diff --git a/build/PixiBuild.xml b/build/PixiBuild.xml
index 49d2624..27d7aa5 100644
--- a/build/PixiBuild.xml
+++ b/build/PixiBuild.xml
@@ -10,11 +10,13 @@
A Class that loads a bunch of images / sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrameId(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId()
+ A Class that loads a bunch of images / sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrame(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId()
When all items have been loaded this class will dispatch a 'loaded' event
As each individual item is loaded this class will dispatch a 'progress' event
+ Events
+
+
+
+
+
pixi/loaders/AssetLoader.js:19
+ pixi/loaders/AssetLoader.js:18
@@ -332,6 +356,98 @@ As each individual item is loaded this class will dispatch a 'progress' event
+ onComplete
Fired when all the assets have loaded
+onProgress
Fired when an item has loaded
+the CanvasRenderer is draws the stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL. +
the CanvasRenderer draws the stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL. Dont forget to add the view to your DOM or you will not see anything :)
pixi/renderers/CanvasRenderer.js:54
+ pixi/renderers/CanvasRenderer.js:53
@@ -341,7 +341,7 @@ Dont forget to add the view to your DOM or you will not see anything :)
- pixi/renderers/CanvasRenderer.js:43
+ pixi/renderers/CanvasRenderer.js:42
diff --git a/docs/classes/DisplayObject.html b/docs/classes/DisplayObject.html
index 19c83bd..2474970 100644
--- a/docs/classes/DisplayObject.html
+++ b/docs/classes/DisplayObject.html
@@ -2,7 +2,7 @@
- addChild
DisplayObject
+
+ Adds a child to the container.
+DisplayObject
+ DisplayObject
+
+
+
+
+ addChildAt
DisplayObject
+
+ index
+
+ Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown
+DisplayObject
+ DisplayObject
+
+
+
+
+ index
+ Number
+
+
+
+
+ gotoAndPlay
pixi/MovieClip.js:79
+ pixi/MovieClip.js:80
@@ -462,7 +774,7 @@
- pixi/MovieClip.js:66
+ pixi/MovieClip.js:67
@@ -539,7 +851,7 @@
- pixi/MovieClip.js:57
+ pixi/MovieClip.js:58
@@ -558,6 +870,174 @@
+removeChild
DisplayObject
+
+ Removes a child from the container.
+DisplayObject
+ DisplayObject
+
+
+
+
+ setTexture
texture
+
+ texture
+ Texture
+
+
+
+
+ The PIXI texture that is displayed by the sprite
+pixi/MovieClip.js:48
+ pixi/MovieClip.js:49
@@ -623,6 +1103,91 @@
alpha
The opacity of the object.
+anchor
The anchor sets the origin point of the texture. +The default is 0,0 this means the textures origin is the top left +Setting than anchor to 0.5,0.5 means the textures origin is centered +Setting the anchor to 1,1 would mean the textures origin points will be the bottom right
+animationSpeed
pixi/MovieClip.js:29
+ pixi/MovieClip.js:30
@@ -664,6 +1229,89 @@
+blendMode
The blend mode of sprite. +currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN
+children
[read-only] The of children of this container.
+pixi/MovieClip.js:22
+ pixi/MovieClip.js:23
@@ -708,6 +1356,88 @@
+height
The height of the sprite (this is initially set by the texture)
+parent
[read-only] The display object container that contains this display object.
+pixi/MovieClip.js:36
+ pixi/MovieClip.js:37
@@ -752,6 +1482,211 @@
+position
The coordinate of the object relative to the local coordinates of the parent.
+rotation
The rotation of the object in radians.
+stage
[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.
+pixi/MovieClip.js:15
+ pixi/MovieClip.js:16
@@ -796,6 +1731,88 @@
+visible
The visibility of the object.
+width
The width of the sprite (this is initially set by the texture)
+Stage
backgroundColor
+
+ backgroundColor
+ Number
+
+
+
+
+ the background color of the stage
+__addChild
__removeChild
addChild
setBackgroundColor
backgroundColor
+
+ backgroundColor
+ Number
+
+
+
+
pixi/Stage.js:26
+ pixi/Stage.js:30
diff --git a/docs/classes/Texture.html b/docs/classes/Texture.html
index 0dc539e..54b4031 100644
--- a/docs/classes/Texture.html
+++ b/docs/classes/Texture.html
@@ -2,7 +2,7 @@
- fromFrameId
fromFrame
WebGLRenderer
width
+
+ height
+
+ width
+ Number
+
+
+
+
+ the width of the canvas view
+height
+ Number
+
+
+
+
+ the height of the canvas view
+pixi/renderers/WebGLRenderer.js:156
+ pixi/renderers/WebGLRenderer.js:157
@@ -327,7 +438,7 @@ Dont forget to add the view to your DOM or you will not see anything :)
- pixi/renderers/WebGLRenderer.js:525
+ pixi/renderers/WebGLRenderer.js:526
diff --git a/docs/data.json b/docs/data.json
index 0c986fb..267288f 100644
--- a/docs/data.json
+++ b/docs/data.json
@@ -1,9 +1,10 @@
{
"project": {
- "name": "The Foo API",
+ "name": "Pixi.js API",
+ "logo": "../logo_small.png",
"description": "The Foo API: a library for doing X, Y, and Z",
- "version": "1.2.1",
- "url": "http://example.com/"
+ "version": "0.9",
+ "url": "http://goodboydigital.com/"
},
"files": {
"pixi/extras/Rope.js": {
@@ -223,7 +224,7 @@
"module": "PIXI",
"file": "pixi/loaders/AssetLoader.js",
"line": 5,
- "description": "A Class that loads a bunch of images / sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrameId(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId()\nWhen all items have been loaded this class will dispatch a 'loaded' event\nAs each individual item is loaded this class will dispatch a 'progress' event",
+ "description": "A Class that loads a bunch of images / sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrame(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId()\nWhen all items have been loaded this class will dispatch a 'loaded' event\nAs each individual item is loaded this class will dispatch a 'progress' event",
"is_constructor": 1,
"extends": "EventTarget",
"params": [
@@ -267,7 +268,7 @@
"module": "PIXI",
"file": "pixi/renderers/CanvasRenderer.js",
"line": 5,
- "description": "the CanvasRenderer is draws the stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.\nDont forget to add the view to your DOM or you will not see anything :)",
+ "description": "the CanvasRenderer draws the stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.\nDont forget to add the view to your DOM or you will not see anything :)",
"params": [
{
"name": "width",
@@ -316,6 +317,7 @@
"file": "pixi/renderers/WebGLRenderer.js",
"line": 7,
"description": "the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. So no need for Sprite Batch's or Sprite Cloud's\nDont forget to add the view to your DOM or you will not see anything :)",
+ "is_constructor": 1,
"params": [
{
"name": "width",
@@ -420,6 +422,7 @@
"file": "pixi/MovieClip.js",
"line": 5,
"description": "A MovieClip is a simple way to display an animation depicted by a list of textures.",
+ "extends": "Sprite",
"is_constructor": 1,
"params": [
{
@@ -530,7 +533,14 @@
"line": 5,
"description": "A Stage represents the root of the display tree. Everything connected to the stage is rendered",
"extends": "DisplayObjectContainer",
- "is_constructor": 1
+ "is_constructor": 1,
+ "params": [
+ {
+ "name": "backgroundColor",
+ "description": "the background color of the stage",
+ "type": "Number"
+ }
+ ]
}
},
"classitems": [
@@ -549,12 +559,12 @@
{
"file": "pixi/loaders/AssetLoader.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "AssetLoader"
},
{
"file": "pixi/loaders/AssetLoader.js",
- "line": 19,
+ "line": 18,
"description": "The array of asset URLs that are going to be loaded",
"itemtype": "property",
"name": "assetURLs",
@@ -563,14 +573,30 @@
},
{
"file": "pixi/loaders/AssetLoader.js",
- "line": 32,
+ "line": 28,
+ "description": "Fired when an item has loaded",
+ "itemtype": "event",
+ "name": "onProgress",
+ "class": "AssetLoader"
+ },
+ {
+ "file": "pixi/loaders/AssetLoader.js",
+ "line": 33,
+ "description": "Fired when all the assets have loaded",
+ "itemtype": "event",
+ "name": "onComplete",
+ "class": "AssetLoader"
+ },
+ {
+ "file": "pixi/loaders/AssetLoader.js",
+ "line": 41,
"description": "This will begin loading the assets sequentially",
"class": "AssetLoader"
},
{
"file": "pixi/loaders/SpriteSheetLoader.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "SpriteSheetLoader"
},
{
@@ -582,7 +608,7 @@
{
"file": "pixi/renderers/CanvasRenderer.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "CanvasRenderer"
},
{
@@ -616,7 +642,7 @@
},
{
"file": "pixi/renderers/CanvasRenderer.js",
- "line": 43,
+ "line": 42,
"description": "The canvas context that the everything is drawn to",
"itemtype": "property",
"name": "context",
@@ -625,7 +651,7 @@
},
{
"file": "pixi/renderers/CanvasRenderer.js",
- "line": 54,
+ "line": 53,
"description": "Renders the stage to its canvas view",
"itemtype": "method",
"name": "render",
@@ -640,7 +666,7 @@
},
{
"file": "pixi/renderers/CanvasRenderer.js",
- "line": 78,
+ "line": 81,
"description": "resizes the canvas view to the specified width and height",
"params": [
{
@@ -656,21 +682,21 @@
},
{
"file": "pixi/renderers/CanvasRenderer.js",
- "line": 92,
+ "line": 95,
"access": "private",
"tagname": "",
"class": "CanvasRenderer"
},
{
"file": "pixi/renderers/CanvasRenderer.js",
- "line": 162,
+ "line": 165,
"access": "private",
"tagname": "",
"class": "CanvasRenderer"
},
{
"file": "pixi/renderers/CanvasRenderer.js",
- "line": 197,
+ "line": 200,
"access": "private",
"tagname": "",
"class": "CanvasRenderer"
@@ -678,7 +704,7 @@
{
"file": "pixi/renderers/WebGLBatch.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "WebGLBatch"
},
{
@@ -846,26 +872,26 @@
{
"file": "pixi/renderers/WebGLRenderer.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "WebGLRenderer"
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 63,
+ "line": 64,
"access": "private",
"tagname": "",
"class": "WebGLRenderer"
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 102,
+ "line": 103,
"access": "private",
"tagname": "",
"class": "WebGLRenderer"
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 156,
+ "line": 157,
"description": "Renders the stage to its webGL view",
"itemtype": "method",
"name": "render",
@@ -880,28 +906,28 @@
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 222,
+ "line": 223,
"access": "private",
"tagname": "",
"class": "WebGLRenderer"
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 251,
+ "line": 252,
"access": "private",
"tagname": "",
"class": "WebGLRenderer"
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 447,
+ "line": 448,
"access": "private",
"tagname": "",
"class": "WebGLRenderer"
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 525,
+ "line": 526,
"description": "resizes the webGL view to the specified width and height",
"itemtype": "method",
"name": "resize",
@@ -921,28 +947,28 @@
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 546,
+ "line": 547,
"access": "private",
"tagname": "",
"class": "WebGLRenderer"
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 574,
+ "line": 575,
"access": "private",
"tagname": "",
"class": "WebGLRenderer"
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 652,
+ "line": 653,
"access": "private",
"tagname": "",
"class": "WebGLRenderer"
},
{
"file": "pixi/renderers/WebGLRenderer.js",
- "line": 661,
+ "line": 662,
"access": "private",
"tagname": "",
"class": "WebGLRenderer"
@@ -950,13 +976,13 @@
{
"file": "pixi/renderers/WebGLShaders.js",
"line": 2,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "BaseTexture"
},
{
"file": "pixi/textures/BaseTexture.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "BaseTexture"
},
{
@@ -998,7 +1024,7 @@
{
"file": "pixi/textures/Texture.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "Texture"
},
{
@@ -1058,7 +1084,7 @@
"line": 112,
"description": "Helper function that returns a texture based on a frame id\n If the frame id is not in the texture cache an error will be thrown",
"itemtype": "method",
- "name": "fromFrameId",
+ "name": "fromFrame",
"params": [
{
"name": "frameId",
@@ -1109,7 +1135,7 @@
{
"file": "pixi/utils/Detector.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "DisplayObject"
},
{
@@ -1148,7 +1174,7 @@
{
"file": "pixi/DisplayObject.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "DisplayObject"
},
{
@@ -1224,7 +1250,7 @@
{
"file": "pixi/DisplayObjectContainer.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "DisplayObjectContainer"
},
{
@@ -1296,12 +1322,12 @@
{
"file": "pixi/MovieClip.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "MovieClip"
},
{
"file": "pixi/MovieClip.js",
- "line": 15,
+ "line": 16,
"description": "The array of textures that make up the animation",
"itemtype": "property",
"name": "textures",
@@ -1310,7 +1336,7 @@
},
{
"file": "pixi/MovieClip.js",
- "line": 22,
+ "line": 23,
"description": "[read only] The index MovieClips current frame (this may not have to be a whole number)",
"itemtype": "property",
"name": "currentFrame",
@@ -1319,7 +1345,7 @@
},
{
"file": "pixi/MovieClip.js",
- "line": 29,
+ "line": 30,
"description": "The speed that the MovieClip will play at. Higher is faster, lower is slower",
"itemtype": "property",
"name": "animationSpeed",
@@ -1328,7 +1354,7 @@
},
{
"file": "pixi/MovieClip.js",
- "line": 36,
+ "line": 37,
"description": "[read only] indicates if the MovieClip is currently playing",
"itemtype": "property",
"name": "playing",
@@ -1337,7 +1363,7 @@
},
{
"file": "pixi/MovieClip.js",
- "line": 48,
+ "line": 49,
"description": "Stops the MovieClip",
"itemtype": "method",
"name": "stop",
@@ -1345,7 +1371,7 @@
},
{
"file": "pixi/MovieClip.js",
- "line": 57,
+ "line": 58,
"description": "Plays the MovieClip",
"itemtype": "method",
"name": "play",
@@ -1353,7 +1379,7 @@
},
{
"file": "pixi/MovieClip.js",
- "line": 66,
+ "line": 67,
"description": "Stops the MovieClip and goes to a specific frame",
"itemtype": "method",
"name": "gotoAndStop",
@@ -1368,7 +1394,7 @@
},
{
"file": "pixi/MovieClip.js",
- "line": 79,
+ "line": 80,
"description": "Goes to a specific frame and begins playing the MovieClip",
"itemtype": "method",
"name": "gotoAndPlay",
@@ -1384,13 +1410,13 @@
{
"file": "pixi/Pixi.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "Point"
},
{
"file": "pixi/Point.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "Point",
"module": "PIXI"
},
@@ -1486,7 +1512,7 @@
{
"file": "pixi/Sprite.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "Sprite",
"module": "PIXI"
},
@@ -1607,15 +1633,16 @@
{
"file": "pixi/Stage.js",
"line": 1,
- "author": "Mat Groves http://matgroves.com/",
+ "author": "Mat Groves http://matgroves.com/ @Doormat23",
"class": "Stage",
"module": "PIXI"
},
{
"file": "pixi/Stage.js",
- "line": 26,
+ "line": 30,
"itemtype": "method",
"name": "updateTransform",
+ "internal": "",
"class": "Stage",
"module": "PIXI"
},
@@ -1623,15 +1650,14 @@
"file": "pixi/Stage.js",
"line": 44,
"itemtype": "method",
- "name": "__addChild",
- "class": "Stage",
- "module": "PIXI"
- },
- {
- "file": "pixi/Stage.js",
- "line": 63,
- "itemtype": "method",
- "name": "__removeChild",
+ "name": "setBackgroundColor",
+ "params": [
+ {
+ "name": "backgroundColor",
+ "description": "",
+ "type": "Number"
+ }
+ ],
"class": "Stage",
"module": "PIXI"
}
@@ -1641,6 +1667,10 @@
"message": "unknown tag: methos",
"line": " pixi/renderers/WebGLBatch.js:292"
},
+ {
+ "message": "unknown tag: internal",
+ "line": " pixi/Stage.js:30"
+ },
{
"message": "Missing item type",
"line": " pixi/extras/Rope.js:1"
@@ -1655,7 +1685,7 @@
},
{
"message": "Missing item type\nThis will begin loading the assets sequentially",
- "line": " pixi/loaders/AssetLoader.js:32"
+ "line": " pixi/loaders/AssetLoader.js:41"
},
{
"message": "Missing item type",
@@ -1671,19 +1701,19 @@
},
{
"message": "Missing item type\nresizes the canvas view to the specified width and height",
- "line": " pixi/renderers/CanvasRenderer.js:78"
+ "line": " pixi/renderers/CanvasRenderer.js:81"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/CanvasRenderer.js:92"
+ "line": " pixi/renderers/CanvasRenderer.js:95"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/CanvasRenderer.js:162"
+ "line": " pixi/renderers/CanvasRenderer.js:165"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/CanvasRenderer.js:197"
+ "line": " pixi/renderers/CanvasRenderer.js:200"
},
{
"message": "Missing item type",
@@ -1715,39 +1745,39 @@
},
{
"message": "Missing item type",
- "line": " pixi/renderers/WebGLRenderer.js:63"
+ "line": " pixi/renderers/WebGLRenderer.js:64"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/WebGLRenderer.js:102"
+ "line": " pixi/renderers/WebGLRenderer.js:103"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/WebGLRenderer.js:222"
+ "line": " pixi/renderers/WebGLRenderer.js:223"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/WebGLRenderer.js:251"
+ "line": " pixi/renderers/WebGLRenderer.js:252"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/WebGLRenderer.js:447"
+ "line": " pixi/renderers/WebGLRenderer.js:448"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/WebGLRenderer.js:546"
+ "line": " pixi/renderers/WebGLRenderer.js:547"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/WebGLRenderer.js:574"
+ "line": " pixi/renderers/WebGLRenderer.js:575"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/WebGLRenderer.js:652"
+ "line": " pixi/renderers/WebGLRenderer.js:653"
},
{
"message": "Missing item type",
- "line": " pixi/renderers/WebGLRenderer.js:661"
+ "line": " pixi/renderers/WebGLRenderer.js:662"
},
{
"message": "Missing item type",
diff --git a/docs/files/pixi_DisplayObject.js.html b/docs/files/pixi_DisplayObject.js.html
index 5fccb4a..3314e86 100644
--- a/docs/files/pixi_DisplayObject.js.html
+++ b/docs/files/pixi_DisplayObject.js.html
@@ -2,7 +2,7 @@
- /** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** diff --git a/docs/files/pixi_DisplayObjectContainer.js.html b/docs/files/pixi_DisplayObjectContainer.js.html index 7c8f08e..3ef66ea 100644 --- a/docs/files/pixi_DisplayObjectContainer.js.html +++ b/docs/files/pixi_DisplayObjectContainer.js.html @@ -2,7 +2,7 @@ -pixi/DisplayObjectContainer.js - The Foo API +pixi/DisplayObjectContainer.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ diff --git a/docs/files/pixi_MovieClip.js.html b/docs/files/pixi_MovieClip.js.html index f8e5d34..13c7ad5 100644 --- a/docs/files/pixi_MovieClip.js.html +++ b/docs/files/pixi_MovieClip.js.html @@ -2,7 +2,7 @@ -pixi/MovieClip.js - The Foo API +pixi/MovieClip.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,12 +115,13 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @class MovieClip + * @extends Sprite * @constructor * @param textures {Array} an array of {Texture} objects that make up the animation */ diff --git a/docs/files/pixi_Pixi.js.html b/docs/files/pixi_Pixi.js.html index 1066836..1e312f2 100644 --- a/docs/files/pixi_Pixi.js.html +++ b/docs/files/pixi_Pixi.js.html @@ -2,7 +2,7 @@ -pixi/Pixi.js - The Foo API +pixi/Pixi.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** diff --git a/docs/files/pixi_Point.js.html b/docs/files/pixi_Point.js.html index a0a29b6..6bf960a 100644 --- a/docs/files/pixi_Point.js.html +++ b/docs/files/pixi_Point.js.html @@ -2,7 +2,7 @@ -pixi/Point.js - The Foo API +pixi/Point.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** diff --git a/docs/files/pixi_Rectangle.js.html b/docs/files/pixi_Rectangle.js.html index b0410f1..faeb2ca 100644 --- a/docs/files/pixi_Rectangle.js.html +++ b/docs/files/pixi_Rectangle.js.html @@ -2,7 +2,7 @@ -pixi/Rectangle.js - The Foo API +pixi/Rectangle.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9diff --git a/docs/files/pixi_Sprite.js.html b/docs/files/pixi_Sprite.js.html index 6b559dd..1deaa9a 100644 --- a/docs/files/pixi_Sprite.js.html +++ b/docs/files/pixi_Sprite.js.html @@ -2,7 +2,7 @@ -pixi/Sprite.js - The Foo API +pixi/Sprite.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ PIXI.blendModes = {}; diff --git a/docs/files/pixi_Stage.js.html b/docs/files/pixi_Stage.js.html index 167fa76..d127230 100644 --- a/docs/files/pixi_Stage.js.html +++ b/docs/files/pixi_Stage.js.html @@ -2,7 +2,7 @@ -pixi/Stage.js - The Foo API +pixi/Stage.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** @@ -123,15 +123,19 @@ A Stage represents the root of the display tree. Everything connected to the sta @class Stage @extends DisplayObjectContainer @constructor +@param backgroundColor {Number} the background color of the stage */ -PIXI.Stage = function() +PIXI.Stage = function(backgroundColor) { + PIXI.DisplayObjectContainer.call( this ); this.worldTransform = mat3.identity(); this.__childrenAdded = []; this.__childrenRemoved = []; this.childIndex = 0; this.stage= this; + + this.setBackgroundColor(backgroundColor); } // constructor @@ -141,6 +145,7 @@ PIXI.Stage.prototype = Object.create( PIXI.DisplayObjectContainer.prototype ); /** @method updateTransform +@internal */ PIXI.Stage.prototype.updateTransform = function() { @@ -151,15 +156,18 @@ PIXI.Stage.prototype.updateTransform = function() this.children[i].updateTransform(); } } -/* -PIXI.Stage.prototype.setFilter = function(filters) -{ - this.filters = filters; -}*/ /** -@method __addChild -*/ + * @method setBackgroundColor + * @param backgroundColor {Number} + */ +PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor) +{ + this.backgroundColor = backgroundColor ? backgroundColor : 0x000000; + this.backgroundColorSplit = HEXtoRGB(this.backgroundColor); + this.backgroundColorString = "#" + this.backgroundColor.toString(16); +} + PIXI.Stage.prototype.__addChild = function(child) { //this.__childrenAdded.push(child); @@ -176,9 +184,7 @@ PIXI.Stage.prototype.__addChild = function(child) } -/** -@method __removeChild -*/ + PIXI.Stage.prototype.__removeChild = function(child) { this.__childrenRemoved.push(child); diff --git a/docs/files/pixi_extras_Rope.js.html b/docs/files/pixi_extras_Rope.js.html index 4e05fd4..f0ff723 100644 --- a/docs/files/pixi_extras_Rope.js.html +++ b/docs/files/pixi_extras_Rope.js.html @@ -2,7 +2,7 @@ -pixi/extras/Rope.js - The Foo API +pixi/extras/Rope.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9diff --git a/docs/files/pixi_extras_Strip.js.html b/docs/files/pixi_extras_Strip.js.html index 1a9c9c9..85c1c58 100644 --- a/docs/files/pixi_extras_Strip.js.html +++ b/docs/files/pixi_extras_Strip.js.html @@ -2,7 +2,7 @@ -pixi/extras/Strip.js - The Foo API +pixi/extras/Strip.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9diff --git a/docs/files/pixi_loaders_AssetLoader.js.html b/docs/files/pixi_loaders_AssetLoader.js.html index fc38827..7cb38fe 100644 --- a/docs/files/pixi_loaders_AssetLoader.js.html +++ b/docs/files/pixi_loaders_AssetLoader.js.html @@ -2,7 +2,7 @@ -pixi/loaders/AssetLoader.js - The Foo API +pixi/loaders/AssetLoader.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,11 +115,11 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** - * A Class that loads a bunch of images / sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrameId(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId() + * A Class that loads a bunch of images / sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrame(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId() * When all items have been loaded this class will dispatch a 'loaded' event * As each individual item is loaded this class will dispatch a 'progress' event * @class AssetLoader @@ -131,7 +131,6 @@ PIXI.AssetLoader = function(assetURLs) { PIXI.EventTarget.call( this ); - /** * The array of asset URLs that are going to be loaded * @property assetURLs @@ -142,6 +141,16 @@ PIXI.AssetLoader = function(assetURLs) this.assets = []; } +/** +Fired when an item has loaded +@event onProgress +**/ + +/** +Fired when all the assets have loaded +@event onComplete +**/ + // constructor PIXI.AssetLoader.constructor = PIXI.AssetLoader; @@ -160,7 +169,7 @@ PIXI.AssetLoader.prototype.load = function() var filename = this.assetURLs[i]; var fileType = filename.split('.').pop().toLowerCase(); // what are we loading? - var type; + var type = null; for (var j=0; j < imageTypes.length; j++) { @@ -171,7 +180,7 @@ PIXI.AssetLoader.prototype.load = function() } } - if(!type) + if(type != "img") { for (var j=0; j < spriteSheetTypes.length; j++) { @@ -185,6 +194,7 @@ PIXI.AssetLoader.prototype.load = function() if(type == "img") { + var texture = PIXI.Texture.fromImage(filename); if(!texture.hasLoaded) { @@ -232,11 +242,13 @@ PIXI.AssetLoader.prototype.load = function() PIXI.AssetLoader.prototype.onAssetLoaded = function() { this.loadCount--; - this.dispatchEvent( { type: 'progress', content: this } ); + this.dispatchEvent( { type: 'onProgress', content: this } ); + if(this.onProgress)this.onProgress(); if(this.loadCount == 0) { - this.dispatchEvent( { type: 'loaded', content: this } ); + this.dispatchEvent( { type: 'onComplete', content: this } ); + if(this.onComplete)this.onComplete(); } } diff --git a/docs/files/pixi_loaders_SpriteSheetLoader.js.html b/docs/files/pixi_loaders_SpriteSheetLoader.js.html index da4a0ea..96fab87 100644 --- a/docs/files/pixi_loaders_SpriteSheetLoader.js.html +++ b/docs/files/pixi_loaders_SpriteSheetLoader.js.html @@ -2,7 +2,7 @@ -pixi/loaders/SpriteSheetLoader.js - The Foo API +pixi/loaders/SpriteSheetLoader.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** diff --git a/docs/files/pixi_renderers_CanvasRenderer.js.html b/docs/files/pixi_renderers_CanvasRenderer.js.html index 8c2889a..0c2c440 100644 --- a/docs/files/pixi_renderers_CanvasRenderer.js.html +++ b/docs/files/pixi_renderers_CanvasRenderer.js.html @@ -2,7 +2,7 @@ -pixi/renderers/CanvasRenderer.js - The Foo API +pixi/renderers/CanvasRenderer.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,11 +115,11 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** - * the CanvasRenderer is draws the stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL. + * the CanvasRenderer draws the stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL. * Dont forget to add the view to your DOM or you will not see anything :) * @class CanvasRenderer * @param width {Number} the width of the canvas view @@ -153,7 +153,6 @@ PIXI.CanvasRenderer = function(width, height) this.view.width = this.width; this.view.height = this.height; - this.view.background = "#FF0000"; this.count = 0; /** @@ -187,6 +186,10 @@ PIXI.CanvasRenderer.prototype.render = function(stage) stage.updateTransform(); this.context.setTransform(1,0,0,1,0,0); + + // update the background color + if(this.view.style.backgroundColor!=stage.backgroundColorString)this.view.style.backgroundColor = stage.backgroundColorString; + this.context.clearRect(0, 0, this.width, this.height) this.renderDisplayObject(stage); } diff --git a/docs/files/pixi_renderers_WebGLBatch.js.html b/docs/files/pixi_renderers_WebGLBatch.js.html index 92ea7ac..6070a40 100644 --- a/docs/files/pixi_renderers_WebGLBatch.js.html +++ b/docs/files/pixi_renderers_WebGLBatch.js.html @@ -2,7 +2,7 @@ -pixi/renderers/WebGLBatch.js - The Foo API +pixi/renderers/WebGLBatch.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ PIXI._batchs = []; diff --git a/docs/files/pixi_renderers_WebGLRenderer.js.html b/docs/files/pixi_renderers_WebGLRenderer.js.html index 6a965c4..4938b42 100644 --- a/docs/files/pixi_renderers_WebGLRenderer.js.html +++ b/docs/files/pixi_renderers_WebGLRenderer.js.html @@ -2,7 +2,7 @@ -pixi/renderers/WebGLRenderer.js - The Foo API +pixi/renderers/WebGLRenderer.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ PIXI._defaultFrame = new PIXI.Rectangle(0,0,1,1); @@ -124,6 +124,7 @@ PIXI._defaultFrame = new PIXI.Rectangle(0,0,1,1); * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @class WebGLRenderer + * @constructor * @param width {Number} the width of the canvas view * @default 0 * @param height {Number} the height of the canvas view @@ -310,7 +311,7 @@ PIXI.WebGLRenderer.prototype.render = function(stage) gl.clear(gl.COLOR_BUFFER_BIT) - gl.clearColor(0, 0, 0, 1.0); + gl.clearColor(stage.backgroundColorSplit[0], stage.backgroundColorSplit[1], stage.backgroundColorSplit[2], 1.0); // set the correct blend mode! gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); @@ -618,7 +619,7 @@ PIXI.WebGLRenderer.prototype.removeDisplayObject = function(displayObject) if(this.batchs[index-1] instanceof PIXI.WebGLBatch && this.batchs[index+1] instanceof PIXI.WebGLBatch) { - if(this.batchs[index-1].texture == this.batchs[index+1].texture) + if(this.batchs[index-1].texture == this.batchs[index+1].texture && this.batchs[index-1].blendMode == this.batchs[index+1].blendMode) { //console.log("MERGE") this.batchs[index-1].merge(this.batchs[index+1]); diff --git a/docs/files/pixi_renderers_WebGLShaders.js.html b/docs/files/pixi_renderers_WebGLShaders.js.html index de4fdff..5ab65ec 100644 --- a/docs/files/pixi_renderers_WebGLShaders.js.html +++ b/docs/files/pixi_renderers_WebGLShaders.js.html @@ -2,7 +2,7 @@ -pixi/renderers/WebGLShaders.js - The Foo API +pixi/renderers/WebGLShaders.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -116,7 +116,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ PIXI.shaderFragmentSrc = [ "precision mediump float;", diff --git a/docs/files/pixi_textures_BaseTexture.js.html b/docs/files/pixi_textures_BaseTexture.js.html index 777e388..6604f24 100644 --- a/docs/files/pixi_textures_BaseTexture.js.html +++ b/docs/files/pixi_textures_BaseTexture.js.html @@ -2,7 +2,7 @@ -pixi/textures/BaseTexture.js - The Foo API +pixi/textures/BaseTexture.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ PIXI.BaseTextureCache = {}; @@ -158,7 +158,7 @@ PIXI.BaseTexture = function(imageUrl) scope.dispatchEvent( { type: 'loaded', content: scope } ); } - $.proxy(this.onImageLoaded, this); + //$.proxy(this.onImageLoaded, this); this.image.src = imageUrl; /** diff --git a/docs/files/pixi_textures_Texture.js.html b/docs/files/pixi_textures_Texture.js.html index a8ebe42..f3c350f 100644 --- a/docs/files/pixi_textures_Texture.js.html +++ b/docs/files/pixi_textures_Texture.js.html @@ -2,7 +2,7 @@ -pixi/textures/Texture.js - The Foo API +pixi/textures/Texture.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ PIXI.TextureCache = {}; @@ -229,11 +229,11 @@ PIXI.Texture.fromImage = function(imageUrl) * * Helper function that returns a texture based on a frame id * If the frame id is not in the texture cache an error will be thrown - * @method fromFrameId + * @method fromFrame * @param frameId {String} The frame id of the texture * @return Texture */ -PIXI.Texture.fromFrameId = function(frameId) +PIXI.Texture.fromFrame = function(frameId) { var texture = PIXI.TextureCache[frameId]; if(!texture)throw new Error("The frameId '"+ frameId +"' does not exist in the texture cache " + this); diff --git a/docs/files/pixi_utils_Detector.js.html b/docs/files/pixi_utils_Detector.js.html index 2c1f3f3..d3f3a54 100644 --- a/docs/files/pixi_utils_Detector.js.html +++ b/docs/files/pixi_utils_Detector.js.html @@ -2,7 +2,7 @@ -pixi/utils/Detector.js - The Foo API +pixi/utils/Detector.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -115,7 +115,7 @@/** - * @author Mat Groves http://matgroves.com/ + * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** diff --git a/docs/files/pixi_utils_EventTarget.js.html b/docs/files/pixi_utils_EventTarget.js.html index e9025f8..3585a93 100644 --- a/docs/files/pixi_utils_EventTarget.js.html +++ b/docs/files/pixi_utils_EventTarget.js.html @@ -2,7 +2,7 @@ -pixi/utils/EventTarget.js - The Foo API +pixi/utils/EventTarget.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9diff --git a/docs/files/pixi_utils_Utils.js.html b/docs/files/pixi_utils_Utils.js.html index 5deab64..8a885e8 100644 --- a/docs/files/pixi_utils_Utils.js.html +++ b/docs/files/pixi_utils_Utils.js.html @@ -2,7 +2,7 @@ -pixi/utils/Utils.js - The Foo API +pixi/utils/Utils.js - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9@@ -128,6 +128,10 @@ window.requestAnimFrame = (function() { }; })(); +function HEXtoRGB(hex) { + return [(hex >> 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255]; +} + var AjaxRequest = function() { var activexmodes = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"] //activeX versions to check for in IE diff --git a/docs/index.html b/docs/index.html index 0041fd4..e2ac3f0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,7 +2,7 @@ -The Foo API +Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9diff --git a/docs/logo_small.png b/docs/logo_small.png new file mode 100644 index 0000000..f7c1f4f Binary files /dev/null and b/docs/logo_small.png differ diff --git a/docs/modules/PIXI.html b/docs/modules/PIXI.html index fafb8ea..3bdd35a 100644 --- a/docs/modules/PIXI.html +++ b/docs/modules/PIXI.html @@ -2,7 +2,7 @@ -PIXI - The Foo API +PIXI - Pixi.js API @@ -15,11 +15,11 @@-+
- API Docs for: 1.2.1 + API Docs for: 0.9diff --git a/examples/example 1/bunny.png b/examples/example 1/bunny.png new file mode 100644 index 0000000..79c3167 Binary files /dev/null and b/examples/example 1/bunny.png differ diff --git a/examples/example 1/index.html b/examples/example 1/index.html new file mode 100644 index 0000000..b0e7c03 --- /dev/null +++ b/examples/example 1/index.html @@ -0,0 +1,57 @@ + + + +pixi.js example 1 + + + + + + + + diff --git a/examples/example 1/pixi.js b/examples/example 1/pixi.js new file mode 100644 index 0000000..dd58212 --- /dev/null +++ b/examples/example 1/pixi.js @@ -0,0 +1,111 @@ +var PIXI=PIXI||{};PIXI.Point=function(b,c){this.x=b?b:0;this.y=c?c:0};PIXI.Point.clone=function(){return new PIXI.Point(this.x,this.y)};PIXI.Point.constructor=PIXI.Point;PIXI.Rectangle=function(b,c,f,e){this.x=b?b:0;this.y=c?c:0;this.width=f?f:0;this.height=e?e:0};PIXI.Point.clone=function(){return new PIXI.Rectangle(this.x,this.y,this.width,this.height)};PIXI.Rectangle.constructor=PIXI.Rectangle;window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(b){window.setTimeout(b,1E3/60)}}();function HEXtoRGB(b){return[(b>>16&255)/255,(b>>8&255)/255,(b&255)/255]} +var AjaxRequest=function(){var b=["Msxml2.XMLHTTP","Microsoft.XMLHTTP"];if(window.ActiveXObject)for(var c=0;c>1);var d=g[0];return d*(1.5-0.5*a*d*d)}}else e.invsqrt=function(a){return 1/Math.sqrt(a)}; +var k=null;f();var n={create:function(a){var d=new k(3);a?(d[0]=a[0],d[1]=a[1],d[2]=a[2]):d[0]=d[1]=d[2]=0;return d},createFrom:function(a,d,l){var b=new k(3);b[0]=a;b[1]=d;b[2]=l;return b},set:function(a,d){d[0]=a[0];d[1]=a[1];d[2]=a[2];return d},equal:function(a,d){return a===d||1E-6>Math.abs(a[0]-d[0])&&1E-6>Math.abs(a[1]-d[1])&&1E-6>Math.abs(a[2]-d[2])},add:function(a,d,l){if(!l||a===l)return a[0]+=d[0],a[1]+=d[1],a[2]+=d[2],a;l[0]=a[0]+d[0];l[1]=a[1]+d[1];l[2]=a[2]+d[2];return l},subtract:function(a, +d,l){if(!l||a===l)return a[0]-=d[0],a[1]-=d[1],a[2]-=d[2],a;l[0]=a[0]-d[0];l[1]=a[1]-d[1];l[2]=a[2]-d[2];return l},multiply:function(a,d,l){if(!l||a===l)return a[0]*=d[0],a[1]*=d[1],a[2]*=d[2],a;l[0]=a[0]*d[0];l[1]=a[1]*d[1];l[2]=a[2]*d[2];return l},negate:function(a,d){d||(d=a);d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];return d},scale:function(a,d,l){if(!l||a===l)return a[0]*=d,a[1]*=d,a[2]*=d,a;l[0]=a[0]*d;l[1]=a[1]*d;l[2]=a[2]*d;return l},normalize:function(a,d){d||(d=a);var l=a[0],b=a[1],c=a[2],e=Math.sqrt(l* +l+b*b+c*c);if(!e)return d[0]=0,d[1]=0,d[2]=0,d;if(1===e)return d[0]=l,d[1]=b,d[2]=c,d;e=1/e;d[0]=l*e;d[1]=b*e;d[2]=c*e;return d},cross:function(a,d,l){l||(l=a);var b=a[0],c=a[1];a=a[2];var e=d[0],h=d[1];d=d[2];l[0]=c*d-a*h;l[1]=a*e-b*d;l[2]=b*h-c*e;return l},length:function(a){var d=a[0],l=a[1];a=a[2];return Math.sqrt(d*d+l*l+a*a)},squaredLength:function(a){var d=a[0],l=a[1];a=a[2];return d*d+l*l+a*a},dot:function(a,d){return a[0]*d[0]+a[1]*d[1]+a[2]*d[2]},direction:function(a,d,l){l||(l=a);var b= +a[0]-d[0],c=a[1]-d[1];a=a[2]-d[2];d=Math.sqrt(b*b+c*c+a*a);if(!d)return l[0]=0,l[1]=0,l[2]=0,l;d=1/d;l[0]=b*d;l[1]=c*d;l[2]=a*d;return l},lerp:function(a,d,l,b){b||(b=a);b[0]=a[0]+l*(d[0]-a[0]);b[1]=a[1]+l*(d[1]-a[1]);b[2]=a[2]+l*(d[2]-a[2]);return b},dist:function(a,d){var l=d[0]-a[0],b=d[1]-a[1],c=d[2]-a[2];return Math.sqrt(l*l+b*b+c*c)}},p=null,q=new k(4);n.unproject=function(a,d,l,b,c){c||(c=a);p||(p=u.create());var e=p;q[0]=2*(a[0]-b[0])/b[2]-1;q[1]=2*(a[1]-b[1])/b[3]-1;q[2]=2*a[2]-1;q[3]=1; +u.multiply(l,d,e);if(!u.inverse(e))return null;u.multiplyVec4(e,q);if(0===q[3])return null;c[0]=q[0]/q[3];c[1]=q[1]/q[3];c[2]=q[2]/q[3];return c};var C=n.createFrom(1,0,0),E=n.createFrom(0,1,0),t=n.createFrom(0,0,1),x=n.create();n.rotationTo=function(a,d,l){l||(l=m.create());var b=n.dot(a,d);if(1<=b)m.set(F,l);else if(-0.999999>b)n.cross(C,a,x),1E-6>n.length(x)&&n.cross(E,a,x),1E-6>n.length(x)&&n.cross(t,a,x),n.normalize(x),m.fromAngleAxis(Math.PI,x,l);else{var b=Math.sqrt(2*(1+b)),c=1/b;n.cross(a, +d,x);l[0]=x[0]*c;l[1]=x[1]*c;l[2]=x[2]*c;l[3]=0.5*b;m.normalize(l)}1 l[3]&&(l[3]=-1);return l};n.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+"]"};var y={create:function(a){var d=new k(9);a?(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3],d[4]=a[4],d[5]=a[5],d[6]=a[6],d[7]=a[7],d[8]=a[8]):d[0]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=0;return d},createFrom:function(a,d,l,b,c,e,h,f,D){var s=new k(9);s[0]=a;s[1]=d;s[2]=l;s[3]=b;s[4]=c;s[5]=e;s[6]=h;s[7]=f;s[8]=D;return s},determinant:function(a){var d= +a[3],l=a[4],b=a[5],c=a[6],e=a[7],h=a[8];return a[0]*(h*l-b*e)+a[1]*(-h*d+b*c)+a[2]*(e*d-l*c)},inverse:function(a,d){var l=a[0],b=a[1],c=a[2],e=a[3],h=a[4],f=a[5],D=a[6],s=a[7],g=a[8],j=g*h-f*s,k=-g*e+f*D,m=s*e-h*D,r=l*j+b*k+c*m;if(!r)return null;r=1/r;d||(d=y.create());d[0]=j*r;d[1]=(-g*b+c*s)*r;d[2]=(f*b-c*h)*r;d[3]=k*r;d[4]=(g*l-c*D)*r;d[5]=(-f*l+c*e)*r;d[6]=m*r;d[7]=(-s*l+b*D)*r;d[8]=(h*l-b*e)*r;return d},multiply:function(a,d,l){l||(l=a);var b=a[0],c=a[1],e=a[2],h=a[3],f=a[4],D=a[5],s=a[6],g= +a[7];a=a[8];var j=d[0],k=d[1],m=d[2],r=d[3],n=d[4],v=d[5],q=d[6],w=d[7];d=d[8];l[0]=j*b+k*h+m*s;l[1]=j*c+k*f+m*g;l[2]=j*e+k*D+m*a;l[3]=r*b+n*h+v*s;l[4]=r*c+n*f+v*g;l[5]=r*e+n*D+v*a;l[6]=q*b+w*h+d*s;l[7]=q*c+w*f+d*g;l[8]=q*e+w*D+d*a;return l},multiplyVec2:function(a,d,l){l||(l=d);var b=d[0];d=d[1];l[0]=b*a[0]+d*a[3]+a[6];l[1]=b*a[1]+d*a[4]+a[7];return l},multiplyVec3:function(a,d,l){l||(l=d);var b=d[0],c=d[1];d=d[2];l[0]=b*a[0]+c*a[3]+d*a[6];l[1]=b*a[1]+c*a[4]+d*a[7];l[2]=b*a[2]+c*a[5]+d*a[8];return l}, +set:function(a,d){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];d[4]=a[4];d[5]=a[5];d[6]=a[6];d[7]=a[7];d[8]=a[8];return d},equal:function(a,d){return a===d||1E-6>Math.abs(a[0]-d[0])&&1E-6>Math.abs(a[1]-d[1])&&1E-6>Math.abs(a[2]-d[2])&&1E-6>Math.abs(a[3]-d[3])&&1E-6>Math.abs(a[4]-d[4])&&1E-6>Math.abs(a[5]-d[5])&&1E-6>Math.abs(a[6]-d[6])&&1E-6>Math.abs(a[7]-d[7])&&1E-6>Math.abs(a[8]-d[8])},identity:function(a){a||(a=y.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a},transpose:function(a, +d){if(!d||a===d){var l=a[1],b=a[2],c=a[5];a[1]=a[3];a[2]=a[6];a[3]=l;a[5]=a[7];a[6]=b;a[7]=c;return a}d[0]=a[0];d[1]=a[3];d[2]=a[6];d[3]=a[1];d[4]=a[4];d[5]=a[7];d[6]=a[2];d[7]=a[5];d[8]=a[8];return d},toMat4:function(a,d){d||(d=u.create());d[15]=1;d[14]=0;d[13]=0;d[12]=0;d[11]=0;d[10]=a[8];d[9]=a[7];d[8]=a[6];d[7]=0;d[6]=a[5];d[5]=a[4];d[4]=a[3];d[3]=0;d[2]=a[2];d[1]=a[1];d[0]=a[0];return d},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+ +a[8]+"]"}},u={create:function(a){var d=new k(16);a&&(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3],d[4]=a[4],d[5]=a[5],d[6]=a[6],d[7]=a[7],d[8]=a[8],d[9]=a[9],d[10]=a[10],d[11]=a[11],d[12]=a[12],d[13]=a[13],d[14]=a[14],d[15]=a[15]);return d},createFrom:function(a,d,l,b,c,e,h,f,D,s,g,j,m,n,r,q){var v=new k(16);v[0]=a;v[1]=d;v[2]=l;v[3]=b;v[4]=c;v[5]=e;v[6]=h;v[7]=f;v[8]=D;v[9]=s;v[10]=g;v[11]=j;v[12]=m;v[13]=n;v[14]=r;v[15]=q;return v},set:function(a,d){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];d[4]=a[4]; +d[5]=a[5];d[6]=a[6];d[7]=a[7];d[8]=a[8];d[9]=a[9];d[10]=a[10];d[11]=a[11];d[12]=a[12];d[13]=a[13];d[14]=a[14];d[15]=a[15];return d},equal:function(a,d){return a===d||1E-6>Math.abs(a[0]-d[0])&&1E-6>Math.abs(a[1]-d[1])&&1E-6>Math.abs(a[2]-d[2])&&1E-6>Math.abs(a[3]-d[3])&&1E-6>Math.abs(a[4]-d[4])&&1E-6>Math.abs(a[5]-d[5])&&1E-6>Math.abs(a[6]-d[6])&&1E-6>Math.abs(a[7]-d[7])&&1E-6>Math.abs(a[8]-d[8])&&1E-6>Math.abs(a[9]-d[9])&&1E-6>Math.abs(a[10]-d[10])&&1E-6>Math.abs(a[11]-d[11])&&1E-6>Math.abs(a[12]- +d[12])&&1E-6>Math.abs(a[13]-d[13])&&1E-6>Math.abs(a[14]-d[14])&&1E-6>Math.abs(a[15]-d[15])},identity:function(a){a||(a=u.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},transpose:function(a,d){if(!d||a===d){var l=a[1],b=a[2],c=a[3],e=a[6],h=a[7],f=a[11];a[1]=a[4];a[2]=a[8];a[3]=a[12];a[4]=l;a[6]=a[9];a[7]=a[13];a[8]=b;a[9]=e;a[11]=a[14];a[12]=c;a[13]=h;a[14]=f;return a}d[0]=a[0];d[1]=a[4];d[2]=a[8];d[3]=a[12]; +d[4]=a[1];d[5]=a[5];d[6]=a[9];d[7]=a[13];d[8]=a[2];d[9]=a[6];d[10]=a[10];d[11]=a[14];d[12]=a[3];d[13]=a[7];d[14]=a[11];d[15]=a[15];return d},determinant:function(a){var d=a[0],l=a[1],b=a[2],c=a[3],e=a[4],h=a[5],f=a[6],D=a[7],s=a[8],g=a[9],j=a[10],k=a[11],m=a[12],r=a[13],n=a[14];a=a[15];return m*g*f*c-s*r*f*c-m*h*j*c+e*r*j*c+s*h*n*c-e*g*n*c-m*g*b*D+s*r*b*D+m*l*j*D-d*r*j*D-s*l*n*D+d*g*n*D+m*h*b*k-e*r*b*k-m*l*f*k+d*r*f*k+e*l*n*k-d*h*n*k-s*h*b*a+e*g*b*a+s*l*f*a-d*g*f*a-e*l*j*a+d*h*j*a},inverse:function(a, +d){d||(d=a);var b=a[0],c=a[1],e=a[2],f=a[3],h=a[4],g=a[5],D=a[6],s=a[7],j=a[8],k=a[9],m=a[10],n=a[11],r=a[12],q=a[13],v=a[14],t=a[15],w=b*g-c*h,H=b*D-e*h,z=b*s-f*h,A=c*D-e*g,u=c*s-f*g,p=e*s-f*D,x=j*q-k*r,y=j*v-m*r,B=j*t-n*r,C=k*v-m*q,E=k*t-n*q,F=m*t-n*v,G=w*F-H*E+z*C+A*B-u*y+p*x;if(!G)return null;G=1/G;d[0]=(g*F-D*E+s*C)*G;d[1]=(-c*F+e*E-f*C)*G;d[2]=(q*p-v*u+t*A)*G;d[3]=(-k*p+m*u-n*A)*G;d[4]=(-h*F+D*B-s*y)*G;d[5]=(b*F-e*B+f*y)*G;d[6]=(-r*p+v*z-t*H)*G;d[7]=(j*p-m*z+n*H)*G;d[8]=(h*E-g*B+s*x)*G;d[9]= +(-b*E+c*B-f*x)*G;d[10]=(r*u-q*z+t*w)*G;d[11]=(-j*u+k*z-n*w)*G;d[12]=(-h*C+g*y-D*x)*G;d[13]=(b*C-c*y+e*x)*G;d[14]=(-r*A+q*H-v*w)*G;d[15]=(j*A-k*H+m*w)*G;return d},toRotationMat:function(a,d){d||(d=u.create());d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];d[4]=a[4];d[5]=a[5];d[6]=a[6];d[7]=a[7];d[8]=a[8];d[9]=a[9];d[10]=a[10];d[11]=a[11];d[12]=0;d[13]=0;d[14]=0;d[15]=1;return d},toMat3:function(a,d){d||(d=y.create());d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[4];d[4]=a[5];d[5]=a[6];d[6]=a[8];d[7]=a[9];d[8]=a[10]; +return d},toInverseMat3:function(a,d){var b=a[0],c=a[1],e=a[2],f=a[4],h=a[5],g=a[6],j=a[8],s=a[9],k=a[10],m=k*h-g*s,n=-k*f+g*j,q=s*f-h*j,r=b*m+c*n+e*q;if(!r)return null;r=1/r;d||(d=y.create());d[0]=m*r;d[1]=(-k*c+e*s)*r;d[2]=(g*c-e*h)*r;d[3]=n*r;d[4]=(k*b-e*j)*r;d[5]=(-g*b+e*f)*r;d[6]=q*r;d[7]=(-s*b+c*j)*r;d[8]=(h*b-c*f)*r;return d},multiply:function(a,d,b){b||(b=a);var c=a[0],e=a[1],f=a[2],h=a[3],g=a[4],j=a[5],s=a[6],k=a[7],m=a[8],n=a[9],q=a[10],r=a[11],t=a[12],v=a[13],u=a[14];a=a[15];var w=d[0], +p=d[1],z=d[2],A=d[3];b[0]=w*c+p*g+z*m+A*t;b[1]=w*e+p*j+z*n+A*v;b[2]=w*f+p*s+z*q+A*u;b[3]=w*h+p*k+z*r+A*a;w=d[4];p=d[5];z=d[6];A=d[7];b[4]=w*c+p*g+z*m+A*t;b[5]=w*e+p*j+z*n+A*v;b[6]=w*f+p*s+z*q+A*u;b[7]=w*h+p*k+z*r+A*a;w=d[8];p=d[9];z=d[10];A=d[11];b[8]=w*c+p*g+z*m+A*t;b[9]=w*e+p*j+z*n+A*v;b[10]=w*f+p*s+z*q+A*u;b[11]=w*h+p*k+z*r+A*a;w=d[12];p=d[13];z=d[14];A=d[15];b[12]=w*c+p*g+z*m+A*t;b[13]=w*e+p*j+z*n+A*v;b[14]=w*f+p*s+z*q+A*u;b[15]=w*h+p*k+z*r+A*a;return b},multiplyVec3:function(a,d,b){b||(b=d); +var c=d[0],e=d[1];d=d[2];b[0]=a[0]*c+a[4]*e+a[8]*d+a[12];b[1]=a[1]*c+a[5]*e+a[9]*d+a[13];b[2]=a[2]*c+a[6]*e+a[10]*d+a[14];return b},multiplyVec4:function(a,d,b){b||(b=d);var c=d[0],e=d[1],f=d[2];d=d[3];b[0]=a[0]*c+a[4]*e+a[8]*f+a[12]*d;b[1]=a[1]*c+a[5]*e+a[9]*f+a[13]*d;b[2]=a[2]*c+a[6]*e+a[10]*f+a[14]*d;b[3]=a[3]*c+a[7]*e+a[11]*f+a[15]*d;return b},translate:function(a,d,b){var c=d[0],e=d[1];d=d[2];var f,h,g,j,s,k,m,n,p,r,q,v;if(!b||a===b)return a[12]=a[0]*c+a[4]*e+a[8]*d+a[12],a[13]=a[1]*c+a[5]*e+ +a[9]*d+a[13],a[14]=a[2]*c+a[6]*e+a[10]*d+a[14],a[15]=a[3]*c+a[7]*e+a[11]*d+a[15],a;f=a[0];h=a[1];g=a[2];j=a[3];s=a[4];k=a[5];m=a[6];n=a[7];p=a[8];r=a[9];q=a[10];v=a[11];b[0]=f;b[1]=h;b[2]=g;b[3]=j;b[4]=s;b[5]=k;b[6]=m;b[7]=n;b[8]=p;b[9]=r;b[10]=q;b[11]=v;b[12]=f*c+s*e+p*d+a[12];b[13]=h*c+k*e+r*d+a[13];b[14]=g*c+m*e+q*d+a[14];b[15]=j*c+n*e+v*d+a[15];return b},scale:function(a,d,b){var c=d[0],e=d[1];d=d[2];if(!b||a===b)return a[0]*=c,a[1]*=c,a[2]*=c,a[3]*=c,a[4]*=e,a[5]*=e,a[6]*=e,a[7]*=e,a[8]*=d,a[9]*= +d,a[10]*=d,a[11]*=d,a;b[0]=a[0]*c;b[1]=a[1]*c;b[2]=a[2]*c;b[3]=a[3]*c;b[4]=a[4]*e;b[5]=a[5]*e;b[6]=a[6]*e;b[7]=a[7]*e;b[8]=a[8]*d;b[9]=a[9]*d;b[10]=a[10]*d;b[11]=a[11]*d;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},rotate:function(a,d,b,c){var e=b[0],f=b[1];b=b[2];var h=Math.sqrt(e*e+f*f+b*b),g,j,k,m,n,p,q,r,t,v,u,w,x,z,A,y,B,C,E,F;if(!h)return null;1!==h&&(h=1/h,e*=h,f*=h,b*=h);g=Math.sin(d);j=Math.cos(d);k=1-j;d=a[0];h=a[1];m=a[2];n=a[3];p=a[4];q=a[5];r=a[6];t=a[7];v=a[8];u=a[9];w= +a[10];x=a[11];z=e*e*k+j;A=f*e*k+b*g;y=b*e*k-f*g;B=e*f*k-b*g;C=f*f*k+j;E=b*f*k+e*g;F=e*b*k+f*g;e=f*b*k-e*g;f=b*b*k+j;c?a!==c&&(c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[0]=d*z+p*A+v*y;c[1]=h*z+q*A+u*y;c[2]=m*z+r*A+w*y;c[3]=n*z+t*A+x*y;c[4]=d*B+p*C+v*E;c[5]=h*B+q*C+u*E;c[6]=m*B+r*C+w*E;c[7]=n*B+t*C+x*E;c[8]=d*F+p*e+v*f;c[9]=h*F+q*e+u*f;c[10]=m*F+r*e+w*f;c[11]=n*F+t*e+x*f;return c},rotateX:function(a,d,b){var c=Math.sin(d);d=Math.cos(d);var e=a[4],f=a[5],h=a[6],g=a[7],j=a[8],k=a[9],m=a[10], +n=a[11];b?a!==b&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]):b=a;b[4]=e*d+j*c;b[5]=f*d+k*c;b[6]=h*d+m*c;b[7]=g*d+n*c;b[8]=e*-c+j*d;b[9]=f*-c+k*d;b[10]=h*-c+m*d;b[11]=g*-c+n*d;return b},rotateY:function(a,d,b){var c=Math.sin(d);d=Math.cos(d);var e=a[0],f=a[1],h=a[2],g=a[3],j=a[8],k=a[9],m=a[10],n=a[11];b?a!==b&&(b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]):b=a;b[0]=e*d+j*-c;b[1]=f*d+k*-c;b[2]=h*d+m*-c;b[3]=g* +d+n*-c;b[8]=e*c+j*d;b[9]=f*c+k*d;b[10]=h*c+m*d;b[11]=g*c+n*d;return b},rotateZ:function(a,d,b){var c=Math.sin(d);d=Math.cos(d);var e=a[0],f=a[1],h=a[2],g=a[3],j=a[4],k=a[5],m=a[6],n=a[7];b?a!==b&&(b[8]=a[8],b[9]=a[9],b[10]=a[10],b[11]=a[11],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]):b=a;b[0]=e*d+j*c;b[1]=f*d+k*c;b[2]=h*d+m*c;b[3]=g*d+n*c;b[4]=e*-c+j*d;b[5]=f*-c+k*d;b[6]=h*-c+m*d;b[7]=g*-c+n*d;return b},frustum:function(a,d,b,c,e,f,h){h||(h=u.create());var g=d-a,j=c-b,k=f-e;h[0]=2*e/g;h[1]=0; +h[2]=0;h[3]=0;h[4]=0;h[5]=2*e/j;h[6]=0;h[7]=0;h[8]=(d+a)/g;h[9]=(c+b)/j;h[10]=-(f+e)/k;h[11]=-1;h[12]=0;h[13]=0;h[14]=-(2*f*e)/k;h[15]=0;return h},perspective:function(a,d,b,c,e){a=b*Math.tan(a*Math.PI/360);d*=a;return u.frustum(-d,d,-a,a,b,c,e)},ortho:function(a,d,b,c,e,f,h){h||(h=u.create());var g=d-a,j=c-b,k=f-e;h[0]=2/g;h[1]=0;h[2]=0;h[3]=0;h[4]=0;h[5]=2/j;h[6]=0;h[7]=0;h[8]=0;h[9]=0;h[10]=-2/k;h[11]=0;h[12]=-(a+d)/g;h[13]=-(c+b)/j;h[14]=-(f+e)/k;h[15]=1;return h},lookAt:function(a,d,b,c){c|| +(c=u.create());var e,f,h,g,j,k,m,n,p=a[0],q=a[1];a=a[2];h=b[0];g=b[1];f=b[2];m=d[0];b=d[1];e=d[2];if(p===m&&q===b&&a===e)return u.identity(c);d=p-m;b=q-b;m=a-e;n=1/Math.sqrt(d*d+b*b+m*m);d*=n;b*=n;m*=n;e=g*m-f*b;f=f*d-h*m;h=h*b-g*d;(n=Math.sqrt(e*e+f*f+h*h))?(n=1/n,e*=n,f*=n,h*=n):h=f=e=0;g=b*h-m*f;j=m*e-d*h;k=d*f-b*e;(n=Math.sqrt(g*g+j*j+k*k))?(n=1/n,g*=n,j*=n,k*=n):k=j=g=0;c[0]=e;c[1]=g;c[2]=d;c[3]=0;c[4]=f;c[5]=j;c[6]=b;c[7]=0;c[8]=h;c[9]=k;c[10]=m;c[11]=0;c[12]=-(e*p+f*q+h*a);c[13]=-(g*p+j*q+ +k*a);c[14]=-(d*p+b*q+m*a);c[15]=1;return c},fromRotationTranslation:function(a,d,b){b||(b=u.create());var c=a[0],e=a[1],f=a[2],h=a[3],g=c+c,j=e+e,k=f+f;a=c*g;var m=c*j,c=c*k,n=e*j,e=e*k,f=f*k,g=h*g,j=h*j,h=h*k;b[0]=1-(n+f);b[1]=m+h;b[2]=c-j;b[3]=0;b[4]=m-h;b[5]=1-(a+f);b[6]=e+g;b[7]=0;b[8]=c+j;b[9]=e-g;b[10]=1-(a+n);b[11]=0;b[12]=d[0];b[13]=d[1];b[14]=d[2];b[15]=1;return b},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+ +a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+"]"}},m={create:function(a){var d=new k(4);a?(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3]):d[0]=d[1]=d[2]=d[3]=0;return d},createFrom:function(a,d,b,c){var e=new k(4);e[0]=a;e[1]=d;e[2]=b;e[3]=c;return e},set:function(a,d){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];return d},equal:function(a,d){return a===d||1E-6>Math.abs(a[0]-d[0])&&1E-6>Math.abs(a[1]-d[1])&&1E-6>Math.abs(a[2]-d[2])&&1E-6>Math.abs(a[3]-d[3])},identity:function(a){a||(a=m.create()); +a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a}},F=m.identity();m.calculateW=function(a,d){var b=a[0],c=a[1],e=a[2];if(!d||a===d)return a[3]=-Math.sqrt(Math.abs(1-b*b-c*c-e*e)),a;d[0]=b;d[1]=c;d[2]=e;d[3]=-Math.sqrt(Math.abs(1-b*b-c*c-e*e));return d};m.dot=function(a,d){return a[0]*d[0]+a[1]*d[1]+a[2]*d[2]+a[3]*d[3]};m.inverse=function(a,d){var b=a[0],c=a[1],e=a[2],f=a[3],b=(b=b*b+c*c+e*e+f*f)?1/b:0;if(!d||a===d)return a[0]*=-b,a[1]*=-b,a[2]*=-b,a[3]*=b,a;d[0]=-a[0]*b;d[1]=-a[1]*b;d[2]=-a[2]*b;d[3]=a[3]*b; +return d};m.conjugate=function(a,d){if(!d||a===d)return a[0]*=-1,a[1]*=-1,a[2]*=-1,a;d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];d[3]=a[3];return d};m.length=function(a){var d=a[0],b=a[1],c=a[2];a=a[3];return Math.sqrt(d*d+b*b+c*c+a*a)};m.normalize=function(a,d){d||(d=a);var b=a[0],c=a[1],e=a[2],f=a[3],h=Math.sqrt(b*b+c*c+e*e+f*f);if(0===h)return d[0]=0,d[1]=0,d[2]=0,d[3]=0,d;h=1/h;d[0]=b*h;d[1]=c*h;d[2]=e*h;d[3]=f*h;return d};m.add=function(a,d,b){if(!b||a===b)return a[0]+=d[0],a[1]+=d[1],a[2]+=d[2],a[3]+= +d[3],a;b[0]=a[0]+d[0];b[1]=a[1]+d[1];b[2]=a[2]+d[2];b[3]=a[3]+d[3];return b};m.multiply=function(a,d,b){b||(b=a);var c=a[0],e=a[1],f=a[2];a=a[3];var h=d[0],g=d[1],j=d[2];d=d[3];b[0]=c*d+a*h+e*j-f*g;b[1]=e*d+a*g+f*h-c*j;b[2]=f*d+a*j+c*g-e*h;b[3]=a*d-c*h-e*g-f*j;return b};m.multiplyVec3=function(a,d,b){b||(b=d);var c=d[0],e=d[1],f=d[2];d=a[0];var h=a[1],g=a[2];a=a[3];var j=a*c+h*f-g*e,k=a*e+g*c-d*f,m=a*f+d*e-h*c,c=-d*c-h*e-g*f;b[0]=j*a+c*-d+k*-g-m*-h;b[1]=k*a+c*-h+m*-d-j*-g;b[2]=m*a+c*-g+j*-h-k*-d; +return b};m.scale=function(a,d,b){if(!b||a===b)return a[0]*=d,a[1]*=d,a[2]*=d,a[3]*=d,a;b[0]=a[0]*d;b[1]=a[1]*d;b[2]=a[2]*d;b[3]=a[3]*d;return b};m.toMat3=function(a,d){d||(d=y.create());var b=a[0],c=a[1],e=a[2],f=a[3],h=b+b,g=c+c,j=e+e,k=b*h,m=b*g,b=b*j,n=c*g,c=c*j,e=e*j,h=f*h,g=f*g,f=f*j;d[0]=1-(n+e);d[1]=m+f;d[2]=b-g;d[3]=m-f;d[4]=1-(k+e);d[5]=c+h;d[6]=b+g;d[7]=c-h;d[8]=1-(k+n);return d};m.toMat4=function(a,d){d||(d=u.create());var b=a[0],c=a[1],e=a[2],f=a[3],h=b+b,g=c+c,j=e+e,k=b*h,m=b*g,b=b* +j,n=c*g,c=c*j,e=e*j,h=f*h,g=f*g,f=f*j;d[0]=1-(n+e);d[1]=m+f;d[2]=b-g;d[3]=0;d[4]=m-f;d[5]=1-(k+e);d[6]=c+h;d[7]=0;d[8]=b+g;d[9]=c-h;d[10]=1-(k+n);d[11]=0;d[12]=0;d[13]=0;d[14]=0;d[15]=1;return d};m.slerp=function(a,d,b,c){c||(c=a);var e=a[0]*d[0]+a[1]*d[1]+a[2]*d[2]+a[3]*d[3],f,g;if(1<=Math.abs(e))return c!==a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3]),c;f=Math.acos(e);g=Math.sqrt(1-e*e);if(0.0010>Math.abs(g))return c[0]=0.5*a[0]+0.5*d[0],c[1]=0.5*a[1]+0.5*d[1],c[2]=0.5*a[2]+0.5*d[2],c[3]=0.5*a[3]+ +0.5*d[3],c;e=Math.sin((1-b)*f)/g;b=Math.sin(b*f)/g;c[0]=a[0]*e+d[0]*b;c[1]=a[1]*e+d[1]*b;c[2]=a[2]*e+d[2]*b;c[3]=a[3]*e+d[3]*b;return c};m.fromRotationMatrix=function(a,d){d||(d=m.create());var b=a[0]+a[4]+a[8],c;if(0a[0]&&(b=1);a[8]>a[3*b+b]&&(b=2);var e=c[b],f=c[e];c=Math.sqrt(a[3*b+b]-a[3*e+e]-a[3*f+f]+1);d[b]=0.5*c;c= +0.5/c;d[3]=(a[3*f+e]-a[3*e+f])*c;d[e]=(a[3*e+b]+a[3*b+e])*c;d[f]=(a[3*f+b]+a[3*b+f])*c}return d};y.toQuat4=m.fromRotationMatrix;var B=y.create();m.fromAxes=function(a,b,c,e){B[0]=b[0];B[3]=b[1];B[6]=b[2];B[1]=c[0];B[4]=c[1];B[7]=c[2];B[2]=a[0];B[5]=a[1];B[8]=a[2];return m.fromRotationMatrix(B,e)};m.identity=function(a){a||(a=m.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a};m.fromAngleAxis=function(a,b,c){c||(c=m.create());a*=0.5;var e=Math.sin(a);c[3]=Math.cos(a);c[0]=e*b[0];c[1]=e*b[1];c[2]=e*b[2]; +return c};m.toAngleAxis=function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1]+a[2]*a[2];0 Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])},negate:function(a,b){b||(b=a); +b[0]=-a[0];b[1]=-a[1];return b},normalize:function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1];0 +Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])&&1E-6>Math.abs(a[2]-b[2])&&1E-6>Math.abs(a[3]-b[3])},identity:function(a){a||(a=I.create());a[0]=1;a[1]=0;a[2]=0;a[3]=1;return a},transpose:function(a,b){if(!b||a===b){var c=a[1];a[1]=a[2];a[2]=c;return a}b[0]=a[0];b[1]=a[2];b[2]=a[1];b[3]=a[3];return b},determinant:function(a){return a[0]*a[3]-a[2]*a[1]},inverse:function(a,b){b||(b=a);var c=a[0],e=a[1],f=a[2],g=a[3],h=c*g-f*e;if(!h)return null;h=1/h;b[0]=g*h;b[1]=-e*h;b[2]=-f*h;b[3]=c*h;return b},multiply:function(a, +b,c){c||(c=a);var e=a[0],f=a[1],g=a[2];a=a[3];c[0]=e*b[0]+f*b[2];c[1]=e*b[1]+f*b[3];c[2]=g*b[0]+a*b[2];c[3]=g*b[1]+a*b[3];return c},rotate:function(a,b,c){c||(c=a);var e=a[0],f=a[1],g=a[2];a=a[3];var h=Math.sin(b);b=Math.cos(b);c[0]=e*b+f*h;c[1]=e*-h+f*b;c[2]=g*b+a*h;c[3]=g*-h+a*b;return c},multiplyVec2:function(a,b,c){c||(c=b);var e=b[0];b=b[1];c[0]=e*a[0]+b*a[1];c[1]=e*a[2]+b*a[3];return c},scale:function(a,b,c){c||(c=a);var e=a[1],f=a[2],g=a[3],h=b[0];b=b[1];c[0]=a[0]*h;c[1]=e*b;c[2]=f*h;c[3]= +g*b;return c},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}},K={create:function(a){var b=new k(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):(b[0]=0,b[1]=0,b[2]=0,b[3]=0);return b},createFrom:function(a,b,c,e){var f=new k(4);f[0]=a;f[1]=b;f[2]=c;f[3]=e;return f},add:function(a,b,c){c||(c=b);c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];return c},subtract:function(a,b,c){c||(c=b);c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];c[3]=a[3]-b[3];return c},multiply:function(a, +b,c){c||(c=b);c[0]=a[0]*b[0];c[1]=a[1]*b[1];c[2]=a[2]*b[2];c[3]=a[3]*b[3];return c},divide:function(a,b,c){c||(c=b);c[0]=a[0]/b[0];c[1]=a[1]/b[1];c[2]=a[2]/b[2];c[3]=a[3]/b[3];return c},scale:function(a,b,c){c||(c=a);c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;c[3]=a[3]*b;return c},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},equal:function(a,b){return a===b||1E-6>Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])&&1E-6>Math.abs(a[2]-b[2])&&1E-6>Math.abs(a[3]-b[3])},negate:function(a,b){b|| +(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=-a[3];return b},length:function(a){var b=a[0],c=a[1],e=a[2];a=a[3];return Math.sqrt(b*b+c*c+e*e+a*a)},squaredLength:function(a){var b=a[0],c=a[1],e=a[2];a=a[3];return b*b+c*c+e*e+a*a},lerp:function(a,b,c,e){e||(e=a);e[0]=a[0]+c*(b[0]-a[0]);e[1]=a[1]+c*(b[1]-a[1]);e[2]=a[2]+c*(b[2]-a[2]);e[3]=a[3]+c*(b[3]-a[3]);return e},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};b&&(b.glMatrixArrayType=k,b.MatrixArray=k,b.setMatrixArrayType=c,b.determineMatrixArrayType= +f,b.glMath=e,b.vec2=J,b.vec3=n,b.vec4=K,b.mat2=I,b.mat3=y,b.mat4=u,b.quat4=m);return{glMatrixArrayType:k,MatrixArray:k,setMatrixArrayType:c,determineMatrixArrayType:f,glMath:e,vec2:J,vec3:n,vec4:K,mat2:I,mat3:y,mat4:u,quat4:m}});PIXI.shaderFragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying float vColor;","uniform sampler2D uSampler;","void main(void) {","gl_FragColor \x3d texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y));","gl_FragColor \x3d gl_FragColor * vColor;","}"]; +PIXI.shaderVertexSrc=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute float aColor;","uniform mat4 uMVMatrix;","varying vec2 vTextureCoord;","varying float vColor;","void main(void) {","gl_Position \x3d uMVMatrix * vec4(aVertexPosition, 1.0, 1.0);","vTextureCoord \x3d aTextureCoord;","vColor \x3d aColor;","}"]; +PIXI.CompileVertexShader=function(b,c){for(var f="",e=0;e b.length)){var c=this.uvs,f=this.indices,e=this.colors;this.count-=0.2;c[0]=0;c[1]=1;c[2]=0;c[3]=1;e[0]=1;e[1]=1;f[0]=0;f[1]=1;for(var b=b.length,g=1;gb.length)){var c=this.verticies,f=b[0],e,g=e=0,j=b[0];this.count-=0.2;c[0]=j.x+e;c[1]=j.y+g;c[2]=j.x-e;c[3]=j.y-g;for(var k=b.length,n=1;n + + + pixi.js example 1 + + + + + + + + diff --git a/examples/example 2/pixi.js b/examples/example 2/pixi.js new file mode 100644 index 0000000..dd58212 --- /dev/null +++ b/examples/example 2/pixi.js @@ -0,0 +1,111 @@ +var PIXI=PIXI||{};PIXI.Point=function(b,c){this.x=b?b:0;this.y=c?c:0};PIXI.Point.clone=function(){return new PIXI.Point(this.x,this.y)};PIXI.Point.constructor=PIXI.Point;PIXI.Rectangle=function(b,c,f,e){this.x=b?b:0;this.y=c?c:0;this.width=f?f:0;this.height=e?e:0};PIXI.Point.clone=function(){return new PIXI.Rectangle(this.x,this.y,this.width,this.height)};PIXI.Rectangle.constructor=PIXI.Rectangle;window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(b){window.setTimeout(b,1E3/60)}}();function HEXtoRGB(b){return[(b>>16&255)/255,(b>>8&255)/255,(b&255)/255]} +var AjaxRequest=function(){var b=["Msxml2.XMLHTTP","Microsoft.XMLHTTP"];if(window.ActiveXObject)for(var c=0;c>1);var d=g[0];return d*(1.5-0.5*a*d*d)}}else e.invsqrt=function(a){return 1/Math.sqrt(a)}; +var k=null;f();var n={create:function(a){var d=new k(3);a?(d[0]=a[0],d[1]=a[1],d[2]=a[2]):d[0]=d[1]=d[2]=0;return d},createFrom:function(a,d,l){var b=new k(3);b[0]=a;b[1]=d;b[2]=l;return b},set:function(a,d){d[0]=a[0];d[1]=a[1];d[2]=a[2];return d},equal:function(a,d){return a===d||1E-6>Math.abs(a[0]-d[0])&&1E-6>Math.abs(a[1]-d[1])&&1E-6>Math.abs(a[2]-d[2])},add:function(a,d,l){if(!l||a===l)return a[0]+=d[0],a[1]+=d[1],a[2]+=d[2],a;l[0]=a[0]+d[0];l[1]=a[1]+d[1];l[2]=a[2]+d[2];return l},subtract:function(a, +d,l){if(!l||a===l)return a[0]-=d[0],a[1]-=d[1],a[2]-=d[2],a;l[0]=a[0]-d[0];l[1]=a[1]-d[1];l[2]=a[2]-d[2];return l},multiply:function(a,d,l){if(!l||a===l)return a[0]*=d[0],a[1]*=d[1],a[2]*=d[2],a;l[0]=a[0]*d[0];l[1]=a[1]*d[1];l[2]=a[2]*d[2];return l},negate:function(a,d){d||(d=a);d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];return d},scale:function(a,d,l){if(!l||a===l)return a[0]*=d,a[1]*=d,a[2]*=d,a;l[0]=a[0]*d;l[1]=a[1]*d;l[2]=a[2]*d;return l},normalize:function(a,d){d||(d=a);var l=a[0],b=a[1],c=a[2],e=Math.sqrt(l* +l+b*b+c*c);if(!e)return d[0]=0,d[1]=0,d[2]=0,d;if(1===e)return d[0]=l,d[1]=b,d[2]=c,d;e=1/e;d[0]=l*e;d[1]=b*e;d[2]=c*e;return d},cross:function(a,d,l){l||(l=a);var b=a[0],c=a[1];a=a[2];var e=d[0],h=d[1];d=d[2];l[0]=c*d-a*h;l[1]=a*e-b*d;l[2]=b*h-c*e;return l},length:function(a){var d=a[0],l=a[1];a=a[2];return Math.sqrt(d*d+l*l+a*a)},squaredLength:function(a){var d=a[0],l=a[1];a=a[2];return d*d+l*l+a*a},dot:function(a,d){return a[0]*d[0]+a[1]*d[1]+a[2]*d[2]},direction:function(a,d,l){l||(l=a);var b= +a[0]-d[0],c=a[1]-d[1];a=a[2]-d[2];d=Math.sqrt(b*b+c*c+a*a);if(!d)return l[0]=0,l[1]=0,l[2]=0,l;d=1/d;l[0]=b*d;l[1]=c*d;l[2]=a*d;return l},lerp:function(a,d,l,b){b||(b=a);b[0]=a[0]+l*(d[0]-a[0]);b[1]=a[1]+l*(d[1]-a[1]);b[2]=a[2]+l*(d[2]-a[2]);return b},dist:function(a,d){var l=d[0]-a[0],b=d[1]-a[1],c=d[2]-a[2];return Math.sqrt(l*l+b*b+c*c)}},p=null,q=new k(4);n.unproject=function(a,d,l,b,c){c||(c=a);p||(p=u.create());var e=p;q[0]=2*(a[0]-b[0])/b[2]-1;q[1]=2*(a[1]-b[1])/b[3]-1;q[2]=2*a[2]-1;q[3]=1; +u.multiply(l,d,e);if(!u.inverse(e))return null;u.multiplyVec4(e,q);if(0===q[3])return null;c[0]=q[0]/q[3];c[1]=q[1]/q[3];c[2]=q[2]/q[3];return c};var C=n.createFrom(1,0,0),E=n.createFrom(0,1,0),t=n.createFrom(0,0,1),x=n.create();n.rotationTo=function(a,d,l){l||(l=m.create());var b=n.dot(a,d);if(1<=b)m.set(F,l);else if(-0.999999>b)n.cross(C,a,x),1E-6>n.length(x)&&n.cross(E,a,x),1E-6>n.length(x)&&n.cross(t,a,x),n.normalize(x),m.fromAngleAxis(Math.PI,x,l);else{var b=Math.sqrt(2*(1+b)),c=1/b;n.cross(a, +d,x);l[0]=x[0]*c;l[1]=x[1]*c;l[2]=x[2]*c;l[3]=0.5*b;m.normalize(l)}1 l[3]&&(l[3]=-1);return l};n.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+"]"};var y={create:function(a){var d=new k(9);a?(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3],d[4]=a[4],d[5]=a[5],d[6]=a[6],d[7]=a[7],d[8]=a[8]):d[0]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=0;return d},createFrom:function(a,d,l,b,c,e,h,f,D){var s=new k(9);s[0]=a;s[1]=d;s[2]=l;s[3]=b;s[4]=c;s[5]=e;s[6]=h;s[7]=f;s[8]=D;return s},determinant:function(a){var d= +a[3],l=a[4],b=a[5],c=a[6],e=a[7],h=a[8];return a[0]*(h*l-b*e)+a[1]*(-h*d+b*c)+a[2]*(e*d-l*c)},inverse:function(a,d){var l=a[0],b=a[1],c=a[2],e=a[3],h=a[4],f=a[5],D=a[6],s=a[7],g=a[8],j=g*h-f*s,k=-g*e+f*D,m=s*e-h*D,r=l*j+b*k+c*m;if(!r)return null;r=1/r;d||(d=y.create());d[0]=j*r;d[1]=(-g*b+c*s)*r;d[2]=(f*b-c*h)*r;d[3]=k*r;d[4]=(g*l-c*D)*r;d[5]=(-f*l+c*e)*r;d[6]=m*r;d[7]=(-s*l+b*D)*r;d[8]=(h*l-b*e)*r;return d},multiply:function(a,d,l){l||(l=a);var b=a[0],c=a[1],e=a[2],h=a[3],f=a[4],D=a[5],s=a[6],g= +a[7];a=a[8];var j=d[0],k=d[1],m=d[2],r=d[3],n=d[4],v=d[5],q=d[6],w=d[7];d=d[8];l[0]=j*b+k*h+m*s;l[1]=j*c+k*f+m*g;l[2]=j*e+k*D+m*a;l[3]=r*b+n*h+v*s;l[4]=r*c+n*f+v*g;l[5]=r*e+n*D+v*a;l[6]=q*b+w*h+d*s;l[7]=q*c+w*f+d*g;l[8]=q*e+w*D+d*a;return l},multiplyVec2:function(a,d,l){l||(l=d);var b=d[0];d=d[1];l[0]=b*a[0]+d*a[3]+a[6];l[1]=b*a[1]+d*a[4]+a[7];return l},multiplyVec3:function(a,d,l){l||(l=d);var b=d[0],c=d[1];d=d[2];l[0]=b*a[0]+c*a[3]+d*a[6];l[1]=b*a[1]+c*a[4]+d*a[7];l[2]=b*a[2]+c*a[5]+d*a[8];return l}, +set:function(a,d){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];d[4]=a[4];d[5]=a[5];d[6]=a[6];d[7]=a[7];d[8]=a[8];return d},equal:function(a,d){return a===d||1E-6>Math.abs(a[0]-d[0])&&1E-6>Math.abs(a[1]-d[1])&&1E-6>Math.abs(a[2]-d[2])&&1E-6>Math.abs(a[3]-d[3])&&1E-6>Math.abs(a[4]-d[4])&&1E-6>Math.abs(a[5]-d[5])&&1E-6>Math.abs(a[6]-d[6])&&1E-6>Math.abs(a[7]-d[7])&&1E-6>Math.abs(a[8]-d[8])},identity:function(a){a||(a=y.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a},transpose:function(a, +d){if(!d||a===d){var l=a[1],b=a[2],c=a[5];a[1]=a[3];a[2]=a[6];a[3]=l;a[5]=a[7];a[6]=b;a[7]=c;return a}d[0]=a[0];d[1]=a[3];d[2]=a[6];d[3]=a[1];d[4]=a[4];d[5]=a[7];d[6]=a[2];d[7]=a[5];d[8]=a[8];return d},toMat4:function(a,d){d||(d=u.create());d[15]=1;d[14]=0;d[13]=0;d[12]=0;d[11]=0;d[10]=a[8];d[9]=a[7];d[8]=a[6];d[7]=0;d[6]=a[5];d[5]=a[4];d[4]=a[3];d[3]=0;d[2]=a[2];d[1]=a[1];d[0]=a[0];return d},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+ +a[8]+"]"}},u={create:function(a){var d=new k(16);a&&(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3],d[4]=a[4],d[5]=a[5],d[6]=a[6],d[7]=a[7],d[8]=a[8],d[9]=a[9],d[10]=a[10],d[11]=a[11],d[12]=a[12],d[13]=a[13],d[14]=a[14],d[15]=a[15]);return d},createFrom:function(a,d,l,b,c,e,h,f,D,s,g,j,m,n,r,q){var v=new k(16);v[0]=a;v[1]=d;v[2]=l;v[3]=b;v[4]=c;v[5]=e;v[6]=h;v[7]=f;v[8]=D;v[9]=s;v[10]=g;v[11]=j;v[12]=m;v[13]=n;v[14]=r;v[15]=q;return v},set:function(a,d){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];d[4]=a[4]; +d[5]=a[5];d[6]=a[6];d[7]=a[7];d[8]=a[8];d[9]=a[9];d[10]=a[10];d[11]=a[11];d[12]=a[12];d[13]=a[13];d[14]=a[14];d[15]=a[15];return d},equal:function(a,d){return a===d||1E-6>Math.abs(a[0]-d[0])&&1E-6>Math.abs(a[1]-d[1])&&1E-6>Math.abs(a[2]-d[2])&&1E-6>Math.abs(a[3]-d[3])&&1E-6>Math.abs(a[4]-d[4])&&1E-6>Math.abs(a[5]-d[5])&&1E-6>Math.abs(a[6]-d[6])&&1E-6>Math.abs(a[7]-d[7])&&1E-6>Math.abs(a[8]-d[8])&&1E-6>Math.abs(a[9]-d[9])&&1E-6>Math.abs(a[10]-d[10])&&1E-6>Math.abs(a[11]-d[11])&&1E-6>Math.abs(a[12]- +d[12])&&1E-6>Math.abs(a[13]-d[13])&&1E-6>Math.abs(a[14]-d[14])&&1E-6>Math.abs(a[15]-d[15])},identity:function(a){a||(a=u.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},transpose:function(a,d){if(!d||a===d){var l=a[1],b=a[2],c=a[3],e=a[6],h=a[7],f=a[11];a[1]=a[4];a[2]=a[8];a[3]=a[12];a[4]=l;a[6]=a[9];a[7]=a[13];a[8]=b;a[9]=e;a[11]=a[14];a[12]=c;a[13]=h;a[14]=f;return a}d[0]=a[0];d[1]=a[4];d[2]=a[8];d[3]=a[12]; +d[4]=a[1];d[5]=a[5];d[6]=a[9];d[7]=a[13];d[8]=a[2];d[9]=a[6];d[10]=a[10];d[11]=a[14];d[12]=a[3];d[13]=a[7];d[14]=a[11];d[15]=a[15];return d},determinant:function(a){var d=a[0],l=a[1],b=a[2],c=a[3],e=a[4],h=a[5],f=a[6],D=a[7],s=a[8],g=a[9],j=a[10],k=a[11],m=a[12],r=a[13],n=a[14];a=a[15];return m*g*f*c-s*r*f*c-m*h*j*c+e*r*j*c+s*h*n*c-e*g*n*c-m*g*b*D+s*r*b*D+m*l*j*D-d*r*j*D-s*l*n*D+d*g*n*D+m*h*b*k-e*r*b*k-m*l*f*k+d*r*f*k+e*l*n*k-d*h*n*k-s*h*b*a+e*g*b*a+s*l*f*a-d*g*f*a-e*l*j*a+d*h*j*a},inverse:function(a, +d){d||(d=a);var b=a[0],c=a[1],e=a[2],f=a[3],h=a[4],g=a[5],D=a[6],s=a[7],j=a[8],k=a[9],m=a[10],n=a[11],r=a[12],q=a[13],v=a[14],t=a[15],w=b*g-c*h,H=b*D-e*h,z=b*s-f*h,A=c*D-e*g,u=c*s-f*g,p=e*s-f*D,x=j*q-k*r,y=j*v-m*r,B=j*t-n*r,C=k*v-m*q,E=k*t-n*q,F=m*t-n*v,G=w*F-H*E+z*C+A*B-u*y+p*x;if(!G)return null;G=1/G;d[0]=(g*F-D*E+s*C)*G;d[1]=(-c*F+e*E-f*C)*G;d[2]=(q*p-v*u+t*A)*G;d[3]=(-k*p+m*u-n*A)*G;d[4]=(-h*F+D*B-s*y)*G;d[5]=(b*F-e*B+f*y)*G;d[6]=(-r*p+v*z-t*H)*G;d[7]=(j*p-m*z+n*H)*G;d[8]=(h*E-g*B+s*x)*G;d[9]= +(-b*E+c*B-f*x)*G;d[10]=(r*u-q*z+t*w)*G;d[11]=(-j*u+k*z-n*w)*G;d[12]=(-h*C+g*y-D*x)*G;d[13]=(b*C-c*y+e*x)*G;d[14]=(-r*A+q*H-v*w)*G;d[15]=(j*A-k*H+m*w)*G;return d},toRotationMat:function(a,d){d||(d=u.create());d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];d[4]=a[4];d[5]=a[5];d[6]=a[6];d[7]=a[7];d[8]=a[8];d[9]=a[9];d[10]=a[10];d[11]=a[11];d[12]=0;d[13]=0;d[14]=0;d[15]=1;return d},toMat3:function(a,d){d||(d=y.create());d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[4];d[4]=a[5];d[5]=a[6];d[6]=a[8];d[7]=a[9];d[8]=a[10]; +return d},toInverseMat3:function(a,d){var b=a[0],c=a[1],e=a[2],f=a[4],h=a[5],g=a[6],j=a[8],s=a[9],k=a[10],m=k*h-g*s,n=-k*f+g*j,q=s*f-h*j,r=b*m+c*n+e*q;if(!r)return null;r=1/r;d||(d=y.create());d[0]=m*r;d[1]=(-k*c+e*s)*r;d[2]=(g*c-e*h)*r;d[3]=n*r;d[4]=(k*b-e*j)*r;d[5]=(-g*b+e*f)*r;d[6]=q*r;d[7]=(-s*b+c*j)*r;d[8]=(h*b-c*f)*r;return d},multiply:function(a,d,b){b||(b=a);var c=a[0],e=a[1],f=a[2],h=a[3],g=a[4],j=a[5],s=a[6],k=a[7],m=a[8],n=a[9],q=a[10],r=a[11],t=a[12],v=a[13],u=a[14];a=a[15];var w=d[0], +p=d[1],z=d[2],A=d[3];b[0]=w*c+p*g+z*m+A*t;b[1]=w*e+p*j+z*n+A*v;b[2]=w*f+p*s+z*q+A*u;b[3]=w*h+p*k+z*r+A*a;w=d[4];p=d[5];z=d[6];A=d[7];b[4]=w*c+p*g+z*m+A*t;b[5]=w*e+p*j+z*n+A*v;b[6]=w*f+p*s+z*q+A*u;b[7]=w*h+p*k+z*r+A*a;w=d[8];p=d[9];z=d[10];A=d[11];b[8]=w*c+p*g+z*m+A*t;b[9]=w*e+p*j+z*n+A*v;b[10]=w*f+p*s+z*q+A*u;b[11]=w*h+p*k+z*r+A*a;w=d[12];p=d[13];z=d[14];A=d[15];b[12]=w*c+p*g+z*m+A*t;b[13]=w*e+p*j+z*n+A*v;b[14]=w*f+p*s+z*q+A*u;b[15]=w*h+p*k+z*r+A*a;return b},multiplyVec3:function(a,d,b){b||(b=d); +var c=d[0],e=d[1];d=d[2];b[0]=a[0]*c+a[4]*e+a[8]*d+a[12];b[1]=a[1]*c+a[5]*e+a[9]*d+a[13];b[2]=a[2]*c+a[6]*e+a[10]*d+a[14];return b},multiplyVec4:function(a,d,b){b||(b=d);var c=d[0],e=d[1],f=d[2];d=d[3];b[0]=a[0]*c+a[4]*e+a[8]*f+a[12]*d;b[1]=a[1]*c+a[5]*e+a[9]*f+a[13]*d;b[2]=a[2]*c+a[6]*e+a[10]*f+a[14]*d;b[3]=a[3]*c+a[7]*e+a[11]*f+a[15]*d;return b},translate:function(a,d,b){var c=d[0],e=d[1];d=d[2];var f,h,g,j,s,k,m,n,p,r,q,v;if(!b||a===b)return a[12]=a[0]*c+a[4]*e+a[8]*d+a[12],a[13]=a[1]*c+a[5]*e+ +a[9]*d+a[13],a[14]=a[2]*c+a[6]*e+a[10]*d+a[14],a[15]=a[3]*c+a[7]*e+a[11]*d+a[15],a;f=a[0];h=a[1];g=a[2];j=a[3];s=a[4];k=a[5];m=a[6];n=a[7];p=a[8];r=a[9];q=a[10];v=a[11];b[0]=f;b[1]=h;b[2]=g;b[3]=j;b[4]=s;b[5]=k;b[6]=m;b[7]=n;b[8]=p;b[9]=r;b[10]=q;b[11]=v;b[12]=f*c+s*e+p*d+a[12];b[13]=h*c+k*e+r*d+a[13];b[14]=g*c+m*e+q*d+a[14];b[15]=j*c+n*e+v*d+a[15];return b},scale:function(a,d,b){var c=d[0],e=d[1];d=d[2];if(!b||a===b)return a[0]*=c,a[1]*=c,a[2]*=c,a[3]*=c,a[4]*=e,a[5]*=e,a[6]*=e,a[7]*=e,a[8]*=d,a[9]*= +d,a[10]*=d,a[11]*=d,a;b[0]=a[0]*c;b[1]=a[1]*c;b[2]=a[2]*c;b[3]=a[3]*c;b[4]=a[4]*e;b[5]=a[5]*e;b[6]=a[6]*e;b[7]=a[7]*e;b[8]=a[8]*d;b[9]=a[9]*d;b[10]=a[10]*d;b[11]=a[11]*d;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},rotate:function(a,d,b,c){var e=b[0],f=b[1];b=b[2];var h=Math.sqrt(e*e+f*f+b*b),g,j,k,m,n,p,q,r,t,v,u,w,x,z,A,y,B,C,E,F;if(!h)return null;1!==h&&(h=1/h,e*=h,f*=h,b*=h);g=Math.sin(d);j=Math.cos(d);k=1-j;d=a[0];h=a[1];m=a[2];n=a[3];p=a[4];q=a[5];r=a[6];t=a[7];v=a[8];u=a[9];w= +a[10];x=a[11];z=e*e*k+j;A=f*e*k+b*g;y=b*e*k-f*g;B=e*f*k-b*g;C=f*f*k+j;E=b*f*k+e*g;F=e*b*k+f*g;e=f*b*k-e*g;f=b*b*k+j;c?a!==c&&(c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[0]=d*z+p*A+v*y;c[1]=h*z+q*A+u*y;c[2]=m*z+r*A+w*y;c[3]=n*z+t*A+x*y;c[4]=d*B+p*C+v*E;c[5]=h*B+q*C+u*E;c[6]=m*B+r*C+w*E;c[7]=n*B+t*C+x*E;c[8]=d*F+p*e+v*f;c[9]=h*F+q*e+u*f;c[10]=m*F+r*e+w*f;c[11]=n*F+t*e+x*f;return c},rotateX:function(a,d,b){var c=Math.sin(d);d=Math.cos(d);var e=a[4],f=a[5],h=a[6],g=a[7],j=a[8],k=a[9],m=a[10], +n=a[11];b?a!==b&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]):b=a;b[4]=e*d+j*c;b[5]=f*d+k*c;b[6]=h*d+m*c;b[7]=g*d+n*c;b[8]=e*-c+j*d;b[9]=f*-c+k*d;b[10]=h*-c+m*d;b[11]=g*-c+n*d;return b},rotateY:function(a,d,b){var c=Math.sin(d);d=Math.cos(d);var e=a[0],f=a[1],h=a[2],g=a[3],j=a[8],k=a[9],m=a[10],n=a[11];b?a!==b&&(b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]):b=a;b[0]=e*d+j*-c;b[1]=f*d+k*-c;b[2]=h*d+m*-c;b[3]=g* +d+n*-c;b[8]=e*c+j*d;b[9]=f*c+k*d;b[10]=h*c+m*d;b[11]=g*c+n*d;return b},rotateZ:function(a,d,b){var c=Math.sin(d);d=Math.cos(d);var e=a[0],f=a[1],h=a[2],g=a[3],j=a[4],k=a[5],m=a[6],n=a[7];b?a!==b&&(b[8]=a[8],b[9]=a[9],b[10]=a[10],b[11]=a[11],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]):b=a;b[0]=e*d+j*c;b[1]=f*d+k*c;b[2]=h*d+m*c;b[3]=g*d+n*c;b[4]=e*-c+j*d;b[5]=f*-c+k*d;b[6]=h*-c+m*d;b[7]=g*-c+n*d;return b},frustum:function(a,d,b,c,e,f,h){h||(h=u.create());var g=d-a,j=c-b,k=f-e;h[0]=2*e/g;h[1]=0; +h[2]=0;h[3]=0;h[4]=0;h[5]=2*e/j;h[6]=0;h[7]=0;h[8]=(d+a)/g;h[9]=(c+b)/j;h[10]=-(f+e)/k;h[11]=-1;h[12]=0;h[13]=0;h[14]=-(2*f*e)/k;h[15]=0;return h},perspective:function(a,d,b,c,e){a=b*Math.tan(a*Math.PI/360);d*=a;return u.frustum(-d,d,-a,a,b,c,e)},ortho:function(a,d,b,c,e,f,h){h||(h=u.create());var g=d-a,j=c-b,k=f-e;h[0]=2/g;h[1]=0;h[2]=0;h[3]=0;h[4]=0;h[5]=2/j;h[6]=0;h[7]=0;h[8]=0;h[9]=0;h[10]=-2/k;h[11]=0;h[12]=-(a+d)/g;h[13]=-(c+b)/j;h[14]=-(f+e)/k;h[15]=1;return h},lookAt:function(a,d,b,c){c|| +(c=u.create());var e,f,h,g,j,k,m,n,p=a[0],q=a[1];a=a[2];h=b[0];g=b[1];f=b[2];m=d[0];b=d[1];e=d[2];if(p===m&&q===b&&a===e)return u.identity(c);d=p-m;b=q-b;m=a-e;n=1/Math.sqrt(d*d+b*b+m*m);d*=n;b*=n;m*=n;e=g*m-f*b;f=f*d-h*m;h=h*b-g*d;(n=Math.sqrt(e*e+f*f+h*h))?(n=1/n,e*=n,f*=n,h*=n):h=f=e=0;g=b*h-m*f;j=m*e-d*h;k=d*f-b*e;(n=Math.sqrt(g*g+j*j+k*k))?(n=1/n,g*=n,j*=n,k*=n):k=j=g=0;c[0]=e;c[1]=g;c[2]=d;c[3]=0;c[4]=f;c[5]=j;c[6]=b;c[7]=0;c[8]=h;c[9]=k;c[10]=m;c[11]=0;c[12]=-(e*p+f*q+h*a);c[13]=-(g*p+j*q+ +k*a);c[14]=-(d*p+b*q+m*a);c[15]=1;return c},fromRotationTranslation:function(a,d,b){b||(b=u.create());var c=a[0],e=a[1],f=a[2],h=a[3],g=c+c,j=e+e,k=f+f;a=c*g;var m=c*j,c=c*k,n=e*j,e=e*k,f=f*k,g=h*g,j=h*j,h=h*k;b[0]=1-(n+f);b[1]=m+h;b[2]=c-j;b[3]=0;b[4]=m-h;b[5]=1-(a+f);b[6]=e+g;b[7]=0;b[8]=c+j;b[9]=e-g;b[10]=1-(a+n);b[11]=0;b[12]=d[0];b[13]=d[1];b[14]=d[2];b[15]=1;return b},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+ +a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+"]"}},m={create:function(a){var d=new k(4);a?(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3]):d[0]=d[1]=d[2]=d[3]=0;return d},createFrom:function(a,d,b,c){var e=new k(4);e[0]=a;e[1]=d;e[2]=b;e[3]=c;return e},set:function(a,d){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];return d},equal:function(a,d){return a===d||1E-6>Math.abs(a[0]-d[0])&&1E-6>Math.abs(a[1]-d[1])&&1E-6>Math.abs(a[2]-d[2])&&1E-6>Math.abs(a[3]-d[3])},identity:function(a){a||(a=m.create()); +a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a}},F=m.identity();m.calculateW=function(a,d){var b=a[0],c=a[1],e=a[2];if(!d||a===d)return a[3]=-Math.sqrt(Math.abs(1-b*b-c*c-e*e)),a;d[0]=b;d[1]=c;d[2]=e;d[3]=-Math.sqrt(Math.abs(1-b*b-c*c-e*e));return d};m.dot=function(a,d){return a[0]*d[0]+a[1]*d[1]+a[2]*d[2]+a[3]*d[3]};m.inverse=function(a,d){var b=a[0],c=a[1],e=a[2],f=a[3],b=(b=b*b+c*c+e*e+f*f)?1/b:0;if(!d||a===d)return a[0]*=-b,a[1]*=-b,a[2]*=-b,a[3]*=b,a;d[0]=-a[0]*b;d[1]=-a[1]*b;d[2]=-a[2]*b;d[3]=a[3]*b; +return d};m.conjugate=function(a,d){if(!d||a===d)return a[0]*=-1,a[1]*=-1,a[2]*=-1,a;d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];d[3]=a[3];return d};m.length=function(a){var d=a[0],b=a[1],c=a[2];a=a[3];return Math.sqrt(d*d+b*b+c*c+a*a)};m.normalize=function(a,d){d||(d=a);var b=a[0],c=a[1],e=a[2],f=a[3],h=Math.sqrt(b*b+c*c+e*e+f*f);if(0===h)return d[0]=0,d[1]=0,d[2]=0,d[3]=0,d;h=1/h;d[0]=b*h;d[1]=c*h;d[2]=e*h;d[3]=f*h;return d};m.add=function(a,d,b){if(!b||a===b)return a[0]+=d[0],a[1]+=d[1],a[2]+=d[2],a[3]+= +d[3],a;b[0]=a[0]+d[0];b[1]=a[1]+d[1];b[2]=a[2]+d[2];b[3]=a[3]+d[3];return b};m.multiply=function(a,d,b){b||(b=a);var c=a[0],e=a[1],f=a[2];a=a[3];var h=d[0],g=d[1],j=d[2];d=d[3];b[0]=c*d+a*h+e*j-f*g;b[1]=e*d+a*g+f*h-c*j;b[2]=f*d+a*j+c*g-e*h;b[3]=a*d-c*h-e*g-f*j;return b};m.multiplyVec3=function(a,d,b){b||(b=d);var c=d[0],e=d[1],f=d[2];d=a[0];var h=a[1],g=a[2];a=a[3];var j=a*c+h*f-g*e,k=a*e+g*c-d*f,m=a*f+d*e-h*c,c=-d*c-h*e-g*f;b[0]=j*a+c*-d+k*-g-m*-h;b[1]=k*a+c*-h+m*-d-j*-g;b[2]=m*a+c*-g+j*-h-k*-d; +return b};m.scale=function(a,d,b){if(!b||a===b)return a[0]*=d,a[1]*=d,a[2]*=d,a[3]*=d,a;b[0]=a[0]*d;b[1]=a[1]*d;b[2]=a[2]*d;b[3]=a[3]*d;return b};m.toMat3=function(a,d){d||(d=y.create());var b=a[0],c=a[1],e=a[2],f=a[3],h=b+b,g=c+c,j=e+e,k=b*h,m=b*g,b=b*j,n=c*g,c=c*j,e=e*j,h=f*h,g=f*g,f=f*j;d[0]=1-(n+e);d[1]=m+f;d[2]=b-g;d[3]=m-f;d[4]=1-(k+e);d[5]=c+h;d[6]=b+g;d[7]=c-h;d[8]=1-(k+n);return d};m.toMat4=function(a,d){d||(d=u.create());var b=a[0],c=a[1],e=a[2],f=a[3],h=b+b,g=c+c,j=e+e,k=b*h,m=b*g,b=b* +j,n=c*g,c=c*j,e=e*j,h=f*h,g=f*g,f=f*j;d[0]=1-(n+e);d[1]=m+f;d[2]=b-g;d[3]=0;d[4]=m-f;d[5]=1-(k+e);d[6]=c+h;d[7]=0;d[8]=b+g;d[9]=c-h;d[10]=1-(k+n);d[11]=0;d[12]=0;d[13]=0;d[14]=0;d[15]=1;return d};m.slerp=function(a,d,b,c){c||(c=a);var e=a[0]*d[0]+a[1]*d[1]+a[2]*d[2]+a[3]*d[3],f,g;if(1<=Math.abs(e))return c!==a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3]),c;f=Math.acos(e);g=Math.sqrt(1-e*e);if(0.0010>Math.abs(g))return c[0]=0.5*a[0]+0.5*d[0],c[1]=0.5*a[1]+0.5*d[1],c[2]=0.5*a[2]+0.5*d[2],c[3]=0.5*a[3]+ +0.5*d[3],c;e=Math.sin((1-b)*f)/g;b=Math.sin(b*f)/g;c[0]=a[0]*e+d[0]*b;c[1]=a[1]*e+d[1]*b;c[2]=a[2]*e+d[2]*b;c[3]=a[3]*e+d[3]*b;return c};m.fromRotationMatrix=function(a,d){d||(d=m.create());var b=a[0]+a[4]+a[8],c;if(0a[0]&&(b=1);a[8]>a[3*b+b]&&(b=2);var e=c[b],f=c[e];c=Math.sqrt(a[3*b+b]-a[3*e+e]-a[3*f+f]+1);d[b]=0.5*c;c= +0.5/c;d[3]=(a[3*f+e]-a[3*e+f])*c;d[e]=(a[3*e+b]+a[3*b+e])*c;d[f]=(a[3*f+b]+a[3*b+f])*c}return d};y.toQuat4=m.fromRotationMatrix;var B=y.create();m.fromAxes=function(a,b,c,e){B[0]=b[0];B[3]=b[1];B[6]=b[2];B[1]=c[0];B[4]=c[1];B[7]=c[2];B[2]=a[0];B[5]=a[1];B[8]=a[2];return m.fromRotationMatrix(B,e)};m.identity=function(a){a||(a=m.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a};m.fromAngleAxis=function(a,b,c){c||(c=m.create());a*=0.5;var e=Math.sin(a);c[3]=Math.cos(a);c[0]=e*b[0];c[1]=e*b[1];c[2]=e*b[2]; +return c};m.toAngleAxis=function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1]+a[2]*a[2];0 Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])},negate:function(a,b){b||(b=a); +b[0]=-a[0];b[1]=-a[1];return b},normalize:function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1];0 +Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])&&1E-6>Math.abs(a[2]-b[2])&&1E-6>Math.abs(a[3]-b[3])},identity:function(a){a||(a=I.create());a[0]=1;a[1]=0;a[2]=0;a[3]=1;return a},transpose:function(a,b){if(!b||a===b){var c=a[1];a[1]=a[2];a[2]=c;return a}b[0]=a[0];b[1]=a[2];b[2]=a[1];b[3]=a[3];return b},determinant:function(a){return a[0]*a[3]-a[2]*a[1]},inverse:function(a,b){b||(b=a);var c=a[0],e=a[1],f=a[2],g=a[3],h=c*g-f*e;if(!h)return null;h=1/h;b[0]=g*h;b[1]=-e*h;b[2]=-f*h;b[3]=c*h;return b},multiply:function(a, +b,c){c||(c=a);var e=a[0],f=a[1],g=a[2];a=a[3];c[0]=e*b[0]+f*b[2];c[1]=e*b[1]+f*b[3];c[2]=g*b[0]+a*b[2];c[3]=g*b[1]+a*b[3];return c},rotate:function(a,b,c){c||(c=a);var e=a[0],f=a[1],g=a[2];a=a[3];var h=Math.sin(b);b=Math.cos(b);c[0]=e*b+f*h;c[1]=e*-h+f*b;c[2]=g*b+a*h;c[3]=g*-h+a*b;return c},multiplyVec2:function(a,b,c){c||(c=b);var e=b[0];b=b[1];c[0]=e*a[0]+b*a[1];c[1]=e*a[2]+b*a[3];return c},scale:function(a,b,c){c||(c=a);var e=a[1],f=a[2],g=a[3],h=b[0];b=b[1];c[0]=a[0]*h;c[1]=e*b;c[2]=f*h;c[3]= +g*b;return c},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}},K={create:function(a){var b=new k(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):(b[0]=0,b[1]=0,b[2]=0,b[3]=0);return b},createFrom:function(a,b,c,e){var f=new k(4);f[0]=a;f[1]=b;f[2]=c;f[3]=e;return f},add:function(a,b,c){c||(c=b);c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];return c},subtract:function(a,b,c){c||(c=b);c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];c[3]=a[3]-b[3];return c},multiply:function(a, +b,c){c||(c=b);c[0]=a[0]*b[0];c[1]=a[1]*b[1];c[2]=a[2]*b[2];c[3]=a[3]*b[3];return c},divide:function(a,b,c){c||(c=b);c[0]=a[0]/b[0];c[1]=a[1]/b[1];c[2]=a[2]/b[2];c[3]=a[3]/b[3];return c},scale:function(a,b,c){c||(c=a);c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;c[3]=a[3]*b;return c},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},equal:function(a,b){return a===b||1E-6>Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])&&1E-6>Math.abs(a[2]-b[2])&&1E-6>Math.abs(a[3]-b[3])},negate:function(a,b){b|| +(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=-a[3];return b},length:function(a){var b=a[0],c=a[1],e=a[2];a=a[3];return Math.sqrt(b*b+c*c+e*e+a*a)},squaredLength:function(a){var b=a[0],c=a[1],e=a[2];a=a[3];return b*b+c*c+e*e+a*a},lerp:function(a,b,c,e){e||(e=a);e[0]=a[0]+c*(b[0]-a[0]);e[1]=a[1]+c*(b[1]-a[1]);e[2]=a[2]+c*(b[2]-a[2]);e[3]=a[3]+c*(b[3]-a[3]);return e},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};b&&(b.glMatrixArrayType=k,b.MatrixArray=k,b.setMatrixArrayType=c,b.determineMatrixArrayType= +f,b.glMath=e,b.vec2=J,b.vec3=n,b.vec4=K,b.mat2=I,b.mat3=y,b.mat4=u,b.quat4=m);return{glMatrixArrayType:k,MatrixArray:k,setMatrixArrayType:c,determineMatrixArrayType:f,glMath:e,vec2:J,vec3:n,vec4:K,mat2:I,mat3:y,mat4:u,quat4:m}});PIXI.shaderFragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying float vColor;","uniform sampler2D uSampler;","void main(void) {","gl_FragColor \x3d texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y));","gl_FragColor \x3d gl_FragColor * vColor;","}"]; +PIXI.shaderVertexSrc=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute float aColor;","uniform mat4 uMVMatrix;","varying vec2 vTextureCoord;","varying float vColor;","void main(void) {","gl_Position \x3d uMVMatrix * vec4(aVertexPosition, 1.0, 1.0);","vTextureCoord \x3d aTextureCoord;","vColor \x3d aColor;","}"]; +PIXI.CompileVertexShader=function(b,c){for(var f="",e=0;e b.length)){var c=this.uvs,f=this.indices,e=this.colors;this.count-=0.2;c[0]=0;c[1]=1;c[2]=0;c[3]=1;e[0]=1;e[1]=1;f[0]=0;f[1]=1;for(var b=b.length,g=1;gb.length)){var c=this.verticies,f=b[0],e,g=e=0,j=b[0];this.count-=0.2;c[0]=j.x+e;c[1]=j.y+g;c[2]=j.x-e;c[3]=j.y-g;for(var k=b.length,n=1;n > 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255]; +} + var AjaxRequest = function() { var activexmodes = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"] //activeX versions to check for in IE diff --git a/src/yuidoc.json b/src/yuidoc.json index fc3f18e..c4fb6a8 100644 --- a/src/yuidoc.json +++ b/src/yuidoc.json @@ -1,9 +1,10 @@ { - "name": "The Foo API", + "name": "Pixi.js API", + "logo": "../logo_small.png", "description": "The Foo API: a library for doing X, Y, and Z", - "version": "1.2.1", - "url": "http://example.com/", + "version": "0.9", + "url": "http://goodboydigital.com/", "options": { - "outdir": "../build/apidocs" + "outdir": "../docs" } } \ No newline at end of file