Documentation Fix

This commit is contained in:
Mat Groves 2013-06-19 20:43:52 +01:00
parent 8093792ed5
commit 4dab30ee17
85 changed files with 16528 additions and 1633 deletions

View file

@ -12,10 +12,13 @@ YUI.add("yuidoc-meta", function(Y) {
"ImageLoader",
"InteractionData",
"InteractionManager",
"JsonLoader",
"MovieClip",
"Point",
"Polygon",
"Rectangle",
"RenderTexture",
"Spine",
"Sprite",
"SpriteSheetLoader",
"Stage",

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -401,7 +407,7 @@ As each individual item is loaded this class will dispatch a "onProgress" event<
<a href="..&#x2F;files&#x2F;src_pixi_loaders_AssetLoader.js.html#l43"><code>src&#x2F;pixi&#x2F;loaders&#x2F;AssetLoader.js:43</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_loaders_AssetLoader.js.html#l46"><code>src&#x2F;pixi&#x2F;loaders&#x2F;AssetLoader.js:46</code></a>
</p>
@ -444,7 +450,7 @@ As each individual item is loaded this class will dispatch a "onProgress" event<
<a href="..&#x2F;files&#x2F;src_pixi_loaders_AssetLoader.js.html#l38"><code>src&#x2F;pixi&#x2F;loaders&#x2F;AssetLoader.js:38</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_loaders_AssetLoader.js.html#l41"><code>src&#x2F;pixi&#x2F;loaders&#x2F;AssetLoader.js:41</code></a>
</p>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -377,7 +383,7 @@
<a href="..&#x2F;files&#x2F;src_pixi_textures_BaseTexture.js.html#l103"><code>src&#x2F;pixi&#x2F;textures&#x2F;BaseTexture.js:103</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_textures_BaseTexture.js.html#l101"><code>src&#x2F;pixi&#x2F;textures&#x2F;BaseTexture.js:101</code></a>
</p>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -625,7 +631,7 @@ http://www.bmglyph.com/ for mac.</p>
<div class="param-description">
</div>
@ -715,7 +721,7 @@ http://www.bmglyph.com/ for mac.</p>
<div class="param-description">
</div>
@ -730,7 +736,7 @@ http://www.bmglyph.com/ for mac.</p>
<div class="param-description">
</div>
@ -814,7 +820,7 @@ http://www.bmglyph.com/ for mac.</p>
<div class="param-description">
</div>
@ -898,7 +904,7 @@ http://www.bmglyph.com/ for mac.</p>
<div class="param-description">
</div>
@ -982,7 +988,7 @@ http://www.bmglyph.com/ for mac.</p>
<div class="param-description">
</div>
@ -1066,7 +1072,7 @@ http://www.bmglyph.com/ for mac.</p>
<div class="param-description">
</div>
@ -1150,7 +1156,7 @@ http://www.bmglyph.com/ for mac.</p>
<div class="param-description">
</div>
@ -1235,7 +1241,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
<div class="param-description">
</div>
@ -1320,7 +1326,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1404,7 +1410,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1488,7 +1494,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1783,7 +1789,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1798,7 +1804,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1883,7 +1889,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -1967,7 +1973,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -2052,7 +2058,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>
@ -2136,7 +2142,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -642,7 +648,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
<div class="param-description">
</div>
@ -729,7 +735,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
<div class="param-description">
</div>
@ -816,7 +822,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
<div class="param-description">
</div>
@ -903,7 +909,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
<div class="param-description">
</div>
@ -991,7 +997,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
<div class="param-description">
</div>
@ -1079,7 +1085,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1166,7 +1172,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1254,7 +1260,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -1341,7 +1347,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -1429,7 +1435,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>
@ -1516,7 +1522,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -526,7 +532,7 @@
<div class="param-description">
</div>
@ -619,7 +625,7 @@
<div class="param-description">
</div>
@ -634,7 +640,7 @@
<div class="param-description">
</div>
@ -718,7 +724,7 @@
<div class="param-description">
</div>
@ -805,7 +811,7 @@
<div class="param-description">
</div>
@ -889,7 +895,7 @@
<div class="param-description">
</div>
@ -973,7 +979,7 @@
<div class="param-description">
</div>
@ -1057,7 +1063,7 @@
<div class="param-description">
</div>
@ -1142,7 +1148,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
<div class="param-description">
</div>
@ -1227,7 +1233,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1314,7 +1320,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1398,7 +1404,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1491,7 +1497,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1506,7 +1512,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1591,7 +1597,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -1675,7 +1681,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -1760,7 +1766,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>
@ -1844,7 +1850,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -136,7 +142,7 @@
<div class="foundat">
Defined in: <a href="..&#x2F;files&#x2F;src_pixi_InteractionManager.js.html#l506"><code>src&#x2F;pixi&#x2F;InteractionManager.js:506</code></a>
Defined in: <a href="..&#x2F;files&#x2F;src_pixi_InteractionManager.js.html#l513"><code>src&#x2F;pixi&#x2F;InteractionManager.js:513</code></a>
</div>
@ -190,7 +196,7 @@
<a href="..&#x2F;files&#x2F;src_pixi_InteractionManager.js.html#l506"><code>src&#x2F;pixi&#x2F;InteractionManager.js:506</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_InteractionManager.js.html#l513"><code>src&#x2F;pixi&#x2F;InteractionManager.js:513</code></a>
</p>
@ -329,7 +335,7 @@
<a href="..&#x2F;files&#x2F;src_pixi_InteractionManager.js.html#l530"><code>src&#x2F;pixi&#x2F;InteractionManager.js:530</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_InteractionManager.js.html#l537"><code>src&#x2F;pixi&#x2F;InteractionManager.js:537</code></a>
</p>
@ -418,7 +424,7 @@
<a href="..&#x2F;files&#x2F;src_pixi_InteractionManager.js.html#l512"><code>src&#x2F;pixi&#x2F;InteractionManager.js:512</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_InteractionManager.js.html#l519"><code>src&#x2F;pixi&#x2F;InteractionManager.js:519</code></a>
</p>
@ -462,7 +468,7 @@
<a href="..&#x2F;files&#x2F;src_pixi_InteractionManager.js.html#l522"><code>src&#x2F;pixi&#x2F;InteractionManager.js:522</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_InteractionManager.js.html#l529"><code>src&#x2F;pixi&#x2F;InteractionManager.js:529</code></a>
</p>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -0,0 +1,331 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JsonLoader - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="..&#x2F;classes/AssetLoader.html">AssetLoader</a></li>
<li><a href="..&#x2F;classes/BaseTexture.html">BaseTexture</a></li>
<li><a href="..&#x2F;classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
<li><a href="..&#x2F;classes/BitmapText.html">BitmapText</a></li>
<li><a href="..&#x2F;classes/CanvasRenderer.html">CanvasRenderer</a></li>
<li><a href="..&#x2F;classes/CustomRenderable.html">CustomRenderable</a></li>
<li><a href="..&#x2F;classes/DisplayObject.html">DisplayObject</a></li>
<li><a href="..&#x2F;classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
<li><a href="..&#x2F;classes/ImageLoader.html">ImageLoader</a></li>
<li><a href="..&#x2F;classes/InteractionData.html">InteractionData</a></li>
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
<li><a href="..&#x2F;classes/Stage.html">Stage</a></li>
<li><a href="..&#x2F;classes/Text.html">Text</a></li>
<li><a href="..&#x2F;classes/Texture.html">Texture</a></li>
<li><a href="..&#x2F;classes/TilingSprite.html">TilingSprite</a></li>
<li><a href="..&#x2F;classes/WebGLBatch.html">WebGLBatch</a></li>
<li><a href="..&#x2F;classes/WebGLRenderer.html">WebGLRenderer</a></li>
</ul>
<ul id="api-modules" class="apis modules">
<li><a href="..&#x2F;modules/PIXI.html">PIXI</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1>JsonLoader Class</h1>
<div class="box meta">
<div class="extends">
Extends EventTarget
</div>
<div class="foundat">
Defined in: <a href="..&#x2F;files&#x2F;src_pixi_loaders_JsonLoader.js.html#l5"><code>src&#x2F;pixi&#x2F;loaders&#x2F;JsonLoader.js:5</code></a>
</div>
Module: <a href="../modules/PIXI.html">PIXI</a>
</div>
<div class="box intro">
<p>The json file loader is used to load in JSON data and parsing it
When loaded this class will dispatch a "loaded" event
If load failed this class will dispatch a "error" event</p>
</div>
<div class="constructor">
<h2>Constructor</h2>
<div id="method_JsonLoader" class="method item">
<h3 class="name"><code>JsonLoader</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>url</code>
</li>
<li class="arg">
<code>crossorigin</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="..&#x2F;files&#x2F;src_pixi_loaders_JsonLoader.js.html#l5"><code>src&#x2F;pixi&#x2F;loaders&#x2F;JsonLoader.js:5</code></a>
</p>
</div>
<div class="description">
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">url</code>
<span class="type">String</span>
<div class="param-description">
<p>the url of the JSON file</p>
</div>
</li>
<li class="param">
<code class="param-name">crossorigin</code>
<span class="type">Boolean</span>
<div class="param-description">
</div>
</li>
</ul>
</div>
</div>
</div>
<div id="classdocs" class="tabview">
<ul class="api-class-tabs">
<li class="api-class-tab index"><a href="#index">Index</a></li>
</ul>
<div>
<div id="index" class="api-class-tabpanel index">
<h2 class="off-left">Item Index</h2>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="..&#x2F;assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="..&#x2F;assets/js/yui-prettify.js"></script>
<script src="..&#x2F;assets/../api.js"></script>
<script src="..&#x2F;assets/js/api-filter.js"></script>
<script src="..&#x2F;assets/js/api-list.js"></script>
<script src="..&#x2F;assets/js/api-search.js"></script>
<script src="..&#x2F;assets/js/apidocs.js"></script>
</body>
</html>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -668,7 +674,7 @@
<div class="param-description">
</div>
@ -758,7 +764,7 @@
<div class="param-description">
</div>
@ -773,7 +779,7 @@
<div class="param-description">
</div>
@ -857,7 +863,7 @@
<div class="param-description">
</div>
@ -941,7 +947,7 @@
<div class="param-description">
</div>
@ -1199,7 +1205,7 @@
<div class="param-description">
</div>
@ -1283,7 +1289,7 @@
<div class="param-description">
</div>
@ -1367,7 +1373,7 @@
<div class="param-description">
</div>
@ -1452,7 +1458,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
<div class="param-description">
</div>
@ -1537,7 +1543,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1675,7 +1681,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1759,7 +1765,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1987,7 +1993,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -2002,7 +2008,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -2087,7 +2093,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -2171,7 +2177,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -2256,7 +2262,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>
@ -2340,7 +2346,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

396
docs/classes/Polygon.html Normal file
View file

@ -0,0 +1,396 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Polygon - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="..&#x2F;classes/AssetLoader.html">AssetLoader</a></li>
<li><a href="..&#x2F;classes/BaseTexture.html">BaseTexture</a></li>
<li><a href="..&#x2F;classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
<li><a href="..&#x2F;classes/BitmapText.html">BitmapText</a></li>
<li><a href="..&#x2F;classes/CanvasRenderer.html">CanvasRenderer</a></li>
<li><a href="..&#x2F;classes/CustomRenderable.html">CustomRenderable</a></li>
<li><a href="..&#x2F;classes/DisplayObject.html">DisplayObject</a></li>
<li><a href="..&#x2F;classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
<li><a href="..&#x2F;classes/ImageLoader.html">ImageLoader</a></li>
<li><a href="..&#x2F;classes/InteractionData.html">InteractionData</a></li>
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
<li><a href="..&#x2F;classes/Stage.html">Stage</a></li>
<li><a href="..&#x2F;classes/Text.html">Text</a></li>
<li><a href="..&#x2F;classes/Texture.html">Texture</a></li>
<li><a href="..&#x2F;classes/TilingSprite.html">TilingSprite</a></li>
<li><a href="..&#x2F;classes/WebGLBatch.html">WebGLBatch</a></li>
<li><a href="..&#x2F;classes/WebGLRenderer.html">WebGLRenderer</a></li>
</ul>
<ul id="api-modules" class="apis modules">
<li><a href="..&#x2F;modules/PIXI.html">PIXI</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1>Polygon Class</h1>
<div class="box meta">
<div class="foundat">
Defined in: <a href="..&#x2F;files&#x2F;src_pixi_Polygon.js.html#l5"><code>src&#x2F;pixi&#x2F;Polygon.js:5</code></a>
</div>
Module: <a href="../modules/PIXI.html">PIXI</a>
</div>
<div class="box intro">
</div>
<div class="constructor">
<h2>Constructor</h2>
<div id="method_Polygon" class="method item">
<h3 class="name"><code>Polygon</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>points</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="..&#x2F;files&#x2F;src_pixi_Polygon.js.html#l5"><code>src&#x2F;pixi&#x2F;Polygon.js:5</code></a>
</p>
</div>
<div class="description">
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">points</code>
<span class="type">Array</span>
<div class="param-description">
</div>
</li>
</ul>
</div>
</div>
</div>
<div id="classdocs" class="tabview">
<ul class="api-class-tabs">
<li class="api-class-tab index"><a href="#index">Index</a></li>
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
</ul>
<div>
<div id="index" class="api-class-tabpanel index">
<h2 class="off-left">Item Index</h2>
<div class="index-section methods">
<h3>Methods</h3>
<ul class="index-list methods">
<li class="index-item method">
<a href="#method_clone">clone</a>
</li>
</ul>
</div>
</div>
<div id="methods" class="api-class-tabpanel">
<h2 class="off-left">Methods</h2>
<div id="method_clone" class="method item">
<h3 class="name"><code>clone</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type"></span>
</span>
<div class="meta">
<p>
Defined in
<a href="..&#x2F;files&#x2F;src_pixi_Polygon.js.html#l15"><code>src&#x2F;pixi&#x2F;Polygon.js:15</code></a>
</p>
</div>
<div class="description">
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
a copy of the polygon
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="..&#x2F;assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="..&#x2F;assets/js/yui-prettify.js"></script>
<script src="..&#x2F;assets/../api.js"></script>
<script src="..&#x2F;assets/js/api-filter.js"></script>
<script src="..&#x2F;assets/js/api-list.js"></script>
<script src="..&#x2F;assets/js/api-search.js"></script>
<script src="..&#x2F;assets/js/apidocs.js"></script>
</body>
</html>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -547,7 +553,7 @@
<div class="param-description">
<p>If true the texture will not be cleared before the displayObject is drawn</p>
<p>If true the texture will be cleared before the displayObject is drawn</p>
</div>

2376
docs/classes/Spine.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -616,7 +622,7 @@
<div class="param-description">
</div>
@ -706,7 +712,7 @@
<div class="param-description">
</div>
@ -721,7 +727,7 @@
<div class="param-description">
</div>
@ -805,7 +811,7 @@
<div class="param-description">
</div>
@ -1103,7 +1109,7 @@
<div class="param-description">
</div>
@ -1187,7 +1193,7 @@
<div class="param-description">
</div>
@ -1271,7 +1277,7 @@
<div class="param-description">
</div>
@ -1355,7 +1361,7 @@
<div class="param-description">
</div>
@ -1440,7 +1446,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
<div class="param-description">
</div>
@ -1525,7 +1531,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1609,7 +1615,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1693,7 +1699,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1870,7 +1876,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1885,7 +1891,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1970,7 +1976,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -2054,7 +2060,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -2139,7 +2145,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>
@ -2223,7 +2229,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -598,7 +604,7 @@
<div class="param-description">
</div>
@ -688,7 +694,7 @@
<div class="param-description">
</div>
@ -703,7 +709,7 @@
<div class="param-description">
</div>
@ -787,7 +793,7 @@
<div class="param-description">
</div>
@ -871,7 +877,7 @@
<div class="param-description">
</div>
@ -923,7 +929,7 @@
<a href="..&#x2F;files&#x2F;src_pixi_Stage.js.html#l72"><code>src&#x2F;pixi&#x2F;Stage.js:72</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_Stage.js.html#l76"><code>src&#x2F;pixi&#x2F;Stage.js:76</code></a>
</p>
@ -1026,7 +1032,7 @@
<div class="param-description">
</div>
@ -1110,7 +1116,7 @@
<div class="param-description">
</div>
@ -1194,7 +1200,7 @@
<div class="param-description">
</div>
@ -1279,7 +1285,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
<div class="param-description">
</div>
@ -1364,7 +1370,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1448,7 +1454,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1506,7 +1512,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<a href="..&#x2F;files&#x2F;src_pixi_Stage.js.html#l61"><code>src&#x2F;pixi&#x2F;Stage.js:61</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_Stage.js.html#l63"><code>src&#x2F;pixi&#x2F;Stage.js:63</code></a>
</p>
@ -1619,7 +1625,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1709,7 +1715,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1724,7 +1730,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1809,7 +1815,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -1893,7 +1899,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -1978,7 +1984,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>
@ -2062,7 +2068,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>
@ -2110,7 +2116,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<a href="..&#x2F;files&#x2F;src_pixi_Stage.js.html#l38"><code>src&#x2F;pixi&#x2F;Stage.js:38</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_Stage.js.html#l40"><code>src&#x2F;pixi&#x2F;Stage.js:40</code></a>
</p>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -331,6 +337,34 @@
</li>
<li class="param">
<code class="param-name optional">[wordWrap=false]</code>
<span class="type">Boolean</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Indicates if word wrap should be used</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[wordWrapWidth=100]</code>
<span class="type">Number</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The width at which text will wrap</p>
</div>
</li>
</ul>
</li>
@ -701,7 +735,7 @@
<div class="param-description">
</div>
@ -791,7 +825,7 @@
<div class="param-description">
</div>
@ -806,7 +840,7 @@
<div class="param-description">
</div>
@ -890,7 +924,7 @@
<div class="param-description">
</div>
@ -974,7 +1008,7 @@
<div class="param-description">
</div>
@ -1058,7 +1092,7 @@
<div class="param-description">
</div>
@ -1142,7 +1176,7 @@
<div class="param-description">
</div>
@ -1226,7 +1260,7 @@
<div class="param-description">
</div>
@ -1311,7 +1345,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
<div class="param-description">
</div>
@ -1396,7 +1430,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1480,7 +1514,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1564,7 +1598,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1628,7 +1662,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<a href="..&#x2F;files&#x2F;src_pixi_text_Text.js.html#l35"><code>src&#x2F;pixi&#x2F;text&#x2F;Text.js:35</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_text_Text.js.html#l37"><code>src&#x2F;pixi&#x2F;text&#x2F;Text.js:37</code></a>
</p>
@ -1694,7 +1728,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<li class="param">
<code class="param-name optional">[stroke]</code>
<code class="param-name optional">[stroke=&quot;black&quot;]</code>
<span class="type">String</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
@ -1720,6 +1754,34 @@ for this callback to be fired, The touch must have started over the displayObjec
</li>
<li class="param">
<code class="param-name optional">[wordWrap=false]</code>
<span class="type">Boolean</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Indicates if word wrap should be used</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[wordWrapWidth=100]</code>
<span class="type">Number</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The width at which text will wrap</p>
</div>
</li>
</ul>
</li>
@ -1907,7 +1969,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1922,7 +1984,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -2007,7 +2069,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -2091,7 +2153,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -2176,7 +2238,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>
@ -2260,7 +2322,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -612,7 +618,7 @@
<div class="param-description">
</div>
@ -702,7 +708,7 @@
<div class="param-description">
</div>
@ -717,7 +723,7 @@
<div class="param-description">
</div>
@ -801,7 +807,7 @@
<div class="param-description">
</div>
@ -885,7 +891,7 @@
<div class="param-description">
</div>
@ -969,7 +975,7 @@
<div class="param-description">
</div>
@ -1053,7 +1059,7 @@
<div class="param-description">
</div>
@ -1137,7 +1143,7 @@
<div class="param-description">
</div>
@ -1222,7 +1228,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
<div class="param-description">
</div>
@ -1307,7 +1313,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1391,7 +1397,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1475,7 +1481,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1565,7 +1571,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1580,7 +1586,7 @@ for this callback to be fired, The touch must have started over the displayObjec
<div class="param-description">
</div>
@ -1665,7 +1671,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -1749,7 +1755,7 @@ basically a touch version of click</p>
<div class="param-description">
</div>
@ -1834,7 +1840,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>
@ -1918,7 +1924,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
<div class="param-description">
</div>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -604,7 +610,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
<a href="..&#x2F;files&#x2F;src_pixi_renderers_WebGLBatch.js.html#l267"><code>src&#x2F;pixi&#x2F;renderers&#x2F;WebGLBatch.js:267</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_renderers_WebGLBatch.js.html#l268"><code>src&#x2F;pixi&#x2F;renderers&#x2F;WebGLBatch.js:268</code></a>
</p>
@ -681,7 +687,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
<a href="..&#x2F;files&#x2F;src_pixi_renderers_WebGLBatch.js.html#l345"><code>src&#x2F;pixi&#x2F;renderers&#x2F;WebGLBatch.js:345</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_renderers_WebGLBatch.js.html#l346"><code>src&#x2F;pixi&#x2F;renderers&#x2F;WebGLBatch.js:346</code></a>
</p>
@ -980,7 +986,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
<a href="..&#x2F;files&#x2F;src_pixi_renderers_WebGLBatch.js.html#l400"><code>src&#x2F;pixi&#x2F;renderers&#x2F;WebGLBatch.js:400</code></a>
<a href="..&#x2F;files&#x2F;src_pixi_renderers_WebGLBatch.js.html#l401"><code>src&#x2F;pixi&#x2F;renderers&#x2F;WebGLBatch.js:401</code></a>
</p>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

File diff suppressed because it is too large Load diff

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -197,25 +203,27 @@ PIXI.InteractionManager.prototype.collectInteractiveSprite = function(displayObj
{
var child = children[i];
&#x2F;&#x2F; push all interactive bits
if(child.interactive)
{
iParent.interactiveChildren = true;
&#x2F;&#x2F;child.__iParent = iParent;
this.interactiveItems.push(child);
if(child.children.length &gt; 0)
if(child.visible) {
&#x2F;&#x2F; push all interactive bits
if(child.interactive)
{
this.collectInteractiveSprite(child, child);
iParent.interactiveChildren = true;
&#x2F;&#x2F;child.__iParent = iParent;
this.interactiveItems.push(child);
if(child.children.length &gt; 0)
{
this.collectInteractiveSprite(child, child);
}
}
}
else
{
child.__iParent = null;
if(child.children.length &gt; 0)
else
{
this.collectInteractiveSprite(child, iParent);
child.__iParent = null;
if(child.children.length &gt; 0)
{
this.collectInteractiveSprite(child, iParent);
}
}
}
}
@ -325,8 +333,6 @@ PIXI.InteractionManager.prototype.update = function()
PIXI.InteractionManager.prototype.onMouseMove = function(event)
{
event.preventDefault();
&#x2F;&#x2F; TODO optimize by not check EVERY TIME! maybe half as often? &#x2F;&#x2F;
var rect = this.target.view.getBoundingClientRect();
@ -351,8 +357,6 @@ PIXI.InteractionManager.prototype.onMouseMove = function(event)
PIXI.InteractionManager.prototype.onMouseDown = function(event)
{
event.preventDefault();
&#x2F;&#x2F; loop through inteaction tree...
&#x2F;&#x2F; hit test each item! -&gt;
&#x2F;&#x2F; get interactive items under point??
@ -389,7 +393,6 @@ PIXI.InteractionManager.prototype.onMouseDown = function(event)
PIXI.InteractionManager.prototype.onMouseUp = function(event)
{
event.preventDefault();
var global = this.mouse.global;
@ -436,27 +439,66 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
var global = interactionData.global;
if(!item.visible)return false;
if(item instanceof PIXI.Sprite)
var isSprite = (item instanceof PIXI.Sprite),
worldTransform = item.worldTransform,
a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2],
a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5],
id = 1 &#x2F; (a00 * a11 + a01 * -a10),
x = a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
y = a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id;
&#x2F;&#x2F;a sprite or display object with a hit area defined
if(item.hitArea)
{
var worldTransform = item.worldTransform;
var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2],
a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5],
id = 1 &#x2F; (a00 * a11 + a01 * -a10);
var x = a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id;
var y = a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id;
var width = item.texture.frame.width;
var height = item.texture.frame.height;
var x1 = -width * item.anchor.x;
var hitArea = item.hitArea;
&#x2F;&#x2F;Polygon hit area
if(item.hitArea instanceof PIXI.Polygon) {
var inside = false;
&#x2F;&#x2F; use some raycasting to test hits
&#x2F;&#x2F; https:&#x2F;&#x2F;github.com&#x2F;substack&#x2F;point-in-polygon&#x2F;blob&#x2F;master&#x2F;index.js
for(var i = 0, j = item.hitArea.points.length - 1; i &lt; item.hitArea.points.length; j = i++) {
var xi = item.hitArea.points[i].x, yi = item.hitArea.points[i].y,
xj = item.hitArea.points[j].x, yj = item.hitArea.points[j].y,
intersect = ((yi &gt; y) != (yj &gt; y)) &amp;&amp; (x &lt; (xj - xi) * (y - yi) &#x2F; (yj - yi) + xi);
if(intersect) inside = !inside;
}
if(inside) {
if(isSprite) interactionData.target = item;
return true;
}
}
&#x2F;&#x2F;Rectangle hit area
else {
var x1 = hitArea.x;
if(x &gt; x1 &amp;&amp; x &lt; x1 + hitArea.width)
{
var y1 = hitArea.y;
if(y &gt; y1 &amp;&amp; y &lt; y1 + hitArea.height)
{
if(isSprite) interactionData.target = item;
return true;
}
}
}
}
&#x2F;&#x2F; a sprite with no hitarea defined
else if(isSprite)
{
var width = item.texture.frame.width,
height = item.texture.frame.height,
x1 = -width * item.anchor.x,
y1;
if(x &gt; x1 &amp;&amp; x &lt; x1 + width)
{
var y1 = -height * item.anchor.y;
y1 = -height * item.anchor.y;
if(y &gt; y1 &amp;&amp; y &lt; y1 + height)
{
&#x2F;&#x2F; set the target property if a hit is true!
@ -465,30 +507,7 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
}
}
}
else if(item.hitArea)
{
var worldTransform = item.worldTransform;
var hitArea = item.hitArea;
var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2],
a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5],
id = 1 &#x2F; (a00 * a11 + a01 * -a10);
var x = a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id;
var y = a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id;
var x1 = hitArea.x;
if(x &gt; x1 &amp;&amp; x &lt; x1 + hitArea.width)
{
var y1 = hitArea.y;
if(y &gt; y1 &amp;&amp; y &lt; y1 + hitArea.height)
{
return true;
}
}
}
var length = item.children.length;
for (var i = 0; i &lt; length; i++)
@ -497,7 +516,7 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
var hit = this.hitTest(tempItem, interactionData);
if(hit)return true;
}
return false;
}
@ -505,8 +524,6 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
PIXI.InteractionManager.prototype.onTouchMove = function(event)
{
event.preventDefault();
var rect = this.target.view.getBoundingClientRect();
var changedTouches = event.changedTouches;
@ -530,7 +547,6 @@ PIXI.InteractionManager.prototype.onTouchMove = function(event)
PIXI.InteractionManager.prototype.onTouchStart = function(event)
{
event.preventDefault();
var rect = this.target.view.getBoundingClientRect();
var changedTouches = event.changedTouches;
@ -572,9 +588,6 @@ PIXI.InteractionManager.prototype.onTouchStart = function(event)
PIXI.InteractionManager.prototype.onTouchEnd = function(event)
{
event.preventDefault();
var rect = this.target.view.getBoundingClientRect();
var changedTouches = event.changedTouches;

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -0,0 +1,190 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>src&#x2F;pixi&#x2F;Polygon.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="..&#x2F;classes/AssetLoader.html">AssetLoader</a></li>
<li><a href="..&#x2F;classes/BaseTexture.html">BaseTexture</a></li>
<li><a href="..&#x2F;classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
<li><a href="..&#x2F;classes/BitmapText.html">BitmapText</a></li>
<li><a href="..&#x2F;classes/CanvasRenderer.html">CanvasRenderer</a></li>
<li><a href="..&#x2F;classes/CustomRenderable.html">CustomRenderable</a></li>
<li><a href="..&#x2F;classes/DisplayObject.html">DisplayObject</a></li>
<li><a href="..&#x2F;classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
<li><a href="..&#x2F;classes/ImageLoader.html">ImageLoader</a></li>
<li><a href="..&#x2F;classes/InteractionData.html">InteractionData</a></li>
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
<li><a href="..&#x2F;classes/Stage.html">Stage</a></li>
<li><a href="..&#x2F;classes/Text.html">Text</a></li>
<li><a href="..&#x2F;classes/Texture.html">Texture</a></li>
<li><a href="..&#x2F;classes/TilingSprite.html">TilingSprite</a></li>
<li><a href="..&#x2F;classes/WebGLBatch.html">WebGLBatch</a></li>
<li><a href="..&#x2F;classes/WebGLRenderer.html">WebGLRenderer</a></li>
</ul>
<ul id="api-modules" class="apis modules">
<li><a href="..&#x2F;modules/PIXI.html">PIXI</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;Polygon.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Adrien Brault &lt;adrien.brault@gmail.com&gt;
*&#x2F;
&#x2F;**
* @class Polygon
* @constructor
* @param points {Array}
*&#x2F;
PIXI.Polygon = function(points)
{
this.points = points;
}
&#x2F;**
* @method clone
* @return a copy of the polygon
*&#x2F;
PIXI.Polygon.clone = function()
{
var points = [];
for (var i=0; i&lt;this.points.length; i++) {
points.push(this.points[i].clone());
}
return new PIXI.Polygon(points);
}
PIXI.Polygon.constructor = PIXI.Polygon;
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="..&#x2F;assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="..&#x2F;assets/js/yui-prettify.js"></script>
<script src="..&#x2F;assets/../api.js"></script>
<script src="..&#x2F;assets/js/api-filter.js"></script>
<script src="..&#x2F;assets/js/api-list.js"></script>
<script src="..&#x2F;assets/js/api-search.js"></script>
<script src="..&#x2F;assets/js/apidocs.js"></script>
</body>
</html>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -162,6 +168,8 @@ PIXI.Stage = function(backgroundColor, interactive)
this.setBackgroundColor(backgroundColor);
this.worldVisible = true;
this.stage.dirty = true;
}
&#x2F;&#x2F; constructor
@ -200,7 +208,9 @@ PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor)
{
this.backgroundColor = backgroundColor || 0x000000;
this.backgroundColorSplit = HEXtoRGB(this.backgroundColor);
this.backgroundColorString = &quot;#&quot; + this.backgroundColor.toString(16);
var hex = this.backgroundColor.toString(16);
hex = &quot;000000&quot;.substr(0, 6 - hex.length) + hex;
this.backgroundColorString = &quot;#&quot; + hex;
}
&#x2F;**

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

File diff suppressed because it is too large Load diff

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -163,10 +169,13 @@ PIXI.AssetLoader = function(assetURLs)
&quot;jpeg&quot;: PIXI.ImageLoader,
&quot;png&quot;: PIXI.ImageLoader,
&quot;gif&quot;: PIXI.ImageLoader,
&quot;json&quot;: PIXI.SpriteSheetLoader,
&quot;json&quot;: PIXI.JsonLoader,
&quot;anim&quot;: PIXI.SpineLoader,
&quot;xml&quot;: PIXI.BitmapFontLoader,
&quot;fnt&quot;: PIXI.BitmapFontLoader
};
};
&#x2F;**

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -223,7 +229,9 @@ PIXI.BitmapFontLoader.prototype.onXMLLoaded = function()
xOffset: parseInt(letters[i].attributes.getNamedItem(&quot;xoffset&quot;).nodeValue, 10),
yOffset: parseInt(letters[i].attributes.getNamedItem(&quot;yoffset&quot;).nodeValue, 10),
xAdvance: parseInt(letters[i].attributes.getNamedItem(&quot;xadvance&quot;).nodeValue, 10),
kerning: {}
kerning: {},
texture:new PIXI.Texture(this.texture, textureRect)
};
}
@ -238,6 +246,7 @@ PIXI.BitmapFontLoader.prototype.onXMLLoaded = function()
data.chars[second].kerning[first] = amount;
}
PIXI.BitmapText.fonts[data.font] = data;
var scope = this;

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -0,0 +1,288 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>src&#x2F;pixi&#x2F;loaders&#x2F;JsonLoader.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="..&#x2F;classes/AssetLoader.html">AssetLoader</a></li>
<li><a href="..&#x2F;classes/BaseTexture.html">BaseTexture</a></li>
<li><a href="..&#x2F;classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
<li><a href="..&#x2F;classes/BitmapText.html">BitmapText</a></li>
<li><a href="..&#x2F;classes/CanvasRenderer.html">CanvasRenderer</a></li>
<li><a href="..&#x2F;classes/CustomRenderable.html">CustomRenderable</a></li>
<li><a href="..&#x2F;classes/DisplayObject.html">DisplayObject</a></li>
<li><a href="..&#x2F;classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
<li><a href="..&#x2F;classes/ImageLoader.html">ImageLoader</a></li>
<li><a href="..&#x2F;classes/InteractionData.html">InteractionData</a></li>
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
<li><a href="..&#x2F;classes/Stage.html">Stage</a></li>
<li><a href="..&#x2F;classes/Text.html">Text</a></li>
<li><a href="..&#x2F;classes/Texture.html">Texture</a></li>
<li><a href="..&#x2F;classes/TilingSprite.html">TilingSprite</a></li>
<li><a href="..&#x2F;classes/WebGLBatch.html">WebGLBatch</a></li>
<li><a href="..&#x2F;classes/WebGLRenderer.html">WebGLRenderer</a></li>
</ul>
<ul id="api-modules" class="apis modules">
<li><a href="..&#x2F;modules/PIXI.html">PIXI</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;loaders&#x2F;JsonLoader.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**
* The json file loader is used to load in JSON data and parsing it
* When loaded this class will dispatch a &quot;loaded&quot; event
* If load failed this class will dispatch a &quot;error&quot; event
* @class JsonLoader
* @extends EventTarget
* @constructor
* @param {String} url the url of the JSON file
* @param {Boolean} crossorigin
*&#x2F;
PIXI.JsonLoader = function (url, crossorigin) {
PIXI.EventTarget.call(this);
this.url = url;
this.baseUrl = url.replace(&#x2F;[^\&#x2F;]*$&#x2F;, &quot;&quot;);
this.crossorigin = crossorigin;
this.loaded = false;
};
&#x2F;&#x2F; constructor
PIXI.JsonLoader.constructor = PIXI.JsonLoader;
&#x2F;**
* This will begin loading the JSON file
*&#x2F;
PIXI.JsonLoader.prototype.load = function () {
this.ajaxRequest = new AjaxRequest();
var scope = this;
this.ajaxRequest.onreadystatechange = function () {
scope.onJSONLoaded();
};
this.ajaxRequest.open(&quot;GET&quot;, this.url, true);
if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType(&quot;application&#x2F;json&quot;);
this.ajaxRequest.send(null);
};
&#x2F;**
* Invoke when JSON file is loaded
* @private
*&#x2F;
PIXI.JsonLoader.prototype.onJSONLoaded = function () {
if (this.ajaxRequest.readyState == 4) {
if (this.ajaxRequest.status == 200 || window.location.href.indexOf(&quot;http&quot;) == -1) {
this.json = JSON.parse(this.ajaxRequest.responseText);
if(this.json.frames)
{
&#x2F;&#x2F; sprite sheet
var scope = this;
var textureUrl = this.baseUrl + this.json.meta.image;
var image = new PIXI.ImageLoader(textureUrl, this.crossorigin);
var frameData = this.json.frames;
this.texture = image.texture.baseTexture;
image.addEventListener(&quot;loaded&quot;, function (event) {
scope.onLoaded();
});
for (var i in frameData) {
var rect = frameData[i].frame;
if (rect) {
PIXI.TextureCache[i] = new PIXI.Texture(this.texture, {
x: rect.x,
y: rect.y,
width: rect.w,
height: rect.h
});
if (frameData[i].trimmed) {
&#x2F;&#x2F;var realSize = frameData[i].spriteSourceSize;
PIXI.TextureCache[i].realSize = frameData[i].spriteSourceSize;
PIXI.TextureCache[i].trim.x = 0; &#x2F;&#x2F; (realSize.x &#x2F; rect.w)
&#x2F;&#x2F; calculate the offset!
}
}
}
image.load();
}
else if(this.json.bones)
{
&#x2F;&#x2F; spine animation
var spineJsonParser = new spine.SkeletonJson();
var skeletonData = spineJsonParser.readSkeletonData(this.json);
PIXI.AnimCache[this.url] = skeletonData;
this.onLoaded();
}
else
{
this.onLoaded();
}
} else {
this.onError();
}
}
};
&#x2F;**
* Invoke when json file loaded
* @private
*&#x2F;
PIXI.JsonLoader.prototype.onLoaded = function () {
this.loaded = true;
this.dispatchEvent({
type: &quot;loaded&quot;,
content: this
});
};
&#x2F;**
* Invoke when error occured
* @private
*&#x2F;
PIXI.JsonLoader.prototype.onError = function () {
this.dispatchEvent({
type: &quot;error&quot;,
content: this
});
};
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="..&#x2F;assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="..&#x2F;assets/js/yui-prettify.js"></script>
<script src="..&#x2F;assets/../api.js"></script>
<script src="..&#x2F;assets/js/api-filter.js"></script>
<script src="..&#x2F;assets/js/api-list.js"></script>
<script src="..&#x2F;assets/js/api-search.js"></script>
<script src="..&#x2F;assets/js/apidocs.js"></script>
</body>
</html>

View file

@ -0,0 +1,236 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>src&#x2F;pixi&#x2F;loaders&#x2F;SpineLoader.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="..&#x2F;classes/AssetLoader.html">AssetLoader</a></li>
<li><a href="..&#x2F;classes/BaseTexture.html">BaseTexture</a></li>
<li><a href="..&#x2F;classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
<li><a href="..&#x2F;classes/BitmapText.html">BitmapText</a></li>
<li><a href="..&#x2F;classes/CanvasRenderer.html">CanvasRenderer</a></li>
<li><a href="..&#x2F;classes/CustomRenderable.html">CustomRenderable</a></li>
<li><a href="..&#x2F;classes/DisplayObject.html">DisplayObject</a></li>
<li><a href="..&#x2F;classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
<li><a href="..&#x2F;classes/ImageLoader.html">ImageLoader</a></li>
<li><a href="..&#x2F;classes/InteractionData.html">InteractionData</a></li>
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
<li><a href="..&#x2F;classes/Stage.html">Stage</a></li>
<li><a href="..&#x2F;classes/Text.html">Text</a></li>
<li><a href="..&#x2F;classes/Texture.html">Texture</a></li>
<li><a href="..&#x2F;classes/TilingSprite.html">TilingSprite</a></li>
<li><a href="..&#x2F;classes/WebGLBatch.html">WebGLBatch</a></li>
<li><a href="..&#x2F;classes/WebGLRenderer.html">WebGLRenderer</a></li>
</ul>
<ul id="api-modules" class="apis modules">
<li><a href="..&#x2F;modules/PIXI.html">PIXI</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;loaders&#x2F;SpineLoader.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
* based on pixi impact spine implementation made by Eemeli Kelokorpi (@ekelokorpi) https:&#x2F;&#x2F;github.com&#x2F;ekelokorpi
*
* Awesome JS run time provided by EsotericSoftware
* https:&#x2F;&#x2F;github.com&#x2F;EsotericSoftware&#x2F;spine-runtimes
*
*&#x2F;
&#x2F;**
* The Spine loader is used to load in JSON spine data
* To generate the data you need to use http:&#x2F;&#x2F;esotericsoftware.com&#x2F; and export the &quot;JSON&quot; format
* Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load
* See example 12 (http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;examples&#x2F;12&#x2F;) to see a working example and check out the source
* You will need to generate a sprite sheet to accompany the spine data
* When loaded this class will dispatch a &quot;loaded&quot; event
* @class Spine
* @constructor
* @extends EventTarget
* @param {String} url the url of the sprite sheet JSON file
* @param {Boolean} crossorigin
*&#x2F;
PIXI.SpineLoader = function(url, crossorigin)
{
PIXI.EventTarget.call(this);
this.url = url;
this.crossorigin = crossorigin;
this.loaded = false;
}
PIXI.SpineLoader.constructor = PIXI.SpineLoader;
PIXI.SpineLoader.prototype.load = function()
{
new PIXI.JsonLoader(this.url, this.crossorigin);
jsonLoader.addEventListener(&quot;loaded&quot;, function (event) {
scope.json = event.content.json;
scope.onJSONLoaded();
});
jsonLoader.load();
};
PIXI.SpineLoader.prototype.load = function () {
var scope = this;
var jsonLoader = new PIXI.JsonLoader(this.url, this.crossorigin);
jsonLoader.addEventListener(&quot;loaded&quot;, function (event) {
scope.json = event.content.json;
scope.onJSONLoaded();
});
jsonLoader.load();
};
&#x2F;**
* Invoke when JSON file is loaded
* @private
*&#x2F;
PIXI.SpineLoader.prototype.onJSONLoaded = function (event) {
var spineJsonParser = new spine.SkeletonJson();
var skeletonData = spineJsonParser.readSkeletonData(this.json);
PIXI.AnimCache[this.url] = skeletonData;
this.onLoaded();
};
PIXI.SpineLoader.prototype.onLoaded = function()
{
this.loaded = true;
this.dispatchEvent({type: &quot;loaded&quot;, content: this});
};
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="..&#x2F;assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="..&#x2F;assets/js/yui-prettify.js"></script>
<script src="..&#x2F;assets/../api.js"></script>
<script src="..&#x2F;assets/js/api-filter.js"></script>
<script src="..&#x2F;assets/js/api-list.js"></script>
<script src="..&#x2F;assets/js/api-search.js"></script>
<script src="..&#x2F;assets/js/apidocs.js"></script>
</body>
</html>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -151,8 +157,7 @@
* @param {Boolean} crossorigin
*&#x2F;
PIXI.SpriteSheetLoader = function(url, crossorigin)
{
PIXI.SpriteSheetLoader = function (url, crossorigin) {
&#x2F;*
* i use texture packer to load the assets..
* http:&#x2F;&#x2F;www.codeandweb.com&#x2F;texturepacker
@ -172,71 +177,61 @@ PIXI.SpriteSheetLoader.constructor = PIXI.SpriteSheetLoader;
&#x2F;**
* This will begin loading the JSON file
*&#x2F;
PIXI.SpriteSheetLoader.prototype.load = function()
{
this.ajaxRequest = new AjaxRequest();
PIXI.SpriteSheetLoader.prototype.load = function () {
var scope = this;
this.ajaxRequest.onreadystatechange = function()
{
var jsonLoader = new PIXI.JsonLoader(this.url, this.crossorigin);
jsonLoader.addEventListener(&quot;loaded&quot;, function (event) {
scope.json = event.content.json;
scope.onJSONLoaded();
};
this.ajaxRequest.open(&quot;GET&quot;, this.url, true);
if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType(&quot;application&#x2F;json&quot;);
this.ajaxRequest.send(null)
});
jsonLoader.load();
};
&#x2F;**
* Invoke when JSON file is loaded
* @private
*&#x2F;
PIXI.SpriteSheetLoader.prototype.onJSONLoaded = function()
{
if (this.ajaxRequest.readyState == 4)
{
if (this.ajaxRequest.status == 200 || window.location.href.indexOf(&quot;http&quot;) == -1)
{
var jsonData = eval(&quot;(&quot; + this.ajaxRequest.responseText + &quot;)&quot;);
var textureUrl = this.baseUrl + jsonData.meta.image;
PIXI.SpriteSheetLoader.prototype.onJSONLoaded = function () {
var scope = this;
var textureUrl = this.baseUrl + this.json.meta.image;
var image = new PIXI.ImageLoader(textureUrl, this.crossorigin);
var frameData = this.json.frames;
var image = new PIXI.ImageLoader(textureUrl, this.crossorigin);
this.texture = image.texture.baseTexture;
var scope = this;
image.addEventListener(&quot;loaded&quot;, function(event) {
scope.onLoaded();
});
this.texture = image.texture.baseTexture;
image.addEventListener(&quot;loaded&quot;, function (event) {
scope.onLoaded();
});
var frameData = jsonData.frames;
for (var i in frameData)
{
var rect = frameData[i].frame;
if (rect)
{
PIXI.TextureCache[i] = new PIXI.Texture(this.texture, {x:rect.x, y:rect.y, width:rect.w, height:rect.h});
if(frameData[i].trimmed)
{
&#x2F;&#x2F;var realSize = frameData[i].spriteSourceSize;
PIXI.TextureCache[i].realSize = frameData[i].spriteSourceSize;
PIXI.TextureCache[i].trim.x = 0;&#x2F;&#x2F; (realSize.x &#x2F; rect.w)
&#x2F;&#x2F; calculate the offset!
}
}
}
for (var i in frameData) {
var rect = frameData[i].frame;
if (rect) {
PIXI.TextureCache[i] = new PIXI.Texture(this.texture, {
x: rect.x,
y: rect.y,
width: rect.w,
height: rect.h
});
if (frameData[i].trimmed) {
&#x2F;&#x2F;var realSize = frameData[i].spriteSourceSize;
PIXI.TextureCache[i].realSize = frameData[i].spriteSourceSize;
PIXI.TextureCache[i].trim.x = 0; &#x2F;&#x2F; (realSize.x &#x2F; rect.w)
&#x2F;&#x2F; calculate the offset!
}
}
}
image.load();
}
}
image.load();
};
&#x2F;**
* Invoke when all files are loaded (json and texture)
* @private
*&#x2F;
PIXI.SpriteSheetLoader.prototype.onLoaded = function()
{
this.dispatchEvent({type: &quot;loaded&quot;, content: this});
PIXI.SpriteSheetLoader.prototype.onLoaded = function () {
this.dispatchEvent({
type: &quot;loaded&quot;,
content: this
});
};
</pre>
</div>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -333,9 +339,12 @@ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject)
}
&#x2F;&#x2F; render!
for (var i=0; i &lt; displayObject.children.length; i++)
if(displayObject.children)
{
this.renderDisplayObject(displayObject.children[i]);
for (var i=0; i &lt; displayObject.children.length; i++)
{
this.renderDisplayObject(displayObject.children[i]);
}
}
this.context.setTransform(1,0,0,1,0,0);

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -367,6 +373,7 @@ PIXI.WebGLBatch.prototype.split = function(sprite)
&#x2F;&#x2F;console.log(val + &quot; SAME?&quot;);
var batch = new PIXI.WebGLBatch(this.gl)&#x2F;&#x2F;PIXI._getBatch(this.gl);
batch.init(sprite);
batch.texture = this.texture;
batch.tail = this.tail;
&#x2F;&#x2F;console.log(&quot;id is &quot; +batcheee.id)
@ -573,7 +580,6 @@ PIXI.WebGLBatch.prototype.update = function()
tx = worldTransform[2];
ty = worldTransform[5];
this.verticies[index + 0 ] = a * w1 + c * h1 + tx;
this.verticies[index + 1 ] = d * h1 + b * w1 + ty;
@ -659,6 +665,7 @@ PIXI.WebGLBatch.prototype.render = function(start, end)
{
this.refresh();
this.dirty = false;
}
if (this.size == 0)return;

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -165,6 +171,8 @@ PIXI.WebGLRenderGroup.prototype.setRenderable = function(displayObject)
&#x2F;&#x2F; has this changed??
if(this.root)this.removeDisplayObjectAndChildren(this.root);
displayObject.worldVisible = displayObject.visible;
&#x2F;&#x2F; soooooo &#x2F;&#x2F;
&#x2F;&#x2F; to check if any batchs exist already??
@ -177,25 +185,21 @@ PIXI.WebGLRenderGroup.prototype.setRenderable = function(displayObject)
PIXI.WebGLRenderGroup.prototype.render = function(projectionMatrix)
{
&#x2F;&#x2F;PIXI.WebGLRenderer.updateTextures();
PIXI.WebGLRenderer.updateTextures();
var gl = this.gl;
&#x2F;&#x2F; set the flipped matrix..
gl.uniformMatrix4fv(PIXI.shaderProgram.mvMatrixUniform, false, projectionMatrix);
for (var i=0; i &lt; this.toRemove.length; i++)
{
this.removeDisplayObjectAndChildren(this.toRemove[i]);
};
this.toRemove = [];
&#x2F;&#x2F; TODO remove this by replacing visible with getter setters..
this.checkVisibility(this.root, this.root.visible);
&#x2F;&#x2F; will render all the elements in the group
var renderable;
for (var i=0; i &lt; this.batchs.length; i++)
{
renderable = this.batchs[i];
@ -217,7 +221,7 @@ PIXI.WebGLRenderGroup.prototype.render = function(projectionMatrix)
PIXI.WebGLRenderGroup.prototype.renderSpecific = function(displayObject, projectionMatrix)
{
&#x2F;&#x2F;PIXI.WebGLRenderer.updateTextures();
PIXI.WebGLRenderer.updateTextures();
var gl = this.gl;
this.checkVisibility(displayObject, displayObject.visible);
@ -411,8 +415,9 @@ PIXI.WebGLRenderGroup.prototype.checkVisibility = function(displayObject, global
child.textureChange = false;
if(child.worldVisible)
{
this.removeDisplayObject(child)
this.addDisplayObject(child)
this.removeDisplayObject(child);
this.addDisplayObject(child);
&#x2F;&#x2F;this.updateTexture(child);
}
&#x2F;&#x2F; update texture!!
}
@ -424,6 +429,106 @@ PIXI.WebGLRenderGroup.prototype.checkVisibility = function(displayObject, global
};
}
PIXI.WebGLRenderGroup.prototype.updateTexture = function(displayObject)
{
&#x2F;&#x2F; we know this exists..
&#x2F;&#x2F; is it in a batch..
&#x2F;&#x2F; check batch length
if(displayObject.batch.length == 1)
{
&#x2F;&#x2F; just one! this guy! so simply swap the texture
displayObject.batch.texture = displayObject.texture.baseTexture;
return;
}
&#x2F;&#x2F; early out!
if(displayObject.batch.texture == displayObject.texture.baseTexture)return;
if(displayObject.batch.head == displayObject)
{
&#x2F;&#x2F;console.log(&quot;HEAD&quot;)
var currentBatch = displayObject.batch;
var index = this.batchs.indexOf( currentBatch );
var previousBatch = this.batchs[index-1];
currentBatch.remove(displayObject);
if(previousBatch)
{
if(previousBatch.texture == displayObject.texture.baseTexture &amp;&amp; previousBatch.blendMode == displayObject.blendMode)
{
previousBatch.insertAfter(displayObject, previousBatch.tail);
}
else
{
&#x2F;&#x2F; add it before..
var batch = PIXI.WebGLRenderer.getBatch();
batch.init(displayObject);
this.batchs.splice(index-1, 0, batch);
}
}
else
{
&#x2F;&#x2F; we are 0!
var batch = PIXI.WebGLRenderer.getBatch();
batch.init(displayObject);
this.batchs.splice(0, 0, batch);
}
}
else if(displayObject.batch.tail == displayObject)
{
var currentBatch = displayObject.batch;
var index = this.batchs.indexOf( currentBatch );
var nextBatch = this.batchs[index+1];
currentBatch.remove(displayObject);
if(nextBatch)
{
if(nextBatch.texture == displayObject.texture.baseTexture &amp;&amp; nextBatch.blendMode == displayObject.blendMode)
{
nextBatch.insertBefore(displayObject, nextBatch.head);
return;
}
else
{
&#x2F;&#x2F; add it before..
var batch = PIXI.WebGLRenderer.getBatch();
batch.init(displayObject);
this.batchs.splice(index+1, 0, batch);
}
}
else
{
&#x2F;&#x2F; we are 0!
var batch = PIXI.WebGLRenderer.getBatch();
batch.init(displayObject);
this.batchs.push(batch);
}
}
else
{
&#x2F;&#x2F; console.log(&quot;MIDDLE&quot;)
var currentBatch = displayObject.batch;
&#x2F;&#x2F; split the batch into 2
&#x2F;&#x2F; AH! dont split on the current display object as the texture is wrong!
var splitBatch = currentBatch.split(displayObject);
&#x2F;&#x2F; now remove the display object
splitBatch.remove(displayObject);
var batch = PIXI.WebGLRenderer.getBatch();
var index = this.batchs.indexOf( currentBatch );
batch.init(displayObject);
this.batchs.splice(index+1, 0, batch, splitBatch);
}
}
PIXI.WebGLRenderGroup.prototype.addDisplayObject = function(displayObject)
{
&#x2F;&#x2F; add a child to the render group..

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -182,7 +188,7 @@ PIXI.WebGLRenderer = function(width, height, view, transparent)
PIXI.gl = this.gl = this.view.getContext(&quot;experimental-webgl&quot;, {
alpha: this.transparent,
antialias:false, &#x2F;&#x2F; SPEED UP??
premultipliedAlpha:true
premultipliedAlpha:false
});
}
catch (e)
@ -325,7 +331,7 @@ PIXI.WebGLRenderer.prototype.render = function(stage)
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
gl.clearColor(stage.backgroundColorSplit[0],stage.backgroundColorSplit[1],stage.backgroundColorSplit[2], this.transparent);
gl.clearColor(stage.backgroundColorSplit[0],stage.backgroundColorSplit[1],stage.backgroundColorSplit[2], !this.transparent);
gl.clear(gl.COLOR_BUFFER_BIT);

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -231,7 +237,7 @@ PIXI.BitmapText.prototype.updateText = function()
{
pos.x += charData.kerning[prevCharCode];
}
chars.push({line: line, charCode: charCode, position: new PIXI.Point(pos.x + charData.xOffset, pos.y + charData.yOffset)});
chars.push({texture:charData.texture, line: line, charCode: charCode, position: new PIXI.Point(pos.x + charData.xOffset, pos.y + charData.yOffset)});
pos.x += charData.xAdvance;
prevCharCode = charCode;
@ -257,11 +263,11 @@ PIXI.BitmapText.prototype.updateText = function()
for(i = 0; i &lt; chars.length; i++)
{
var char = PIXI.Sprite.fromFrame(chars[i].charCode);
char.position.x = (chars[i].position.x + lineAlignOffsets[chars[i].line]) * scale;
char.position.y = chars[i].position.y * scale;
char.scale.x = char.scale.y = scale;
this.addChild(char);
var c = new PIXI.Sprite(chars[i].texture)&#x2F;&#x2F;PIXI.Sprite.fromFrame(chars[i].charCode);
c.position.x = (chars[i].position.x + lineAlignOffsets[chars[i].line]) * scale;
c.position.y = chars[i].position.y * scale;
c.scale.x = c.scale.y = scale;
this.addChild(c);
}
this.width = pos.x * scale;

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -148,6 +154,8 @@
* @param {String} [style.align=&quot;left&quot;] An alignment of the multiline text (&quot;left&quot;, &quot;center&quot; or &quot;right&quot;)
* @param {String} [style.stroke] A canvas fillstyle that will be used on the text stroke eg &quot;blue&quot;, &quot;#FCFF00&quot;
* @param {Number} [style.strokeThickness=0] A number that represents the thickness of the stroke. Default is 0 (no stroke)
* @param {Boolean} [style.wordWrap=false] Indicates if word wrap should be used
* @param {Number} [style.wordWrapWidth=100] The width at which text will wrap
*&#x2F;
PIXI.Text = function(text, style)
{
@ -173,8 +181,10 @@ PIXI.Text.prototype = Object.create(PIXI.Sprite.prototype);
* @param {String} [style.font=&quot;bold 20pt Arial&quot;] The style and size of the font
* @param {Object} [style.fill=&quot;black&quot;] A canvas fillstyle that will be used on the text eg &quot;red&quot;, &quot;#00FF00&quot;
* @param {String} [style.align=&quot;left&quot;] An alignment of the multiline text (&quot;left&quot;, &quot;center&quot; or &quot;right&quot;)
* @param {String} [style.stroke] A canvas fillstyle that will be used on the text stroke eg &quot;blue&quot;, &quot;#FCFF00&quot;
* @param {String} [style.stroke=&quot;black&quot;] A canvas fillstyle that will be used on the text stroke eg &quot;blue&quot;, &quot;#FCFF00&quot;
* @param {Number} [style.strokeThickness=0] A number that represents the thickness of the stroke. Default is 0 (no stroke)
* @param {Boolean} [style.wordWrap=false] Indicates if word wrap should be used
* @param {Number} [style.wordWrapWidth=100] The width at which text will wrap
*&#x2F;
PIXI.Text.prototype.setStyle = function(style)
{
@ -182,7 +192,10 @@ PIXI.Text.prototype.setStyle = function(style)
style.font = style.font || &quot;bold 20pt Arial&quot;;
style.fill = style.fill || &quot;black&quot;;
style.align = style.align || &quot;left&quot;;
style.stroke = style.stroke || &quot;black&quot;; &#x2F;&#x2F;provide a default, see: https:&#x2F;&#x2F;github.com&#x2F;GoodBoyDigital&#x2F;pixi.js&#x2F;issues&#x2F;136
style.strokeThickness = style.strokeThickness || 0;
style.wordWrap = style.wordWrap || false;
style.wordWrapWidth = style.wordWrapWidth || 100;
this.style = style;
this.dirty = true;
};
@ -194,7 +207,7 @@ PIXI.Text.prototype.setStyle = function(style)
*&#x2F;
PIXI.Sprite.prototype.setText = function(text)
{
this.text = text || &quot; &quot;;
this.text = text.toString() || &quot; &quot;;
this.dirty = true;
};
@ -205,9 +218,15 @@ PIXI.Sprite.prototype.setText = function(text)
PIXI.Text.prototype.updateText = function()
{
this.context.font = this.style.font;
var outputText = this.text;
&#x2F;&#x2F; word wrap
&#x2F;&#x2F; preserve original text
if(this.style.wordWrap)outputText = this.wordWrap(this.text);
&#x2F;&#x2F;split text into lines
var lines = this.text.split(&#x2F;(?:\r\n|\r|\n)&#x2F;);
var lines = outputText.split(&#x2F;(?:\r\n|\r|\n)&#x2F;);
&#x2F;&#x2F;calculate text width
var lineWidths = [];
@ -309,7 +328,7 @@ PIXI.Text.prototype.determineFontHeight = function(fontStyle)
var dummy = document.createElement(&quot;div&quot;);
var dummyText = document.createTextNode(&quot;M&quot;);
dummy.appendChild(dummyText);
dummy.setAttribute(&quot;style&quot;, fontStyle);
dummy.setAttribute(&quot;style&quot;, fontStyle + &#x27;;position:absolute;top:0;left:0&#x27;);
body.appendChild(dummy);
result = dummy.offsetHeight;
@ -321,6 +340,57 @@ PIXI.Text.prototype.determineFontHeight = function(fontStyle)
return result;
};
&#x2F;**
* A Text Object will apply wordwrap
* @private
*&#x2F;
PIXI.Text.prototype.wordWrap = function(text)
{
&#x2F;&#x2F; search good wrap position
var searchWrapPos = function(ctx, text, start, end, wrapWidth)
{
var p = Math.floor((end-start) &#x2F; 2) + start;
if(p == start) {
return 1;
}
if(ctx.measureText(text.substring(0,p)).width &lt;= wrapWidth)
{
if(ctx.measureText(text.substring(0,p+1)).width &gt; wrapWidth)
{
return p;
}
else
{
return arguments.callee(ctx, text, p, end, wrapWidth);
}
}
else
{
return arguments.callee(ctx, text, start, p, wrapWidth);
}
};
var lineWrap = function(ctx, text, wrapWidth)
{
if(ctx.measureText(text).width &lt;= wrapWidth || text.length &lt; 1)
{
return text;
}
var pos = searchWrapPos(ctx, text, 0, text.length, wrapWidth);
return text.substring(0, pos) + &quot;\n&quot; + arguments.callee(ctx, text.substring(pos), wrapWidth);
};
var result = &quot;&quot;;
var lines = text.split(&quot;\n&quot;);
for (var i = 0; i &lt; lines.length; i++)
{
result += lineWrap(this.context, lines[i], this.style.wordWrapWidth) + &quot;\n&quot;;
}
return result;
};
PIXI.Text.prototype.destroy = function(destroyTexture)
{
if(destroyTexture)

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -224,7 +230,6 @@ PIXI.BaseTexture.constructor = PIXI.BaseTexture;
PIXI.BaseTexture.prototype.destroy = function()
{
if(this.source instanceof Image)
{
this.source.src = null;
@ -233,7 +238,6 @@ PIXI.BaseTexture.prototype.destroy = function()
PIXI.texturesToDestroy.push(this);
}
&#x2F;**
*
* Helper function that returns a base texture based on an image url

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -150,7 +156,7 @@ PIXI.RenderTexture = function(width, height)
this.width = width || 100;
this.height = height || 100;
this.indetityMatrix = PIXI.mat3.create();
this.frame = new PIXI.Rectangle(0, 0, this.width, this.height);
@ -225,7 +231,7 @@ PIXI.RenderTexture.prototype.initCanvas = function()
* This function will draw the display object to the texture.
* @method render
* @param displayObject {DisplayObject}
* @param clear {Boolean} If true the texture will not be cleared before the displayObject is drawn
* @param clear {Boolean} If true the texture will be cleared before the displayObject is drawn
*&#x2F;
PIXI.RenderTexture.prototype.renderWebGL = function(displayObject, clear)
{

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -132,19 +138,38 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* Provides requestAnimationFrame in a cross browser way.
*&#x2F;
window.requestAnimFrame = (function() {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(&#x2F;* function FrameRequestCallback *&#x2F; callback, &#x2F;* DOMElement Element *&#x2F; element) {
window.setTimeout(callback, 1000&#x2F;60);
};
})();
&#x2F;&#x2F; http:&#x2F;&#x2F;paulirish.com&#x2F;2011&#x2F;requestanimationframe-for-smart-animating&#x2F;
&#x2F;&#x2F; http:&#x2F;&#x2F;my.opera.com&#x2F;emoller&#x2F;blog&#x2F;2011&#x2F;12&#x2F;20&#x2F;requestanimationframe-for-smart-er-animating
&#x2F;&#x2F; requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
&#x2F;&#x2F; MIT license
var lastTime = 0;
var vendors = [&#x27;ms&#x27;, &#x27;moz&#x27;, &#x27;webkit&#x27;, &#x27;o&#x27;];
for(var x = 0; x &lt; vendors.length &amp;&amp; !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+&#x27;RequestAnimationFrame&#x27;];
window.cancelAnimationFrame = window[vendors[x]+&#x27;CancelAnimationFrame&#x27;]
|| window[vendors[x]+&#x27;CancelRequestAnimationFrame&#x27;];
}
if (!window.requestAnimationFrame)
window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
var id = window.setTimeout(function() { callback(currTime + timeToCall); },
timeToCall);
lastTime = currTime + timeToCall;
return id;
};
if (!window.cancelAnimationFrame)
window.cancelAnimationFrame = function(id) {
clearTimeout(id);
};
window.requestAnimFrame = window.requestAnimationFrame;
function HEXtoRGB(hex) {
return [(hex &gt;&gt; 16 &amp; 0xFF) &#x2F; 255, ( hex &gt;&gt; 8 &amp; 0xFF) &#x2F; 255, (hex &amp; 0xFF)&#x2F; 255];
@ -176,7 +201,7 @@ if (typeof Function.prototype.bind != &#x27;function&#x27;) {
})();
}
var AjaxRequest = function()
var AjaxRequest = PIXI.AjaxRequest = function()
{
var activexmodes = [&quot;Msxml2.XMLHTTP&quot;, &quot;Microsoft.XMLHTTP&quot;] &#x2F;&#x2F;activeX versions to check for in IE

View file

@ -63,14 +63,20 @@
<li><a href=".&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href=".&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href=".&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href=".&#x2F;classes/Point.html">Point</a></li>
<li><a href=".&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href=".&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href=".&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href=".&#x2F;classes/Spine.html">Spine</a></li>
<li><a href=".&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href=".&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>

View file

@ -63,14 +63,20 @@
<li><a href="..&#x2F;classes/InteractionManager.html">InteractionManager</a></li>
<li><a href="..&#x2F;classes/JsonLoader.html">JsonLoader</a></li>
<li><a href="..&#x2F;classes/MovieClip.html">MovieClip</a></li>
<li><a href="..&#x2F;classes/Point.html">Point</a></li>
<li><a href="..&#x2F;classes/Polygon.html">Polygon</a></li>
<li><a href="..&#x2F;classes/Rectangle.html">Rectangle</a></li>
<li><a href="..&#x2F;classes/RenderTexture.html">RenderTexture</a></li>
<li><a href="..&#x2F;classes/Spine.html">Spine</a></li>
<li><a href="..&#x2F;classes/Sprite.html">Sprite</a></li>
<li><a href="..&#x2F;classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
@ -224,6 +230,12 @@
</a>
</li>
<li class="module-class">
<a href="..&#x2F;classes/JsonLoader.html">
JsonLoader
</a>
</li>
<li class="module-class">
<a href="..&#x2F;classes/MovieClip.html">
MovieClip
@ -236,6 +248,12 @@
</a>
</li>
<li class="module-class">
<a href="..&#x2F;classes/Polygon.html">
Polygon
</a>
</li>
<li class="module-class">
<a href="..&#x2F;classes/Rectangle.html">
Rectangle
@ -248,6 +266,12 @@
</a>
</li>
<li class="module-class">
<a href="..&#x2F;classes/Spine.html">
Spine
</a>
</li>
<li class="module-class">
<a href="..&#x2F;classes/Sprite.html">
Sprite