Merge branch 'dev'
40
Gruntfile.js
|
|
@ -11,27 +11,33 @@ module.exports = function(grunt) {
|
|||
srcFiles = [
|
||||
'<%= dirs.src %>/Intro.js',
|
||||
'<%= dirs.src %>/Pixi.js',
|
||||
'<%= dirs.src %>/Point.js',
|
||||
'<%= dirs.src %>/Rectangle.js',
|
||||
'<%= dirs.src %>/Polygon.js',
|
||||
'<%= dirs.src %>/DisplayObject.js',
|
||||
'<%= dirs.src %>/DisplayObjectContainer.js',
|
||||
'<%= dirs.src %>/Sprite.js',
|
||||
'<%= dirs.src %>/MovieClip.js',
|
||||
'<%= dirs.src %>/core/Point.js',
|
||||
'<%= dirs.src %>/core/Rectangle.js',
|
||||
'<%= dirs.src %>/core/Polygon.js',
|
||||
'<%= dirs.src %>/core/Circle.js',
|
||||
'<%= dirs.src %>/core/Ellipse.js',
|
||||
'<%= dirs.src %>/core/Matrix.js',
|
||||
'<%= dirs.src %>/display/DisplayObject.js',
|
||||
'<%= dirs.src %>/display/DisplayObjectContainer.js',
|
||||
'<%= dirs.src %>/display/Sprite.js',
|
||||
'<%= dirs.src %>/display/MovieClip.js',
|
||||
'<%= dirs.src %>/filters/FilterBlock.js',
|
||||
'<%= dirs.src %>/text/Text.js',
|
||||
'<%= dirs.src %>/text/BitmapText.js',
|
||||
'<%= dirs.src %>/Text.js',
|
||||
'<%= dirs.src %>/InteractionManager.js',
|
||||
'<%= dirs.src %>/Stage.js',
|
||||
'<%= dirs.src %>/display/Stage.js',
|
||||
'<%= dirs.src %>/utils/Utils.js',
|
||||
'<%= dirs.src %>/utils/EventTarget.js',
|
||||
'<%= dirs.src %>/utils/Matrix.js',
|
||||
'<%= dirs.src %>/utils/Detector.js',
|
||||
'<%= dirs.src %>/renderers/WebGLShaders.js',
|
||||
'<%= dirs.src %>/renderers/WebGLRenderer.js',
|
||||
'<%= dirs.src %>/renderers/WebGLBatch.js',
|
||||
'<%= dirs.src %>/renderers/WebGLRenderGroup.js',
|
||||
'<%= dirs.src %>/renderers/CanvasRenderer.js',
|
||||
'<%= dirs.src %>/utils/Polyk.js',
|
||||
'<%= dirs.src %>/renderers/webgl/WebGLShaders.js',
|
||||
'<%= dirs.src %>/renderers/webgl/WebGLGraphics.js',
|
||||
'<%= dirs.src %>/renderers/webgl/WebGLRenderer.js',
|
||||
'<%= dirs.src %>/renderers/webgl/WebGLBatch.js',
|
||||
'<%= dirs.src %>/renderers/webgl/WebGLRenderGroup.js',
|
||||
'<%= dirs.src %>/renderers/canvas/CanvasRenderer.js',
|
||||
'<%= dirs.src %>/renderers/canvas/CanvasGraphics.js',
|
||||
'<%= dirs.src %>/primitives/Graphics.js',
|
||||
'<%= dirs.src %>/extras/Strip.js',
|
||||
'<%= dirs.src %>/extras/Rope.js',
|
||||
'<%= dirs.src %>/extras/TilingSprite.js',
|
||||
|
|
@ -116,7 +122,9 @@ module.exports = function(grunt) {
|
|||
'examples/example 9 - Tiling Texture',
|
||||
'examples/example 10 - Text',
|
||||
'examples/example 11 - RenderTexture',
|
||||
'examples/example 12 - Spine'
|
||||
'examples/example 12 - Spine',
|
||||
'examples/example 13 - Graphics',
|
||||
'examples/example 14 - Masking'
|
||||
]
|
||||
},
|
||||
connect: {
|
||||
|
|
|
|||
11
README.md
|
|
@ -26,6 +26,10 @@ any breakthroughs will be posted up there too!
|
|||
|
||||
- [Render Texture Demo](<http://www.goodboydigital.com/pixijs/examples/11/>)
|
||||
|
||||
- [Primitives Demo](<http://www.goodboydigital.com/pixijs/examples/13/>)
|
||||
|
||||
- [Masking Demo](<http://www.goodboydigital.com/pixijs/examples/14/>)
|
||||
|
||||
- [Interaction Demo](<http://www.goodboydigital.com/pixijs/examples/6/>)
|
||||
|
||||
- [photonstorm Balls Demo](<http://gametest.mobi/pixi/balls/>)
|
||||
|
|
@ -49,11 +53,7 @@ last 2 examples and allowing us to share the source code :)
|
|||
### Road Map ###
|
||||
|
||||
* Create a Typescript definition file for Pixi.js
|
||||
* Implement Custom Render Item (currently being worked on by @GoodBoyDigital)
|
||||
* Implement Masking
|
||||
* Implement Primitive Drawing
|
||||
* Implement Filters (currently being worked on by @GoodBoyDigital)
|
||||
* Add Spine support
|
||||
* Implement Flash animation to pixi
|
||||
* Update Loader so that it support XHR2 if it is available
|
||||
* Improve the Documentation of the Project
|
||||
|
|
@ -104,6 +104,9 @@ It also copies the non-minified version to the examples.
|
|||
- BitmapFont text
|
||||
- Multiline Text
|
||||
- Render Texture
|
||||
- Spine support
|
||||
- Primitive Drawing
|
||||
- Masking
|
||||
|
||||
### Coming soon ###
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,14 @@ YUI.add("yuidoc-meta", function(Y) {
|
|||
"BaseTexture",
|
||||
"BitmapFontLoader",
|
||||
"BitmapText",
|
||||
"CanvasGraphics",
|
||||
"CanvasRenderer",
|
||||
"Circle",
|
||||
"CustomRenderable",
|
||||
"DisplayObject",
|
||||
"DisplayObjectContainer",
|
||||
"Ellipse",
|
||||
"Graphics",
|
||||
"ImageLoader",
|
||||
"InteractionData",
|
||||
"InteractionManager",
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -498,6 +506,20 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_interactive">interactive</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_mask">mask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
|
|
@ -602,7 +624,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l41"><code>src/pixi/DisplayObjectContainer.js:41</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l42"><code>src/pixi/display/DisplayObjectContainer.js:42</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -631,7 +653,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -692,7 +714,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l73"><code>src/pixi/DisplayObjectContainer.js:73</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l139"><code>src/pixi/display/DisplayObjectContainer.js:139</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -721,7 +743,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -736,7 +758,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -791,7 +813,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l106"><code>src/pixi/DisplayObject.js:106</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l109"><code>src/pixi/display/DisplayObject.js:109</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -875,7 +897,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l168"><code>src/pixi/DisplayObjectContainer.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l274"><code>src/pixi/display/DisplayObjectContainer.js:274</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -904,7 +926,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -959,7 +981,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l112"><code>src/pixi/DisplayObject.js:112</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l115"><code>src/pixi/display/DisplayObject.js:115</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1043,7 +1065,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l138"><code>src/pixi/DisplayObject.js:138</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l141"><code>src/pixi/display/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1127,7 +1149,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l132"><code>src/pixi/DisplayObject.js:132</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l135"><code>src/pixi/display/DisplayObject.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1211,7 +1233,7 @@ http://www.bmglyph.com/ for mac.</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l118"><code>src/pixi/DisplayObject.js:118</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l121"><code>src/pixi/display/DisplayObject.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1296,7 +1318,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l125"><code>src/pixi/DisplayObject.js:125</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l128"><code>src/pixi/display/DisplayObject.js:128</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1381,7 +1403,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l186"><code>src/pixi/DisplayObjectContainer.js:186</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l291"><code>src/pixi/display/DisplayObjectContainer.js:291</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1410,7 +1432,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1465,7 +1487,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l190"><code>src/pixi/DisplayObject.js:190</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l193"><code>src/pixi/display/DisplayObject.js:193</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1476,7 +1498,8 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
<p>[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
Instead of using this function you can now simply set the interactive property to true or false</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1760,7 +1783,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l128"><code>src/pixi/DisplayObjectContainer.js:128</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l227"><code>src/pixi/display/DisplayObjectContainer.js:227</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1789,7 +1812,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1804,7 +1827,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1859,7 +1882,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l149"><code>src/pixi/DisplayObject.js:149</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l152"><code>src/pixi/display/DisplayObject.js:152</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1944,7 +1967,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l162"><code>src/pixi/DisplayObject.js:162</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l165"><code>src/pixi/display/DisplayObject.js:165</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2028,7 +2051,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l168"><code>src/pixi/DisplayObject.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l171"><code>src/pixi/display/DisplayObject.js:171</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2113,7 +2136,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l156"><code>src/pixi/DisplayObject.js:156</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l159"><code>src/pixi/display/DisplayObject.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2186,7 +2209,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l40"><code>src/pixi/DisplayObject.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l43"><code>src/pixi/display/DisplayObject.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2227,7 +2250,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l95"><code>src/pixi/DisplayObject.js:95</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l98"><code>src/pixi/display/DisplayObject.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2268,7 +2291,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l16"><code>src/pixi/DisplayObjectContainer.js:16</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l16"><code>src/pixi/display/DisplayObjectContainer.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2309,7 +2332,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l69"><code>src/pixi/DisplayObject.js:69</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l72"><code>src/pixi/display/DisplayObject.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2328,6 +2351,90 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_interactive" class="property item inherited">
|
||||
<h3 class="name"><code>interactive</code></h3>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_interactive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l204"><code>src/pixi/display/DisplayObject.js:204</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_mask" class="property item inherited">
|
||||
<h3 class="name"><code>mask</code></h3>
|
||||
<span class="type">PIXI.Graphics</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_mask">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l222"><code>src/pixi/display/DisplayObject.js:222</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
To remove a mask, set this property to null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2351,7 +2458,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l55"><code>src/pixi/DisplayObject.js:55</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l58"><code>src/pixi/display/DisplayObject.js:58</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2392,7 +2499,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l26"><code>src/pixi/DisplayObject.js:26</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l29"><code>src/pixi/display/DisplayObject.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2433,7 +2540,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l12"><code>src/pixi/DisplayObject.js:12</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l15"><code>src/pixi/display/DisplayObject.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2474,7 +2581,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l33"><code>src/pixi/DisplayObject.js:33</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l36"><code>src/pixi/display/DisplayObject.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2515,7 +2622,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l19"><code>src/pixi/DisplayObject.js:19</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l22"><code>src/pixi/display/DisplayObject.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2556,7 +2663,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l65"><code>src/pixi/display/DisplayObject.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2597,7 +2704,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l47"><code>src/pixi/DisplayObject.js:47</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l50"><code>src/pixi/display/DisplayObject.js:50</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
222
docs/classes/CanvasGraphics.html
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CanvasGraphics - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/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://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.3.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="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Text.html">Text</a></li>
|
||||
|
||||
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||
|
||||
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="api-modules" class="apis modules">
|
||||
|
||||
<li><a href="../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>CanvasGraphics Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_webgl_WebGLGraphics.js.html#l7"><code>src/pixi/renderers/webgl/WebGLGraphics.js:7</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
Module: <a href="../modules/PIXI.html">PIXI</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box intro">
|
||||
<p>A set of functions used by the webGL renderer to draw the primitive graphics data</p>
|
||||
</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="../assets/vendor/prettify/prettify-min.js"></script>
|
||||
<script>prettyPrint();</script>
|
||||
<script src="../assets/js/yui-prettify.js"></script>
|
||||
<script src="../assets/../api.js"></script>
|
||||
<script src="../assets/js/api-filter.js"></script>
|
||||
<script src="../assets/js/api-list.js"></script>
|
||||
<script src="../assets/js/api-search.js"></script>
|
||||
<script src="../assets/js/apidocs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -142,7 +150,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_CanvasRenderer.js.html#l6"><code>src/pixi/renderers/CanvasRenderer.js:6</code></a>
|
||||
Defined in: <a href="../files/src_pixi_renderers_canvas_CanvasRenderer.js.html#l6"><code>src/pixi/renderers/canvas/CanvasRenderer.js:6</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -225,7 +233,7 @@ Dont forget to add the view to your DOM or you will not see anything :)</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_CanvasRenderer.js.html#l6"><code>src/pixi/renderers/CanvasRenderer.js:6</code></a>
|
||||
<a href="../files/src_pixi_renderers_canvas_CanvasRenderer.js.html#l6"><code>src/pixi/renderers/canvas/CanvasRenderer.js:6</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -442,7 +450,7 @@ Dont forget to add the view to your DOM or you will not see anything :)</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_CanvasRenderer.js.html#l66"><code>src/pixi/renderers/CanvasRenderer.js:66</code></a>
|
||||
<a href="../files/src_pixi_renderers_canvas_CanvasRenderer.js.html#l66"><code>src/pixi/renderers/canvas/CanvasRenderer.js:66</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -518,7 +526,7 @@ Dont forget to add the view to your DOM or you will not see anything :)</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_CanvasRenderer.js.html#l55"><code>src/pixi/renderers/CanvasRenderer.js:55</code></a>
|
||||
<a href="../files/src_pixi_renderers_canvas_CanvasRenderer.js.html#l55"><code>src/pixi/renderers/canvas/CanvasRenderer.js:55</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -562,7 +570,7 @@ Dont forget to add the view to your DOM or you will not see anything :)</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_CanvasRenderer.js.html#l31"><code>src/pixi/renderers/CanvasRenderer.js:31</code></a>
|
||||
<a href="../files/src_pixi_renderers_canvas_CanvasRenderer.js.html#l31"><code>src/pixi/renderers/canvas/CanvasRenderer.js:31</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -608,7 +616,7 @@ Dont forget to add the view to your DOM or you will not see anything :)</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_CanvasRenderer.js.html#l41"><code>src/pixi/renderers/CanvasRenderer.js:41</code></a>
|
||||
<a href="../files/src_pixi_renderers_canvas_CanvasRenderer.js.html#l41"><code>src/pixi/renderers/canvas/CanvasRenderer.js:41</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -652,7 +660,7 @@ Dont forget to add the view to your DOM or you will not see anything :)</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_CanvasRenderer.js.html#l24"><code>src/pixi/renderers/CanvasRenderer.js:24</code></a>
|
||||
<a href="../files/src_pixi_renderers_canvas_CanvasRenderer.js.html#l24"><code>src/pixi/renderers/canvas/CanvasRenderer.js:24</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
751
docs/classes/Circle.html
Normal file
|
|
@ -0,0 +1,751 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Circle - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/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://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.3.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="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Text.html">Text</a></li>
|
||||
|
||||
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||
|
||||
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="api-modules" class="apis modules">
|
||||
|
||||
<li><a href="../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>Circle Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_core_Circle.js.html#l5"><code>src/pixi/core/Circle.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_Circle" class="method item">
|
||||
<h3 class="name"><code>Circle</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>x</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>y</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>radius</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Circle.js.html#l5"><code>src/pixi/core/Circle.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">x</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The X coord of the upper-left corner of the framing rectangle of this circle</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">y</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The Y coord of the upper-left corner of the framing rectangle of this circle</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">radius</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The radius of the circle</p>
|
||||
</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>
|
||||
|
||||
|
||||
<li class="api-class-tab properties"><a href="#properties">Properties</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>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_contains">contains</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
<h3>Properties</h3>
|
||||
|
||||
<ul class="index-list properties">
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_radius">radius</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_x">x</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_y">y</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="../files/src_pixi_core_Circle.js.html#l36"><code>src/pixi/core/Circle.js:36</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 id="method_contains" class="method item">
|
||||
<h3 class="name"><code>contains</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>x</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>y</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<span class="returns-inline">
|
||||
<span class="type"></span>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Circle.js.html#l45"><code>src/pixi/core/Circle.js:45</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">x</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The X coord of the point to test</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">y</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The Y coord of the point to test</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="returns">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<div class="returns-description">
|
||||
|
||||
|
||||
if the x/y coords are within this polygon
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Properties</h2>
|
||||
|
||||
|
||||
<div id="property_radius" class="property item">
|
||||
<h3 class="name"><code>radius</code></h3>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Circle.js.html#l28"><code>src/pixi/core/Circle.js:28</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p><strong>Default:</strong> 0</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_x" class="property item">
|
||||
<h3 class="name"><code>x</code></h3>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Circle.js.html#l14"><code>src/pixi/core/Circle.js:14</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p><strong>Default:</strong> 0</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_y" class="property item">
|
||||
<h3 class="name"><code>y</code></h3>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Circle.js.html#l21"><code>src/pixi/core/Circle.js:21</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p><strong>Default:</strong> 0</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||
<script>prettyPrint();</script>
|
||||
<script src="../assets/js/yui-prettify.js"></script>
|
||||
<script src="../assets/../api.js"></script>
|
||||
<script src="../assets/js/api-filter.js"></script>
|
||||
<script src="../assets/js/api-list.js"></script>
|
||||
<script src="../assets/js/api-search.js"></script>
|
||||
<script src="../assets/js/apidocs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -354,6 +362,20 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_interactive">interactive</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_mask">mask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
|
|
@ -458,7 +480,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l106"><code>src/pixi/DisplayObject.js:106</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l109"><code>src/pixi/display/DisplayObject.js:109</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -487,7 +509,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -542,7 +564,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l112"><code>src/pixi/DisplayObject.js:112</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l115"><code>src/pixi/display/DisplayObject.js:115</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -571,7 +593,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -626,7 +648,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l138"><code>src/pixi/DisplayObject.js:138</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l141"><code>src/pixi/display/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -655,7 +677,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -710,7 +732,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l132"><code>src/pixi/DisplayObject.js:132</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l135"><code>src/pixi/display/DisplayObject.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -739,7 +761,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -794,7 +816,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l118"><code>src/pixi/DisplayObject.js:118</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l121"><code>src/pixi/display/DisplayObject.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -824,7 +846,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -879,7 +901,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l125"><code>src/pixi/DisplayObject.js:125</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l128"><code>src/pixi/display/DisplayObject.js:128</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -909,7 +931,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -964,7 +986,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l190"><code>src/pixi/DisplayObject.js:190</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l193"><code>src/pixi/display/DisplayObject.js:193</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -975,7 +997,8 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
<p>[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
Instead of using this function you can now simply set the interactive property to true or false</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -993,7 +1016,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1048,7 +1071,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l149"><code>src/pixi/DisplayObject.js:149</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l152"><code>src/pixi/display/DisplayObject.js:152</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1078,7 +1101,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1133,7 +1156,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l162"><code>src/pixi/DisplayObject.js:162</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l165"><code>src/pixi/display/DisplayObject.js:165</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1162,7 +1185,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1217,7 +1240,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l168"><code>src/pixi/DisplayObject.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l171"><code>src/pixi/display/DisplayObject.js:171</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1247,7 +1270,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1302,7 +1325,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l156"><code>src/pixi/DisplayObject.js:156</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l159"><code>src/pixi/display/DisplayObject.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1331,7 +1354,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1375,7 +1398,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l40"><code>src/pixi/DisplayObject.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l43"><code>src/pixi/display/DisplayObject.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1416,7 +1439,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l95"><code>src/pixi/DisplayObject.js:95</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l98"><code>src/pixi/display/DisplayObject.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1457,7 +1480,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l69"><code>src/pixi/DisplayObject.js:69</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l72"><code>src/pixi/display/DisplayObject.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1476,6 +1499,90 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_interactive" class="property item inherited">
|
||||
<h3 class="name"><code>interactive</code></h3>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_interactive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l204"><code>src/pixi/display/DisplayObject.js:204</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_mask" class="property item inherited">
|
||||
<h3 class="name"><code>mask</code></h3>
|
||||
<span class="type">PIXI.Graphics</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_mask">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l222"><code>src/pixi/display/DisplayObject.js:222</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
To remove a mask, set this property to null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1499,7 +1606,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l55"><code>src/pixi/DisplayObject.js:55</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l58"><code>src/pixi/display/DisplayObject.js:58</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1540,7 +1647,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l26"><code>src/pixi/DisplayObject.js:26</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l29"><code>src/pixi/display/DisplayObject.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1581,7 +1688,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l12"><code>src/pixi/DisplayObject.js:12</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l15"><code>src/pixi/display/DisplayObject.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1622,7 +1729,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l33"><code>src/pixi/DisplayObject.js:33</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l36"><code>src/pixi/display/DisplayObject.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1663,7 +1770,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l19"><code>src/pixi/DisplayObject.js:19</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l22"><code>src/pixi/display/DisplayObject.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1704,7 +1811,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l65"><code>src/pixi/display/DisplayObject.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1745,7 +1852,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l47"><code>src/pixi/DisplayObject.js:47</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l50"><code>src/pixi/display/DisplayObject.js:50</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -142,7 +150,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_DisplayObject.js.html#l5"><code>src/pixi/DisplayObject.js:5</code></a>
|
||||
Defined in: <a href="../files/src_pixi_display_DisplayObject.js.html#l5"><code>src/pixi/display/DisplayObject.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -196,7 +204,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l5"><code>src/pixi/DisplayObject.js:5</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l5"><code>src/pixi/display/DisplayObject.js:5</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -244,15 +252,6 @@
|
|||
|
||||
<ul class="index-list methods">
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_autoDetectRenderer">autoDetectRenderer</a>
|
||||
|
||||
|
||||
<span class="flag static">static</span>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_click">click</a>
|
||||
|
||||
|
|
@ -359,6 +358,20 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_interactive">interactive</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_mask">mask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
|
|
@ -424,159 +437,6 @@
|
|||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_autoDetectRenderer" class="method item">
|
||||
<h3 class="name"><code>autoDetectRenderer</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>width</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>height</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>view</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>transparent</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="flag static">static</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Detector.js.html#l5"><code>src/pixi/utils/Detector.js:5</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This helper function will automatically detect which renderer you should be using.
|
||||
WebGL is the preferred renderer as it is a lot fastest. If webGL is not supported by the browser then this function will return a canvas renderer</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">width</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the width of the renderers view</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">height</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the height of the renderers view</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">view</code>
|
||||
<span class="type">Canvas</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the canvas to use as a view, optional</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">transparent</code>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the transparency of the render view, default false</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_click" class="method item">
|
||||
<h3 class="name"><code>click</code></h3>
|
||||
|
||||
|
|
@ -619,7 +479,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l106"><code>src/pixi/DisplayObject.js:106</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l109"><code>src/pixi/display/DisplayObject.js:109</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -648,7 +508,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -706,7 +566,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l112"><code>src/pixi/DisplayObject.js:112</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l115"><code>src/pixi/display/DisplayObject.js:115</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -735,7 +595,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -793,7 +653,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l138"><code>src/pixi/DisplayObject.js:138</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l141"><code>src/pixi/display/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -822,7 +682,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -880,7 +740,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l132"><code>src/pixi/DisplayObject.js:132</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l135"><code>src/pixi/display/DisplayObject.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -909,7 +769,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -967,7 +827,7 @@ WebGL is the preferred renderer as it is a lot fastest. If webGL is not supporte
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l118"><code>src/pixi/DisplayObject.js:118</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l121"><code>src/pixi/display/DisplayObject.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -997,7 +857,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1055,7 +915,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l125"><code>src/pixi/DisplayObject.js:125</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l128"><code>src/pixi/display/DisplayObject.js:128</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1085,7 +945,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1143,7 +1003,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l190"><code>src/pixi/DisplayObject.js:190</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l193"><code>src/pixi/display/DisplayObject.js:193</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1154,7 +1014,8 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
<p>[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
Instead of using this function you can now simply set the interactive property to true or false</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1172,7 +1033,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1230,7 +1091,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l149"><code>src/pixi/DisplayObject.js:149</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l152"><code>src/pixi/display/DisplayObject.js:152</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1260,7 +1121,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1318,7 +1179,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l162"><code>src/pixi/DisplayObject.js:162</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l165"><code>src/pixi/display/DisplayObject.js:165</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1347,7 +1208,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1405,7 +1266,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l168"><code>src/pixi/DisplayObject.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l171"><code>src/pixi/display/DisplayObject.js:171</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1435,7 +1296,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1493,7 +1354,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l156"><code>src/pixi/DisplayObject.js:156</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l159"><code>src/pixi/display/DisplayObject.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1522,7 +1383,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1569,7 +1430,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l40"><code>src/pixi/DisplayObject.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l43"><code>src/pixi/display/DisplayObject.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1613,7 +1474,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l95"><code>src/pixi/DisplayObject.js:95</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l98"><code>src/pixi/display/DisplayObject.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1657,7 +1518,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l69"><code>src/pixi/DisplayObject.js:69</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l72"><code>src/pixi/display/DisplayObject.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1676,6 +1537,96 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_interactive" class="property item">
|
||||
<h3 class="name"><code>interactive</code></h3>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l204"><code>src/pixi/display/DisplayObject.js:204</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_mask" class="property item">
|
||||
<h3 class="name"><code>mask</code></h3>
|
||||
<span class="type">PIXI.Graphics</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l222"><code>src/pixi/display/DisplayObject.js:222</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
To remove a mask, set this property to null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1702,7 +1653,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l55"><code>src/pixi/DisplayObject.js:55</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l58"><code>src/pixi/display/DisplayObject.js:58</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1746,7 +1697,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l26"><code>src/pixi/DisplayObject.js:26</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l29"><code>src/pixi/display/DisplayObject.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1790,7 +1741,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l12"><code>src/pixi/DisplayObject.js:12</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l15"><code>src/pixi/display/DisplayObject.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1834,7 +1785,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l33"><code>src/pixi/DisplayObject.js:33</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l36"><code>src/pixi/display/DisplayObject.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1878,7 +1829,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l19"><code>src/pixi/DisplayObject.js:19</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l22"><code>src/pixi/display/DisplayObject.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1922,7 +1873,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l65"><code>src/pixi/display/DisplayObject.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1966,7 +1917,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l47"><code>src/pixi/DisplayObject.js:47</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l50"><code>src/pixi/display/DisplayObject.js:50</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -146,7 +154,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_DisplayObjectContainer.js.html#l6"><code>src/pixi/DisplayObjectContainer.js:6</code></a>
|
||||
Defined in: <a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l6"><code>src/pixi/display/DisplayObjectContainer.js:6</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -200,7 +208,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l6"><code>src/pixi/DisplayObjectContainer.js:6</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l6"><code>src/pixi/display/DisplayObjectContainer.js:6</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -396,6 +404,20 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_interactive">interactive</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_mask">mask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
|
|
@ -503,7 +525,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l41"><code>src/pixi/DisplayObjectContainer.js:41</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l42"><code>src/pixi/display/DisplayObjectContainer.js:42</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -596,7 +618,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l73"><code>src/pixi/DisplayObjectContainer.js:73</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l139"><code>src/pixi/display/DisplayObjectContainer.js:139</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -695,7 +717,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l106"><code>src/pixi/DisplayObject.js:106</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l109"><code>src/pixi/display/DisplayObject.js:109</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -724,7 +746,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -782,7 +804,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l168"><code>src/pixi/DisplayObjectContainer.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l274"><code>src/pixi/display/DisplayObjectContainer.js:274</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -866,7 +888,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l112"><code>src/pixi/DisplayObject.js:112</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l115"><code>src/pixi/display/DisplayObject.js:115</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -895,7 +917,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -950,7 +972,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l138"><code>src/pixi/DisplayObject.js:138</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l141"><code>src/pixi/display/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -979,7 +1001,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1034,7 +1056,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l132"><code>src/pixi/DisplayObject.js:132</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l135"><code>src/pixi/display/DisplayObject.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1063,7 +1085,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1118,7 +1140,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l118"><code>src/pixi/DisplayObject.js:118</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l121"><code>src/pixi/display/DisplayObject.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1148,7 +1170,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1203,7 +1225,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l125"><code>src/pixi/DisplayObject.js:125</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l128"><code>src/pixi/display/DisplayObject.js:128</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1233,7 +1255,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1291,7 +1313,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l186"><code>src/pixi/DisplayObjectContainer.js:186</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l291"><code>src/pixi/display/DisplayObjectContainer.js:291</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1375,7 +1397,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l190"><code>src/pixi/DisplayObject.js:190</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l193"><code>src/pixi/display/DisplayObject.js:193</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1386,7 +1408,8 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
<p>[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
Instead of using this function you can now simply set the interactive property to true or false</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1404,7 +1427,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1468,7 +1491,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l128"><code>src/pixi/DisplayObjectContainer.js:128</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l227"><code>src/pixi/display/DisplayObjectContainer.js:227</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1567,7 +1590,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l149"><code>src/pixi/DisplayObject.js:149</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l152"><code>src/pixi/display/DisplayObject.js:152</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1597,7 +1620,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1652,7 +1675,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l162"><code>src/pixi/DisplayObject.js:162</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l165"><code>src/pixi/display/DisplayObject.js:165</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1681,7 +1704,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1736,7 +1759,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l168"><code>src/pixi/DisplayObject.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l171"><code>src/pixi/display/DisplayObject.js:171</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1766,7 +1789,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1821,7 +1844,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l156"><code>src/pixi/DisplayObject.js:156</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l159"><code>src/pixi/display/DisplayObject.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1850,7 +1873,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1894,7 +1917,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l40"><code>src/pixi/DisplayObject.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l43"><code>src/pixi/display/DisplayObject.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1935,7 +1958,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l95"><code>src/pixi/DisplayObject.js:95</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l98"><code>src/pixi/display/DisplayObject.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1979,7 +2002,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l16"><code>src/pixi/DisplayObjectContainer.js:16</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l16"><code>src/pixi/display/DisplayObjectContainer.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2020,7 +2043,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l69"><code>src/pixi/DisplayObject.js:69</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l72"><code>src/pixi/display/DisplayObject.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2039,6 +2062,90 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_interactive" class="property item inherited">
|
||||
<h3 class="name"><code>interactive</code></h3>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_interactive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l204"><code>src/pixi/display/DisplayObject.js:204</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_mask" class="property item inherited">
|
||||
<h3 class="name"><code>mask</code></h3>
|
||||
<span class="type">PIXI.Graphics</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_mask">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l222"><code>src/pixi/display/DisplayObject.js:222</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
To remove a mask, set this property to null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2062,7 +2169,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l55"><code>src/pixi/DisplayObject.js:55</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l58"><code>src/pixi/display/DisplayObject.js:58</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2103,7 +2210,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l26"><code>src/pixi/DisplayObject.js:26</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l29"><code>src/pixi/display/DisplayObject.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2144,7 +2251,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l12"><code>src/pixi/DisplayObject.js:12</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l15"><code>src/pixi/display/DisplayObject.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2185,7 +2292,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l33"><code>src/pixi/DisplayObject.js:33</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l36"><code>src/pixi/display/DisplayObject.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2226,7 +2333,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l19"><code>src/pixi/DisplayObject.js:19</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l22"><code>src/pixi/display/DisplayObject.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2267,7 +2374,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l65"><code>src/pixi/display/DisplayObject.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2308,7 +2415,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l47"><code>src/pixi/DisplayObject.js:47</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l50"><code>src/pixi/display/DisplayObject.js:50</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
825
docs/classes/Ellipse.html
Normal file
|
|
@ -0,0 +1,825 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Ellipse - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/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://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.3.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="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Text.html">Text</a></li>
|
||||
|
||||
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||
|
||||
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="api-modules" class="apis modules">
|
||||
|
||||
<li><a href="../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>Ellipse Class</h1>
|
||||
<div class="box meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_core_Ellipse.js.html#l5"><code>src/pixi/core/Ellipse.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_Ellipse" class="method item">
|
||||
<h3 class="name"><code>Ellipse</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>x</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>y</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>width</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>height</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Ellipse.js.html#l5"><code>src/pixi/core/Ellipse.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">x</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The X coord of the upper-left corner of the framing rectangle of this circle</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">y</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The Y coord of the upper-left corner of the framing rectangle of this circle</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">width</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The overall height of this ellipse</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">height</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The overall width of this ellipse</p>
|
||||
</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>
|
||||
|
||||
|
||||
<li class="api-class-tab properties"><a href="#properties">Properties</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>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_contains">contains</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
<h3>Properties</h3>
|
||||
|
||||
<ul class="index-list properties">
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_height">height</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_width">width</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_x">x</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_y">y</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="../files/src_pixi_core_Ellipse.js.html#l44"><code>src/pixi/core/Ellipse.js:44</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 id="method_contains" class="method item">
|
||||
<h3 class="name"><code>contains</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>x</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>y</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<span class="returns-inline">
|
||||
<span class="type"></span>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Ellipse.js.html#l53"><code>src/pixi/core/Ellipse.js:53</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">x</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The X coord of the point to test</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">y</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The Y coord of the point to test</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="returns">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<div class="returns-description">
|
||||
|
||||
|
||||
if the x/y coords are within this polygon
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Properties</h2>
|
||||
|
||||
|
||||
<div id="property_height" class="property item">
|
||||
<h3 class="name"><code>height</code></h3>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Ellipse.js.html#l36"><code>src/pixi/core/Ellipse.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p><strong>Default:</strong> 0</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_width" class="property item">
|
||||
<h3 class="name"><code>width</code></h3>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Ellipse.js.html#l29"><code>src/pixi/core/Ellipse.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p><strong>Default:</strong> 0</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_x" class="property item">
|
||||
<h3 class="name"><code>x</code></h3>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Ellipse.js.html#l15"><code>src/pixi/core/Ellipse.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p><strong>Default:</strong> 0</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_y" class="property item">
|
||||
<h3 class="name"><code>y</code></h3>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Ellipse.js.html#l22"><code>src/pixi/core/Ellipse.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p><strong>Default:</strong> 0</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||
<script>prettyPrint();</script>
|
||||
<script src="../assets/js/yui-prettify.js"></script>
|
||||
<script src="../assets/../api.js"></script>
|
||||
<script src="../assets/js/api-filter.js"></script>
|
||||
<script src="../assets/js/api-list.js"></script>
|
||||
<script src="../assets/js/api-search.js"></script>
|
||||
<script src="../assets/js/apidocs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
3500
docs/classes/Graphics.html
Normal file
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -142,7 +150,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_InteractionManager.js.html#l513"><code>src/pixi/InteractionManager.js:513</code></a>
|
||||
Defined in: <a href="../files/src_pixi_InteractionManager.js.html#l493"><code>src/pixi/InteractionManager.js:493</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -196,7 +204,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l513"><code>src/pixi/InteractionManager.js:513</code></a>
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l493"><code>src/pixi/InteractionManager.js:493</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -266,6 +274,13 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_originalEvent">originalEvent</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
|
|
@ -335,7 +350,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l537"><code>src/pixi/InteractionManager.js:537</code></a>
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l524"><code>src/pixi/InteractionManager.js:524</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -424,7 +439,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l519"><code>src/pixi/InteractionManager.js:519</code></a>
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l499"><code>src/pixi/InteractionManager.js:499</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -442,6 +457,50 @@
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_originalEvent" class="property item">
|
||||
<h3 class="name"><code>originalEvent</code></h3>
|
||||
<span class="type">Event</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l516"><code>src/pixi/InteractionManager.js:516</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>When passed to an event handler, this will be the original DOM Event that was captured</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -468,7 +527,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l529"><code>src/pixi/InteractionManager.js:529</code></a>
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l509"><code>src/pixi/InteractionManager.js:509</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -259,6 +267,8 @@ This manager also supports multitouch.</p>
|
|||
<li class="api-class-tab index"><a href="#index">Index</a></li>
|
||||
|
||||
|
||||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||||
|
||||
|
||||
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
|
||||
|
||||
|
|
@ -271,6 +281,23 @@ This manager also supports multitouch.</p>
|
|||
<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_autoDetectRenderer">autoDetectRenderer</a>
|
||||
|
||||
|
||||
<span class="flag static">static</span>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
|
|
@ -309,6 +336,165 @@ This manager also supports multitouch.</p>
|
|||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_autoDetectRenderer" class="method item">
|
||||
<h3 class="name"><code>autoDetectRenderer</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>width</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>height</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>view</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>transparent</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="flag static">static</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_utils_Detector.js.html#l5"><code>src/pixi/utils/Detector.js:5</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This helper function will automatically detect which renderer you should be using.
|
||||
WebGL is the preferred renderer as it is a lot fastest. If webGL is not supported by the browser then this function will return a canvas renderer</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">width</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the width of the renderers view</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">height</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the height of the renderers view</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">view</code>
|
||||
<span class="type">Canvas</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the canvas to use as a view, optional</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">transparent</code>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>the transparency of the render view, default false</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -146,7 +154,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_MovieClip.js.html#l5"><code>src/pixi/MovieClip.js:5</code></a>
|
||||
Defined in: <a href="../files/src_pixi_display_MovieClip.js.html#l5"><code>src/pixi/display/MovieClip.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -210,7 +218,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l5"><code>src/pixi/MovieClip.js:5</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l5"><code>src/pixi/display/MovieClip.js:5</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -499,6 +507,13 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_interactive">interactive</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
|
|
@ -506,6 +521,13 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_mask">mask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
|
|
@ -645,7 +667,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l41"><code>src/pixi/DisplayObjectContainer.js:41</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l42"><code>src/pixi/display/DisplayObjectContainer.js:42</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -735,7 +757,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l73"><code>src/pixi/DisplayObjectContainer.js:73</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l139"><code>src/pixi/display/DisplayObjectContainer.js:139</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -834,7 +856,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l106"><code>src/pixi/DisplayObject.js:106</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l109"><code>src/pixi/display/DisplayObject.js:109</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -863,7 +885,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -918,7 +940,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l168"><code>src/pixi/DisplayObjectContainer.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l274"><code>src/pixi/display/DisplayObjectContainer.js:274</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1005,7 +1027,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l94"><code>src/pixi/MovieClip.js:94</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l94"><code>src/pixi/display/MovieClip.js:94</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1092,7 +1114,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l81"><code>src/pixi/MovieClip.js:81</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l81"><code>src/pixi/display/MovieClip.js:81</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1176,7 +1198,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l112"><code>src/pixi/DisplayObject.js:112</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l115"><code>src/pixi/display/DisplayObject.js:115</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1205,7 +1227,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1260,7 +1282,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l138"><code>src/pixi/DisplayObject.js:138</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l141"><code>src/pixi/display/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1289,7 +1311,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1344,7 +1366,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l132"><code>src/pixi/DisplayObject.js:132</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l135"><code>src/pixi/display/DisplayObject.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1373,7 +1395,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1428,7 +1450,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l118"><code>src/pixi/DisplayObject.js:118</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l121"><code>src/pixi/display/DisplayObject.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1458,7 +1480,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1513,7 +1535,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l125"><code>src/pixi/DisplayObject.js:125</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l128"><code>src/pixi/display/DisplayObject.js:128</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1543,7 +1565,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1591,7 +1613,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l72"><code>src/pixi/MovieClip.js:72</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l72"><code>src/pixi/display/MovieClip.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1652,7 +1674,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l186"><code>src/pixi/DisplayObjectContainer.js:186</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l291"><code>src/pixi/display/DisplayObjectContainer.js:291</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1736,7 +1758,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l190"><code>src/pixi/DisplayObject.js:190</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l193"><code>src/pixi/display/DisplayObject.js:193</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1747,7 +1769,8 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
<p>[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
Instead of using this function you can now simply set the interactive property to true or false</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1765,7 +1788,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1820,7 +1843,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l103"><code>src/pixi/Sprite.js:103</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l103"><code>src/pixi/display/Sprite.js:103</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1897,7 +1920,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l63"><code>src/pixi/MovieClip.js:63</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l63"><code>src/pixi/display/MovieClip.js:63</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1964,7 +1987,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l128"><code>src/pixi/DisplayObjectContainer.js:128</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l227"><code>src/pixi/display/DisplayObjectContainer.js:227</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2063,7 +2086,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l149"><code>src/pixi/DisplayObject.js:149</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l152"><code>src/pixi/display/DisplayObject.js:152</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2093,7 +2116,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2148,7 +2171,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l162"><code>src/pixi/DisplayObject.js:162</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l165"><code>src/pixi/display/DisplayObject.js:165</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2177,7 +2200,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2232,7 +2255,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l168"><code>src/pixi/DisplayObject.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l171"><code>src/pixi/display/DisplayObject.js:171</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2262,7 +2285,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2317,7 +2340,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l156"><code>src/pixi/DisplayObject.js:156</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l159"><code>src/pixi/display/DisplayObject.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2346,7 +2369,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2390,7 +2413,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l40"><code>src/pixi/DisplayObject.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l43"><code>src/pixi/display/DisplayObject.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2431,7 +2454,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l21"><code>src/pixi/Sprite.js:21</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l21"><code>src/pixi/display/Sprite.js:21</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2478,7 +2501,7 @@ Setting the anchor to 1,1 would mean the textures origin points will be the bott
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l30"><code>src/pixi/MovieClip.js:30</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l30"><code>src/pixi/display/MovieClip.js:30</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2519,7 +2542,7 @@ Setting the anchor to 1,1 would mean the textures origin points will be the bott
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l38"><code>src/pixi/Sprite.js:38</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l38"><code>src/pixi/display/Sprite.js:38</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2561,7 +2584,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l95"><code>src/pixi/DisplayObject.js:95</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l98"><code>src/pixi/display/DisplayObject.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2602,7 +2625,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l16"><code>src/pixi/DisplayObjectContainer.js:16</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l16"><code>src/pixi/display/DisplayObjectContainer.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2646,7 +2669,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l23"><code>src/pixi/MovieClip.js:23</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l23"><code>src/pixi/display/MovieClip.js:23</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2687,7 +2710,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l53"><code>src/pixi/Sprite.js:53</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l53"><code>src/pixi/display/Sprite.js:53</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2728,7 +2751,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l69"><code>src/pixi/DisplayObject.js:69</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l72"><code>src/pixi/display/DisplayObject.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2747,6 +2770,47 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_interactive" class="property item inherited">
|
||||
<h3 class="name"><code>interactive</code></h3>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_interactive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l204"><code>src/pixi/display/DisplayObject.js:204</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2773,7 +2837,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l37"><code>src/pixi/MovieClip.js:37</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l37"><code>src/pixi/display/MovieClip.js:37</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2791,6 +2855,49 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_mask" class="property item inherited">
|
||||
<h3 class="name"><code>mask</code></h3>
|
||||
<span class="type">PIXI.Graphics</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_mask">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l222"><code>src/pixi/display/DisplayObject.js:222</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
To remove a mask, set this property to null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2817,7 +2924,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l44"><code>src/pixi/MovieClip.js:44</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l44"><code>src/pixi/display/MovieClip.js:44</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2858,7 +2965,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l55"><code>src/pixi/DisplayObject.js:55</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l58"><code>src/pixi/display/DisplayObject.js:58</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2899,7 +3006,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l26"><code>src/pixi/DisplayObject.js:26</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l29"><code>src/pixi/display/DisplayObject.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2943,7 +3050,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l51"><code>src/pixi/MovieClip.js:51</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l51"><code>src/pixi/display/MovieClip.js:51</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2984,7 +3091,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l12"><code>src/pixi/DisplayObject.js:12</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l15"><code>src/pixi/display/DisplayObject.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -3025,7 +3132,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l33"><code>src/pixi/DisplayObject.js:33</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l36"><code>src/pixi/display/DisplayObject.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -3066,7 +3173,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l19"><code>src/pixi/DisplayObject.js:19</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l22"><code>src/pixi/display/DisplayObject.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -3107,7 +3214,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l65"><code>src/pixi/display/DisplayObject.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -3148,7 +3255,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l31"><code>src/pixi/Sprite.js:31</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l31"><code>src/pixi/display/Sprite.js:31</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -3192,7 +3299,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_MovieClip.js.html#l16"><code>src/pixi/MovieClip.js:16</code></a>
|
||||
<a href="../files/src_pixi_display_MovieClip.js.html#l16"><code>src/pixi/display/MovieClip.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -3233,7 +3340,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l47"><code>src/pixi/DisplayObject.js:47</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l50"><code>src/pixi/display/DisplayObject.js:50</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -3274,7 +3381,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l46"><code>src/pixi/Sprite.js:46</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l46"><code>src/pixi/display/Sprite.js:46</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -142,7 +150,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_Point.js.html#l5"><code>src/pixi/Point.js:5</code></a>
|
||||
Defined in: <a href="../files/src_pixi_core_Point.js.html#l5"><code>src/pixi/core/Point.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -212,7 +220,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Point.js.html#l5"><code>src/pixi/Point.js:5</code></a>
|
||||
<a href="../files/src_pixi_core_Point.js.html#l5"><code>src/pixi/core/Point.js:5</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -379,7 +387,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Point.js.html#l29"><code>src/pixi/Point.js:29</code></a>
|
||||
<a href="../files/src_pixi_core_Point.js.html#l29"><code>src/pixi/core/Point.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -443,7 +451,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Point.js.html#l14"><code>src/pixi/Point.js:14</code></a>
|
||||
<a href="../files/src_pixi_core_Point.js.html#l14"><code>src/pixi/core/Point.js:14</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -489,7 +497,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Point.js.html#l21"><code>src/pixi/Point.js:21</code></a>
|
||||
<a href="../files/src_pixi_core_Point.js.html#l21"><code>src/pixi/core/Point.js:21</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -142,7 +150,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_Polygon.js.html#l5"><code>src/pixi/Polygon.js:5</code></a>
|
||||
Defined in: <a href="../files/src_pixi_core_Polygon.js.html#l5"><code>src/pixi/core/Polygon.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -206,7 +214,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Polygon.js.html#l5"><code>src/pixi/Polygon.js:5</code></a>
|
||||
<a href="../files/src_pixi_core_Polygon.js.html#l5"><code>src/pixi/core/Polygon.js:5</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -229,13 +237,14 @@
|
|||
<li class="param">
|
||||
|
||||
<code class="param-name">points</code>
|
||||
<span class="type">Array</span>
|
||||
<span class="type">Array<Point> | Array<Number></span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
<p>This cna be an array of Points or a flat array of numbers
|
||||
that will be interpreted as [x,y, x,y, ...]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -280,6 +289,13 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_contains">contains</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
@ -334,7 +350,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Polygon.js.html#l15"><code>src/pixi/Polygon.js:15</code></a>
|
||||
<a href="../files/src_pixi_core_Polygon.js.html#l28"><code>src/pixi/core/Polygon.js:28</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -364,6 +380,129 @@
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_contains" class="method item">
|
||||
<h3 class="name"><code>contains</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>x</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>y</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<span class="returns-inline">
|
||||
<span class="type"></span>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Polygon.js.html#l42"><code>src/pixi/core/Polygon.js:42</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">x</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The X coord of the point to test</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">y</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The Y coord of the point to test</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="returns">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<div class="returns-description">
|
||||
|
||||
|
||||
if the x/y coords are within this polygon
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -142,7 +150,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_Rectangle.js.html#l5"><code>src/pixi/Rectangle.js:5</code></a>
|
||||
Defined in: <a href="../files/src_pixi_core_Rectangle.js.html#l5"><code>src/pixi/core/Rectangle.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -224,7 +232,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Rectangle.js.html#l5"><code>src/pixi/Rectangle.js:5</code></a>
|
||||
<a href="../files/src_pixi_core_Rectangle.js.html#l5"><code>src/pixi/core/Rectangle.js:5</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -345,6 +353,13 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_contains">contains</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
@ -435,7 +450,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Rectangle.js.html#l45"><code>src/pixi/Rectangle.js:45</code></a>
|
||||
<a href="../files/src_pixi_core_Rectangle.js.html#l45"><code>src/pixi/core/Rectangle.js:45</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -465,6 +480,129 @@
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_contains" class="method item">
|
||||
<h3 class="name"><code>contains</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>x</code>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>y</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<span class="returns-inline">
|
||||
<span class="type"></span>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_core_Rectangle.js.html#l54"><code>src/pixi/core/Rectangle.js:54</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">x</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The X coord of the point to test</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">y</code>
|
||||
<span class="type">Number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The Y coord of the point to test</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="returns">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<div class="returns-description">
|
||||
|
||||
|
||||
if the x/y coords are within this polygon
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -499,7 +637,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Rectangle.js.html#l37"><code>src/pixi/Rectangle.js:37</code></a>
|
||||
<a href="../files/src_pixi_core_Rectangle.js.html#l37"><code>src/pixi/core/Rectangle.js:37</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -545,7 +683,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Rectangle.js.html#l30"><code>src/pixi/Rectangle.js:30</code></a>
|
||||
<a href="../files/src_pixi_core_Rectangle.js.html#l30"><code>src/pixi/core/Rectangle.js:30</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -591,7 +729,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Rectangle.js.html#l16"><code>src/pixi/Rectangle.js:16</code></a>
|
||||
<a href="../files/src_pixi_core_Rectangle.js.html#l16"><code>src/pixi/core/Rectangle.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -637,7 +775,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Rectangle.js.html#l23"><code>src/pixi/Rectangle.js:23</code></a>
|
||||
<a href="../files/src_pixi_core_Rectangle.js.html#l23"><code>src/pixi/core/Rectangle.js:23</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -163,6 +171,27 @@
|
|||
|
||||
<div class="box intro">
|
||||
<p>A RenderTexture is a special texture that allows any pixi displayObject to be rendered to it.</p>
|
||||
|
||||
<p><strong>Hint</strong>: All DisplayObjects (exmpl. Sprites) that renders on RenderTexture should be preloaded.
|
||||
Otherwise black rectangles will be drawn instead. </p>
|
||||
|
||||
<p>RenderTexture takes snapshot of DisplayObject passed to render method. If DisplayObject is passed to render method, position and rotation of it will be ignored. For example:</p>
|
||||
|
||||
<pre class="code prettyprint"><code>var renderTexture = new PIXI.RenderTexture(800, 600);
|
||||
var sprite = PIXI.Sprite.fromImage("spinObj_01.png");
|
||||
sprite.position.x = 800/2;
|
||||
sprite.position.y = 600/2;
|
||||
sprite.anchor.x = 0.5;
|
||||
sprite.anchor.y = 0.5;
|
||||
renderTexture.render(sprite);
|
||||
</code></pre>
|
||||
|
||||
<p>Sprite in this case will be rendered to 0,0 position. To render this sprite at center DisplayObjectContainer should be used:</p>
|
||||
|
||||
<pre class="code prettyprint"><code>var doc = new PIXI.DisplayObjectContainer();
|
||||
doc.addChild(sprite);
|
||||
renderTexture.render(doc); // Renders to center of renderTexture
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -509,7 +538,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_textures_RenderTexture.js.html#l90"><code>src/pixi/textures/RenderTexture.js:90</code></a>
|
||||
<a href="../files/src_pixi_textures_RenderTexture.js.html#l112"><code>src/pixi/textures/RenderTexture.js:112</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -434,6 +442,20 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_interactive">interactive</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_mask">mask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
|
|
@ -538,7 +560,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l41"><code>src/pixi/DisplayObjectContainer.js:41</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l42"><code>src/pixi/display/DisplayObjectContainer.js:42</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -628,7 +650,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l73"><code>src/pixi/DisplayObjectContainer.js:73</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l139"><code>src/pixi/display/DisplayObjectContainer.js:139</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -727,7 +749,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l106"><code>src/pixi/DisplayObject.js:106</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l109"><code>src/pixi/display/DisplayObject.js:109</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -756,7 +778,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -811,7 +833,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l168"><code>src/pixi/DisplayObjectContainer.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l274"><code>src/pixi/display/DisplayObjectContainer.js:274</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -895,7 +917,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l112"><code>src/pixi/DisplayObject.js:112</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l115"><code>src/pixi/display/DisplayObject.js:115</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -924,7 +946,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -979,7 +1001,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l138"><code>src/pixi/DisplayObject.js:138</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l141"><code>src/pixi/display/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1008,7 +1030,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1063,7 +1085,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l132"><code>src/pixi/DisplayObject.js:132</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l135"><code>src/pixi/display/DisplayObject.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1092,7 +1114,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1147,7 +1169,7 @@ When loaded this class will dispatch a "loaded" event</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l118"><code>src/pixi/DisplayObject.js:118</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l121"><code>src/pixi/display/DisplayObject.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1177,7 +1199,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1232,7 +1254,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l125"><code>src/pixi/DisplayObject.js:125</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l128"><code>src/pixi/display/DisplayObject.js:128</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1262,7 +1284,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1317,7 +1339,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l186"><code>src/pixi/DisplayObjectContainer.js:186</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l291"><code>src/pixi/display/DisplayObjectContainer.js:291</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1401,7 +1423,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l190"><code>src/pixi/DisplayObject.js:190</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l193"><code>src/pixi/display/DisplayObject.js:193</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1412,7 +1434,8 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
<p>[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
Instead of using this function you can now simply set the interactive property to true or false</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1430,7 +1453,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1491,7 +1514,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l128"><code>src/pixi/DisplayObjectContainer.js:128</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l227"><code>src/pixi/display/DisplayObjectContainer.js:227</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1590,7 +1613,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l149"><code>src/pixi/DisplayObject.js:149</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l152"><code>src/pixi/display/DisplayObject.js:152</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1620,7 +1643,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1675,7 +1698,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l162"><code>src/pixi/DisplayObject.js:162</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l165"><code>src/pixi/display/DisplayObject.js:165</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1704,7 +1727,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1759,7 +1782,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l168"><code>src/pixi/DisplayObject.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l171"><code>src/pixi/display/DisplayObject.js:171</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1789,7 +1812,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1844,7 +1867,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l156"><code>src/pixi/DisplayObject.js:156</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l159"><code>src/pixi/display/DisplayObject.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1873,7 +1896,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1917,7 +1940,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l40"><code>src/pixi/DisplayObject.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l43"><code>src/pixi/display/DisplayObject.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1958,7 +1981,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l95"><code>src/pixi/DisplayObject.js:95</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l98"><code>src/pixi/display/DisplayObject.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1999,7 +2022,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l16"><code>src/pixi/DisplayObjectContainer.js:16</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l16"><code>src/pixi/display/DisplayObjectContainer.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2040,7 +2063,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l69"><code>src/pixi/DisplayObject.js:69</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l72"><code>src/pixi/display/DisplayObject.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2059,6 +2082,90 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_interactive" class="property item inherited">
|
||||
<h3 class="name"><code>interactive</code></h3>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_interactive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l204"><code>src/pixi/display/DisplayObject.js:204</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_mask" class="property item inherited">
|
||||
<h3 class="name"><code>mask</code></h3>
|
||||
<span class="type">PIXI.Graphics</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_mask">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l222"><code>src/pixi/display/DisplayObject.js:222</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
To remove a mask, set this property to null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2082,7 +2189,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l55"><code>src/pixi/DisplayObject.js:55</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l58"><code>src/pixi/display/DisplayObject.js:58</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2123,7 +2230,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l26"><code>src/pixi/DisplayObject.js:26</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l29"><code>src/pixi/display/DisplayObject.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2164,7 +2271,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l12"><code>src/pixi/DisplayObject.js:12</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l15"><code>src/pixi/display/DisplayObject.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2205,7 +2312,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l33"><code>src/pixi/DisplayObject.js:33</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l36"><code>src/pixi/display/DisplayObject.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2246,7 +2353,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l19"><code>src/pixi/DisplayObject.js:19</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l22"><code>src/pixi/display/DisplayObject.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2287,7 +2394,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l65"><code>src/pixi/display/DisplayObject.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2328,7 +2435,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l47"><code>src/pixi/DisplayObject.js:47</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l50"><code>src/pixi/display/DisplayObject.js:50</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -146,7 +154,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_Sprite.js.html#l10"><code>src/pixi/Sprite.js:10</code></a>
|
||||
Defined in: <a href="../files/src_pixi_display_Sprite.js.html#l10"><code>src/pixi/display/Sprite.js:10</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -210,7 +218,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l10"><code>src/pixi/Sprite.js:10</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l10"><code>src/pixi/display/Sprite.js:10</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -475,6 +483,20 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_interactive">interactive</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_mask">mask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
|
|
@ -593,7 +615,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l41"><code>src/pixi/DisplayObjectContainer.js:41</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l42"><code>src/pixi/display/DisplayObjectContainer.js:42</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -683,7 +705,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l73"><code>src/pixi/DisplayObjectContainer.js:73</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l139"><code>src/pixi/display/DisplayObjectContainer.js:139</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -782,7 +804,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l106"><code>src/pixi/DisplayObject.js:106</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l109"><code>src/pixi/display/DisplayObject.js:109</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -811,7 +833,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -875,7 +897,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l135"><code>src/pixi/Sprite.js:135</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l135"><code>src/pixi/display/Sprite.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -982,7 +1004,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l151"><code>src/pixi/Sprite.js:151</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l151"><code>src/pixi/display/Sprite.js:151</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1080,7 +1102,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l168"><code>src/pixi/DisplayObjectContainer.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l274"><code>src/pixi/display/DisplayObjectContainer.js:274</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1164,7 +1186,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l112"><code>src/pixi/DisplayObject.js:112</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l115"><code>src/pixi/display/DisplayObject.js:115</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1193,7 +1215,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1248,7 +1270,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l138"><code>src/pixi/DisplayObject.js:138</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l141"><code>src/pixi/display/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1277,7 +1299,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1332,7 +1354,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l132"><code>src/pixi/DisplayObject.js:132</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l135"><code>src/pixi/display/DisplayObject.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1361,7 +1383,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1416,7 +1438,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l118"><code>src/pixi/DisplayObject.js:118</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l121"><code>src/pixi/display/DisplayObject.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1446,7 +1468,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1501,7 +1523,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l125"><code>src/pixi/DisplayObject.js:125</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l128"><code>src/pixi/display/DisplayObject.js:128</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1531,7 +1553,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1586,7 +1608,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l186"><code>src/pixi/DisplayObjectContainer.js:186</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l291"><code>src/pixi/display/DisplayObjectContainer.js:291</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1670,7 +1692,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l190"><code>src/pixi/DisplayObject.js:190</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l193"><code>src/pixi/display/DisplayObject.js:193</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1681,7 +1703,8 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
<p>[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
Instead of using this function you can now simply set the interactive property to true or false</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1699,7 +1722,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1757,7 +1780,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l103"><code>src/pixi/Sprite.js:103</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l103"><code>src/pixi/display/Sprite.js:103</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1847,7 +1870,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l128"><code>src/pixi/DisplayObjectContainer.js:128</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l227"><code>src/pixi/display/DisplayObjectContainer.js:227</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1946,7 +1969,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l149"><code>src/pixi/DisplayObject.js:149</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l152"><code>src/pixi/display/DisplayObject.js:152</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1976,7 +1999,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2031,7 +2054,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l162"><code>src/pixi/DisplayObject.js:162</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l165"><code>src/pixi/display/DisplayObject.js:165</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2060,7 +2083,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2115,7 +2138,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l168"><code>src/pixi/DisplayObject.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l171"><code>src/pixi/display/DisplayObject.js:171</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2145,7 +2168,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2200,7 +2223,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l156"><code>src/pixi/DisplayObject.js:156</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l159"><code>src/pixi/display/DisplayObject.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2229,7 +2252,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2273,7 +2296,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l40"><code>src/pixi/DisplayObject.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l43"><code>src/pixi/display/DisplayObject.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2317,7 +2340,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l21"><code>src/pixi/Sprite.js:21</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l21"><code>src/pixi/display/Sprite.js:21</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2364,7 +2387,7 @@ Setting the anchor to 1,1 would mean the textures origin points will be the bott
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l38"><code>src/pixi/Sprite.js:38</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l38"><code>src/pixi/display/Sprite.js:38</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2406,7 +2429,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l95"><code>src/pixi/DisplayObject.js:95</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l98"><code>src/pixi/display/DisplayObject.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2447,7 +2470,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l16"><code>src/pixi/DisplayObjectContainer.js:16</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l16"><code>src/pixi/display/DisplayObjectContainer.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2491,7 +2514,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l53"><code>src/pixi/Sprite.js:53</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l53"><code>src/pixi/display/Sprite.js:53</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2532,7 +2555,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l69"><code>src/pixi/DisplayObject.js:69</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l72"><code>src/pixi/display/DisplayObject.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2551,6 +2574,90 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_interactive" class="property item inherited">
|
||||
<h3 class="name"><code>interactive</code></h3>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_interactive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l204"><code>src/pixi/display/DisplayObject.js:204</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_mask" class="property item inherited">
|
||||
<h3 class="name"><code>mask</code></h3>
|
||||
<span class="type">PIXI.Graphics</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_mask">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l222"><code>src/pixi/display/DisplayObject.js:222</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
To remove a mask, set this property to null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2574,7 +2681,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l55"><code>src/pixi/DisplayObject.js:55</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l58"><code>src/pixi/display/DisplayObject.js:58</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2615,7 +2722,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l26"><code>src/pixi/DisplayObject.js:26</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l29"><code>src/pixi/display/DisplayObject.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2656,7 +2763,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l12"><code>src/pixi/DisplayObject.js:12</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l15"><code>src/pixi/display/DisplayObject.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2697,7 +2804,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l33"><code>src/pixi/DisplayObject.js:33</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l36"><code>src/pixi/display/DisplayObject.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2738,7 +2845,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l19"><code>src/pixi/DisplayObject.js:19</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l22"><code>src/pixi/display/DisplayObject.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2779,7 +2886,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l65"><code>src/pixi/display/DisplayObject.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2823,7 +2930,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l31"><code>src/pixi/Sprite.js:31</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l31"><code>src/pixi/display/Sprite.js:31</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2864,7 +2971,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l47"><code>src/pixi/DisplayObject.js:47</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l50"><code>src/pixi/display/DisplayObject.js:50</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2908,7 +3015,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l46"><code>src/pixi/Sprite.js:46</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l46"><code>src/pixi/display/Sprite.js:46</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -146,7 +154,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_Stage.js.html#l5"><code>src/pixi/Stage.js:5</code></a>
|
||||
Defined in: <a href="../files/src_pixi_display_Stage.js.html#l5"><code>src/pixi/display/Stage.js:5</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -216,7 +224,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Stage.js.html#l5"><code>src/pixi/Stage.js:5</code></a>
|
||||
<a href="../files/src_pixi_display_Stage.js.html#l5"><code>src/pixi/display/Stage.js:5</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -471,6 +479,20 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_interactive">interactive</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_mask">mask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
|
|
@ -575,7 +597,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l41"><code>src/pixi/DisplayObjectContainer.js:41</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l42"><code>src/pixi/display/DisplayObjectContainer.js:42</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -665,7 +687,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l73"><code>src/pixi/DisplayObjectContainer.js:73</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l139"><code>src/pixi/display/DisplayObjectContainer.js:139</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -764,7 +786,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l106"><code>src/pixi/DisplayObject.js:106</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l109"><code>src/pixi/display/DisplayObject.js:109</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -793,7 +815,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -848,7 +870,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l168"><code>src/pixi/DisplayObjectContainer.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l274"><code>src/pixi/display/DisplayObjectContainer.js:274</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -929,7 +951,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Stage.js.html#l76"><code>src/pixi/Stage.js:76</code></a>
|
||||
<a href="../files/src_pixi_display_Stage.js.html#l78"><code>src/pixi/display/Stage.js:78</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1003,7 +1025,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l112"><code>src/pixi/DisplayObject.js:112</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l115"><code>src/pixi/display/DisplayObject.js:115</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1032,7 +1054,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1087,7 +1109,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l138"><code>src/pixi/DisplayObject.js:138</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l141"><code>src/pixi/display/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1116,7 +1138,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1171,7 +1193,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l132"><code>src/pixi/DisplayObject.js:132</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l135"><code>src/pixi/display/DisplayObject.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1200,7 +1222,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1255,7 +1277,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l118"><code>src/pixi/DisplayObject.js:118</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l121"><code>src/pixi/display/DisplayObject.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1285,7 +1307,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1340,7 +1362,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l125"><code>src/pixi/DisplayObject.js:125</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l128"><code>src/pixi/display/DisplayObject.js:128</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1370,7 +1392,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1425,7 +1447,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l186"><code>src/pixi/DisplayObjectContainer.js:186</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l291"><code>src/pixi/display/DisplayObjectContainer.js:291</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1512,7 +1534,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Stage.js.html#l63"><code>src/pixi/Stage.js:63</code></a>
|
||||
<a href="../files/src_pixi_display_Stage.js.html#l65"><code>src/pixi/display/Stage.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1596,7 +1618,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l190"><code>src/pixi/DisplayObject.js:190</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l193"><code>src/pixi/display/DisplayObject.js:193</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1607,7 +1629,8 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
<p>[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
Instead of using this function you can now simply set the interactive property to true or false</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1625,7 +1648,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1686,7 +1709,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l128"><code>src/pixi/DisplayObjectContainer.js:128</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l227"><code>src/pixi/display/DisplayObjectContainer.js:227</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1785,7 +1808,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l149"><code>src/pixi/DisplayObject.js:149</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l152"><code>src/pixi/display/DisplayObject.js:152</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1815,7 +1838,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1870,7 +1893,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l162"><code>src/pixi/DisplayObject.js:162</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l165"><code>src/pixi/display/DisplayObject.js:165</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1899,7 +1922,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1954,7 +1977,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l168"><code>src/pixi/DisplayObject.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l171"><code>src/pixi/display/DisplayObject.js:171</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1984,7 +2007,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2039,7 +2062,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l156"><code>src/pixi/DisplayObject.js:156</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l159"><code>src/pixi/display/DisplayObject.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2068,7 +2091,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2116,7 +2139,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Stage.js.html#l40"><code>src/pixi/Stage.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_Stage.js.html#l42"><code>src/pixi/display/Stage.js:42</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2166,7 +2189,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l40"><code>src/pixi/DisplayObject.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l43"><code>src/pixi/display/DisplayObject.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2207,7 +2230,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l95"><code>src/pixi/DisplayObject.js:95</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l98"><code>src/pixi/display/DisplayObject.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2248,7 +2271,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l16"><code>src/pixi/DisplayObjectContainer.js:16</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l16"><code>src/pixi/display/DisplayObjectContainer.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2289,7 +2312,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l69"><code>src/pixi/DisplayObject.js:69</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l72"><code>src/pixi/display/DisplayObject.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2308,6 +2331,90 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_interactive" class="property item inherited">
|
||||
<h3 class="name"><code>interactive</code></h3>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_interactive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l204"><code>src/pixi/display/DisplayObject.js:204</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_mask" class="property item inherited">
|
||||
<h3 class="name"><code>mask</code></h3>
|
||||
<span class="type">PIXI.Graphics</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_mask">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l222"><code>src/pixi/display/DisplayObject.js:222</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
To remove a mask, set this property to null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2331,7 +2438,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l55"><code>src/pixi/DisplayObject.js:55</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l58"><code>src/pixi/display/DisplayObject.js:58</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2372,7 +2479,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l26"><code>src/pixi/DisplayObject.js:26</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l29"><code>src/pixi/display/DisplayObject.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2413,7 +2520,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l12"><code>src/pixi/DisplayObject.js:12</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l15"><code>src/pixi/display/DisplayObject.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2454,7 +2561,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l33"><code>src/pixi/DisplayObject.js:33</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l36"><code>src/pixi/display/DisplayObject.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2495,7 +2602,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l19"><code>src/pixi/DisplayObject.js:19</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l22"><code>src/pixi/display/DisplayObject.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2536,7 +2643,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l65"><code>src/pixi/display/DisplayObject.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2577,7 +2684,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l47"><code>src/pixi/DisplayObject.js:47</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l50"><code>src/pixi/display/DisplayObject.js:50</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -588,6 +596,20 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_interactive">interactive</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_mask">mask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
|
|
@ -706,7 +728,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l41"><code>src/pixi/DisplayObjectContainer.js:41</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l42"><code>src/pixi/display/DisplayObjectContainer.js:42</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -735,7 +757,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -796,7 +818,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l73"><code>src/pixi/DisplayObjectContainer.js:73</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l139"><code>src/pixi/display/DisplayObjectContainer.js:139</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -825,7 +847,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -840,7 +862,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -895,7 +917,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l106"><code>src/pixi/DisplayObject.js:106</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l109"><code>src/pixi/display/DisplayObject.js:109</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -979,7 +1001,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l168"><code>src/pixi/DisplayObjectContainer.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l274"><code>src/pixi/display/DisplayObjectContainer.js:274</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1008,7 +1030,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1063,7 +1085,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l112"><code>src/pixi/DisplayObject.js:112</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l115"><code>src/pixi/display/DisplayObject.js:115</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1147,7 +1169,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l138"><code>src/pixi/DisplayObject.js:138</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l141"><code>src/pixi/display/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1231,7 +1253,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l132"><code>src/pixi/DisplayObject.js:132</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l135"><code>src/pixi/display/DisplayObject.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1315,7 +1337,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l118"><code>src/pixi/DisplayObject.js:118</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l121"><code>src/pixi/display/DisplayObject.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1400,7 +1422,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l125"><code>src/pixi/DisplayObject.js:125</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l128"><code>src/pixi/display/DisplayObject.js:128</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1485,7 +1507,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l186"><code>src/pixi/DisplayObjectContainer.js:186</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l291"><code>src/pixi/display/DisplayObjectContainer.js:291</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1514,7 +1536,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1569,7 +1591,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l190"><code>src/pixi/DisplayObject.js:190</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l193"><code>src/pixi/display/DisplayObject.js:193</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1580,7 +1602,8 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
<p>[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
Instead of using this function you can now simply set the interactive property to true or false</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1850,7 +1873,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l103"><code>src/pixi/Sprite.js:103</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l103"><code>src/pixi/display/Sprite.js:103</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1940,7 +1963,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l128"><code>src/pixi/DisplayObjectContainer.js:128</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l227"><code>src/pixi/display/DisplayObjectContainer.js:227</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1969,7 +1992,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1984,7 +2007,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2039,7 +2062,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l149"><code>src/pixi/DisplayObject.js:149</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l152"><code>src/pixi/display/DisplayObject.js:152</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2124,7 +2147,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l162"><code>src/pixi/DisplayObject.js:162</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l165"><code>src/pixi/display/DisplayObject.js:165</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2208,7 +2231,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l168"><code>src/pixi/DisplayObject.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l171"><code>src/pixi/display/DisplayObject.js:171</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2293,7 +2316,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l156"><code>src/pixi/DisplayObject.js:156</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l159"><code>src/pixi/display/DisplayObject.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2366,7 +2389,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l40"><code>src/pixi/DisplayObject.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l43"><code>src/pixi/display/DisplayObject.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2407,7 +2430,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l21"><code>src/pixi/Sprite.js:21</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l21"><code>src/pixi/display/Sprite.js:21</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2451,7 +2474,7 @@ Setting the anchor to 1,1 would mean the textures origin points will be the bott
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l38"><code>src/pixi/Sprite.js:38</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l38"><code>src/pixi/display/Sprite.js:38</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2493,7 +2516,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l95"><code>src/pixi/DisplayObject.js:95</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l98"><code>src/pixi/display/DisplayObject.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2534,7 +2557,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l16"><code>src/pixi/DisplayObjectContainer.js:16</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l16"><code>src/pixi/display/DisplayObjectContainer.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2575,7 +2598,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l53"><code>src/pixi/Sprite.js:53</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l53"><code>src/pixi/display/Sprite.js:53</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2616,7 +2639,7 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l69"><code>src/pixi/DisplayObject.js:69</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l72"><code>src/pixi/display/DisplayObject.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2635,6 +2658,90 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_interactive" class="property item inherited">
|
||||
<h3 class="name"><code>interactive</code></h3>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_interactive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l204"><code>src/pixi/display/DisplayObject.js:204</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_mask" class="property item inherited">
|
||||
<h3 class="name"><code>mask</code></h3>
|
||||
<span class="type">PIXI.Graphics</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_mask">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l222"><code>src/pixi/display/DisplayObject.js:222</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
To remove a mask, set this property to null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2658,7 +2765,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l55"><code>src/pixi/DisplayObject.js:55</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l58"><code>src/pixi/display/DisplayObject.js:58</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2699,7 +2806,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l26"><code>src/pixi/DisplayObject.js:26</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l29"><code>src/pixi/display/DisplayObject.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2740,7 +2847,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l12"><code>src/pixi/DisplayObject.js:12</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l15"><code>src/pixi/display/DisplayObject.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2781,7 +2888,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l33"><code>src/pixi/DisplayObject.js:33</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l36"><code>src/pixi/display/DisplayObject.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2822,7 +2929,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l19"><code>src/pixi/DisplayObject.js:19</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l22"><code>src/pixi/display/DisplayObject.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2863,7 +2970,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l65"><code>src/pixi/display/DisplayObject.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2904,7 +3011,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l31"><code>src/pixi/Sprite.js:31</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l31"><code>src/pixi/display/Sprite.js:31</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2945,7 +3052,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l47"><code>src/pixi/DisplayObject.js:47</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l50"><code>src/pixi/display/DisplayObject.js:50</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2986,7 +3093,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l46"><code>src/pixi/Sprite.js:46</code></a>
|
||||
<a href="../files/src_pixi_display_Sprite.js.html#l46"><code>src/pixi/display/Sprite.js:46</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -471,6 +479,20 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_interactive">interactive</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_mask">mask</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
|
|
@ -589,7 +611,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l41"><code>src/pixi/DisplayObjectContainer.js:41</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l42"><code>src/pixi/display/DisplayObjectContainer.js:42</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -679,7 +701,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l73"><code>src/pixi/DisplayObjectContainer.js:73</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l139"><code>src/pixi/display/DisplayObjectContainer.js:139</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -778,7 +800,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l106"><code>src/pixi/DisplayObject.js:106</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l109"><code>src/pixi/display/DisplayObject.js:109</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -807,7 +829,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -862,7 +884,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l168"><code>src/pixi/DisplayObjectContainer.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l274"><code>src/pixi/display/DisplayObjectContainer.js:274</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -946,7 +968,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l112"><code>src/pixi/DisplayObject.js:112</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l115"><code>src/pixi/display/DisplayObject.js:115</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -975,7 +997,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1030,7 +1052,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l138"><code>src/pixi/DisplayObject.js:138</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l141"><code>src/pixi/display/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1059,7 +1081,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1114,7 +1136,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l132"><code>src/pixi/DisplayObject.js:132</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l135"><code>src/pixi/display/DisplayObject.js:135</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1143,7 +1165,7 @@
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1198,7 +1220,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l118"><code>src/pixi/DisplayObject.js:118</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l121"><code>src/pixi/display/DisplayObject.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1228,7 +1250,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1283,7 +1305,7 @@ for this callback to be fired the mouse must have been pressed down over the dis
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l125"><code>src/pixi/DisplayObject.js:125</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l128"><code>src/pixi/display/DisplayObject.js:128</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1313,7 +1335,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1368,7 +1390,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l186"><code>src/pixi/DisplayObjectContainer.js:186</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l291"><code>src/pixi/display/DisplayObjectContainer.js:291</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1452,7 +1474,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l190"><code>src/pixi/DisplayObject.js:190</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l193"><code>src/pixi/display/DisplayObject.js:193</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1463,7 +1485,8 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
<p>[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
Instead of using this function you can now simply set the interactive property to true or false</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1481,7 +1504,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1542,7 +1565,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l128"><code>src/pixi/DisplayObjectContainer.js:128</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l227"><code>src/pixi/display/DisplayObjectContainer.js:227</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1641,7 +1664,7 @@ for this callback to be fired, The touch must have started over the displayObjec
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l149"><code>src/pixi/DisplayObject.js:149</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l152"><code>src/pixi/display/DisplayObject.js:152</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1671,7 +1694,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1726,7 +1749,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l162"><code>src/pixi/DisplayObject.js:162</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l165"><code>src/pixi/display/DisplayObject.js:165</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1755,7 +1778,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1810,7 +1833,7 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l168"><code>src/pixi/DisplayObject.js:168</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l171"><code>src/pixi/display/DisplayObject.js:171</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1840,7 +1863,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1895,7 +1918,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l156"><code>src/pixi/DisplayObject.js:156</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l159"><code>src/pixi/display/DisplayObject.js:159</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -1924,7 +1947,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -1968,7 +1991,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l40"><code>src/pixi/DisplayObject.js:40</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l43"><code>src/pixi/display/DisplayObject.js:43</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2009,7 +2032,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l95"><code>src/pixi/DisplayObject.js:95</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l98"><code>src/pixi/display/DisplayObject.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2050,7 +2073,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObjectContainer.js.html#l16"><code>src/pixi/DisplayObjectContainer.js:16</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObjectContainer.js.html#l16"><code>src/pixi/display/DisplayObjectContainer.js:16</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2091,7 +2114,7 @@ for this callback to be fired, The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l69"><code>src/pixi/DisplayObject.js:69</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l72"><code>src/pixi/display/DisplayObject.js:72</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2110,6 +2133,90 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_interactive" class="property item inherited">
|
||||
<h3 class="name"><code>interactive</code></h3>
|
||||
<span class="type">Boolean</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_interactive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l204"><code>src/pixi/display/DisplayObject.js:204</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Indicates if the sprite will have touch and mouse interactivity. It is false by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_mask" class="property item inherited">
|
||||
<h3 class="name"><code>mask</code></h3>
|
||||
<span class="type">PIXI.Graphics</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_mask">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l222"><code>src/pixi/display/DisplayObject.js:222</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
To remove a mask, set this property to null.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -2133,7 +2240,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l55"><code>src/pixi/DisplayObject.js:55</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l58"><code>src/pixi/display/DisplayObject.js:58</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2174,7 +2281,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l26"><code>src/pixi/DisplayObject.js:26</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l29"><code>src/pixi/display/DisplayObject.js:29</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2215,7 +2322,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l12"><code>src/pixi/DisplayObject.js:12</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l15"><code>src/pixi/display/DisplayObject.js:15</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2256,7 +2363,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l33"><code>src/pixi/DisplayObject.js:33</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l36"><code>src/pixi/display/DisplayObject.js:36</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2297,7 +2404,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l19"><code>src/pixi/DisplayObject.js:19</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l22"><code>src/pixi/display/DisplayObject.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2338,7 +2445,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l65"><code>src/pixi/display/DisplayObject.js:65</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2382,7 +2489,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_extras_TilingSprite.js.html#l29"><code>src/pixi/extras/TilingSprite.js:29</code></a>
|
||||
<a href="../files/src_pixi_extras_TilingSprite.js.html#l28"><code>src/pixi/extras/TilingSprite.js:28</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2426,7 +2533,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_extras_TilingSprite.js.html#l23"><code>src/pixi/extras/TilingSprite.js:23</code></a>
|
||||
<a href="../files/src_pixi_extras_TilingSprite.js.html#l22"><code>src/pixi/extras/TilingSprite.js:22</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -2467,7 +2574,7 @@ Setting it is a neat way of optimising the hitTest function that the interaction
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l47"><code>src/pixi/DisplayObject.js:47</code></a>
|
||||
<a href="../files/src_pixi_display_DisplayObject.js.html#l50"><code>src/pixi/display/DisplayObject.js:50</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -142,7 +150,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_WebGLRenderGroup.js.html#l8"><code>src/pixi/renderers/WebGLRenderGroup.js:8</code></a>
|
||||
Defined in: <a href="../files/src_pixi_renderers_webgl_WebGLRenderGroup.js.html#l8"><code>src/pixi/renderers/webgl/WebGLRenderGroup.js:8</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -307,7 +315,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLBatch.js.html#l98"><code>src/pixi/renderers/WebGLBatch.js:98</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLBatch.js.html#l98"><code>src/pixi/renderers/webgl/WebGLBatch.js:98</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -400,7 +408,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLBatch.js.html#l145"><code>src/pixi/renderers/WebGLBatch.js:145</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLBatch.js.html#l145"><code>src/pixi/renderers/webgl/WebGLBatch.js:145</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -508,7 +516,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLBatch.js.html#l117"><code>src/pixi/renderers/WebGLBatch.js:117</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLBatch.js.html#l117"><code>src/pixi/renderers/webgl/WebGLBatch.js:117</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -610,7 +618,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLBatch.js.html#l268"><code>src/pixi/renderers/WebGLBatch.js:268</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLBatch.js.html#l268"><code>src/pixi/renderers/webgl/WebGLBatch.js:268</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -687,7 +695,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLBatch.js.html#l346"><code>src/pixi/renderers/WebGLBatch.js:346</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLBatch.js.html#l346"><code>src/pixi/renderers/webgl/WebGLBatch.js:346</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -751,7 +759,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLBatch.js.html#l175"><code>src/pixi/renderers/WebGLBatch.js:175</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLBatch.js.html#l175"><code>src/pixi/renderers/webgl/WebGLBatch.js:175</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -828,7 +836,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLBatch.js.html#l513"><code>src/pixi/renderers/WebGLBatch.js:513</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLBatch.js.html#l513"><code>src/pixi/renderers/webgl/WebGLBatch.js:513</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -896,7 +904,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLBatch.js.html#l218"><code>src/pixi/renderers/WebGLBatch.js:218</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLBatch.js.html#l218"><code>src/pixi/renderers/webgl/WebGLBatch.js:218</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -986,7 +994,7 @@ if a group of sprites all have the same baseTexture and blendMode then they can
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLBatch.js.html#l401"><code>src/pixi/renderers/WebGLBatch.js:401</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLBatch.js.html#l401"><code>src/pixi/renderers/webgl/WebGLBatch.js:401</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -142,7 +150,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_renderers_WebGLRenderer.js.html#l11"><code>src/pixi/renderers/WebGLRenderer.js:11</code></a>
|
||||
Defined in: <a href="../files/src_pixi_renderers_webgl_WebGLRenderer.js.html#l11"><code>src/pixi/renderers/webgl/WebGLRenderer.js:11</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -225,7 +233,7 @@ Dont forget to add the view to your DOM or you will not see anything :)</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLRenderer.js.html#l11"><code>src/pixi/renderers/WebGLRenderer.js:11</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLRenderer.js.html#l11"><code>src/pixi/renderers/webgl/WebGLRenderer.js:11</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -411,7 +419,7 @@ Dont forget to add the view to your DOM or you will not see anything :)</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLRenderer.js.html#l144"><code>src/pixi/renderers/WebGLRenderer.js:144</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLRenderer.js.html#l121"><code>src/pixi/renderers/webgl/WebGLRenderer.js:121</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
@ -504,7 +512,7 @@ Dont forget to add the view to your DOM or you will not see anything :)</p>
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_renderers_WebGLRenderer.js.html#l284"><code>src/pixi/renderers/WebGLRenderer.js:284</code></a>
|
||||
<a href="../files/src_pixi_renderers_webgl_WebGLRenderer.js.html#l263"><code>src/pixi/renderers/webgl/WebGLRenderer.js:263</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
|||
2956
docs/data.json
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -197,7 +205,6 @@ PIXI.InteractionManager.prototype.collectInteractiveSprite = function(displayObj
|
|||
var children = displayObject.children;
|
||||
var length = children.length;
|
||||
|
||||
//this.interactiveItems = [];
|
||||
/// make an interaction tree... {item.__interactiveParent}
|
||||
for (var i = length-1; i >= 0; i--)
|
||||
{
|
||||
|
|
@ -273,7 +280,7 @@ PIXI.InteractionManager.prototype.update = function()
|
|||
|
||||
var len = this.interactiveItems.length;
|
||||
|
||||
for (var i=0; i < this.interactiveItems.length; i++) {
|
||||
for (var i=0; i < len; i++) {
|
||||
this.interactiveItems[i].interactiveChildren = false;
|
||||
}
|
||||
|
||||
|
|
@ -333,6 +340,7 @@ PIXI.InteractionManager.prototype.update = function()
|
|||
|
||||
PIXI.InteractionManager.prototype.onMouseMove = function(event)
|
||||
{
|
||||
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
||||
// TODO optimize by not check EVERY TIME! maybe half as often? //
|
||||
var rect = this.target.view.getBoundingClientRect();
|
||||
|
||||
|
|
@ -357,6 +365,9 @@ PIXI.InteractionManager.prototype.onMouseMove = function(event)
|
|||
|
||||
PIXI.InteractionManager.prototype.onMouseDown = function(event)
|
||||
{
|
||||
event.preventDefault();
|
||||
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
||||
|
||||
// loop through inteaction tree...
|
||||
// hit test each item! ->
|
||||
// get interactive items under point??
|
||||
|
|
@ -393,6 +404,8 @@ PIXI.InteractionManager.prototype.onMouseDown = function(event)
|
|||
|
||||
PIXI.InteractionManager.prototype.onMouseUp = function(event)
|
||||
{
|
||||
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
||||
|
||||
var global = this.mouse.global;
|
||||
|
||||
|
||||
|
|
@ -449,42 +462,12 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
|
|||
y = a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id;
|
||||
|
||||
//a sprite or display object with a hit area defined
|
||||
if(item.hitArea)
|
||||
{
|
||||
var hitArea = item.hitArea;
|
||||
if(item.hitArea && item.hitArea.contains) {
|
||||
if(item.hitArea.contains(x, y)) {
|
||||
if(isSprite)
|
||||
interactionData.target = item;
|
||||
|
||||
//Polygon hit area
|
||||
if(item.hitArea instanceof PIXI.Polygon) {
|
||||
var inside = false;
|
||||
|
||||
// use some raycasting to test hits
|
||||
// https://github.com/substack/point-in-polygon/blob/master/index.js
|
||||
for(var i = 0, j = item.hitArea.points.length - 1; i < 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 > y) != (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);
|
||||
|
||||
if(intersect) inside = !inside;
|
||||
}
|
||||
|
||||
if(inside) {
|
||||
if(isSprite) interactionData.target = item;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//Rectangle hit area
|
||||
else {
|
||||
var x1 = hitArea.x;
|
||||
if(x > x1 && x < x1 + hitArea.width)
|
||||
{
|
||||
var y1 = hitArea.y;
|
||||
|
||||
if(y > y1 && y < y1 + hitArea.height)
|
||||
{
|
||||
if(isSprite) interactionData.target = item;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// a sprite with no hitarea defined
|
||||
|
|
@ -524,6 +507,7 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
|
|||
|
||||
PIXI.InteractionManager.prototype.onTouchMove = function(event)
|
||||
{
|
||||
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
||||
var rect = this.target.view.getBoundingClientRect();
|
||||
var changedTouches = event.changedTouches;
|
||||
|
||||
|
|
@ -547,6 +531,9 @@ PIXI.InteractionManager.prototype.onTouchMove = function(event)
|
|||
|
||||
PIXI.InteractionManager.prototype.onTouchStart = function(event)
|
||||
{
|
||||
event.preventDefault();
|
||||
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
||||
|
||||
var rect = this.target.view.getBoundingClientRect();
|
||||
|
||||
var changedTouches = event.changedTouches;
|
||||
|
|
@ -588,6 +575,7 @@ PIXI.InteractionManager.prototype.onTouchStart = function(event)
|
|||
|
||||
PIXI.InteractionManager.prototype.onTouchEnd = function(event)
|
||||
{
|
||||
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
||||
var rect = this.target.view.getBoundingClientRect();
|
||||
var changedTouches = event.changedTouches;
|
||||
|
||||
|
|
@ -672,6 +660,13 @@ PIXI.InteractionData = function()
|
|||
* @type Sprite
|
||||
*/
|
||||
this.target;
|
||||
|
||||
/**
|
||||
* When passed to an event handler, this will be the original DOM Event that was captured
|
||||
* @property originalEvent
|
||||
* @type Event
|
||||
*/
|
||||
this.originalEvent;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
235
docs/files/src_pixi_core_Circle.js.html
Normal file
|
|
@ -0,0 +1,235 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/core/Circle.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/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://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.3.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="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Text.html">Text</a></li>
|
||||
|
||||
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||
|
||||
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="api-modules" class="apis modules">
|
||||
|
||||
<li><a href="../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/pixi/core/Circle.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Chad Engler <chad@pantherdev.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Circle
|
||||
* @constructor
|
||||
* @param x {Number} The X coord of the upper-left corner of the framing rectangle of this circle
|
||||
* @param y {Number} The Y coord of the upper-left corner of the framing rectangle of this circle
|
||||
* @param radius {Number} The radius of the circle
|
||||
*/
|
||||
PIXI.Circle = function(x, y, radius)
|
||||
{
|
||||
/**
|
||||
* @property x
|
||||
* @type Number
|
||||
* @default 0
|
||||
*/
|
||||
this.x = x || 0;
|
||||
|
||||
/**
|
||||
* @property y
|
||||
* @type Number
|
||||
* @default 0
|
||||
*/
|
||||
this.y = y || 0;
|
||||
|
||||
/**
|
||||
* @property radius
|
||||
* @type Number
|
||||
* @default 0
|
||||
*/
|
||||
this.radius = radius || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @method clone
|
||||
* @return a copy of the polygon
|
||||
*/
|
||||
PIXI.Circle.prototype.clone = function()
|
||||
{
|
||||
return new PIXI.Circle(this.x, this.y, this.radius);
|
||||
}
|
||||
|
||||
/**
|
||||
* @method contains
|
||||
* @param x {Number} The X coord of the point to test
|
||||
* @param y {Number} The Y coord of the point to test
|
||||
* @return if the x/y coords are within this polygon
|
||||
*/
|
||||
PIXI.Circle.prototype.contains = function(x, y)
|
||||
{
|
||||
if(this.radius <= 0)
|
||||
return false;
|
||||
|
||||
var dx = (this.x - x),
|
||||
dy = (this.y - y),
|
||||
r2 = this.radius * this.radius;
|
||||
|
||||
dx *= dx;
|
||||
dy *= dy;
|
||||
|
||||
return (dx + dy <= r2);
|
||||
}
|
||||
|
||||
PIXI.Circle.constructor = PIXI.Circle;
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||
<script>prettyPrint();</script>
|
||||
<script src="../assets/js/yui-prettify.js"></script>
|
||||
<script src="../assets/../api.js"></script>
|
||||
<script src="../assets/js/api-filter.js"></script>
|
||||
<script src="../assets/js/api-list.js"></script>
|
||||
<script src="../assets/js/api-search.js"></script>
|
||||
<script src="../assets/js/apidocs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
249
docs/files/src_pixi_core_Ellipse.js.html
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/core/Ellipse.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/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://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.3.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="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Text.html">Text</a></li>
|
||||
|
||||
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||
|
||||
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="api-modules" class="apis modules">
|
||||
|
||||
<li><a href="../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/pixi/core/Ellipse.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Chad Engler <chad@pantherdev.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Ellipse
|
||||
* @constructor
|
||||
* @param x {Number} The X coord of the upper-left corner of the framing rectangle of this circle
|
||||
* @param y {Number} The Y coord of the upper-left corner of the framing rectangle of this circle
|
||||
* @param width {Number} The overall height of this ellipse
|
||||
* @param height {Number} The overall width of this ellipse
|
||||
*/
|
||||
PIXI.Ellipse = function(x, y, width, height)
|
||||
{
|
||||
/**
|
||||
* @property x
|
||||
* @type Number
|
||||
* @default 0
|
||||
*/
|
||||
this.x = x || 0;
|
||||
|
||||
/**
|
||||
* @property y
|
||||
* @type Number
|
||||
* @default 0
|
||||
*/
|
||||
this.y = y || 0;
|
||||
|
||||
/**
|
||||
* @property width
|
||||
* @type Number
|
||||
* @default 0
|
||||
*/
|
||||
this.width = width || 0;
|
||||
|
||||
/**
|
||||
* @property height
|
||||
* @type Number
|
||||
* @default 0
|
||||
*/
|
||||
this.height = height || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @method clone
|
||||
* @return a copy of the polygon
|
||||
*/
|
||||
PIXI.Ellipse.prototype.clone = function()
|
||||
{
|
||||
return new PIXI.Ellipse(this.x, this.y, this.width, this.height);
|
||||
}
|
||||
|
||||
/**
|
||||
* @method contains
|
||||
* @param x {Number} The X coord of the point to test
|
||||
* @param y {Number} The Y coord of the point to test
|
||||
* @return if the x/y coords are within this polygon
|
||||
*/
|
||||
PIXI.Ellipse.prototype.contains = function(x, y)
|
||||
{
|
||||
if(this.width <= 0 || this.height <= 0)
|
||||
return false;
|
||||
|
||||
//normalize the coords to an ellipse with center 0,0
|
||||
//and a radius of 0.5
|
||||
var normx = ((x - this.x) / this.width) - 0.5,
|
||||
normy = ((y - this.y) / this.height) - 0.5;
|
||||
|
||||
normx *= normx;
|
||||
normy *= normy;
|
||||
|
||||
return (normx + normy < 0.25);
|
||||
}
|
||||
|
||||
PIXI.Ellipse.getBounds = function()
|
||||
{
|
||||
return new PIXI.Rectangle(this.x, this.y, this.width, this.height);
|
||||
}
|
||||
|
||||
PIXI.Ellipse.constructor = PIXI.Ellipse;
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||
<script>prettyPrint();</script>
|
||||
<script src="../assets/js/yui-prettify.js"></script>
|
||||
<script src="../assets/../api.js"></script>
|
||||
<script src="../assets/js/api-filter.js"></script>
|
||||
<script src="../assets/js/api-list.js"></script>
|
||||
<script src="../assets/js/api-search.js"></script>
|
||||
<script src="../assets/js/apidocs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/Point.js - Pixi.JS</title>
|
||||
<title>src/pixi/core/Point.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/Point.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/core/Point.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
234
docs/files/src_pixi_core_Polygon.js.html
Normal file
|
|
@ -0,0 +1,234 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/core/Polygon.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/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://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.3.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="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Text.html">Text</a></li>
|
||||
|
||||
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||
|
||||
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="api-modules" class="apis modules">
|
||||
|
||||
<li><a href="../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/pixi/core/Polygon.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Adrien Brault <adrien.brault@gmail.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Polygon
|
||||
* @constructor
|
||||
* @param points {Array<Point>|Array<Number>} This cna be an array of Points or a flat array of numbers
|
||||
* that will be interpreted as [x,y, x,y, ...]
|
||||
*/
|
||||
PIXI.Polygon = function(points)
|
||||
{
|
||||
//if this is a flat array of numbers, convert it to points
|
||||
if(typeof points[0] === 'number') {
|
||||
var p = [];
|
||||
for(var i = 0, il = points.length; i < il; i+=2) {
|
||||
p.push(
|
||||
new PIXI.Point(points[i], points[i + 1])
|
||||
);
|
||||
}
|
||||
|
||||
points = p;
|
||||
}
|
||||
|
||||
this.points = points;
|
||||
}
|
||||
|
||||
/**
|
||||
* @method clone
|
||||
* @return a copy of the polygon
|
||||
*/
|
||||
PIXI.Polygon.prototype.clone = function()
|
||||
{
|
||||
var points = [];
|
||||
for (var i=0; i<this.points.length; i++) {
|
||||
points.push(this.points[i].clone());
|
||||
}
|
||||
|
||||
return new PIXI.Polygon(points);
|
||||
}
|
||||
|
||||
/**
|
||||
* @method contains
|
||||
* @param x {Number} The X coord of the point to test
|
||||
* @param y {Number} The Y coord of the point to test
|
||||
* @return if the x/y coords are within this polygon
|
||||
*/
|
||||
PIXI.Polygon.prototype.contains = function(x, y)
|
||||
{
|
||||
var inside = false;
|
||||
|
||||
// use some raycasting to test hits
|
||||
// https://github.com/substack/point-in-polygon/blob/master/index.js
|
||||
for(var i = 0, j = this.points.length - 1; i < this.points.length; j = i++) {
|
||||
var xi = this.points[i].x, yi = this.points[i].y,
|
||||
xj = this.points[j].x, yj = this.points[j].y,
|
||||
intersect = ((yi > y) != (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);
|
||||
|
||||
if(intersect) inside = !inside;
|
||||
}
|
||||
|
||||
return inside;
|
||||
}
|
||||
|
||||
PIXI.Polygon.constructor = PIXI.Polygon;
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||
<script>prettyPrint();</script>
|
||||
<script src="../assets/js/yui-prettify.js"></script>
|
||||
<script src="../assets/../api.js"></script>
|
||||
<script src="../assets/js/api-filter.js"></script>
|
||||
<script src="../assets/js/api-list.js"></script>
|
||||
<script src="../assets/js/api-search.js"></script>
|
||||
<script src="../assets/js/apidocs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/Rectangle.js - Pixi.JS</title>
|
||||
<title>src/pixi/core/Rectangle.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/Rectangle.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/core/Rectangle.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
|
@ -191,6 +199,31 @@ PIXI.Rectangle.prototype.clone = function()
|
|||
return new PIXI.Rectangle(this.x, this.y, this.width, this.height);
|
||||
}
|
||||
|
||||
/**
|
||||
* @method contains
|
||||
* @param x {Number} The X coord of the point to test
|
||||
* @param y {Number} The Y coord of the point to test
|
||||
* @return if the x/y coords are within this polygon
|
||||
*/
|
||||
PIXI.Rectangle.prototype.contains = function(x, y)
|
||||
{
|
||||
if(this.width <= 0 || this.height <= 0)
|
||||
return false;
|
||||
|
||||
var x1 = this.x;
|
||||
if(x > x1 && x < x1 + this.width)
|
||||
{
|
||||
var y1 = this.y;
|
||||
|
||||
if(y > y1 && y < y1 + this.height)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// constructor
|
||||
PIXI.Rectangle.constructor = PIXI.Rectangle;
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/DisplayObject.js - Pixi.JS</title>
|
||||
<title>src/pixi/display/DisplayObject.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/DisplayObject.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/display/DisplayObject.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
|
@ -149,6 +157,9 @@
|
|||
*/
|
||||
PIXI.DisplayObject = function()
|
||||
{
|
||||
this.last = this;
|
||||
this.first = this;
|
||||
|
||||
/**
|
||||
* The coordinate of the object relative to the local coordinates of the parent.
|
||||
* @property position
|
||||
|
|
@ -230,7 +241,7 @@ PIXI.DisplayObject = function()
|
|||
this.renderable = false;
|
||||
|
||||
// [readonly] best not to toggle directly! use setInteractive()
|
||||
this.interactive = false;
|
||||
this._interactive = false;
|
||||
|
||||
/**
|
||||
* This is used to indicate if the displayObject should display a mouse hand cursor on rollover
|
||||
|
|
@ -328,18 +339,210 @@ Object.defineProperty(PIXI.DisplayObject.prototype, 'visible', {
|
|||
});*/
|
||||
|
||||
/**
|
||||
* Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
* [Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
* Instead of using this function you can now simply set the interactive property to true or false
|
||||
* @method setInteractive
|
||||
* @param interactive {Boolean}
|
||||
*/
|
||||
PIXI.DisplayObject.prototype.setInteractive = function(interactive)
|
||||
{
|
||||
this.interactive = interactive;
|
||||
// TODO more to be done here..
|
||||
// need to sort out a re-crawl!
|
||||
if(this.stage)this.stage.dirty = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
* @property interactive
|
||||
* @type Boolean
|
||||
*/
|
||||
Object.defineProperty(PIXI.DisplayObject.prototype, 'interactive', {
|
||||
get: function() {
|
||||
return this._interactive;
|
||||
},
|
||||
set: function(value) {
|
||||
this._interactive = value;
|
||||
|
||||
// TODO more to be done here..
|
||||
// need to sort out a re-crawl!
|
||||
if(this.stage)this.stage.dirty = true;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||
* In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||
* To remove a mask, set this property to null.
|
||||
* @property mask
|
||||
* @type PIXI.Graphics
|
||||
*/
|
||||
Object.defineProperty(PIXI.DisplayObject.prototype, 'mask', {
|
||||
get: function() {
|
||||
return this._mask;
|
||||
},
|
||||
set: function(value) {
|
||||
|
||||
this._mask = value;
|
||||
|
||||
if(value)
|
||||
{
|
||||
this.addFilter(value)
|
||||
}
|
||||
else
|
||||
{
|
||||
this.removeFilter();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* private
|
||||
*/
|
||||
PIXI.DisplayObject.prototype.addFilter = function(mask)
|
||||
{
|
||||
if(this.filter)return;
|
||||
this.filter = true;
|
||||
|
||||
|
||||
// insert a filter block..
|
||||
var start = new PIXI.FilterBlock();
|
||||
var end = new PIXI.FilterBlock();
|
||||
|
||||
|
||||
start.mask = mask;
|
||||
end.mask = mask;
|
||||
|
||||
start.first = start.last = this;
|
||||
end.first = end.last = this;
|
||||
|
||||
start.open = true;
|
||||
|
||||
/*
|
||||
*
|
||||
* insert start
|
||||
*
|
||||
*/
|
||||
|
||||
var childFirst = start
|
||||
var childLast = start
|
||||
var nextObject;
|
||||
var previousObject;
|
||||
|
||||
previousObject = this.first._iPrev;
|
||||
|
||||
if(previousObject)
|
||||
{
|
||||
nextObject = previousObject._iNext;
|
||||
childFirst._iPrev = previousObject;
|
||||
previousObject._iNext = childFirst;
|
||||
}
|
||||
else
|
||||
{
|
||||
nextObject = this;
|
||||
}
|
||||
|
||||
if(nextObject)
|
||||
{
|
||||
nextObject._iPrev = childLast;
|
||||
childLast._iNext = nextObject;
|
||||
}
|
||||
|
||||
|
||||
// now insert the end filter block..
|
||||
|
||||
/*
|
||||
*
|
||||
* insert end filter
|
||||
*
|
||||
*/
|
||||
var childFirst = end
|
||||
var childLast = end
|
||||
var nextObject = null;
|
||||
var previousObject = null;
|
||||
|
||||
previousObject = this.last;
|
||||
nextObject = previousObject._iNext;
|
||||
|
||||
if(nextObject)
|
||||
{
|
||||
nextObject._iPrev = childLast;
|
||||
childLast._iNext = nextObject;
|
||||
}
|
||||
|
||||
childFirst._iPrev = previousObject;
|
||||
previousObject._iNext = childFirst;
|
||||
|
||||
var updateLast = this;
|
||||
|
||||
var prevLast = this.last;
|
||||
while(updateLast)
|
||||
{
|
||||
if(updateLast.last == prevLast)
|
||||
{
|
||||
updateLast.last = end;
|
||||
}
|
||||
updateLast = updateLast.parent;
|
||||
}
|
||||
|
||||
this.first = start;
|
||||
|
||||
// if webGL...
|
||||
if(this.__renderGroup)
|
||||
{
|
||||
this.__renderGroup.addFilterBlocks(start, end);
|
||||
}
|
||||
|
||||
mask.renderable = false;
|
||||
|
||||
}
|
||||
|
||||
PIXI.DisplayObject.prototype.removeFilter = function()
|
||||
{
|
||||
if(!this.filter)return;
|
||||
this.filter = false;
|
||||
|
||||
// modify the list..
|
||||
var startBlock = this.first;
|
||||
|
||||
var nextObject = startBlock._iNext;
|
||||
var previousObject = startBlock._iPrev;
|
||||
|
||||
if(nextObject)nextObject._iPrev = previousObject;
|
||||
if(previousObject)previousObject._iNext = nextObject;
|
||||
|
||||
this.first = startBlock._iNext;
|
||||
|
||||
|
||||
// remove the end filter
|
||||
var lastBlock = this.last;
|
||||
|
||||
var nextObject = lastBlock._iNext;
|
||||
var previousObject = lastBlock._iPrev;
|
||||
|
||||
if(nextObject)nextObject._iPrev = previousObject;
|
||||
previousObject._iNext = nextObject;
|
||||
|
||||
// this is always true too!
|
||||
// if(this.last == lastBlock)
|
||||
//{
|
||||
var tempLast = lastBlock._iPrev;
|
||||
// need to make sure the parents last is updated too
|
||||
var updateLast = this;
|
||||
while(updateLast.last == lastBlock)
|
||||
{
|
||||
updateLast.last = tempLast;
|
||||
updateLast = updateLast.parent;
|
||||
if(!updateLast)break;
|
||||
}
|
||||
|
||||
var mask = startBlock.mask
|
||||
mask.renderable = true;
|
||||
|
||||
// if webGL...
|
||||
if(this.__renderGroup)
|
||||
{
|
||||
this.__renderGroup.removeFilterBlocks(startBlock, lastBlock);
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
|
@ -363,24 +566,21 @@ PIXI.DisplayObject.prototype.updateTransform = function()
|
|||
localTransform[3] = this._sr * this.scale.x;
|
||||
localTransform[4] = this._cr * this.scale.y;
|
||||
|
||||
///AAARR GETTER SETTTER!
|
||||
//localTransform[2] = this.position.x;
|
||||
//localTransform[5] = this.position.y;
|
||||
// TODO --> do we even need a local matrix???
|
||||
|
||||
var px = this.pivot.x;
|
||||
var py = this.pivot.y;
|
||||
|
||||
///AAARR GETTER SETTTER!
|
||||
localTransform[2] = this.position.x - localTransform[0] * px - py * localTransform[1];
|
||||
localTransform[5] = this.position.y - localTransform[4] * py - px * localTransform[3];
|
||||
|
||||
// Cache the matrix values (makes for huge speed increases!)
|
||||
var a00 = localTransform[0], a01 = localTransform[1], a02 = localTransform[2],
|
||||
a10 = localTransform[3], a11 = localTransform[4], a12 = localTransform[5],
|
||||
var a00 = localTransform[0], a01 = localTransform[1], a02 = this.position.x - localTransform[0] * px - py * localTransform[1],
|
||||
a10 = localTransform[3], a11 = localTransform[4], a12 = this.position.y - localTransform[4] * py - px * localTransform[3],
|
||||
|
||||
b00 = parentTransform[0], b01 = parentTransform[1], b02 = parentTransform[2],
|
||||
b10 = parentTransform[3], b11 = parentTransform[4], b12 = parentTransform[5];
|
||||
|
||||
localTransform[2] = a02
|
||||
localTransform[5] = a12
|
||||
|
||||
worldTransform[0] = b00 * a00 + b01 * a10;
|
||||
worldTransform[1] = b00 * a01 + b01 * a11;
|
||||
worldTransform[2] = b00 * a02 + b01 * a12 + b02;
|
||||
|
|
@ -393,7 +593,6 @@ PIXI.DisplayObject.prototype.updateTransform = function()
|
|||
// mat3.multiply(this.localTransform, this.parent.worldTransform, this.worldTransform);
|
||||
this.worldAlpha = this.alpha * this.parent.worldAlpha;
|
||||
|
||||
|
||||
}
|
||||
|
||||
</pre>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/DisplayObjectContainer.js - Pixi.JS</title>
|
||||
<title>src/pixi/display/DisplayObjectContainer.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/DisplayObjectContainer.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/display/DisplayObjectContainer.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
|
@ -160,6 +168,7 @@ PIXI.DisplayObjectContainer = function()
|
|||
this.children = [];
|
||||
//s
|
||||
this.renderable = false;
|
||||
|
||||
}
|
||||
|
||||
// constructor
|
||||
|
|
@ -185,21 +194,85 @@ Object.defineProperty(PIXI.DisplayObjectContainer.prototype, 'visible'
|
|||
*/
|
||||
PIXI.DisplayObjectContainer.prototype.addChild = function(child)
|
||||
{
|
||||
|
||||
//this.addChildAt(child, this.children.length)
|
||||
//return;
|
||||
|
||||
if(child.parent != undefined)
|
||||
{
|
||||
|
||||
//// COULD BE THIS???
|
||||
child.parent.removeChild(child);
|
||||
// return;
|
||||
}
|
||||
|
||||
child.parent = this;
|
||||
child.childIndex = this.children.length;
|
||||
//child.childIndex = this.children.length;
|
||||
|
||||
this.children.push(child);
|
||||
|
||||
// updae the stage refference..
|
||||
|
||||
if(this.stage)
|
||||
{
|
||||
this.stage.__addChild(child);
|
||||
var tmpChild = child;
|
||||
do
|
||||
{
|
||||
if(tmpChild.interactive)this.stage.dirty = true;
|
||||
tmpChild.stage = this.stage;
|
||||
tmpChild = tmpChild._iNext;
|
||||
}
|
||||
while(tmpChild)
|
||||
}
|
||||
|
||||
// LINKED LIST //
|
||||
|
||||
// modify the list..
|
||||
var childFirst = child.first
|
||||
var childLast = child.last;
|
||||
// console.log(childFirst)
|
||||
var nextObject;
|
||||
var previousObject;
|
||||
|
||||
// this could be wrong if there is a filter??
|
||||
if(this.filter)
|
||||
{
|
||||
previousObject = this.last._iPrev;
|
||||
}
|
||||
else
|
||||
{
|
||||
previousObject = this.last;
|
||||
}
|
||||
// if(this.last._iNext)
|
||||
|
||||
//console.log( this.last._iNext);
|
||||
nextObject = previousObject._iNext;
|
||||
|
||||
// always true in this case
|
||||
//this.last = child.last;
|
||||
// need to make sure the parents last is updated too
|
||||
var updateLast = this;
|
||||
var prevLast = previousObject;
|
||||
|
||||
while(updateLast)
|
||||
{
|
||||
if(updateLast.last == prevLast)
|
||||
{
|
||||
updateLast.last = child.last;
|
||||
}
|
||||
updateLast = updateLast.parent;
|
||||
}
|
||||
|
||||
if(nextObject)
|
||||
{
|
||||
nextObject._iPrev = childLast;
|
||||
childLast._iNext = nextObject;
|
||||
}
|
||||
|
||||
childFirst._iPrev = previousObject;
|
||||
previousObject._iNext = childFirst;
|
||||
|
||||
// console.log(childFirst);
|
||||
// need to remove any render groups..
|
||||
if(this.__renderGroup)
|
||||
{
|
||||
|
|
@ -208,6 +281,7 @@ PIXI.DisplayObjectContainer.prototype.addChild = function(child)
|
|||
// add them to the new render group..
|
||||
this.__renderGroup.addDisplayObjectAndChildren(child);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -224,30 +298,63 @@ PIXI.DisplayObjectContainer.prototype.addChildAt = function(child, index)
|
|||
{
|
||||
child.parent.removeChild(child);
|
||||
}
|
||||
|
||||
if (index == this.children.length)
|
||||
{
|
||||
this.children.push(child);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.children.splice(index, 0, child);
|
||||
}
|
||||
|
||||
child.parent = this;
|
||||
child.childIndex = index;
|
||||
|
||||
var length = this.children.length;
|
||||
for (var i=index; i < length; i++)
|
||||
{
|
||||
this.children[i].childIndex = i;
|
||||
}
|
||||
|
||||
if(this.stage)
|
||||
{
|
||||
this.stage.__addChild(child);
|
||||
var tmpChild = child;
|
||||
do
|
||||
{
|
||||
if(tmpChild.interactive)this.stage.dirty = true;
|
||||
tmpChild.stage = this.stage;
|
||||
tmpChild = tmpChild._iNext;
|
||||
}
|
||||
while(tmpChild)
|
||||
}
|
||||
|
||||
// modify the list..
|
||||
var childFirst = child.first
|
||||
var childLast = child.last;
|
||||
var nextObject;
|
||||
var previousObject;
|
||||
|
||||
if(index == this.children.length)
|
||||
{
|
||||
previousObject = this.last;
|
||||
var updateLast = this;//.parent;
|
||||
var prevLast = this.last;
|
||||
while(updateLast)
|
||||
{
|
||||
if(updateLast.last == prevLast)
|
||||
{
|
||||
updateLast.last = child.last;
|
||||
}
|
||||
updateLast = updateLast.parent;
|
||||
}
|
||||
}
|
||||
else if(index == 0)
|
||||
{
|
||||
previousObject = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
previousObject = this.children[index-1].last;
|
||||
}
|
||||
|
||||
nextObject = previousObject._iNext;
|
||||
|
||||
// always true in this case
|
||||
if(nextObject)
|
||||
{
|
||||
nextObject._iPrev = childLast;
|
||||
childLast._iNext = nextObject;
|
||||
}
|
||||
|
||||
childFirst._iPrev = previousObject;
|
||||
previousObject._iNext = childFirst;
|
||||
|
||||
|
||||
this.children.splice(index, 0, child);
|
||||
// need to remove any render groups..
|
||||
if(this.__renderGroup)
|
||||
{
|
||||
|
|
@ -256,11 +363,11 @@ PIXI.DisplayObjectContainer.prototype.addChildAt = function(child, index)
|
|||
// add them to the new render group..
|
||||
this.__renderGroup.addDisplayObjectAndChildren(child);
|
||||
}
|
||||
|
||||
console.log(this.children)
|
||||
}
|
||||
else
|
||||
{
|
||||
// error!
|
||||
|
||||
throw new Error(child + " The index "+ index +" supplied is out of bounds " + this.children.length);
|
||||
}
|
||||
}
|
||||
|
|
@ -273,6 +380,14 @@ PIXI.DisplayObjectContainer.prototype.addChildAt = function(child, index)
|
|||
*/
|
||||
PIXI.DisplayObjectContainer.prototype.swapChildren = function(child, child2)
|
||||
{
|
||||
/*
|
||||
* this funtion needs to be recoded..
|
||||
* can be done a lot faster..
|
||||
*/
|
||||
return;
|
||||
|
||||
// need to fix this function :/
|
||||
/*
|
||||
// TODO I already know this??
|
||||
var index = this.children.indexOf( child );
|
||||
var index2 = this.children.indexOf( child2 );
|
||||
|
|
@ -280,6 +395,8 @@ PIXI.DisplayObjectContainer.prototype.swapChildren = function(child, child2)
|
|||
if ( index !== -1 && index2 !== -1 )
|
||||
{
|
||||
// cool
|
||||
|
||||
/*
|
||||
if(this.stage)
|
||||
{
|
||||
// this is to satisfy the webGL batching..
|
||||
|
|
@ -291,9 +408,6 @@ PIXI.DisplayObjectContainer.prototype.swapChildren = function(child, child2)
|
|||
this.stage.__addChild(child2);
|
||||
}
|
||||
|
||||
// swap the indexes..
|
||||
child.childIndex = index2;
|
||||
child2.childIndex = index;
|
||||
// swap the positions..
|
||||
this.children[index] = child2;
|
||||
this.children[index2] = child;
|
||||
|
|
@ -302,7 +416,7 @@ PIXI.DisplayObjectContainer.prototype.swapChildren = function(child, child2)
|
|||
else
|
||||
{
|
||||
throw new Error(child + " Both the supplied DisplayObjects must be a child of the caller " + this);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -319,7 +433,6 @@ PIXI.DisplayObjectContainer.prototype.getChildAt = function(index)
|
|||
else
|
||||
{
|
||||
throw new Error(child + " Both the supplied DisplayObjects must be a child of the caller " + this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -331,30 +444,57 @@ PIXI.DisplayObjectContainer.prototype.getChildAt = function(index)
|
|||
PIXI.DisplayObjectContainer.prototype.removeChild = function(child)
|
||||
{
|
||||
var index = this.children.indexOf( child );
|
||||
|
||||
if ( index !== -1 )
|
||||
{
|
||||
if(this.stage)
|
||||
//console.log(">>")
|
||||
// unlink //
|
||||
// modify the list..
|
||||
var childFirst = child.first
|
||||
var childLast = child.last;
|
||||
|
||||
var nextObject = childLast._iNext;
|
||||
var previousObject = childFirst._iPrev;
|
||||
|
||||
if(nextObject)nextObject._iPrev = previousObject;
|
||||
previousObject._iNext = nextObject;
|
||||
|
||||
if(this.last == childLast)
|
||||
{
|
||||
this.stage.__removeChild(child);
|
||||
var tempLast = childFirst._iPrev;
|
||||
// need to make sure the parents last is updated too
|
||||
var updateLast = this;
|
||||
while(updateLast.last == childLast.last)
|
||||
{
|
||||
updateLast.last = tempLast;
|
||||
updateLast = updateLast.parent;
|
||||
if(!updateLast)break;
|
||||
}
|
||||
}
|
||||
|
||||
childLast._iNext = null;
|
||||
childFirst._iPrev = null;
|
||||
|
||||
// update the stage reference..
|
||||
if(this.stage)
|
||||
{
|
||||
var tmpChild = child;
|
||||
do
|
||||
{
|
||||
if(tmpChild.interactive)this.stage.dirty = true;
|
||||
tmpChild.stage = null;
|
||||
tmpChild = tmpChild._iNext;
|
||||
}
|
||||
while(tmpChild)
|
||||
}
|
||||
|
||||
// webGL trim
|
||||
if(child.__renderGroup)
|
||||
{
|
||||
child.__renderGroup.removeDisplayObjectAndChildren(child);
|
||||
}
|
||||
|
||||
// console.log(">" + child.__renderGroup)
|
||||
child.parent = undefined;
|
||||
|
||||
this.children.splice( index, 1 );
|
||||
|
||||
// update in dexs!
|
||||
for(var i=index,j=this.children.length; i<j; i++)
|
||||
{
|
||||
this.children[i].childIndex -= 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/MovieClip.js - Pixi.JS</title>
|
||||
<title>src/pixi/display/MovieClip.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/MovieClip.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/display/MovieClip.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/Sprite.js - Pixi.JS</title>
|
||||
<title>src/pixi/display/Sprite.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/Sprite.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/display/Sprite.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/Stage.js - Pixi.JS</title>
|
||||
<title>src/pixi/display/Stage.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/Stage.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/display/Stage.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
|
@ -154,21 +162,23 @@ PIXI.Stage = function(backgroundColor, interactive)
|
|||
{
|
||||
|
||||
PIXI.DisplayObjectContainer.call( this );
|
||||
|
||||
this.worldTransform = PIXI.mat3.create()
|
||||
this.__childrenAdded = [];
|
||||
this.__childrenRemoved = [];
|
||||
this.childIndex = 0;
|
||||
this.stage= this;
|
||||
|
||||
//this.childIndex = 0;
|
||||
this.stage = this;
|
||||
this.interactive = interactive;
|
||||
|
||||
this.stage.hitArea = new PIXI.Rectangle(0,0,100000, 100000);
|
||||
|
||||
// interaction!
|
||||
this.interactive = !!interactive;
|
||||
// this.interactive = !!interactive;
|
||||
this.interactionManager = new PIXI.InteractionManager(this);
|
||||
|
||||
this.setBackgroundColor(backgroundColor);
|
||||
this.worldVisible = true;
|
||||
|
||||
this.stage.dirty = true;
|
||||
}
|
||||
|
||||
|
|
@ -222,7 +232,7 @@ PIXI.Stage.prototype.getMousePosition = function()
|
|||
{
|
||||
return this.interactionManager.mouse.global;
|
||||
}
|
||||
|
||||
/*
|
||||
PIXI.Stage.prototype.__addChild = function(child)
|
||||
{
|
||||
if(child.interactive)this.dirty = true;
|
||||
|
|
@ -253,7 +263,7 @@ PIXI.Stage.prototype.__removeChild = function(child)
|
|||
this.__removeChild(child.children[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -159,7 +167,6 @@ PIXI.TilingSprite = function(texture, width, height)
|
|||
this.width = width;
|
||||
this.height = height;
|
||||
this.renderable = true;
|
||||
|
||||
/**
|
||||
* The scaling of the image that is being tiled
|
||||
* @property tileScale
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/Polygon.js - Pixi.JS</title>
|
||||
<title>src/pixi/filters/FilterBlock.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,40 +142,23 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/Polygon.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/filters/FilterBlock.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Adrien Brault <adrien.brault@gmail.com>
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Polygon
|
||||
* @constructor
|
||||
* @param points {Array}
|
||||
*/
|
||||
PIXI.Polygon = function(points)
|
||||
|
||||
|
||||
PIXI.FilterBlock = function(mask)
|
||||
{
|
||||
this.points = points;
|
||||
this.graphics = mask
|
||||
this.visible = true;
|
||||
this.renderable = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @method clone
|
||||
* @return a copy of the polygon
|
||||
*/
|
||||
PIXI.Polygon.clone = function()
|
||||
{
|
||||
var points = [];
|
||||
for (var i=0; i<this.points.length; i++) {
|
||||
points.push(this.points[i].clone());
|
||||
}
|
||||
|
||||
return new PIXI.Polygon(points);
|
||||
}
|
||||
|
||||
PIXI.Polygon.constructor = PIXI.Polygon;
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/renderers/WebGLShaders.js - Pixi.JS</title>
|
||||
<title>src/pixi/filters/MaskFilter.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,64 +142,22 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/renderers/WebGLShaders.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/filters/MaskFilter.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
PIXI.shaderFragmentSrc = [
|
||||
"precision mediump float;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
"varying float vColor;",
|
||||
"uniform sampler2D uSampler;",
|
||||
"void main(void) {",
|
||||
"gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y));",
|
||||
"gl_FragColor = gl_FragColor * vColor;",
|
||||
"}"
|
||||
];
|
||||
|
||||
PIXI.shaderVertexSrc = [
|
||||
"attribute vec2 aVertexPosition;",
|
||||
"attribute vec2 aTextureCoord;",
|
||||
"attribute float aColor;",
|
||||
"uniform mat4 uMVMatrix;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
"varying float vColor;",
|
||||
"void main(void) {",
|
||||
"gl_Position = uMVMatrix * vec4(aVertexPosition, 1.0, 1.0);",
|
||||
"vTextureCoord = aTextureCoord;",
|
||||
"vColor = aColor;",
|
||||
"}"
|
||||
];
|
||||
|
||||
PIXI.CompileVertexShader = function(gl, shaderSrc)
|
||||
PIXI.MaskFilter = function(graphics)
|
||||
{
|
||||
return PIXI._CompileShader(gl, shaderSrc, gl.VERTEX_SHADER);
|
||||
// the graphics data that will be used for filtering
|
||||
this.graphics;
|
||||
}
|
||||
|
||||
PIXI.CompileFragmentShader = function(gl, shaderSrc)
|
||||
{
|
||||
return PIXI._CompileShader(gl, shaderSrc, gl.FRAGMENT_SHADER);
|
||||
}
|
||||
|
||||
PIXI._CompileShader = function(gl, shaderSrc, shaderType)
|
||||
{
|
||||
var src = shaderSrc.join("\n");
|
||||
var shader = gl.createShader(shaderType);
|
||||
gl.shaderSource(shader, src);
|
||||
gl.compileShader(shader);
|
||||
|
||||
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
|
||||
alert(gl.getShaderInfoLog(shader));
|
||||
return null;
|
||||
}
|
||||
|
||||
return shader;
|
||||
}
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -232,6 +240,7 @@ PIXI.SpriteSheetLoader.prototype.onLoaded = function () {
|
|||
content: this
|
||||
});
|
||||
};
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
353
docs/files/src_pixi_primitives_Graphics.js.html
Normal file
|
|
@ -0,0 +1,353 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/primitives/Graphics.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/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://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.3.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="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Text.html">Text</a></li>
|
||||
|
||||
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||
|
||||
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="api-modules" class="apis modules">
|
||||
|
||||
<li><a href="../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/pixi/primitives/Graphics.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* The Graphics class contains a set of methods that you can use to create primitive shapes and lines.
|
||||
* It is important to know that with the webGL renderer only simple polys can be filled at this stage
|
||||
* Complex polys will not be filled. Heres an example of a complex poly: http://www.goodboydigital.com/wp-content/uploads/2013/06/complexPolygon.png
|
||||
* @class Graphics
|
||||
* @extends DisplayObjectContainer
|
||||
* @constructor
|
||||
*/
|
||||
PIXI.Graphics = function()
|
||||
{
|
||||
PIXI.DisplayObjectContainer.call( this );
|
||||
|
||||
this.renderable = true;
|
||||
|
||||
this.fillAlpha = 1;
|
||||
|
||||
this.lineWidth = 0;
|
||||
this.lineColor = "black";
|
||||
|
||||
this.graphicsData = [];
|
||||
|
||||
this.currentPath = {points:[]};
|
||||
}
|
||||
|
||||
// constructor
|
||||
PIXI.Graphics.constructor = PIXI.Graphics;
|
||||
PIXI.Graphics.prototype = Object.create( PIXI.DisplayObjectContainer.prototype );
|
||||
|
||||
/**
|
||||
* Specifies a line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method.
|
||||
* @method lineStyle
|
||||
* @param lineWidth {Number}
|
||||
* @param color {Number}
|
||||
* @param alpha {Number}
|
||||
*/
|
||||
PIXI.Graphics.prototype.lineStyle = function(lineWidth, color, alpha)
|
||||
{
|
||||
if(this.currentPath.points.length == 0)this.graphicsData.pop();
|
||||
|
||||
this.lineWidth = lineWidth || 0;
|
||||
this.lineColor = color || 0;
|
||||
this.lineAlpha = (alpha == undefined) ? 1 : alpha;
|
||||
|
||||
this.currentPath = {lineWidth:this.lineWidth, lineColor:this.lineColor, lineAlpha:this.lineAlpha,
|
||||
fillColor:this.fillColor, fillAlpha:this.fillAlpha, fill:this.filling, points:[], type:PIXI.Graphics.POLY};
|
||||
|
||||
this.graphicsData.push(this.currentPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves the current drawing position to (x, y).
|
||||
* @method moveTo
|
||||
* @param x {Number}
|
||||
* @param y {Number}
|
||||
*/
|
||||
PIXI.Graphics.prototype.moveTo = function(x, y)
|
||||
{
|
||||
if(this.currentPath.points.length == 0)this.graphicsData.pop();
|
||||
|
||||
this.currentPath = this.currentPath = {lineWidth:this.lineWidth, lineColor:this.lineColor, lineAlpha:this.lineAlpha,
|
||||
fillColor:this.fillColor, fillAlpha:this.fillAlpha, fill:this.filling, points:[], type:PIXI.Graphics.POLY};
|
||||
|
||||
this.currentPath.points.push(x, y);
|
||||
|
||||
this.graphicsData.push(this.currentPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a line using the current line style from the current drawing position to (x, y); the current drawing position is then set to (x, y).
|
||||
* @method lineTo
|
||||
* @param x {Number}
|
||||
* @param y {Number}
|
||||
*/
|
||||
PIXI.Graphics.prototype.lineTo = function(x, y)
|
||||
{
|
||||
this.currentPath.points.push(x, y);
|
||||
this.dirty = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies a simple one-color fill that subsequent calls to other Graphics methods (such as lineTo() or drawCircle()) use when drawing.
|
||||
* @method beginFill
|
||||
* @param color {uint} the color of the fill
|
||||
* @param alpha {Number} the alpha
|
||||
*/
|
||||
PIXI.Graphics.prototype.beginFill = function(color, alpha)
|
||||
{
|
||||
this.filling = true;
|
||||
this.fillColor = color || 0;
|
||||
this.fillAlpha = alpha || 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies a fill to the lines and shapes that were added since the last call to the beginFill() method.
|
||||
* @method endFill
|
||||
*/
|
||||
PIXI.Graphics.prototype.endFill = function()
|
||||
{
|
||||
this.filling = false;
|
||||
this.fillColor = null;
|
||||
this.fillAlpha = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @method drawRect
|
||||
* @param x {Number}
|
||||
* @param y {Number}
|
||||
* @param width {Number}
|
||||
* @param height {Number}
|
||||
*/
|
||||
PIXI.Graphics.prototype.drawRect = function( x, y, width, height )
|
||||
{
|
||||
if(this.currentPath.points.length == 0)this.graphicsData.pop();
|
||||
|
||||
this.currentPath = {lineWidth:this.lineWidth, lineColor:this.lineColor, lineAlpha:this.lineAlpha,
|
||||
fillColor:this.fillColor, fillAlpha:this.fillAlpha, fill:this.filling,
|
||||
points:[x, y, width, height], type:PIXI.Graphics.RECT};
|
||||
|
||||
this.graphicsData.push(this.currentPath);
|
||||
this.dirty = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a circle.
|
||||
* @method drawCircle
|
||||
* @param x {Number}
|
||||
* @param y {Number}
|
||||
* @param radius {Number}
|
||||
*/
|
||||
PIXI.Graphics.prototype.drawCircle = function( x, y, radius)
|
||||
{
|
||||
if(this.currentPath.points.length == 0)this.graphicsData.pop();
|
||||
|
||||
this.currentPath = {lineWidth:this.lineWidth, lineColor:this.lineColor, lineAlpha:this.lineAlpha,
|
||||
fillColor:this.fillColor, fillAlpha:this.fillAlpha, fill:this.filling,
|
||||
points:[x, y, radius, radius], type:PIXI.Graphics.CIRC};
|
||||
|
||||
this.graphicsData.push(this.currentPath);
|
||||
this.dirty = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws an elipse.
|
||||
* @method drawElipse
|
||||
* @param x {Number}
|
||||
* @param y {Number}
|
||||
* @param width {Number}
|
||||
* @param height {Number}
|
||||
*/
|
||||
PIXI.Graphics.prototype.drawElipse = function( x, y, width, height)
|
||||
{
|
||||
if(this.currentPath.points.length == 0)this.graphicsData.pop();
|
||||
|
||||
this.currentPath = {lineWidth:this.lineWidth, lineColor:this.lineColor, lineAlpha:this.lineAlpha,
|
||||
fillColor:this.fillColor, fillAlpha:this.fillAlpha, fill:this.filling,
|
||||
points:[x, y, width, height], type:PIXI.Graphics.ELIP};
|
||||
|
||||
this.graphicsData.push(this.currentPath);
|
||||
this.dirty = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.
|
||||
* @method clear
|
||||
*/
|
||||
PIXI.Graphics.prototype.clear = function()
|
||||
{
|
||||
this.lineWidth = 0;
|
||||
this.filling = false;
|
||||
|
||||
this.dirty = true;
|
||||
this.clearDirty = true;
|
||||
this.graphicsData = [];
|
||||
}
|
||||
|
||||
// SOME TYPES:
|
||||
PIXI.Graphics.POLY = 0;
|
||||
PIXI.Graphics.RECT = 1;
|
||||
PIXI.Graphics.CIRC = 2;
|
||||
PIXI.Graphics.ELIP = 3;
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||
<script>prettyPrint();</script>
|
||||
<script src="../assets/js/yui-prettify.js"></script>
|
||||
<script src="../assets/../api.js"></script>
|
||||
<script src="../assets/js/api-filter.js"></script>
|
||||
<script src="../assets/js/api-list.js"></script>
|
||||
<script src="../assets/js/api-search.js"></script>
|
||||
<script src="../assets/js/apidocs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
406
docs/files/src_pixi_renderers_canvas_CanvasGraphics.js.html
Normal file
|
|
@ -0,0 +1,406 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/renderers/canvas/CanvasGraphics.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/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://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.3.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="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Text.html">Text</a></li>
|
||||
|
||||
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||
|
||||
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="api-modules" class="apis modules">
|
||||
|
||||
<li><a href="../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/pixi/renderers/canvas/CanvasGraphics.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* A set of functions used by the canvas renderer to draw the primitive graphics data
|
||||
* @class CanvasGraphics
|
||||
*/
|
||||
PIXI.CanvasGraphics = function()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @private
|
||||
* @static
|
||||
* @method renderGraphics
|
||||
* @param graphics {Graphics}
|
||||
* @param context {Context2D}
|
||||
*/
|
||||
PIXI.CanvasGraphics.renderGraphics = function(graphics, context)
|
||||
{
|
||||
var worldAlpha = graphics.worldAlpha;
|
||||
|
||||
for (var i=0; i < graphics.graphicsData.length; i++)
|
||||
{
|
||||
var data = graphics.graphicsData[i];
|
||||
var points = data.points;
|
||||
|
||||
context.strokeStyle = color = '#' + ('00000' + ( data.lineColor | 0).toString(16)).substr(-6);
|
||||
|
||||
context.lineWidth = data.lineWidth;
|
||||
|
||||
if(data.type == PIXI.Graphics.POLY)
|
||||
{
|
||||
//if(data.lineWidth <= 0)continue;
|
||||
|
||||
context.beginPath();
|
||||
|
||||
context.moveTo(points[0], points[1]);
|
||||
|
||||
for (var j=1; j < points.length/2; j++)
|
||||
{
|
||||
context.lineTo(points[j * 2], points[j * 2 + 1]);
|
||||
}
|
||||
|
||||
// if the first and last point are the same close the path - much neater :)
|
||||
if(points[0] == points[points.length-2] && points[1] == points[points.length-1])
|
||||
{
|
||||
context.closePath();
|
||||
}
|
||||
|
||||
if(data.fill)
|
||||
{
|
||||
context.globalAlpha = data.fillAlpha * worldAlpha;
|
||||
context.fillStyle = color = '#' + ('00000' + ( data.fillColor | 0).toString(16)).substr(-6);
|
||||
context.fill();
|
||||
}
|
||||
if(data.lineWidth)
|
||||
{
|
||||
context.globalAlpha = data.lineAlpha * worldAlpha;
|
||||
context.stroke();
|
||||
}
|
||||
}
|
||||
else if(data.type == PIXI.Graphics.RECT)
|
||||
{
|
||||
|
||||
// TODO - need to be Undefined!
|
||||
if(data.fillColor)
|
||||
{
|
||||
context.globalAlpha = data.fillAlpha * worldAlpha;
|
||||
context.fillStyle = color = '#' + ('00000' + ( data.fillColor | 0).toString(16)).substr(-6);
|
||||
context.rect(points[0], points[1], points[2], points[3]);
|
||||
|
||||
}
|
||||
if(data.lineWidth)
|
||||
{
|
||||
context.globalAlpha = data.lineAlpha * worldAlpha;
|
||||
context.strokeRect(points[0], points[1], points[2], points[3]);
|
||||
}
|
||||
|
||||
}
|
||||
else if(data.type == PIXI.Graphics.CIRC)
|
||||
{
|
||||
// TODO - need to be Undefined!
|
||||
context.beginPath();
|
||||
context.arc(points[0], points[1], points[2],0,2*Math.PI);
|
||||
context.closePath();
|
||||
|
||||
if(data.fill)
|
||||
{
|
||||
context.globalAlpha = data.fillAlpha * worldAlpha;
|
||||
context.fillStyle = color = '#' + ('00000' + ( data.fillColor | 0).toString(16)).substr(-6);
|
||||
context.fill();
|
||||
}
|
||||
if(data.lineWidth)
|
||||
{
|
||||
context.globalAlpha = data.lineAlpha * worldAlpha;
|
||||
context.stroke();
|
||||
}
|
||||
}
|
||||
else if(data.type == PIXI.Graphics.ELIP)
|
||||
{
|
||||
|
||||
// elipse code taken from: http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas
|
||||
|
||||
var elipseData = data.points;
|
||||
|
||||
var w = elipseData[2] * 2;
|
||||
var h = elipseData[3] * 2;
|
||||
|
||||
var x = elipseData[0] - w/2;
|
||||
var y = elipseData[1] - h/2;
|
||||
|
||||
context.beginPath();
|
||||
|
||||
var kappa = .5522848,
|
||||
ox = (w / 2) * kappa, // control point offset horizontal
|
||||
oy = (h / 2) * kappa, // control point offset vertical
|
||||
xe = x + w, // x-end
|
||||
ye = y + h, // y-end
|
||||
xm = x + w / 2, // x-middle
|
||||
ym = y + h / 2; // y-middle
|
||||
|
||||
context.moveTo(x, ym);
|
||||
context.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);
|
||||
context.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);
|
||||
context.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);
|
||||
context.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);
|
||||
|
||||
context.closePath();
|
||||
|
||||
if(data.fill)
|
||||
{
|
||||
context.globalAlpha = data.fillAlpha * worldAlpha;
|
||||
context.fillStyle = color = '#' + ('00000' + ( data.fillColor | 0).toString(16)).substr(-6);
|
||||
context.fill();
|
||||
}
|
||||
if(data.lineWidth)
|
||||
{
|
||||
context.globalAlpha = data.lineAlpha * worldAlpha;
|
||||
context.stroke();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* @private
|
||||
* @static
|
||||
* @method renderGraphicsMask
|
||||
* @param graphics {Graphics}
|
||||
* @param context {Context2D}
|
||||
*/
|
||||
PIXI.CanvasGraphics.renderGraphicsMask = function(graphics, context)
|
||||
{
|
||||
var worldAlpha = graphics.worldAlpha;
|
||||
|
||||
var len = graphics.graphicsData.length;
|
||||
if(len > 1)
|
||||
{
|
||||
len = 1;
|
||||
console.log("Pixi.js warning: masks in canvas can only mask using the first path in the graphics object")
|
||||
}
|
||||
|
||||
for (var i=0; i < 1; i++)
|
||||
{
|
||||
var data = graphics.graphicsData[i];
|
||||
var points = data.points;
|
||||
|
||||
if(data.type == PIXI.Graphics.POLY)
|
||||
{
|
||||
//if(data.lineWidth <= 0)continue;
|
||||
|
||||
context.beginPath();
|
||||
context.moveTo(points[0], points[1]);
|
||||
|
||||
for (var j=1; j < points.length/2; j++)
|
||||
{
|
||||
context.lineTo(points[j * 2], points[j * 2 + 1]);
|
||||
}
|
||||
|
||||
// if the first and last point are the same close the path - much neater :)
|
||||
if(points[0] == points[points.length-2] && points[1] == points[points.length-1])
|
||||
{
|
||||
context.closePath();
|
||||
}
|
||||
|
||||
}
|
||||
else if(data.type == PIXI.Graphics.RECT)
|
||||
{
|
||||
context.beginPath();
|
||||
context.rect(points[0], points[1], points[2], points[3]);
|
||||
context.closePath();
|
||||
}
|
||||
else if(data.type == PIXI.Graphics.CIRC)
|
||||
{
|
||||
// TODO - need to be Undefined!
|
||||
context.beginPath();
|
||||
context.arc(points[0], points[1], points[2],0,2*Math.PI);
|
||||
context.closePath();
|
||||
}
|
||||
else if(data.type == PIXI.Graphics.ELIP)
|
||||
{
|
||||
|
||||
// elipse code taken from: http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas
|
||||
var elipseData = data.points;
|
||||
|
||||
var w = elipseData[2] * 2;
|
||||
var h = elipseData[3] * 2;
|
||||
|
||||
var x = elipseData[0] - w/2;
|
||||
var y = elipseData[1] - h/2;
|
||||
|
||||
context.beginPath();
|
||||
|
||||
var kappa = .5522848,
|
||||
ox = (w / 2) * kappa, // control point offset horizontal
|
||||
oy = (h / 2) * kappa, // control point offset vertical
|
||||
xe = x + w, // x-end
|
||||
ye = y + h, // y-end
|
||||
xm = x + w / 2, // x-middle
|
||||
ym = y + h / 2; // y-middle
|
||||
|
||||
context.moveTo(x, ym);
|
||||
context.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);
|
||||
context.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);
|
||||
context.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);
|
||||
context.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);
|
||||
context.closePath();
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||
<script>prettyPrint();</script>
|
||||
<script src="../assets/js/yui-prettify.js"></script>
|
||||
<script src="../assets/../api.js"></script>
|
||||
<script src="../assets/js/api-filter.js"></script>
|
||||
<script src="../assets/js/api-list.js"></script>
|
||||
<script src="../assets/js/api-search.js"></script>
|
||||
<script src="../assets/js/apidocs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/renderers/CanvasRenderer.js - Pixi.JS</title>
|
||||
<title>src/pixi/renderers/canvas/CanvasRenderer.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/renderers/CanvasRenderer.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/renderers/canvas/CanvasRenderer.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
|
@ -267,47 +275,43 @@ PIXI.CanvasRenderer.prototype.resize = function(width, height)
|
|||
|
||||
PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject)
|
||||
{
|
||||
var transform = displayObject.worldTransform;
|
||||
// no loger recurrsive!
|
||||
var transform;
|
||||
var context = this.context;
|
||||
//context.globalCompositeOperation = "source-over"
|
||||
var blit = false;
|
||||
|
||||
if(!displayObject.visible)return;
|
||||
|
||||
if(displayObject instanceof PIXI.Sprite)
|
||||
context.globalCompositeOperation = 'source-over';
|
||||
|
||||
// one the display object hits this. we can break the loop
|
||||
var testObject = displayObject.last._iNext;
|
||||
displayObject = displayObject.first;
|
||||
|
||||
do
|
||||
{
|
||||
var frame = displayObject.texture.frame;
|
||||
transform = displayObject.worldTransform;
|
||||
|
||||
if(frame)
|
||||
if(!displayObject.visible)
|
||||
{
|
||||
context.globalAlpha = displayObject.worldAlpha;
|
||||
displayObject = displayObject.last._iNext;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!displayObject.renderable)
|
||||
{
|
||||
displayObject = displayObject._iNext;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(displayObject instanceof PIXI.Sprite)
|
||||
{
|
||||
|
||||
var frame = displayObject.texture.frame;
|
||||
|
||||
// BLITZ!!!
|
||||
/*
|
||||
* if the rotation is 0 then we can blitz it
|
||||
* meaning we dont need to do a transform and also we
|
||||
* can round to the nearest round number for a little extra speed!
|
||||
*/
|
||||
/*if(displayObject.rotation == 0)
|
||||
if(frame)
|
||||
{
|
||||
if(!blit)this.context.setTransform(1,0,0,1,0,0);
|
||||
blit = true;
|
||||
context.drawImage(displayObject.texture.baseTexture.image,
|
||||
frame.x,
|
||||
frame.y,
|
||||
frame.width,
|
||||
frame.height,
|
||||
(transform[2]+ ((displayObject.anchor.x - displayObject.texture.trim.x) * -frame.width) * transform[0]),
|
||||
(transform[5]+ ((displayObject.anchor.y - displayObject.texture.trim.y) * -frame.height)* transform[4]),
|
||||
(displayObject.width * transform[0]),
|
||||
(displayObject.height * transform[4]));
|
||||
context.globalAlpha = displayObject.worldAlpha;
|
||||
|
||||
}
|
||||
else
|
||||
{*/
|
||||
// blit = false;
|
||||
context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]);
|
||||
|
||||
|
||||
context.drawImage(displayObject.texture.baseTexture.source,
|
||||
frame.x,
|
||||
frame.y,
|
||||
|
|
@ -315,41 +319,67 @@ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject)
|
|||
frame.height,
|
||||
(displayObject.anchor.x) * -frame.width,
|
||||
(displayObject.anchor.y) * -frame.height,
|
||||
// (displayObject.anchor.x - displayObject.texture.trim.x) * -frame.width,
|
||||
// (displayObject.anchor.y - displayObject.texture.trim.y) * -frame.height,
|
||||
|
||||
frame.width,
|
||||
frame.height);
|
||||
//}
|
||||
}
|
||||
}
|
||||
else if(displayObject instanceof PIXI.Strip)
|
||||
{
|
||||
context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5])
|
||||
this.renderStrip(displayObject);
|
||||
}
|
||||
else if(displayObject instanceof PIXI.TilingSprite)
|
||||
{
|
||||
context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5])
|
||||
this.renderTilingSprite(displayObject);
|
||||
}
|
||||
else if(displayObject instanceof PIXI.CustomRenderable)
|
||||
{
|
||||
displayObject.renderCanvas(this);
|
||||
}
|
||||
|
||||
// render!
|
||||
if(displayObject.children)
|
||||
{
|
||||
for (var i=0; i < displayObject.children.length; i++)
|
||||
}
|
||||
}
|
||||
else if(displayObject instanceof PIXI.Strip)
|
||||
{
|
||||
this.renderDisplayObject(displayObject.children[i]);
|
||||
context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5])
|
||||
this.renderStrip(displayObject);
|
||||
}
|
||||
else if(displayObject instanceof PIXI.TilingSprite)
|
||||
{
|
||||
context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5])
|
||||
this.renderTilingSprite(displayObject);
|
||||
}
|
||||
else if(displayObject instanceof PIXI.CustomRenderable)
|
||||
{
|
||||
displayObject.renderCanvas(this);
|
||||
}
|
||||
else if(displayObject instanceof PIXI.Graphics)
|
||||
{
|
||||
context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5])
|
||||
PIXI.CanvasGraphics.renderGraphics(displayObject, context);
|
||||
}
|
||||
else if(displayObject instanceof PIXI.FilterBlock)
|
||||
{
|
||||
if(displayObject.open)
|
||||
{
|
||||
context.save();
|
||||
|
||||
var cacheAlpha = displayObject.mask.alpha;
|
||||
var maskTransform = displayObject.mask.worldTransform;
|
||||
|
||||
context.setTransform(maskTransform[0], maskTransform[3], maskTransform[1], maskTransform[4], maskTransform[2], maskTransform[5])
|
||||
|
||||
displayObject.mask.worldAlpha = 0.5;
|
||||
|
||||
context.worldAlpha = 0;
|
||||
|
||||
PIXI.CanvasGraphics.renderGraphicsMask(displayObject.mask, context);
|
||||
// context.fillStyle = 0xFF0000;
|
||||
// context.fillRect(0, 0, 200, 200);
|
||||
context.clip();
|
||||
|
||||
displayObject.mask.worldAlpha = cacheAlpha;
|
||||
//context.globalCompositeOperation = 'lighter';
|
||||
}
|
||||
else
|
||||
{
|
||||
//context.globalCompositeOperation = 'source-over';
|
||||
context.restore();
|
||||
}
|
||||
}
|
||||
// count++
|
||||
displayObject = displayObject._iNext;
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.context.setTransform(1,0,0,1,0,0);
|
||||
while(displayObject != testObject)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
|
@ -378,11 +408,9 @@ PIXI.CanvasRenderer.prototype.renderStripFlat = function(strip)
|
|||
|
||||
};
|
||||
|
||||
// context.globalCompositeOperation = 'lighter';
|
||||
context.fillStyle = "#FF0000";
|
||||
context.fill();
|
||||
context.closePath();
|
||||
//context.globalCompositeOperation = 'source-over';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -392,6 +420,8 @@ PIXI.CanvasRenderer.prototype.renderTilingSprite = function(sprite)
|
|||
{
|
||||
var context = this.context;
|
||||
|
||||
context.globalAlpha = sprite.worldAlpha;
|
||||
|
||||
if(!sprite.__tilePattern) sprite.__tilePattern = context.createPattern(sprite.texture.baseTexture.source, "repeat");
|
||||
|
||||
context.beginPath();
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/renderers/WebGLBatch.js - Pixi.JS</title>
|
||||
<title>src/pixi/renderers/webgl/WebGLBatch.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/renderers/WebGLBatch.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/renderers/webgl/WebGLBatch.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
|
@ -656,6 +664,7 @@ PIXI.WebGLBatch.prototype.update = function()
|
|||
*/
|
||||
PIXI.WebGLBatch.prototype.render = function(start, end)
|
||||
{
|
||||
|
||||
// console.log(start + " :: " + end + " : " + this.size);
|
||||
start = start || 0;
|
||||
//end = end || this.size;
|
||||
|
|
@ -668,13 +677,13 @@ PIXI.WebGLBatch.prototype.render = function(start, end)
|
|||
|
||||
}
|
||||
|
||||
|
||||
if (this.size == 0)return;
|
||||
|
||||
this.update();
|
||||
var gl = this.gl;
|
||||
|
||||
//TODO optimize this!
|
||||
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
var shaderProgram = PIXI.shaderProgram;
|
||||
gl.useProgram(shaderProgram);
|
||||
|
|
@ -684,7 +693,6 @@ PIXI.WebGLBatch.prototype.render = function(start, end)
|
|||
// ok..
|
||||
gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.verticies)
|
||||
gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, 2, gl.FLOAT, false, 0, 0);
|
||||
|
||||
// update the uvs
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer);
|
||||
|
||||
633
docs/files/src_pixi_renderers_webgl_WebGLGraphics.js.html
Normal file
|
|
@ -0,0 +1,633 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/renderers/webgl/WebGLGraphics.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/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://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.3.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="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Text.html">Text</a></li>
|
||||
|
||||
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||
|
||||
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="api-modules" class="apis modules">
|
||||
|
||||
<li><a href="../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/pixi/renderers/webgl/WebGLGraphics.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A set of functions used by the webGL renderer to draw the primitive graphics data
|
||||
* @class CanvasGraphics
|
||||
*/
|
||||
PIXI.WebGLGraphics = function()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
PIXI.WebGLGraphics.renderGraphics = function(graphics, projection)
|
||||
{
|
||||
|
||||
var gl = PIXI.gl;
|
||||
|
||||
if(!graphics._webGL)graphics._webGL = {points:[], indices:[], lastIndex:0,
|
||||
buffer:gl.createBuffer(),
|
||||
indexBuffer:gl.createBuffer()};
|
||||
|
||||
if(graphics.dirty)
|
||||
{
|
||||
graphics.dirty = false;
|
||||
|
||||
if(graphics.clearDirty)
|
||||
{
|
||||
graphics.clearDirty = false;
|
||||
|
||||
graphics._webGL.lastIndex = 0;
|
||||
graphics._webGL.points = [];
|
||||
graphics._webGL.indices = [];
|
||||
|
||||
}
|
||||
|
||||
PIXI.WebGLGraphics.updateGraphics(graphics);
|
||||
}
|
||||
|
||||
|
||||
PIXI.activatePrimitiveShader();
|
||||
|
||||
// This could be speeded up fo sure!
|
||||
var m = PIXI.mat3.clone(graphics.worldTransform);
|
||||
|
||||
PIXI.mat3.transpose(m);
|
||||
|
||||
// set the matrix transform for the
|
||||
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
gl.uniformMatrix3fv(PIXI.primitiveProgram.translationMatrix, false, m);
|
||||
|
||||
gl.uniform2f(PIXI.primitiveProgram.projectionVector, projection.x, projection.y);
|
||||
|
||||
gl.uniform1f(PIXI.primitiveProgram.alpha, graphics.worldAlpha);
|
||||
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, graphics._webGL.buffer);
|
||||
|
||||
// WHY DOES THIS LINE NEED TO BE THERE???
|
||||
gl.vertexAttribPointer(PIXI.shaderProgram.vertexPositionAttribute, 2, gl.FLOAT, false, 0, 0);
|
||||
// its not even used.. but need to be set or it breaks?
|
||||
// only on pc though..
|
||||
|
||||
gl.vertexAttribPointer(PIXI.primitiveProgram.vertexPositionAttribute, 2, gl.FLOAT, false, 4 * 6, 0);
|
||||
gl.vertexAttribPointer(PIXI.primitiveProgram.colorAttribute, 4, gl.FLOAT, false,4 * 6, 2 * 4);
|
||||
|
||||
// set the index buffer!
|
||||
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, graphics._webGL.indexBuffer);
|
||||
|
||||
gl.drawElements(gl.TRIANGLE_STRIP, graphics._webGL.indices.length, gl.UNSIGNED_SHORT, 0 );
|
||||
|
||||
// return to default shader...
|
||||
PIXI.activateDefaultShader();
|
||||
}
|
||||
|
||||
PIXI.WebGLGraphics.updateGraphics = function(graphics)
|
||||
{
|
||||
for (var i=graphics._webGL.lastIndex; i < graphics.graphicsData.length; i++)
|
||||
{
|
||||
var data = graphics.graphicsData[i];
|
||||
|
||||
if(data.type == PIXI.Graphics.POLY)
|
||||
{
|
||||
if(data.fill)
|
||||
{
|
||||
if(data.points.length>3)
|
||||
PIXI.WebGLGraphics.buildPoly(data, graphics._webGL);
|
||||
}
|
||||
|
||||
if(data.lineWidth > 0)
|
||||
{
|
||||
PIXI.WebGLGraphics.buildLine(data, graphics._webGL);
|
||||
}
|
||||
}
|
||||
else if(data.type == PIXI.Graphics.RECT)
|
||||
{
|
||||
PIXI.WebGLGraphics.buildRectangle(data, graphics._webGL);
|
||||
}
|
||||
else if(data.type == PIXI.Graphics.CIRC || data.type == PIXI.Graphics.ELIP)
|
||||
{
|
||||
PIXI.WebGLGraphics.buildCircle(data, graphics._webGL);
|
||||
}
|
||||
};
|
||||
|
||||
graphics._webGL.lastIndex = graphics.graphicsData.length;
|
||||
|
||||
var gl = PIXI.gl;
|
||||
|
||||
graphics._webGL.glPoints = new Float32Array(graphics._webGL.points);
|
||||
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, graphics._webGL.buffer);
|
||||
gl.bufferData(gl.ARRAY_BUFFER, graphics._webGL.glPoints, gl.STATIC_DRAW);
|
||||
|
||||
graphics._webGL.glIndicies = new Uint16Array(graphics._webGL.indices);
|
||||
|
||||
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, graphics._webGL.indexBuffer);
|
||||
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, graphics._webGL.glIndicies, gl.STATIC_DRAW);
|
||||
}
|
||||
|
||||
|
||||
PIXI.WebGLGraphics.buildRectangle = function(graphicsData, webGLData)
|
||||
{
|
||||
// --- //
|
||||
// need to convert points to a nice regular data
|
||||
//
|
||||
var rectData = graphicsData.points;
|
||||
var x = rectData[0];
|
||||
var y = rectData[1];
|
||||
var width = rectData[2];
|
||||
var height = rectData[3];
|
||||
|
||||
|
||||
if(graphicsData.fill)
|
||||
{
|
||||
var color = HEXtoRGB(graphicsData.fillColor);
|
||||
var alpha = graphicsData.fillAlpha;
|
||||
|
||||
var r = color[0] * alpha;
|
||||
var g = color[1] * alpha;
|
||||
var b = color[2] * alpha;
|
||||
|
||||
var verts = webGLData.points;
|
||||
var indices = webGLData.indices;
|
||||
|
||||
var vertPos = verts.length/6;
|
||||
|
||||
// start
|
||||
verts.push(x, y);
|
||||
verts.push(r, g, b, alpha);
|
||||
|
||||
verts.push(x + width, y);
|
||||
verts.push(r, g, b, alpha);
|
||||
|
||||
verts.push(x , y + height);
|
||||
verts.push(r, g, b, alpha);
|
||||
|
||||
verts.push(x + width, y + height);
|
||||
verts.push(r, g, b, alpha);
|
||||
|
||||
// insert 2 dead triangles..
|
||||
indices.push(vertPos, vertPos, vertPos+1, vertPos+2, vertPos+3, vertPos+3)
|
||||
}
|
||||
|
||||
if(graphicsData.lineWidth)
|
||||
{
|
||||
graphicsData.points = [x, y,
|
||||
x + width, y,
|
||||
x + width, y + height,
|
||||
x, y + height,
|
||||
x, y];
|
||||
|
||||
PIXI.WebGLGraphics.buildLine(graphicsData, webGLData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PIXI.WebGLGraphics.buildCircle = function(graphicsData, webGLData)
|
||||
{
|
||||
// --- //
|
||||
// need to convert points to a nice regular data
|
||||
//
|
||||
var rectData = graphicsData.points;
|
||||
var x = rectData[0];
|
||||
var y = rectData[1];
|
||||
var width = rectData[2];
|
||||
var height = rectData[3];
|
||||
|
||||
var totalSegs = 40;
|
||||
var seg = (Math.PI * 2) / totalSegs ;
|
||||
|
||||
if(graphicsData.fill)
|
||||
{
|
||||
var color = HEXtoRGB(graphicsData.fillColor);
|
||||
var alpha = graphicsData.fillAlpha;
|
||||
|
||||
var r = color[0] * alpha;
|
||||
var g = color[1] * alpha;
|
||||
var b = color[2] * alpha;
|
||||
|
||||
var verts = webGLData.points;
|
||||
var indices = webGLData.indices;
|
||||
|
||||
var vecPos = verts.length/6;
|
||||
|
||||
indices.push(vecPos);
|
||||
|
||||
for (var i=0; i < totalSegs + 1 ; i++)
|
||||
{
|
||||
verts.push(x,y, r, g, b, alpha);
|
||||
|
||||
verts.push(x + Math.sin(seg * i) * width,
|
||||
y + Math.cos(seg * i) * height,
|
||||
r, g, b, alpha);
|
||||
|
||||
indices.push(vecPos++, vecPos++);
|
||||
};
|
||||
|
||||
indices.push(vecPos-1);
|
||||
}
|
||||
|
||||
if(graphicsData.lineWidth)
|
||||
{
|
||||
graphicsData.points = [];
|
||||
|
||||
for (var i=0; i < totalSegs + 1; i++)
|
||||
{
|
||||
graphicsData.points.push(x + Math.sin(seg * i) * width,
|
||||
y + Math.cos(seg * i) * height)
|
||||
};
|
||||
|
||||
PIXI.WebGLGraphics.buildLine(graphicsData, webGLData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PIXI.WebGLGraphics.buildLine = function(graphicsData, webGLData)
|
||||
{
|
||||
// TODO OPTIMISE!
|
||||
|
||||
var wrap = true;
|
||||
var points = graphicsData.points;
|
||||
if(points.length == 0)return;
|
||||
|
||||
// get first and last point.. figure out the middle!
|
||||
var firstPoint = new PIXI.Point( points[0], points[1] );
|
||||
var lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] );
|
||||
|
||||
// if the first point is the last point - goona have issues :)
|
||||
if(firstPoint.x == lastPoint.x && firstPoint.y == lastPoint.y)
|
||||
{
|
||||
points.pop();
|
||||
points.pop();
|
||||
|
||||
lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] );
|
||||
|
||||
var midPointX = lastPoint.x + (firstPoint.x - lastPoint.x) *0.5;
|
||||
var midPointY = lastPoint.y + (firstPoint.y - lastPoint.y) *0.5;
|
||||
|
||||
points.unshift(midPointX, midPointY);
|
||||
points.push(midPointX, midPointY)
|
||||
}
|
||||
|
||||
var verts = webGLData.points;
|
||||
var indices = webGLData.indices;
|
||||
var length = points.length / 2;
|
||||
var indexCount = points.length;
|
||||
var indexStart = verts.length/6;
|
||||
|
||||
// DRAW the Line
|
||||
var width = graphicsData.lineWidth / 2;
|
||||
|
||||
// sort color
|
||||
var color = HEXtoRGB(graphicsData.lineColor);
|
||||
var alpha = graphicsData.lineAlpha;
|
||||
var r = color[0] * alpha;
|
||||
var g = color[1] * alpha;
|
||||
var b = color[2] * alpha;
|
||||
|
||||
var p1x, p1y, p2x, p2y, p3x, p3y;
|
||||
var perpx, perpy, perp2x, perp2y, perp3x, perp3y;
|
||||
var ipx, ipy;
|
||||
var a1, b1, c1, a2, b2, c2;
|
||||
var denom, pdist, dist;
|
||||
|
||||
p1x = points[0];
|
||||
p1y = points[1];
|
||||
|
||||
p2x = points[2];
|
||||
p2y = points[3];
|
||||
|
||||
perpx = -(p1y - p2y);
|
||||
perpy = p1x - p2x;
|
||||
|
||||
dist = Math.sqrt(perpx*perpx + perpy*perpy);
|
||||
|
||||
perpx /= dist;
|
||||
perpy /= dist;
|
||||
perpx *= width;
|
||||
perpy *= width;
|
||||
|
||||
// start
|
||||
verts.push(p1x - perpx , p1y - perpy,
|
||||
r, g, b, alpha);
|
||||
|
||||
verts.push(p1x + perpx , p1y + perpy,
|
||||
r, g, b, alpha);
|
||||
|
||||
for (var i = 1; i < length-1; i++)
|
||||
{
|
||||
p1x = points[(i-1)*2];
|
||||
p1y = points[(i-1)*2 + 1];
|
||||
|
||||
p2x = points[(i)*2]
|
||||
p2y = points[(i)*2 + 1]
|
||||
|
||||
p3x = points[(i+1)*2];
|
||||
p3y = points[(i+1)*2 + 1];
|
||||
|
||||
perpx = -(p1y - p2y);
|
||||
perpy = p1x - p2x;
|
||||
|
||||
dist = Math.sqrt(perpx*perpx + perpy*perpy);
|
||||
perpx /= dist;
|
||||
perpy /= dist;
|
||||
perpx *= width;
|
||||
perpy *= width;
|
||||
|
||||
perp2x = -(p2y - p3y);
|
||||
perp2y = p2x - p3x;
|
||||
|
||||
dist = Math.sqrt(perp2x*perp2x + perp2y*perp2y);
|
||||
perp2x /= dist;
|
||||
perp2y /= dist;
|
||||
perp2x *= width;
|
||||
perp2y *= width;
|
||||
|
||||
a1 = (-perpy + p1y) - (-perpy + p2y);
|
||||
b1 = (-perpx + p2x) - (-perpx + p1x);
|
||||
c1 = (-perpx + p1x) * (-perpy + p2y) - (-perpx + p2x) * (-perpy + p1y);
|
||||
a2 = (-perp2y + p3y) - (-perp2y + p2y);
|
||||
b2 = (-perp2x + p2x) - (-perp2x + p3x);
|
||||
c2 = (-perp2x + p3x) * (-perp2y + p2y) - (-perp2x + p2x) * (-perp2y + p3y);
|
||||
|
||||
denom = a1*b2 - a2*b1;
|
||||
|
||||
if (denom == 0) {
|
||||
denom+=1;
|
||||
}
|
||||
|
||||
px = (b1*c2 - b2*c1)/denom;
|
||||
py = (a2*c1 - a1*c2)/denom;
|
||||
|
||||
pdist = (px -p2x) * (px -p2x) + (py -p2y) + (py -p2y);
|
||||
|
||||
if(pdist > 140 * 140)
|
||||
{
|
||||
perp3x = perpx - perp2x;
|
||||
perp3y = perpy - perp2y;
|
||||
|
||||
dist = Math.sqrt(perp3x*perp3x + perp3y*perp3y);
|
||||
perp3x /= dist;
|
||||
perp3y /= dist;
|
||||
perp3x *= width;
|
||||
perp3y *= width;
|
||||
|
||||
verts.push(p2x - perp3x, p2y -perp3y);
|
||||
verts.push(r, g, b, alpha);
|
||||
|
||||
verts.push(p2x + perp3x, p2y +perp3y);
|
||||
verts.push(r, g, b, alpha);
|
||||
|
||||
verts.push(p2x - perp3x, p2y -perp3y);
|
||||
verts.push(r, g, b, alpha);
|
||||
|
||||
indexCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
verts.push(px , py);
|
||||
verts.push(r, g, b, alpha);
|
||||
|
||||
verts.push(p2x - (px-p2x), p2y - (py - p2y));//, 4);
|
||||
verts.push(r, g, b, alpha);
|
||||
}
|
||||
}
|
||||
|
||||
p1x = points[(length-2)*2]
|
||||
p1y = points[(length-2)*2 + 1]
|
||||
|
||||
p2x = points[(length-1)*2]
|
||||
p2y = points[(length-1)*2 + 1]
|
||||
|
||||
perpx = -(p1y - p2y)
|
||||
perpy = p1x - p2x;
|
||||
|
||||
dist = Math.sqrt(perpx*perpx + perpy*perpy);
|
||||
perpx /= dist;
|
||||
perpy /= dist;
|
||||
perpx *= width;
|
||||
perpy *= width;
|
||||
|
||||
verts.push(p2x - perpx , p2y - perpy)
|
||||
verts.push(r, g, b, alpha);
|
||||
|
||||
verts.push(p2x + perpx , p2y + perpy)
|
||||
verts.push(r, g, b, alpha);
|
||||
|
||||
indices.push(indexStart);
|
||||
|
||||
for (var i=0; i < indexCount; i++)
|
||||
{
|
||||
indices.push(indexStart++);
|
||||
};
|
||||
|
||||
indices.push(indexStart-1);
|
||||
}
|
||||
|
||||
|
||||
PIXI.WebGLGraphics.buildPoly = function(graphicsData, webGLData)
|
||||
{
|
||||
var points = graphicsData.points;
|
||||
if(points.length < 6)return;
|
||||
|
||||
// get first and last point.. figure out the middle!
|
||||
var verts = webGLData.points;
|
||||
var indices = webGLData.indices;
|
||||
|
||||
var length = points.length / 2;
|
||||
|
||||
// sort color
|
||||
var color = HEXtoRGB(graphicsData.fillColor);
|
||||
var alpha = graphicsData.fillAlpha;
|
||||
var r = color[0] * alpha;
|
||||
var g = color[1] * alpha;
|
||||
var b = color[2] * alpha;
|
||||
|
||||
var triangles = PIXI.PolyK.Triangulate(points);
|
||||
|
||||
var vertPos = verts.length / 6;
|
||||
|
||||
for (var i=0; i < triangles.length; i+=3)
|
||||
{
|
||||
indices.push(triangles[i] + vertPos);
|
||||
indices.push(triangles[i] + vertPos);
|
||||
indices.push(triangles[i+1] + vertPos);
|
||||
indices.push(triangles[i+2] +vertPos);
|
||||
indices.push(triangles[i+2] + vertPos);
|
||||
};
|
||||
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
verts.push(points[i * 2], points[i * 2 + 1],
|
||||
r, g, b, alpha);
|
||||
};
|
||||
}
|
||||
|
||||
function HEXtoRGB(hex) {
|
||||
return [(hex >> 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||
<script>prettyPrint();</script>
|
||||
<script src="../assets/js/yui-prettify.js"></script>
|
||||
<script src="../assets/../api.js"></script>
|
||||
<script src="../assets/js/api-filter.js"></script>
|
||||
<script src="../assets/js/api-list.js"></script>
|
||||
<script src="../assets/js/api-search.js"></script>
|
||||
<script src="../assets/js/apidocs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/renderers/WebGLRenderGroup.js - Pixi.JS</title>
|
||||
<title>src/pixi/renderers/webgl/WebGLRenderGroup.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/renderers/WebGLRenderGroup.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/renderers/webgl/WebGLRenderGroup.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
|
@ -162,7 +170,6 @@ PIXI.WebGLRenderGroup = function(gl)
|
|||
this.toRemove = [];
|
||||
}
|
||||
|
||||
|
||||
// constructor
|
||||
PIXI.WebGLRenderGroup.constructor = PIXI.WebGLRenderGroup;
|
||||
|
||||
|
|
@ -178,20 +185,17 @@ PIXI.WebGLRenderGroup.prototype.setRenderable = function(displayObject)
|
|||
|
||||
// TODO what if its already has an object? should remove it
|
||||
this.root = displayObject;
|
||||
//displayObject.__renderGroup = this;
|
||||
this.addDisplayObjectAndChildren(displayObject);
|
||||
//displayObject
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.render = function(projectionMatrix)
|
||||
PIXI.WebGLRenderGroup.prototype.render = function(projection)
|
||||
{
|
||||
|
||||
PIXI.WebGLRenderer.updateTextures();
|
||||
|
||||
var gl = this.gl;
|
||||
|
||||
// set the flipped matrix..
|
||||
gl.uniformMatrix4fv(PIXI.shaderProgram.mvMatrixUniform, false, projectionMatrix);
|
||||
|
||||
gl.uniform2f(PIXI.shaderProgram.projectionVector, projection.x, projection.y);
|
||||
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
// TODO remove this by replacing visible with getter setters..
|
||||
this.checkVisibility(this.root, this.root.visible);
|
||||
|
|
@ -209,26 +213,59 @@ PIXI.WebGLRenderGroup.prototype.render = function(projectionMatrix)
|
|||
}
|
||||
else if(renderable instanceof PIXI.TilingSprite)
|
||||
{
|
||||
if(renderable.visible)this.renderTilingSprite(renderable, projectionMatrix);
|
||||
if(renderable.visible)this.renderTilingSprite(renderable, projection);
|
||||
}
|
||||
else if(renderable instanceof PIXI.Strip)
|
||||
{
|
||||
if(renderable.visible)this.renderStrip(renderable, projectionMatrix);
|
||||
if(renderable.visible)this.renderStrip(renderable, projection);
|
||||
}
|
||||
else if(renderable instanceof PIXI.Graphics)
|
||||
{
|
||||
if(renderable.visible && renderable.renderable) PIXI.WebGLGraphics.renderGraphics(renderable, projection);//, projectionMatrix);
|
||||
}
|
||||
else if(renderable instanceof PIXI.FilterBlock)
|
||||
{
|
||||
/*
|
||||
* for now only masks are supported..
|
||||
*/
|
||||
if(renderable.open)
|
||||
{
|
||||
gl.enable(gl.STENCIL_TEST);
|
||||
|
||||
gl.colorMask(false, false, false, false);
|
||||
gl.stencilFunc(gl.ALWAYS,1,0xff);
|
||||
gl.stencilOp(gl.KEEP,gl.KEEP,gl.REPLACE);
|
||||
|
||||
PIXI.WebGLGraphics.renderGraphics(renderable.mask, projection);
|
||||
|
||||
gl.colorMask(true, true, true, false);
|
||||
gl.stencilFunc(gl.NOTEQUAL,0,0xff);
|
||||
gl.stencilOp(gl.KEEP,gl.KEEP,gl.KEEP);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.disable(gl.STENCIL_TEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.renderSpecific = function(displayObject, projectionMatrix)
|
||||
PIXI.WebGLRenderGroup.prototype.handleFilter = function(filter, projection)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.renderSpecific = function(displayObject, projection)
|
||||
{
|
||||
PIXI.WebGLRenderer.updateTextures();
|
||||
|
||||
var gl = this.gl;
|
||||
this.checkVisibility(displayObject, displayObject.visible);
|
||||
gl.uniformMatrix4fv(PIXI.shaderProgram.mvMatrixUniform, false, projectionMatrix);
|
||||
|
||||
|
||||
//console.log("SPECIFIC");
|
||||
// gl.uniformMatrix4fv(PIXI.shaderProgram.mvMatrixUniform, false, projectionMatrix);
|
||||
gl.uniform2f(PIXI.shaderProgram.projectionVector, projection.x, projection.y);
|
||||
|
||||
// to do!
|
||||
// render part of the scene...
|
||||
|
||||
|
|
@ -238,8 +275,18 @@ PIXI.WebGLRenderGroup.prototype.renderSpecific = function(displayObject, project
|
|||
var endIndex;
|
||||
var endBatchIndex;
|
||||
|
||||
// get NEXT Renderable!
|
||||
var nextRenderable = displayObject.renderable ? displayObject : this.getNextRenderable(displayObject);
|
||||
/*
|
||||
* LOOK FOR THE NEXT SPRITE
|
||||
* This part looks for the closest next sprite that can go into a batch
|
||||
* it keeps looking until it finds a sprite or gets to the end of the display
|
||||
* scene graph
|
||||
*/
|
||||
var nextRenderable = displayObject.last;
|
||||
while(nextRenderable._iNext)
|
||||
{
|
||||
nextRenderable = nextRenderable._iNext;
|
||||
if(nextRenderable.renderable && nextRenderable.__renderGroup)break;
|
||||
}
|
||||
var startBatch = nextRenderable.batch;
|
||||
|
||||
if(nextRenderable instanceof PIXI.Sprite)
|
||||
|
|
@ -308,26 +355,16 @@ PIXI.WebGLRenderGroup.prototype.renderSpecific = function(displayObject, project
|
|||
|
||||
// TODO - need to fold this up a bit!
|
||||
|
||||
|
||||
if(startBatch == endBatch)
|
||||
{
|
||||
if(startBatch instanceof PIXI.WebGLBatch)
|
||||
{
|
||||
startBatch.render(startIndex, endIndex+1);
|
||||
}
|
||||
else if(startBatch instanceof PIXI.TilingSprite)
|
||||
else
|
||||
{
|
||||
if(startBatch.visible)this.renderTilingSprite(startBatch, projectionMatrix);
|
||||
this.renderSpecial(startBatch);
|
||||
}
|
||||
else if(startBatch instanceof PIXI.Strip)
|
||||
{
|
||||
if(startBatch.visible)this.renderStrip(startBatch, projectionMatrix);
|
||||
}
|
||||
else if(startBatch instanceof PIXI.CustomRenderable)
|
||||
{
|
||||
if(startBatch.visible) startBatch.renderWebGL(this, projectionMatrix);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -340,17 +377,9 @@ PIXI.WebGLRenderGroup.prototype.renderSpecific = function(displayObject, project
|
|||
{
|
||||
startBatch.render(startIndex);
|
||||
}
|
||||
else if(startBatch instanceof PIXI.TilingSprite)
|
||||
else
|
||||
{
|
||||
if(startBatch.visible)this.renderTilingSprite(startBatch, projectionMatrix);
|
||||
}
|
||||
else if(startBatch instanceof PIXI.Strip)
|
||||
{
|
||||
if(startBatch.visible)this.renderStrip(startBatch, projectionMatrix);
|
||||
}
|
||||
else if(startBatch instanceof PIXI.CustomRenderable)
|
||||
{
|
||||
if(startBatch.visible) startBatch.renderWebGL(this, projectionMatrix);
|
||||
this.renderSpecial(startBatch);
|
||||
}
|
||||
|
||||
// DO the middle batchs..
|
||||
|
|
@ -362,19 +391,10 @@ PIXI.WebGLRenderGroup.prototype.renderSpecific = function(displayObject, project
|
|||
{
|
||||
this.batchs[i].render();
|
||||
}
|
||||
else if(renderable instanceof PIXI.TilingSprite)
|
||||
else
|
||||
{
|
||||
if(renderable.visible)this.renderTilingSprite(renderable, projectionMatrix);
|
||||
this.renderSpecial(renderable);
|
||||
}
|
||||
else if(renderable instanceof PIXI.Strip)
|
||||
{
|
||||
if(renderable.visible)this.renderStrip(renderable, projectionMatrix);
|
||||
}
|
||||
else if(renderable instanceof PIXI.CustomRenderable)
|
||||
{
|
||||
if(renderable.visible) renderable.renderWebGL(this, projectionMatrix);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// DO the last batch..
|
||||
|
|
@ -382,30 +402,66 @@ PIXI.WebGLRenderGroup.prototype.renderSpecific = function(displayObject, project
|
|||
{
|
||||
endBatch.render(0, endIndex+1);
|
||||
}
|
||||
else if(endBatch instanceof PIXI.TilingSprite)
|
||||
else
|
||||
{
|
||||
if(endBatch.visible)this.renderTilingSprite(endBatch);
|
||||
this.renderSpecial(endBatch);
|
||||
}
|
||||
else if(endBatch instanceof PIXI.Strip)
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.renderSpecial = function(renderable)
|
||||
{
|
||||
if(renderable instanceof PIXI.TilingSprite)
|
||||
{
|
||||
if(endBatch.visible)this.renderStrip(endBatch);
|
||||
if(renderable.visible)this.renderTilingSprite(renderable, projectionMatrix);
|
||||
}
|
||||
else if(endBatch instanceof PIXI.CustomRenderable)
|
||||
else if(renderable instanceof PIXI.Strip)
|
||||
{
|
||||
if(endBatch.visible) endBatch.renderWebGL(this, projectionMatrix);
|
||||
if(renderable.visible)this.renderStrip(renderable, projectionMatrix);
|
||||
}
|
||||
else if(renderable instanceof PIXI.CustomRenderable)
|
||||
{
|
||||
if(renderable.visible) renderable.renderWebGL(this, projectionMatrix);
|
||||
}
|
||||
else if(renderable instanceof PIXI.Graphics)
|
||||
{
|
||||
if(renderable.visible && renderable.renderable) PIXI.WebGLGraphics.renderGraphics(renderable);//, projectionMatrix);
|
||||
}
|
||||
else if(renderable instanceof PIXI.FilterBlock)
|
||||
{
|
||||
/*
|
||||
* for now only masks are supported..
|
||||
*/
|
||||
if(renderable.open)
|
||||
{
|
||||
gl.enable(gl.STENCIL_TEST);
|
||||
|
||||
gl.colorMask(false, false, false, false);
|
||||
gl.stencilFunc(gl.ALWAYS,1,0xff);
|
||||
gl.stencilOp(gl.KEEP,gl.KEEP,gl.REPLACE);
|
||||
|
||||
PIXI.WebGLGraphics.renderGraphics(renderable.mask, projection);
|
||||
|
||||
gl.colorMask(true, true, true, false);
|
||||
gl.stencilFunc(gl.NOTEQUAL,0,0xff);
|
||||
gl.stencilOp(gl.KEEP,gl.KEEP,gl.KEEP);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.disable(gl.STENCIL_TEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.checkVisibility = function(displayObject, globalVisible)
|
||||
{
|
||||
// give the dp a refference to its renderGroup...
|
||||
// give the dp a reference to its renderGroup...
|
||||
var children = displayObject.children;
|
||||
//displayObject.worldVisible = globalVisible;
|
||||
for (var i=0; i < children.length; i++)
|
||||
{
|
||||
var child = children[i];
|
||||
|
||||
// TODO optimize... shouldt need to loop through everything all the time
|
||||
// TODO optimize... should'nt need to loop through everything all the time
|
||||
child.worldVisible = child.visible && globalVisible;
|
||||
|
||||
// everything should have a batch!
|
||||
|
|
@ -413,12 +469,7 @@ PIXI.WebGLRenderGroup.prototype.checkVisibility = function(displayObject, global
|
|||
if(child.textureChange)
|
||||
{
|
||||
child.textureChange = false;
|
||||
if(child.worldVisible)
|
||||
{
|
||||
this.removeDisplayObject(child);
|
||||
this.addDisplayObject(child);
|
||||
//this.updateTexture(child);
|
||||
}
|
||||
if(child.worldVisible)this.updateTexture(child);
|
||||
// update texture!!
|
||||
}
|
||||
|
||||
|
|
@ -431,135 +482,159 @@ PIXI.WebGLRenderGroup.prototype.checkVisibility = function(displayObject, global
|
|||
|
||||
PIXI.WebGLRenderGroup.prototype.updateTexture = function(displayObject)
|
||||
{
|
||||
// we know this exists..
|
||||
// is it in a batch..
|
||||
// check batch length
|
||||
if(displayObject.batch.length == 1)
|
||||
|
||||
// TODO definitely can optimse this function..
|
||||
|
||||
this.removeObject(displayObject);
|
||||
|
||||
/*
|
||||
* LOOK FOR THE PREVIOUS RENDERABLE
|
||||
* This part looks for the closest previous sprite that can go into a batch
|
||||
* It keeps going back until it finds a sprite or the stage
|
||||
*/
|
||||
var previousRenderable = displayObject.first;
|
||||
while(previousRenderable != this.root)
|
||||
{
|
||||
// just one! this guy! so simply swap the texture
|
||||
displayObject.batch.texture = displayObject.texture.baseTexture;
|
||||
return;
|
||||
previousRenderable = previousRenderable._iPrev;
|
||||
if(previousRenderable.renderable && previousRenderable.__renderGroup)break;
|
||||
}
|
||||
|
||||
// early out!
|
||||
if(displayObject.batch.texture == displayObject.texture.baseTexture)return;
|
||||
/*
|
||||
* LOOK FOR THE NEXT SPRITE
|
||||
* This part looks for the closest next sprite that can go into a batch
|
||||
* it keeps looking until it finds a sprite or gets to the end of the display
|
||||
* scene graph
|
||||
*/
|
||||
var nextRenderable = displayObject.last;
|
||||
while(nextRenderable._iNext)
|
||||
{
|
||||
nextRenderable = nextRenderable._iNext;
|
||||
if(nextRenderable.renderable && nextRenderable.__renderGroup)break;
|
||||
}
|
||||
|
||||
|
||||
if(displayObject.batch.head == displayObject)
|
||||
{
|
||||
//console.log("HEAD")
|
||||
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 && previousBatch.blendMode == displayObject.blendMode)
|
||||
{
|
||||
previousBatch.insertAfter(displayObject, previousBatch.tail);
|
||||
}
|
||||
else
|
||||
{
|
||||
// add it before..
|
||||
var batch = PIXI.WebGLRenderer.getBatch();
|
||||
batch.init(displayObject);
|
||||
this.batchs.splice(index-1, 0, batch);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// 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 && nextBatch.blendMode == displayObject.blendMode)
|
||||
{
|
||||
nextBatch.insertBefore(displayObject, nextBatch.head);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// add it before..
|
||||
var batch = PIXI.WebGLRenderer.getBatch();
|
||||
batch.init(displayObject);
|
||||
this.batchs.splice(index+1, 0, batch);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// we are 0!
|
||||
var batch = PIXI.WebGLRenderer.getBatch();
|
||||
batch.init(displayObject);
|
||||
this.batchs.push(batch);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// console.log("MIDDLE")
|
||||
var currentBatch = displayObject.batch;
|
||||
|
||||
// split the batch into 2
|
||||
// AH! dont split on the current display object as the texture is wrong!
|
||||
var splitBatch = currentBatch.split(displayObject);
|
||||
|
||||
// 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);
|
||||
}
|
||||
this.insertObject(displayObject, previousRenderable, nextRenderable);
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.addDisplayObject = function(displayObject)
|
||||
PIXI.WebGLRenderGroup.prototype.addFilterBlocks = function(start, end)
|
||||
{
|
||||
start.__renderGroup = this;
|
||||
end.__renderGroup = this;
|
||||
/*
|
||||
* LOOK FOR THE PREVIOUS RENDERABLE
|
||||
* This part looks for the closest previous sprite that can go into a batch
|
||||
* It keeps going back until it finds a sprite or the stage
|
||||
*/
|
||||
var previousRenderable = start;
|
||||
while(previousRenderable != this.root)
|
||||
{
|
||||
previousRenderable = previousRenderable._iPrev;
|
||||
if(previousRenderable.renderable && previousRenderable.__renderGroup)break;
|
||||
}
|
||||
this.insertAfter(start, previousRenderable);
|
||||
|
||||
/*
|
||||
* LOOK FOR THE NEXT SPRITE
|
||||
* This part looks for the closest next sprite that can go into a batch
|
||||
* it keeps looking until it finds a sprite or gets to the end of the display
|
||||
* scene graph
|
||||
*/
|
||||
var previousRenderable2 = end;
|
||||
while(previousRenderable2 != this.root)
|
||||
{
|
||||
previousRenderable2 = previousRenderable2._iPrev;
|
||||
if(previousRenderable2.renderable && previousRenderable2.__renderGroup)break;
|
||||
}
|
||||
this.insertAfter(end, previousRenderable2);
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.removeFilterBlocks = function(start, end)
|
||||
{
|
||||
this.removeObject(start);
|
||||
this.removeObject(end);
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.addDisplayObjectAndChildren = function(displayObject)
|
||||
{
|
||||
// add a child to the render group..
|
||||
if(displayObject.__renderGroup)displayObject.__renderGroup.removeDisplayObjectAndChildren(displayObject);
|
||||
|
||||
// DONT htink this is needed?
|
||||
// displayObject.batch = null;
|
||||
|
||||
displayObject.__renderGroup = this;
|
||||
/*
|
||||
* LOOK FOR THE PREVIOUS RENDERABLE
|
||||
* This part looks for the closest previous sprite that can go into a batch
|
||||
* It keeps going back until it finds a sprite or the stage
|
||||
*/
|
||||
|
||||
var previousRenderable = displayObject.first;
|
||||
while(previousRenderable != this.root)
|
||||
{
|
||||
previousRenderable = previousRenderable._iPrev;
|
||||
if(previousRenderable.renderable && previousRenderable.__renderGroup)break;
|
||||
}
|
||||
|
||||
/*
|
||||
* LOOK FOR THE NEXT SPRITE
|
||||
* This part looks for the closest next sprite that can go into a batch
|
||||
* it keeps looking until it finds a sprite or gets to the end of the display
|
||||
* scene graph
|
||||
*/
|
||||
var nextRenderable = displayObject.last;
|
||||
while(nextRenderable._iNext)
|
||||
{
|
||||
nextRenderable = nextRenderable._iNext;
|
||||
if(nextRenderable.renderable && nextRenderable.__renderGroup)break;
|
||||
}
|
||||
|
||||
// one the display object hits this. we can break the loop
|
||||
|
||||
var tempObject = displayObject.first;
|
||||
var testObject = displayObject.last._iNext;
|
||||
do
|
||||
{
|
||||
tempObject.__renderGroup = this;
|
||||
|
||||
if(tempObject.renderable)
|
||||
{
|
||||
|
||||
this.insertObject(tempObject, previousRenderable, nextRenderable);
|
||||
previousRenderable = tempObject;
|
||||
}
|
||||
|
||||
tempObject = tempObject._iNext;
|
||||
}
|
||||
while(tempObject != testObject)
|
||||
}
|
||||
|
||||
//displayObject.cacheVisible = true;
|
||||
if(!displayObject.renderable)return;
|
||||
PIXI.WebGLRenderGroup.prototype.removeDisplayObjectAndChildren = function(displayObject)
|
||||
{
|
||||
if(displayObject.__renderGroup != this)return;
|
||||
|
||||
// var displayObject = displayObject.first;
|
||||
var lastObject = displayObject.last;
|
||||
do
|
||||
{
|
||||
displayObject.__renderGroup = null;
|
||||
if(displayObject.renderable)this.removeObject(displayObject);
|
||||
displayObject = displayObject._iNext;
|
||||
}
|
||||
while(displayObject)
|
||||
}
|
||||
|
||||
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.insertObject = function(displayObject, previousObject, nextObject)
|
||||
{
|
||||
// while looping below THE OBJECT MAY NOT HAVE BEEN ADDED
|
||||
//displayObject.__inWebGL = true;
|
||||
var previousSprite = previousObject;
|
||||
var nextSprite = nextObject;
|
||||
|
||||
var previousSprite = this.getPreviousRenderable(displayObject);
|
||||
var nextSprite = this.getNextRenderable(displayObject);
|
||||
|
||||
|
||||
/*
|
||||
* so now we have the next renderable and the previous renderable
|
||||
*
|
||||
*/
|
||||
|
||||
if(displayObject instanceof PIXI.Sprite)
|
||||
{
|
||||
var previousBatch
|
||||
var nextBatch
|
||||
|
||||
//console.log( previousSprite)
|
||||
if(previousSprite instanceof PIXI.Sprite)
|
||||
{
|
||||
previousBatch = previousSprite.batch;
|
||||
|
|
@ -619,6 +694,7 @@ PIXI.WebGLRenderGroup.prototype.addDisplayObject = function(displayObject)
|
|||
else
|
||||
{
|
||||
// TODO re-word!
|
||||
|
||||
nextBatch = nextSprite;
|
||||
}
|
||||
}
|
||||
|
|
@ -641,40 +717,88 @@ PIXI.WebGLRenderGroup.prototype.addDisplayObject = function(displayObject)
|
|||
{
|
||||
this.batchs.push(batch);
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
else if(displayObject instanceof PIXI.TilingSprite)
|
||||
{
|
||||
|
||||
// add to a batch!!
|
||||
this.initTilingSprite(displayObject);
|
||||
this.batchs.push(displayObject);
|
||||
// this.batchs.push(displayObject);
|
||||
|
||||
}
|
||||
else if(displayObject instanceof PIXI.Strip)
|
||||
{
|
||||
// add to a batch!!
|
||||
this.initStrip(displayObject);
|
||||
this.batchs.push(displayObject);
|
||||
// this.batchs.push(displayObject);
|
||||
}
|
||||
else if(displayObject)// instanceof PIXI.Graphics)
|
||||
{
|
||||
//displayObject.initWebGL(this);
|
||||
|
||||
// add to a batch!!
|
||||
//this.initStrip(displayObject);
|
||||
//this.batchs.push(displayObject);
|
||||
}
|
||||
|
||||
// if its somthing else... then custom codes!
|
||||
this.batchUpdate = true;
|
||||
this.insertAfter(displayObject, previousSprite);
|
||||
|
||||
// insert and SPLIT!
|
||||
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.addDisplayObjectAndChildren = function(displayObject)
|
||||
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.insertAfter = function(item, displayObject)
|
||||
{
|
||||
// TODO - this can be faster - but not as important right now
|
||||
|
||||
this.addDisplayObject(displayObject);
|
||||
var children = displayObject.children;
|
||||
|
||||
for (var i=0; i < children.length; i++)
|
||||
if(displayObject instanceof PIXI.Sprite)
|
||||
{
|
||||
this.addDisplayObjectAndChildren(children[i]);
|
||||
};
|
||||
var previousBatch = displayObject.batch;
|
||||
|
||||
if(previousBatch)
|
||||
{
|
||||
// so this object is in a batch!
|
||||
|
||||
// is it not? need to split the batch
|
||||
if(previousBatch.tail == displayObject)
|
||||
{
|
||||
// is it tail? insert in to batchs
|
||||
var index = this.batchs.indexOf( previousBatch );
|
||||
this.batchs.splice(index+1, 0, item);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO MODIFY ADD / REMOVE CHILD TO ACCOUNT FOR FILTERS (also get prev and next) //
|
||||
|
||||
// THERE IS A SPLIT IN THIS BATCH! //
|
||||
var splitBatch = previousBatch.split(displayObject.__next);
|
||||
|
||||
// COOL!
|
||||
// add it back into the array
|
||||
/*
|
||||
* OOPS!
|
||||
* seems the new sprite is in the middle of a batch
|
||||
* lets split it..
|
||||
*/
|
||||
var index = this.batchs.indexOf( previousBatch );
|
||||
this.batchs.splice(index+1, 0, item, splitBatch);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.batchs.push(item);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var index = this.batchs.indexOf( displayObject );
|
||||
this.batchs.splice(index+1, 0, item);
|
||||
}
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.removeDisplayObject = function(displayObject)
|
||||
PIXI.WebGLRenderGroup.prototype.removeObject = function(displayObject)
|
||||
{
|
||||
// loop through children..
|
||||
// display object //
|
||||
|
|
@ -682,10 +806,7 @@ PIXI.WebGLRenderGroup.prototype.removeDisplayObject = function(displayObject)
|
|||
// add a child from the render group..
|
||||
// remove it and all its children!
|
||||
//displayObject.cacheVisible = false;//displayObject.visible;
|
||||
displayObject.__renderGroup = null;
|
||||
|
||||
if(!displayObject.renderable)return;
|
||||
|
||||
|
||||
/*
|
||||
* removing is a lot quicker..
|
||||
*
|
||||
|
|
@ -743,111 +864,18 @@ PIXI.WebGLRenderGroup.prototype.removeDisplayObject = function(displayObject)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
this.batchs.splice(index, 1);
|
||||
if(batchToRemove instanceof PIXI.WebGLBatch)PIXI.WebGLRenderer.returnBatch(batchToRemove);
|
||||
}
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.removeDisplayObjectAndChildren = function(displayObject)
|
||||
{
|
||||
// TODO - this can be faster - but not as important right now
|
||||
if(displayObject.__renderGroup != this)return;
|
||||
|
||||
this.removeDisplayObject(displayObject);
|
||||
var children = displayObject.children;
|
||||
|
||||
for (var i=0; i < children.length; i++)
|
||||
{
|
||||
this.removeDisplayObjectAndChildren(children[i]);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.getNextRenderable = function(displayObject)
|
||||
{
|
||||
/*
|
||||
* LOOK FOR THE NEXT SPRITE
|
||||
* This part looks for the closest next sprite that can go into a batch
|
||||
* it keeps looking until it finds a sprite or gets to the end of the display
|
||||
* scene graph
|
||||
*
|
||||
* These look a lot scarier than the actually are...
|
||||
*/
|
||||
|
||||
var nextSprite = displayObject;
|
||||
do
|
||||
{
|
||||
// moving forward!
|
||||
// if it has no children..
|
||||
if(nextSprite.children.length == 0)
|
||||
{
|
||||
//maynot have a parent
|
||||
if(!nextSprite.parent)return null;
|
||||
|
||||
// go along to the parent..
|
||||
while(nextSprite.childIndex == nextSprite.parent.children.length-1)
|
||||
{
|
||||
nextSprite = nextSprite.parent;
|
||||
//console.log(">" + nextSprite);
|
||||
// console.log(">-" + this.root);
|
||||
if(nextSprite == this.root || !nextSprite.parent)//displayObject.stage)
|
||||
{
|
||||
nextSprite = null
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(nextSprite)nextSprite = nextSprite.parent.children[nextSprite.childIndex+1];
|
||||
}
|
||||
else
|
||||
{
|
||||
nextSprite = nextSprite.children[0];
|
||||
}
|
||||
|
||||
if(!nextSprite)break;
|
||||
}
|
||||
while(!nextSprite.renderable || !nextSprite.__renderGroup)
|
||||
|
||||
return nextSprite;
|
||||
}
|
||||
|
||||
PIXI.WebGLRenderGroup.prototype.getPreviousRenderable = function(displayObject)
|
||||
{
|
||||
/*
|
||||
* LOOK FOR THE PREVIOUS SPRITE
|
||||
* This part looks for the closest previous sprite that can go into a batch
|
||||
* It keeps going back until it finds a sprite or the stage
|
||||
*/
|
||||
var previousSprite = displayObject;
|
||||
do
|
||||
{
|
||||
if(previousSprite.childIndex == 0)
|
||||
{
|
||||
previousSprite = previousSprite.parent;
|
||||
if(!previousSprite)return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
previousSprite = previousSprite.parent.children[previousSprite.childIndex-1];
|
||||
// what if the bloop has children???
|
||||
while(previousSprite.children.length != 0)
|
||||
{
|
||||
// keep diggin till we get to the last child
|
||||
previousSprite = previousSprite.children[previousSprite.children.length-1];
|
||||
}
|
||||
}
|
||||
|
||||
if(previousSprite == this.root)break;
|
||||
}
|
||||
while(!previousSprite.renderable || !previousSprite.__renderGroup);
|
||||
|
||||
return previousSprite;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
|
@ -872,7 +900,6 @@ PIXI.WebGLRenderGroup.prototype.initTilingSprite = function(sprite)
|
|||
|
||||
sprite.indices = new Uint16Array([0, 1, 3,2])//, 2]);
|
||||
|
||||
|
||||
sprite._vertexBuffer = gl.createBuffer();
|
||||
sprite._indexBuffer = gl.createBuffer();
|
||||
sprite._uvBuffer = gl.createBuffer();
|
||||
|
|
@ -908,17 +935,28 @@ PIXI.WebGLRenderGroup.prototype.initTilingSprite = function(sprite)
|
|||
/**
|
||||
* @private
|
||||
*/
|
||||
PIXI.WebGLRenderGroup.prototype.renderStrip = function(strip, projectionMatrix)
|
||||
PIXI.WebGLRenderGroup.prototype.renderStrip = function(strip, projection)
|
||||
{
|
||||
var gl = this.gl;
|
||||
var shaderProgram = PIXI.shaderProgram;
|
||||
// mat
|
||||
var mat4Real = PIXI.mat3.toMat4(strip.worldTransform);
|
||||
PIXI.mat4.transpose(mat4Real);
|
||||
PIXI.mat4.multiply(projectionMatrix, mat4Real, mat4Real )
|
||||
//var mat4Real = PIXI.mat3.toMat4(strip.worldTransform);
|
||||
//PIXI.mat4.transpose(mat4Real);
|
||||
//PIXI.mat4.multiply(projectionMatrix, mat4Real, mat4Real )
|
||||
|
||||
gl.uniformMatrix4fv(shaderProgram.mvMatrixUniform, false, mat4Real);
|
||||
|
||||
|
||||
gl.useProgram(PIXI.stripShaderProgram);
|
||||
|
||||
var m = PIXI.mat3.clone(strip.worldTransform);
|
||||
|
||||
PIXI.mat3.transpose(m);
|
||||
|
||||
// set the matrix transform for the
|
||||
gl.uniformMatrix3fv(PIXI.stripShaderProgram.translationMatrix, false, m);
|
||||
gl.uniform2f(PIXI.stripShaderProgram.projectionVector, projection.x, projection.y);
|
||||
gl.uniform1f(PIXI.stripShaderProgram.alpha, strip.worldAlpha);
|
||||
|
||||
/*
|
||||
if(strip.blendMode == PIXI.blendModes.NORMAL)
|
||||
{
|
||||
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
||||
|
|
@ -927,6 +965,8 @@ PIXI.WebGLRenderGroup.prototype.renderStrip = function(strip, projectionMatrix)
|
|||
{
|
||||
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_COLOR);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
if(!strip.dirty)
|
||||
{
|
||||
|
|
@ -947,8 +987,6 @@ PIXI.WebGLRenderGroup.prototype.renderStrip = function(strip, projectionMatrix)
|
|||
|
||||
// dont need to upload!
|
||||
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, strip._indexBuffer);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -974,11 +1012,11 @@ PIXI.WebGLRenderGroup.prototype.renderStrip = function(strip, projectionMatrix)
|
|||
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, strip.indices, gl.STATIC_DRAW);
|
||||
|
||||
}
|
||||
//console.log(gl.TRIANGLE_STRIP)
|
||||
//console.log(gl.TRIANGLE_STRIP);
|
||||
|
||||
gl.drawElements(gl.TRIANGLE_STRIP, strip.indices.length, gl.UNSIGNED_SHORT, 0);
|
||||
|
||||
gl.uniformMatrix4fv(shaderProgram.mvMatrixUniform, false, projectionMatrix);
|
||||
|
||||
gl.useProgram(PIXI.shaderProgram);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1022,7 +1060,7 @@ PIXI.WebGLRenderGroup.prototype.renderTilingSprite = function(sprite, projection
|
|||
/**
|
||||
* @private
|
||||
*/
|
||||
PIXI.WebGLRenderer.prototype.initStrip = function(strip)
|
||||
PIXI.WebGLRenderGroup.prototype.initStrip = function(strip)
|
||||
{
|
||||
// build the strip!
|
||||
var gl = this.gl;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/renderers/WebGLRenderer.js - Pixi.JS</title>
|
||||
<title>src/pixi/renderers/webgl/WebGLRenderer.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -134,7 +142,7 @@
|
|||
<div class="apidocs">
|
||||
<div id="docs-main">
|
||||
<div class="content">
|
||||
<h1 class="file-heading">File: src/pixi/renderers/WebGLRenderer.js</h1>
|
||||
<h1 class="file-heading">File: src/pixi/renderers/webgl/WebGLRenderer.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
|
@ -174,7 +182,7 @@ PIXI.WebGLRenderer = function(width, height, view, transparent)
|
|||
|
||||
this.view = view || document.createElement( 'canvas' );
|
||||
this.view.width = this.width;
|
||||
this.view.height = this.height;
|
||||
this.view.height = this.height;
|
||||
|
||||
// deal with losing context..
|
||||
var scope = this;
|
||||
|
|
@ -187,8 +195,9 @@ PIXI.WebGLRenderer = function(width, height, view, transparent)
|
|||
{
|
||||
PIXI.gl = this.gl = this.view.getContext("experimental-webgl", {
|
||||
alpha: this.transparent,
|
||||
antialias:false, // SPEED UP??
|
||||
premultipliedAlpha:false
|
||||
antialias:true, // SPEED UP??
|
||||
premultipliedAlpha:false,
|
||||
stencil:true
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
|
|
@ -196,8 +205,11 @@ PIXI.WebGLRenderer = function(width, height, view, transparent)
|
|||
throw new Error(" This browser does not support webGL. Try using the canvas renderer" + this);
|
||||
}
|
||||
|
||||
this.initShaders();
|
||||
PIXI.initPrimitiveShader();
|
||||
PIXI.initDefaultShader();
|
||||
PIXI.initDefaultStripShader();
|
||||
|
||||
PIXI.activateDefaultShader();
|
||||
|
||||
var gl = this.gl;
|
||||
PIXI.WebGLRenderer.gl = gl;
|
||||
|
|
@ -205,10 +217,15 @@ PIXI.WebGLRenderer = function(width, height, view, transparent)
|
|||
this.batch = new PIXI.WebGLBatch(gl);
|
||||
gl.disable(gl.DEPTH_TEST);
|
||||
gl.disable(gl.CULL_FACE);
|
||||
|
||||
//
|
||||
|
||||
|
||||
gl.enable(gl.BLEND);
|
||||
gl.colorMask(true, true, true, this.transparent);
|
||||
|
||||
this.projectionMatrix = PIXI.mat4.create();
|
||||
PIXI.projection = new PIXI.Point(400, 300);
|
||||
|
||||
this.resize(this.width, this.height);
|
||||
this.contextLost = false;
|
||||
|
||||
|
|
@ -246,39 +263,7 @@ PIXI.WebGLRenderer.returnBatch = function(batch)
|
|||
/**
|
||||
* @private
|
||||
*/
|
||||
PIXI.WebGLRenderer.prototype.initShaders = function()
|
||||
{
|
||||
var gl = this.gl;
|
||||
var fragmentShader = PIXI.CompileFragmentShader(gl, PIXI.shaderFragmentSrc);
|
||||
var vertexShader = PIXI.CompileVertexShader(gl, PIXI.shaderVertexSrc);
|
||||
|
||||
PIXI.shaderProgram = gl.createProgram();
|
||||
|
||||
var shaderProgram = PIXI.shaderProgram;
|
||||
|
||||
gl.attachShader(shaderProgram, vertexShader);
|
||||
gl.attachShader(shaderProgram, fragmentShader);
|
||||
gl.linkProgram(shaderProgram);
|
||||
|
||||
if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {
|
||||
alert("Could not initialise shaders");
|
||||
}
|
||||
|
||||
gl.useProgram(shaderProgram);
|
||||
|
||||
shaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, "aVertexPosition");
|
||||
gl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute);
|
||||
|
||||
shaderProgram.textureCoordAttribute = gl.getAttribLocation(shaderProgram, "aTextureCoord");
|
||||
gl.enableVertexAttribArray(shaderProgram.textureCoordAttribute);
|
||||
|
||||
shaderProgram.colorAttribute = gl.getAttribLocation(shaderProgram, "aColor");
|
||||
gl.enableVertexAttribArray(shaderProgram.colorAttribute);
|
||||
|
||||
|
||||
shaderProgram.mvMatrixUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
|
||||
shaderProgram.samplerUniform = gl.getUniformLocation(shaderProgram, "uSampler");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -327,16 +312,18 @@ PIXI.WebGLRenderer.prototype.render = function(stage)
|
|||
gl.viewport(0, 0, this.width, this.height);
|
||||
|
||||
// set the correct matrix..
|
||||
// gl.uniformMatrix4fv(this.shaderProgram.mvMatrixUniform, false, this.projectionMatrix);
|
||||
// gl.uniformMatrix4fv(this.shaderProgram.mvMatrixUniform, false, this.projectionMatrix);
|
||||
|
||||
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
||||
|
||||
gl.clearColor(stage.backgroundColorSplit[0],stage.backgroundColorSplit[1],stage.backgroundColorSplit[2], !this.transparent);
|
||||
gl.clear(gl.COLOR_BUFFER_BIT);
|
||||
|
||||
|
||||
// HACK TO TEST
|
||||
//PIXI.projectionMatrix = this.projectionMatrix;
|
||||
|
||||
this.stageRenderGroup.backgroundColor = stage.backgroundColorSplit;
|
||||
this.stageRenderGroup.render(this.projectionMatrix);
|
||||
this.stageRenderGroup.render(PIXI.projection);
|
||||
|
||||
// interaction
|
||||
// run interaction!
|
||||
|
|
@ -437,12 +424,15 @@ PIXI.WebGLRenderer.prototype.resize = function(width, height)
|
|||
|
||||
this.gl.viewport(0, 0, this.width, this.height);
|
||||
|
||||
var projectionMatrix = this.projectionMatrix;
|
||||
//var projectionMatrix = this.projectionMatrix;
|
||||
|
||||
projectionMatrix[0] = 2/this.width;
|
||||
projectionMatrix[5] = -2/this.height;
|
||||
projectionMatrix[12] = -1;
|
||||
projectionMatrix[13] = 1;
|
||||
PIXI.projection.x = this.width/2;
|
||||
PIXI.projection.y = this.height/2;
|
||||
|
||||
// projectionMatrix[0] = 2/this.width;
|
||||
// projectionMatrix[5] = -2/this.height;
|
||||
// projectionMatrix[12] = -1;
|
||||
// projectionMatrix[13] = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -465,9 +455,11 @@ PIXI.WebGLRenderer.prototype.handleContextRestored = function(event)
|
|||
|
||||
this.initShaders();
|
||||
|
||||
for (var i=0; i < PIXI.TextureCache.length; i++)
|
||||
for(var key in PIXI.TextureCache)
|
||||
{
|
||||
this.updateTexture(PIXI.TextureCache[i]);
|
||||
var texture = PIXI.TextureCache[key].baseTexture;
|
||||
texture._glTexture = null;
|
||||
PIXI.WebGLRenderer.updateTexture(texture);
|
||||
};
|
||||
|
||||
for (var i=0; i < this.batchs.length; i++)
|
||||
399
docs/files/src_pixi_renderers_webgl_WebGLShaders.js.html
Normal file
|
|
@ -0,0 +1,399 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>src/pixi/renderers/webgl/WebGLShaders.js - Pixi.JS</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||||
<script src="http://yui.yahooapis.com/combo?3.8.0/build/yui/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://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.3.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="../classes/AssetLoader.html">AssetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BaseTexture.html">BaseTexture</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapFontLoader.html">BitmapFontLoader</a></li>
|
||||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/JsonLoader.html">JsonLoader</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
||||
<li><a href="../classes/Polygon.html">Polygon</a></li>
|
||||
|
||||
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
||||
|
||||
<li><a href="../classes/RenderTexture.html">RenderTexture</a></li>
|
||||
|
||||
<li><a href="../classes/Spine.html">Spine</a></li>
|
||||
|
||||
<li><a href="../classes/Sprite.html">Sprite</a></li>
|
||||
|
||||
<li><a href="../classes/SpriteSheetLoader.html">SpriteSheetLoader</a></li>
|
||||
|
||||
<li><a href="../classes/Stage.html">Stage</a></li>
|
||||
|
||||
<li><a href="../classes/Text.html">Text</a></li>
|
||||
|
||||
<li><a href="../classes/Texture.html">Texture</a></li>
|
||||
|
||||
<li><a href="../classes/TilingSprite.html">TilingSprite</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLBatch.html">WebGLBatch</a></li>
|
||||
|
||||
<li><a href="../classes/WebGLRenderer.html">WebGLRenderer</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="api-modules" class="apis modules">
|
||||
|
||||
<li><a href="../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/pixi/renderers/webgl/WebGLShaders.js</h1>
|
||||
|
||||
<div class="file">
|
||||
<pre class="code prettyprint linenums">
|
||||
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* the default suoer fast shader!
|
||||
*/
|
||||
|
||||
PIXI.shaderFragmentSrc = [
|
||||
"precision mediump float;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
"varying float vColor;",
|
||||
"uniform sampler2D uSampler;",
|
||||
"void main(void) {",
|
||||
"gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y));",
|
||||
"gl_FragColor = gl_FragColor * vColor;",
|
||||
"}"
|
||||
];
|
||||
|
||||
PIXI.shaderVertexSrc = [
|
||||
"attribute vec2 aVertexPosition;",
|
||||
"attribute vec2 aTextureCoord;",
|
||||
"attribute float aColor;",
|
||||
//"uniform mat4 uMVMatrix;",
|
||||
|
||||
"uniform vec2 projectionVector;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
"varying float vColor;",
|
||||
"void main(void) {",
|
||||
// "gl_Position = uMVMatrix * vec4(aVertexPosition, 1.0, 1.0);",
|
||||
"gl_Position = vec4( aVertexPosition.x / projectionVector.x -1.0, aVertexPosition.y / -projectionVector.y + 1.0 , 0.0, 1.0);",
|
||||
"vTextureCoord = aTextureCoord;",
|
||||
"vColor = aColor;",
|
||||
"}"
|
||||
];
|
||||
|
||||
/*
|
||||
* the triangle strip shader..
|
||||
*/
|
||||
|
||||
PIXI.stripShaderFragmentSrc = [
|
||||
"precision mediump float;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
"varying float vColor;",
|
||||
"uniform float alpha;",
|
||||
"uniform sampler2D uSampler;",
|
||||
"void main(void) {",
|
||||
"gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y));",
|
||||
"gl_FragColor = gl_FragColor * alpha;",
|
||||
"}"
|
||||
];
|
||||
|
||||
|
||||
PIXI.stripShaderVertexSrc = [
|
||||
"attribute vec2 aVertexPosition;",
|
||||
"attribute vec2 aTextureCoord;",
|
||||
"attribute float aColor;",
|
||||
"uniform mat3 translationMatrix;",
|
||||
"uniform vec2 projectionVector;",
|
||||
"varying vec2 vTextureCoord;",
|
||||
"varying float vColor;",
|
||||
"void main(void) {",
|
||||
"vec3 v = translationMatrix * vec3(aVertexPosition, 1.0);",
|
||||
"gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);",
|
||||
"vTextureCoord = aTextureCoord;",
|
||||
"vColor = aColor;",
|
||||
"}"
|
||||
];
|
||||
|
||||
|
||||
/*
|
||||
* primitive shader..
|
||||
*/
|
||||
|
||||
PIXI.primitiveShaderFragmentSrc = [
|
||||
"precision mediump float;",
|
||||
"varying vec4 vColor;",
|
||||
"void main(void) {",
|
||||
"gl_FragColor = vColor;",
|
||||
"}"
|
||||
];
|
||||
|
||||
PIXI.primitiveShaderVertexSrc = [
|
||||
"attribute vec2 aVertexPosition;",
|
||||
"attribute vec4 aColor;",
|
||||
"uniform mat3 translationMatrix;",
|
||||
"uniform vec2 projectionVector;",
|
||||
"uniform float alpha;",
|
||||
"varying vec4 vColor;",
|
||||
"void main(void) {",
|
||||
"vec3 v = translationMatrix * vec3(aVertexPosition, 1.0);",
|
||||
"gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);",
|
||||
"vColor = aColor * alpha;",
|
||||
"}"
|
||||
];
|
||||
|
||||
PIXI.initPrimitiveShader = function()
|
||||
{
|
||||
var gl = PIXI.gl;
|
||||
|
||||
var shaderProgram = PIXI.compileProgram(PIXI.primitiveShaderVertexSrc, PIXI.primitiveShaderFragmentSrc)
|
||||
|
||||
gl.useProgram(shaderProgram);
|
||||
|
||||
shaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, "aVertexPosition");
|
||||
shaderProgram.colorAttribute = gl.getAttribLocation(shaderProgram, "aColor");
|
||||
|
||||
shaderProgram.projectionVector = gl.getUniformLocation(shaderProgram, "projectionVector");
|
||||
shaderProgram.translationMatrix = gl.getUniformLocation(shaderProgram, "translationMatrix");
|
||||
|
||||
shaderProgram.alpha = gl.getUniformLocation(shaderProgram, "alpha");
|
||||
|
||||
PIXI.primitiveProgram = shaderProgram;
|
||||
}
|
||||
|
||||
PIXI.initDefaultShader = function()
|
||||
{
|
||||
var gl = this.gl;
|
||||
var shaderProgram = PIXI.compileProgram(PIXI.shaderVertexSrc, PIXI.shaderFragmentSrc)
|
||||
|
||||
gl.useProgram(shaderProgram);
|
||||
|
||||
shaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, "aVertexPosition");
|
||||
shaderProgram.projectionVector = gl.getUniformLocation(shaderProgram, "projectionVector");
|
||||
shaderProgram.textureCoordAttribute = gl.getAttribLocation(shaderProgram, "aTextureCoord");
|
||||
shaderProgram.colorAttribute = gl.getAttribLocation(shaderProgram, "aColor");
|
||||
|
||||
// shaderProgram.mvMatrixUniform = gl.getUniformLocation(shaderProgram, "uMVMatrix");
|
||||
shaderProgram.samplerUniform = gl.getUniformLocation(shaderProgram, "uSampler");
|
||||
|
||||
PIXI.shaderProgram = shaderProgram;
|
||||
}
|
||||
|
||||
PIXI.initDefaultStripShader = function()
|
||||
{
|
||||
var gl = this.gl;
|
||||
var shaderProgram = PIXI.compileProgram(PIXI.stripShaderVertexSrc, PIXI.stripShaderFragmentSrc)
|
||||
|
||||
gl.useProgram(shaderProgram);
|
||||
|
||||
shaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, "aVertexPosition");
|
||||
shaderProgram.projectionVector = gl.getUniformLocation(shaderProgram, "projectionVector");
|
||||
shaderProgram.textureCoordAttribute = gl.getAttribLocation(shaderProgram, "aTextureCoord");
|
||||
shaderProgram.translationMatrix = gl.getUniformLocation(shaderProgram, "translationMatrix");
|
||||
shaderProgram.alpha = gl.getUniformLocation(shaderProgram, "alpha");
|
||||
|
||||
shaderProgram.colorAttribute = gl.getAttribLocation(shaderProgram, "aColor");
|
||||
|
||||
shaderProgram.projectionVector = gl.getUniformLocation(shaderProgram, "projectionVector");
|
||||
|
||||
shaderProgram.samplerUniform = gl.getUniformLocation(shaderProgram, "uSampler");
|
||||
|
||||
PIXI.stripShaderProgram = shaderProgram;
|
||||
}
|
||||
|
||||
PIXI.CompileVertexShader = function(gl, shaderSrc)
|
||||
{
|
||||
return PIXI._CompileShader(gl, shaderSrc, gl.VERTEX_SHADER);
|
||||
}
|
||||
|
||||
PIXI.CompileFragmentShader = function(gl, shaderSrc)
|
||||
{
|
||||
return PIXI._CompileShader(gl, shaderSrc, gl.FRAGMENT_SHADER);
|
||||
}
|
||||
|
||||
PIXI._CompileShader = function(gl, shaderSrc, shaderType)
|
||||
{
|
||||
var src = shaderSrc.join("\n");
|
||||
var shader = gl.createShader(shaderType);
|
||||
gl.shaderSource(shader, src);
|
||||
gl.compileShader(shader);
|
||||
|
||||
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
|
||||
alert(gl.getShaderInfoLog(shader));
|
||||
return null;
|
||||
}
|
||||
|
||||
return shader;
|
||||
}
|
||||
|
||||
|
||||
PIXI.compileProgram = function(vertexSrc, fragmentSrc)
|
||||
{
|
||||
var gl = PIXI.gl;
|
||||
var fragmentShader = PIXI.CompileFragmentShader(gl, fragmentSrc);
|
||||
var vertexShader = PIXI.CompileVertexShader(gl, vertexSrc);
|
||||
|
||||
var shaderProgram = gl.createProgram();
|
||||
|
||||
gl.attachShader(shaderProgram, vertexShader);
|
||||
gl.attachShader(shaderProgram, fragmentShader);
|
||||
gl.linkProgram(shaderProgram);
|
||||
|
||||
if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {
|
||||
alert("Could not initialise shaders");
|
||||
}
|
||||
|
||||
return shaderProgram;
|
||||
}
|
||||
|
||||
|
||||
PIXI.activateDefaultShader = function()
|
||||
{
|
||||
var gl = PIXI.gl;
|
||||
var shaderProgram = PIXI.shaderProgram;
|
||||
|
||||
gl.useProgram(shaderProgram);
|
||||
|
||||
|
||||
gl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute);
|
||||
gl.enableVertexAttribArray(shaderProgram.textureCoordAttribute);
|
||||
gl.enableVertexAttribArray(shaderProgram.colorAttribute);
|
||||
}
|
||||
|
||||
|
||||
|
||||
PIXI.activatePrimitiveShader = function()
|
||||
{
|
||||
var gl = PIXI.gl;
|
||||
|
||||
gl.disableVertexAttribArray(PIXI.shaderProgram.textureCoordAttribute);
|
||||
gl.disableVertexAttribArray(PIXI.shaderProgram.colorAttribute);
|
||||
|
||||
gl.useProgram(PIXI.primitiveProgram);
|
||||
|
||||
gl.enableVertexAttribArray(PIXI.primitiveProgram.vertexPositionAttribute);
|
||||
gl.enableVertexAttribArray(PIXI.primitiveProgram.colorAttribute);
|
||||
}
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||||
<script>prettyPrint();</script>
|
||||
<script src="../assets/js/yui-prettify.js"></script>
|
||||
<script src="../assets/../api.js"></script>
|
||||
<script src="../assets/js/api-filter.js"></script>
|
||||
<script src="../assets/js/api-list.js"></script>
|
||||
<script src="../assets/js/api-search.js"></script>
|
||||
<script src="../assets/js/apidocs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -252,7 +260,9 @@ PIXI.BaseTexture.fromImage = function(imageUrl, crossorigin)
|
|||
var baseTexture = PIXI.BaseTextureCache[imageUrl];
|
||||
if(!baseTexture)
|
||||
{
|
||||
var image = new Image();
|
||||
// new Image() breaks tex loading in some versions of Chrome.
|
||||
// See https://code.google.com/p/chromium/issues/detail?id=238071
|
||||
var image = new Image();//document.createElement('img');
|
||||
if (crossorigin)
|
||||
{
|
||||
image.crossOrigin = '';
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -143,13 +151,33 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* A RenderTexture is a special texture that allows any pixi displayObject to be rendered to it.
|
||||
* @class RenderTexture
|
||||
* @extends Texture
|
||||
* @constructor
|
||||
* @param width {Number}
|
||||
* @param height {Number}
|
||||
*/
|
||||
A RenderTexture is a special texture that allows any pixi displayObject to be rendered to it.
|
||||
|
||||
__Hint__: All DisplayObjects (exmpl. Sprites) that renders on RenderTexture should be preloaded.
|
||||
Otherwise black rectangles will be drawn instead.
|
||||
|
||||
RenderTexture takes snapshot of DisplayObject passed to render method. If DisplayObject is passed to render method, position and rotation of it will be ignored. For example:
|
||||
|
||||
var renderTexture = new PIXI.RenderTexture(800, 600);
|
||||
var sprite = PIXI.Sprite.fromImage("spinObj_01.png");
|
||||
sprite.position.x = 800/2;
|
||||
sprite.position.y = 600/2;
|
||||
sprite.anchor.x = 0.5;
|
||||
sprite.anchor.y = 0.5;
|
||||
renderTexture.render(sprite);
|
||||
|
||||
Sprite in this case will be rendered to 0,0 position. To render this sprite at center DisplayObjectContainer should be used:
|
||||
|
||||
var doc = new PIXI.DisplayObjectContainer();
|
||||
doc.addChild(sprite);
|
||||
renderTexture.render(doc); // Renders to center of renderTexture
|
||||
|
||||
@class RenderTexture
|
||||
@extends Texture
|
||||
@constructor
|
||||
@param width {Number}
|
||||
@param height {Number}
|
||||
**/
|
||||
PIXI.RenderTexture = function(width, height)
|
||||
{
|
||||
PIXI.EventTarget.call( this );
|
||||
|
|
@ -205,6 +233,8 @@ PIXI.RenderTexture.prototype.initWebGL = function()
|
|||
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.baseTexture._glTexture, 0);
|
||||
|
||||
// create a projection matrix..
|
||||
this.projection = new PIXI.Point(this.width/2 , this.height/2);
|
||||
|
||||
this.projectionMatrix = PIXI.mat4.create();
|
||||
|
||||
this.projectionMatrix[5] = 2/this.height// * 0.5;
|
||||
|
|
@ -255,6 +285,9 @@ PIXI.RenderTexture.prototype.renderWebGL = function(displayObject, clear)
|
|||
|
||||
//TODO -? create a new one??? dont think so!
|
||||
displayObject.worldTransform = PIXI.mat3.create();//sthis.indetityMatrix;
|
||||
// modify to flip...
|
||||
displayObject.worldTransform[4] = -1;
|
||||
displayObject.worldTransform[5] = this.projection.y * 2;
|
||||
|
||||
for(var i=0,j=children.length; i<j; i++)
|
||||
{
|
||||
|
|
@ -267,18 +300,18 @@ PIXI.RenderTexture.prototype.renderWebGL = function(displayObject, clear)
|
|||
{
|
||||
if(displayObject == renderGroup.root)
|
||||
{
|
||||
renderGroup.render(this.projectionMatrix);
|
||||
renderGroup.render(this.projection);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderGroup.renderSpecific(displayObject, this.projectionMatrix);
|
||||
renderGroup.renderSpecific(displayObject, this.projection);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!this.renderGroup)this.renderGroup = new PIXI.WebGLRenderGroup(gl);
|
||||
this.renderGroup.setRenderable(displayObject);
|
||||
this.renderGroup.render(this.projectionMatrix);
|
||||
this.renderGroup.render(this.projection);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -227,7 +235,32 @@ var AjaxRequest = PIXI.AjaxRequest = function()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* DEBUGGING ONLY
|
||||
*/
|
||||
PIXI.runList = function(item)
|
||||
{
|
||||
console.log(">>>>>>>>>")
|
||||
console.log("_")
|
||||
var safe = 0;
|
||||
var tmp = item.first;
|
||||
console.log(tmp);
|
||||
|
||||
while(tmp._iNext)
|
||||
{
|
||||
safe++;
|
||||
// console.log(tmp.childIndex + tmp);
|
||||
tmp = tmp._iNext;
|
||||
console.log(tmp);//.childIndex);
|
||||
// console.log(tmp);
|
||||
|
||||
if(safe > 100)
|
||||
{
|
||||
console.log("BREAK")
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="./classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="./classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="./classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="./classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="./classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="./classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="./classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="./classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="./classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="./classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="./classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 1.0.0</em>
|
||||
<em>API Docs for: 1.3.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
|
@ -49,14 +49,22 @@
|
|||
|
||||
<li><a href="../classes/BitmapText.html">BitmapText</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasGraphics.html">CanvasGraphics</a></li>
|
||||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
|
@ -142,7 +150,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_Stage.js.html#l5"><code>src/pixi/Stage.js:5</code></a>
|
||||
Defined in: <a href="../files/src_pixi_InteractionManager.js.html#l493"><code>src/pixi/InteractionManager.js:493</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -188,12 +196,24 @@
|
|||
</a>
|
||||
</li>
|
||||
|
||||
<li class="module-class">
|
||||
<a href="../classes/CanvasGraphics.html">
|
||||
CanvasGraphics
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="module-class">
|
||||
<a href="../classes/CanvasRenderer.html">
|
||||
CanvasRenderer
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="module-class">
|
||||
<a href="../classes/Circle.html">
|
||||
Circle
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="module-class">
|
||||
<a href="../classes/CustomRenderable.html">
|
||||
CustomRenderable
|
||||
|
|
@ -212,6 +232,18 @@
|
|||
</a>
|
||||
</li>
|
||||
|
||||
<li class="module-class">
|
||||
<a href="../classes/Ellipse.html">
|
||||
Ellipse
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="module-class">
|
||||
<a href="../classes/Graphics.html">
|
||||
Graphics
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="module-class">
|
||||
<a href="../classes/ImageLoader.html">
|
||||
ImageLoader
|
||||
|
|
|
|||
|
|
@ -38,7 +38,29 @@
|
|||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(wf, s);
|
||||
})();
|
||||
|
||||
|
||||
function runList(item)
|
||||
{
|
||||
console.log(">>>>>>>>>")
|
||||
console.log("_")
|
||||
var safe = 0;
|
||||
var tmp = item;
|
||||
while(tmp._iNext)
|
||||
{
|
||||
safe++;
|
||||
// console.log(tmp.childIndex + tmp);
|
||||
tmp = tmp._iNext;
|
||||
console.log(tmp);//.childIndex);
|
||||
// console.log(tmp);
|
||||
|
||||
if(safe > 100)
|
||||
{
|
||||
console.log("BREAK")
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function init()
|
||||
{
|
||||
var assetsToLoader = ["desyrel.fnt"];
|
||||
|
|
@ -50,18 +72,24 @@
|
|||
loader.onComplete = onAssetsLoaded;
|
||||
|
||||
//begin load
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0x66FF99);
|
||||
|
||||
loader.load();
|
||||
function onAssetsLoaded()
|
||||
{
|
||||
var bitmapFontText = new PIXI.BitmapText("bitmap fonts are\n now supported!", {font: "35px Desyrel", align: "right"});
|
||||
bitmapFontText.position.x = 620 - bitmapFontText.width - 20;
|
||||
bitmapFontText.position.y = 20;
|
||||
|
||||
runList(bitmapFontText)
|
||||
stage.addChild(bitmapFontText);
|
||||
|
||||
|
||||
stage.addChild(bitmapFontText);
|
||||
}
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0x66FF99);
|
||||
|
||||
|
||||
// add a shiney background..
|
||||
var background = PIXI.Sprite.fromImage("textDemoBG.jpg");
|
||||
|
|
@ -73,7 +101,7 @@
|
|||
document.body.appendChild(renderer.view);
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
|
||||
// create some white text using the Snippet webfont
|
||||
var textSample = new PIXI.Text("Pixi.js can has\nmultiline text!", {font: "35px Snippet", fill: "white", align: "left"});
|
||||
textSample.position.x = 20;
|
||||
|
|
@ -95,6 +123,7 @@
|
|||
stage.addChild(textSample);
|
||||
stage.addChild(spinningText);
|
||||
stage.addChild(countingText);
|
||||
|
||||
var count = 0;
|
||||
var score = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
<body>
|
||||
<script>
|
||||
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0x000000);
|
||||
|
||||
|
|
@ -76,6 +75,7 @@
|
|||
item.anchor.y = 0.5;
|
||||
|
||||
stuffContainer.addChild(item);
|
||||
console.log("_")
|
||||
items.push(item);
|
||||
};
|
||||
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
|
||||
// render the stage to the texture
|
||||
// the true clears the texture before content is rendered
|
||||
renderTexture2.render(stage, true);
|
||||
renderTexture2.render(stage, new PIXI.Point(0,0), true);
|
||||
|
||||
// and finally render the stage
|
||||
renderer.render(stage);
|
||||
|
|
|
|||
332
examples/example 12 - Spine/data/goblins.json
Normal file
|
|
@ -0,0 +1,332 @@
|
|||
{"frames": {
|
||||
|
||||
"dagger.png":
|
||||
{
|
||||
"frame": {"x":2,"y":372,"w":26,"h":108},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":26,"h":108},
|
||||
"sourceSize": {"w":26,"h":108}
|
||||
},
|
||||
"goblin/eyes-closed.png":
|
||||
{
|
||||
"frame": {"x":64,"y":354,"w":34,"h":12},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":34,"h":12},
|
||||
"sourceSize": {"w":34,"h":12}
|
||||
},
|
||||
"goblin/head.png":
|
||||
{
|
||||
"frame": {"x":59,"y":83,"w":103,"h":64},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":0,"y":2,"w":103,"h":64},
|
||||
"sourceSize": {"w":103,"h":66}
|
||||
},
|
||||
"goblin/left-arm.png":
|
||||
{
|
||||
"frame": {"x":30,"y":445,"w":37,"h":35},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":37,"h":35},
|
||||
"sourceSize": {"w":37,"h":35}
|
||||
},
|
||||
"goblin/left-foot.png":
|
||||
{
|
||||
"frame": {"x":59,"y":182,"w":65,"h":31},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":65,"h":31},
|
||||
"sourceSize": {"w":65,"h":31}
|
||||
},
|
||||
"goblin/left-hand.png":
|
||||
{
|
||||
"frame": {"x":107,"y":436,"w":36,"h":41},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":36,"h":41},
|
||||
"sourceSize": {"w":36,"h":41}
|
||||
},
|
||||
"goblin/left-lower-leg.png":
|
||||
{
|
||||
"frame": {"x":26,"y":74,"w":31,"h":70},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":1,"y":0,"w":31,"h":70},
|
||||
"sourceSize": {"w":33,"h":70}
|
||||
},
|
||||
"goblin/left-shoulder.png":
|
||||
{
|
||||
"frame": {"x":26,"y":146,"w":29,"h":44},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":29,"h":44},
|
||||
"sourceSize": {"w":29,"h":44}
|
||||
},
|
||||
"goblin/left-upper-leg.png":
|
||||
{
|
||||
"frame": {"x":30,"y":370,"w":33,"h":73},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":33,"h":73},
|
||||
"sourceSize": {"w":33,"h":73}
|
||||
},
|
||||
"goblin/neck.png":
|
||||
{
|
||||
"frame": {"x":146,"y":309,"w":36,"h":41},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":36,"h":41},
|
||||
"sourceSize": {"w":36,"h":41}
|
||||
},
|
||||
"goblin/pelvis.png":
|
||||
{
|
||||
"frame": {"x":163,"y":233,"w":62,"h":43},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":62,"h":43},
|
||||
"sourceSize": {"w":62,"h":43}
|
||||
},
|
||||
"goblin/right-arm.png":
|
||||
{
|
||||
"frame": {"x":30,"y":240,"w":23,"h":50},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":23,"h":50},
|
||||
"sourceSize": {"w":23,"h":50}
|
||||
},
|
||||
"goblin/right-foot.png":
|
||||
{
|
||||
"frame": {"x":164,"y":198,"w":63,"h":33},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":63,"h":33},
|
||||
"sourceSize": {"w":63,"h":33}
|
||||
},
|
||||
"goblin/right-hand.png":
|
||||
{
|
||||
"frame": {"x":154,"y":462,"w":36,"h":37},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":36,"h":37},
|
||||
"sourceSize": {"w":36,"h":37}
|
||||
},
|
||||
"goblin/right-lower-leg.png":
|
||||
{
|
||||
"frame": {"x":26,"y":292,"w":36,"h":76},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":36,"h":76},
|
||||
"sourceSize": {"w":36,"h":76}
|
||||
},
|
||||
"goblin/right-shoulder.png":
|
||||
{
|
||||
"frame": {"x":105,"y":309,"w":39,"h":43},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":0,"y":2,"w":39,"h":43},
|
||||
"sourceSize": {"w":39,"h":45}
|
||||
},
|
||||
"goblin/right-upper-leg.png":
|
||||
{
|
||||
"frame": {"x":136,"y":354,"w":34,"h":63},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":34,"h":63},
|
||||
"sourceSize": {"w":34,"h":63}
|
||||
},
|
||||
"goblin/torso.png":
|
||||
{
|
||||
"frame": {"x":164,"y":2,"w":68,"h":96},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":68,"h":96},
|
||||
"sourceSize": {"w":68,"h":96}
|
||||
},
|
||||
"goblin/undie-straps.png":
|
||||
{
|
||||
"frame": {"x":59,"y":482,"w":55,"h":19},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":55,"h":19},
|
||||
"sourceSize": {"w":55,"h":19}
|
||||
},
|
||||
"goblin/undies.png":
|
||||
{
|
||||
"frame": {"x":116,"y":479,"w":36,"h":29},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":36,"h":29},
|
||||
"sourceSize": {"w":36,"h":29}
|
||||
},
|
||||
"goblingirl/eyes-closed.png":
|
||||
{
|
||||
"frame": {"x":100,"y":419,"w":37,"h":15},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":0,"y":6,"w":37,"h":15},
|
||||
"sourceSize": {"w":37,"h":21}
|
||||
},
|
||||
"goblingirl/head.png":
|
||||
{
|
||||
"frame": {"x":59,"y":2,"w":103,"h":79},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":103,"h":79},
|
||||
"sourceSize": {"w":103,"h":81}
|
||||
},
|
||||
"goblingirl/left-arm.png":
|
||||
{
|
||||
"frame": {"x":124,"y":227,"w":37,"h":35},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":37,"h":35},
|
||||
"sourceSize": {"w":37,"h":35}
|
||||
},
|
||||
"goblingirl/left-foot.png":
|
||||
{
|
||||
"frame": {"x":59,"y":149,"w":65,"h":31},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":65,"h":31},
|
||||
"sourceSize": {"w":65,"h":31}
|
||||
},
|
||||
"goblingirl/left-hand.png":
|
||||
{
|
||||
"frame": {"x":55,"y":250,"w":35,"h":40},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":35,"h":40},
|
||||
"sourceSize": {"w":35,"h":40}
|
||||
},
|
||||
"goblingirl/left-lower-leg.png":
|
||||
{
|
||||
"frame": {"x":26,"y":2,"w":31,"h":70},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":1,"y":0,"w":31,"h":70},
|
||||
"sourceSize": {"w":33,"h":70}
|
||||
},
|
||||
"goblingirl/left-shoulder.png":
|
||||
{
|
||||
"frame": {"x":26,"y":192,"w":28,"h":46},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":28,"h":46},
|
||||
"sourceSize": {"w":28,"h":46}
|
||||
},
|
||||
"goblingirl/left-upper-leg.png":
|
||||
{
|
||||
"frame": {"x":65,"y":368,"w":33,"h":70},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":33,"h":70},
|
||||
"sourceSize": {"w":33,"h":70}
|
||||
},
|
||||
"goblingirl/neck.png":
|
||||
{
|
||||
"frame": {"x":145,"y":419,"w":33,"h":41},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":33,"h":41},
|
||||
"sourceSize": {"w":35,"h":41}
|
||||
},
|
||||
"goblingirl/pelvis.png":
|
||||
{
|
||||
"frame": {"x":92,"y":264,"w":60,"h":43},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":60,"h":43},
|
||||
"sourceSize": {"w":62,"h":43}
|
||||
},
|
||||
"goblingirl/right-arm.png":
|
||||
{
|
||||
"frame": {"x":232,"y":100,"w":22,"h":50},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":3,"y":0,"w":22,"h":50},
|
||||
"sourceSize": {"w":28,"h":50}
|
||||
},
|
||||
"goblingirl/right-foot.png":
|
||||
{
|
||||
"frame": {"x":59,"y":215,"w":63,"h":33},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":63,"h":33},
|
||||
"sourceSize": {"w":63,"h":33}
|
||||
},
|
||||
"goblingirl/right-hand.png":
|
||||
{
|
||||
"frame": {"x":69,"y":440,"w":36,"h":37},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":36,"h":37},
|
||||
"sourceSize": {"w":36,"h":37}
|
||||
},
|
||||
"goblingirl/right-lower-leg.png":
|
||||
{
|
||||
"frame": {"x":126,"y":149,"w":36,"h":76},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":36,"h":76},
|
||||
"sourceSize": {"w":36,"h":76}
|
||||
},
|
||||
"goblingirl/right-shoulder.png":
|
||||
{
|
||||
"frame": {"x":64,"y":309,"w":39,"h":43},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":0,"y":2,"w":39,"h":43},
|
||||
"sourceSize": {"w":39,"h":45}
|
||||
},
|
||||
"goblingirl/right-upper-leg.png":
|
||||
{
|
||||
"frame": {"x":100,"y":354,"w":34,"h":63},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":34,"h":63},
|
||||
"sourceSize": {"w":34,"h":63}
|
||||
},
|
||||
"goblingirl/torso.png":
|
||||
{
|
||||
"frame": {"x":164,"y":100,"w":66,"h":96},
|
||||
"rotated": false,
|
||||
"trimmed": true,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":66,"h":96},
|
||||
"sourceSize": {"w":68,"h":96}
|
||||
},
|
||||
"goblingirl/undie-straps.png":
|
||||
{
|
||||
"frame": {"x":2,"y":482,"w":55,"h":19},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":55,"h":19},
|
||||
"sourceSize": {"w":55,"h":19}
|
||||
},
|
||||
"goblingirl/undies.png":
|
||||
{
|
||||
"frame": {"x":154,"y":278,"w":36,"h":29},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":36,"h":29},
|
||||
"sourceSize": {"w":36,"h":29}
|
||||
},
|
||||
"spear.png":
|
||||
{
|
||||
"frame": {"x":2,"y":2,"w":22,"h":368},
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"spriteSourceSize": {"x":0,"y":0,"w":22,"h":368},
|
||||
"sourceSize": {"w":22,"h":368}
|
||||
}},
|
||||
"meta": {
|
||||
"app": "http://www.codeandweb.com/texturepacker ",
|
||||
"version": "1.0",
|
||||
"image": "goblins.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {"w":256,"h":512},
|
||||
"scale": "1",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:f89858b99c6b15e23d39806c4170313a:1/1$"
|
||||
}
|
||||
}
|
||||
BIN
examples/example 12 - Spine/data/goblins.png
Normal file
|
After Width: | Height: | Size: 130 KiB |
502
examples/example 12 - Spine/data/goblinsSpineData.json
Normal file
|
|
@ -0,0 +1,502 @@
|
|||
{
|
||||
"bones": [
|
||||
{ "name": "root" },
|
||||
{ "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 },
|
||||
{ "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 },
|
||||
{ "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 },
|
||||
{ "name": "right upper leg", "parent": "hip", "length": 42.45, "x": -20.07, "y": -6.83, "rotation": -97.49 },
|
||||
{ "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 93.92 },
|
||||
{ "name": "left lower leg", "parent": "left upper leg", "length": 49.89, "x": 56.34, "y": 0.98, "rotation": -16.65 },
|
||||
{ "name": "left shoulder", "parent": "torso", "length": 35.43, "x": 74.04, "y": -20.38, "rotation": -156.96 },
|
||||
{ "name": "neck", "parent": "torso", "length": 18.38, "x": 81.67, "y": -6.34, "rotation": -1.51 },
|
||||
{ "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 42.99, "y": -0.61, "rotation": -14.34 },
|
||||
{ "name": "right shoulder", "parent": "torso", "length": 37.24, "x": 76.02, "y": 18.14, "rotation": 133.88 },
|
||||
{ "name": "head", "parent": "neck", "length": 68.28, "x": 20.93, "y": 11.59, "rotation": -13.92 },
|
||||
{ "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 37.85, "y": -2.34, "rotation": 28.16 },
|
||||
{ "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 58.94, "y": -7.61, "rotation": 102.43 },
|
||||
{ "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 37.6, "y": 0.31, "rotation": 36.32 },
|
||||
{ "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 },
|
||||
{ "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 },
|
||||
{ "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 }
|
||||
],
|
||||
"slots": [
|
||||
{ "name": "left shoulder", "bone": "left shoulder", "attachment": "left shoulder" },
|
||||
{ "name": "left arm", "bone": "left arm", "attachment": "left arm" },
|
||||
{ "name": "left hand item", "bone": "left hand", "attachment": "spear" },
|
||||
{ "name": "left hand", "bone": "left hand", "attachment": "left hand" },
|
||||
{ "name": "left foot", "bone": "left foot", "attachment": "left foot" },
|
||||
{ "name": "left lower leg", "bone": "left lower leg", "attachment": "left lower leg" },
|
||||
{ "name": "left upper leg", "bone": "left upper leg", "attachment": "left upper leg" },
|
||||
{ "name": "neck", "bone": "neck", "attachment": "neck" },
|
||||
{ "name": "torso", "bone": "torso", "attachment": "torso" },
|
||||
{ "name": "pelvis", "bone": "pelvis", "attachment": "pelvis" },
|
||||
{ "name": "right foot", "bone": "right foot", "attachment": "right foot" },
|
||||
{ "name": "right lower leg", "bone": "right lower leg", "attachment": "right lower leg" },
|
||||
{ "name": "undie straps", "bone": "pelvis", "attachment": "undie straps" },
|
||||
{ "name": "undies", "bone": "pelvis", "attachment": "undies" },
|
||||
{ "name": "right upper leg", "bone": "right upper leg", "attachment": "right upper leg" },
|
||||
{ "name": "head", "bone": "head", "attachment": "head" },
|
||||
{ "name": "eyes", "bone": "head" },
|
||||
{ "name": "right shoulder", "bone": "right shoulder", "attachment": "right shoulder" },
|
||||
{ "name": "right arm", "bone": "right arm", "attachment": "right arm" },
|
||||
{ "name": "right hand item", "bone": "right hand", "attachment": "dagger" },
|
||||
{ "name": "right hand", "bone": "right hand", "attachment": "right hand" }
|
||||
],
|
||||
"skins": {
|
||||
"default": {
|
||||
"left hand item": {
|
||||
"dagger": { "x": 7.88, "y": -23.45, "rotation": 10.47, "width": 26, "height": 108 },
|
||||
"spear": { "x": -4.55, "y": 39.2, "rotation": 13.04, "width": 22, "height": 368 }
|
||||
},
|
||||
"right hand item": {
|
||||
"dagger": { "x": 6.51, "y": -24.15, "rotation": -8.06, "width": 26, "height": 108 }
|
||||
}
|
||||
},
|
||||
"goblin": {
|
||||
"eyes": {
|
||||
"eyes closed": { "name": "goblin/eyes-closed", "x": 32.21, "y": -21.27, "rotation": -88.92, "width": 34, "height": 12 }
|
||||
},
|
||||
"head": {
|
||||
"head": { "name": "goblin/head", "x": 25.73, "y": 2.33, "rotation": -92.29, "width": 103, "height": 66 }
|
||||
},
|
||||
"left arm": {
|
||||
"left arm": {
|
||||
"name": "goblin/left-arm",
|
||||
"x": 16.7,
|
||||
"y": -1.69,
|
||||
"scaleX": 1.057,
|
||||
"scaleY": 1.057,
|
||||
"rotation": 33.84,
|
||||
"width": 37,
|
||||
"height": 35
|
||||
}
|
||||
},
|
||||
"left foot": {
|
||||
"left foot": { "name": "goblin/left-foot", "x": 24.85, "y": 8.74, "rotation": 3.32, "width": 65, "height": 31 }
|
||||
},
|
||||
"left hand": {
|
||||
"left hand": {
|
||||
"name": "goblin/left-hand",
|
||||
"x": 3.47,
|
||||
"y": 3.41,
|
||||
"scaleX": 0.892,
|
||||
"scaleY": 0.892,
|
||||
"rotation": 31.14,
|
||||
"width": 36,
|
||||
"height": 41
|
||||
}
|
||||
},
|
||||
"left lower leg": {
|
||||
"left lower leg": { "name": "goblin/left-lower-leg", "x": 23.58, "y": -2.06, "rotation": 105.75, "width": 33, "height": 70 }
|
||||
},
|
||||
"left shoulder": {
|
||||
"left shoulder": { "name": "goblin/left-shoulder", "x": 15.56, "y": -2.26, "rotation": 62.01, "width": 29, "height": 44 }
|
||||
},
|
||||
"left upper leg": {
|
||||
"left upper leg": { "name": "goblin/left-upper-leg", "x": 29.68, "y": -3.87, "rotation": 89.09, "width": 33, "height": 73 }
|
||||
},
|
||||
"neck": {
|
||||
"neck": { "name": "goblin/neck", "x": 10.1, "y": 0.42, "rotation": -93.69, "width": 36, "height": 41 }
|
||||
},
|
||||
"pelvis": {
|
||||
"pelvis": { "name": "goblin/pelvis", "x": -5.61, "y": 0.76, "width": 62, "height": 43 }
|
||||
},
|
||||
"right arm": {
|
||||
"right arm": { "name": "goblin/right-arm", "x": 16.44, "y": -1.04, "rotation": 94.32, "width": 23, "height": 50 }
|
||||
},
|
||||
"right foot": {
|
||||
"right foot": { "name": "goblin/right-foot", "x": 23.56, "y": 9.8, "rotation": 1.52, "width": 63, "height": 33 }
|
||||
},
|
||||
"right hand": {
|
||||
"right hand": { "name": "goblin/right-hand", "x": 7.88, "y": 2.78, "rotation": 91.96, "width": 36, "height": 37 }
|
||||
},
|
||||
"right lower leg": {
|
||||
"right lower leg": { "name": "goblin/right-lower-leg", "x": 25.68, "y": -3.15, "rotation": 111.83, "width": 36, "height": 76 }
|
||||
},
|
||||
"right shoulder": {
|
||||
"right shoulder": { "name": "goblin/right-shoulder", "x": 15.68, "y": -1.03, "rotation": 130.65, "width": 39, "height": 45 }
|
||||
},
|
||||
"right upper leg": {
|
||||
"right upper leg": { "name": "goblin/right-upper-leg", "x": 20.35, "y": 1.47, "rotation": 97.49, "width": 34, "height": 63 }
|
||||
},
|
||||
"torso": {
|
||||
"torso": { "name": "goblin/torso", "x": 38.09, "y": -3.87, "rotation": -94.95, "width": 68, "height": 96 }
|
||||
},
|
||||
"undie straps": {
|
||||
"undie straps": { "name": "goblin/undie-straps", "x": -3.87, "y": 13.1, "scaleX": 1.089, "width": 55, "height": 19 }
|
||||
},
|
||||
"undies": {
|
||||
"undies": { "name": "goblin/undies", "x": 6.3, "y": 0.12, "rotation": 0.91, "width": 36, "height": 29 }
|
||||
}
|
||||
},
|
||||
"goblingirl": {
|
||||
"eyes": {
|
||||
"eyes closed": { "name": "goblingirl/eyes-closed", "x": 28, "y": -25.54, "rotation": -87.04, "width": 37, "height": 21 }
|
||||
},
|
||||
"head": {
|
||||
"head": { "name": "goblingirl/head", "x": 27.71, "y": -4.32, "rotation": -85.58, "width": 103, "height": 81 }
|
||||
},
|
||||
"left arm": {
|
||||
"left arm": { "name": "goblingirl/left-arm", "x": 19.64, "y": -2.42, "rotation": 33.05, "width": 37, "height": 35 }
|
||||
},
|
||||
"left foot": {
|
||||
"left foot": { "name": "goblingirl/left-foot", "x": 25.17, "y": 7.92, "rotation": 3.32, "width": 65, "height": 31 }
|
||||
},
|
||||
"left hand": {
|
||||
"left hand": {
|
||||
"name": "goblingirl/left-hand",
|
||||
"x": 4.34,
|
||||
"y": 2.39,
|
||||
"scaleX": 0.896,
|
||||
"scaleY": 0.896,
|
||||
"rotation": 30.34,
|
||||
"width": 35,
|
||||
"height": 40
|
||||
}
|
||||
},
|
||||
"left lower leg": {
|
||||
"left lower leg": { "name": "goblingirl/left-lower-leg", "x": 25.02, "y": -0.6, "rotation": 105.75, "width": 33, "height": 70 }
|
||||
},
|
||||
"left shoulder": {
|
||||
"left shoulder": { "name": "goblingirl/left-shoulder", "x": 19.8, "y": -0.42, "rotation": 61.21, "width": 28, "height": 46 }
|
||||
},
|
||||
"left upper leg": {
|
||||
"left upper leg": { "name": "goblingirl/left-upper-leg", "x": 30.21, "y": -2.95, "rotation": 89.09, "width": 33, "height": 70 }
|
||||
},
|
||||
"neck": {
|
||||
"neck": { "name": "goblingirl/neck", "x": 6.16, "y": -3.14, "rotation": -98.86, "width": 35, "height": 41 }
|
||||
},
|
||||
"pelvis": {
|
||||
"pelvis": { "name": "goblingirl/pelvis", "x": -3.87, "y": 3.18, "width": 62, "height": 43 }
|
||||
},
|
||||
"right arm": {
|
||||
"right arm": { "name": "goblingirl/right-arm", "x": 16.85, "y": -0.66, "rotation": 93.52, "width": 28, "height": 50 }
|
||||
},
|
||||
"right foot": {
|
||||
"right foot": { "name": "goblingirl/right-foot", "x": 23.46, "y": 9.66, "rotation": 1.52, "width": 63, "height": 33 }
|
||||
},
|
||||
"right hand": {
|
||||
"right hand": { "name": "goblingirl/right-hand", "x": 7.21, "y": 3.43, "rotation": 91.16, "width": 36, "height": 37 }
|
||||
},
|
||||
"right hand item": {
|
||||
"right hand item": { "name": "goblingirl/dagger-tip", "x": 13.45, "y": 22.07, "rotation": -3.23, "width": 17, "height": 17 }
|
||||
},
|
||||
"right lower leg": {
|
||||
"right lower leg": { "name": "goblingirl/right-lower-leg", "x": 26.15, "y": -3.27, "rotation": 111.83, "width": 36, "height": 76 }
|
||||
},
|
||||
"right shoulder": {
|
||||
"right shoulder": { "name": "goblingirl/right-shoulder", "x": 14.46, "y": 0.45, "rotation": 129.85, "width": 39, "height": 45 }
|
||||
},
|
||||
"right upper leg": {
|
||||
"right upper leg": { "name": "goblingirl/right-upper-leg", "x": 19.69, "y": 2.13, "rotation": 97.49, "width": 34, "height": 63 }
|
||||
},
|
||||
"torso": {
|
||||
"torso": { "name": "goblingirl/torso", "x": 36.28, "y": -5.14, "rotation": -95.74, "width": 68, "height": 96 }
|
||||
},
|
||||
"undie straps": {
|
||||
"undie straps": { "name": "goblingirl/undie-straps", "x": -1.51, "y": 14.18, "width": 55, "height": 19 }
|
||||
},
|
||||
"undies": {
|
||||
"undies": { "name": "goblingirl/undies", "x": 5.4, "y": 1.7, "width": 36, "height": 29 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"animations": {
|
||||
"walk": {
|
||||
"bones": {
|
||||
"left upper leg": {
|
||||
"rotate": [
|
||||
{ "time": 0, "angle": -26.55 },
|
||||
{ "time": 0.1333, "angle": -8.78 },
|
||||
{ "time": 0.2333, "angle": 9.51 },
|
||||
{ "time": 0.3666, "angle": 30.74 },
|
||||
{ "time": 0.5, "angle": 25.33 },
|
||||
{ "time": 0.6333, "angle": 26.11 },
|
||||
{ "time": 0.7333, "angle": -7.7 },
|
||||
{ "time": 0.8666, "angle": -21.19 },
|
||||
{ "time": 1, "angle": -26.55 }
|
||||
],
|
||||
"translate": [
|
||||
{ "time": 0, "x": -1.32, "y": 1.7 },
|
||||
{ "time": 0.3666, "x": -0.06, "y": 2.42 },
|
||||
{ "time": 1, "x": -1.32, "y": 1.7 }
|
||||
]
|
||||
},
|
||||
"right upper leg": {
|
||||
"rotate": [
|
||||
{ "time": 0, "angle": 42.45 },
|
||||
{ "time": 0.1333, "angle": 52.1 },
|
||||
{ "time": 0.2333, "angle": 8.53 },
|
||||
{ "time": 0.5, "angle": -16.93 },
|
||||
{ "time": 0.6333, "angle": 1.89 },
|
||||
{
|
||||
"time": 0.7333,
|
||||
"angle": 28.06,
|
||||
"curve": [ 0.462, 0.11, 1, 1 ]
|
||||
},
|
||||
{
|
||||
"time": 0.8666,
|
||||
"angle": 58.68,
|
||||
"curve": [ 0.5, 0.02, 1, 1 ]
|
||||
},
|
||||
{ "time": 1, "angle": 42.45 }
|
||||
],
|
||||
"translate": [
|
||||
{ "time": 0, "x": 6.23, "y": 0 },
|
||||
{ "time": 0.2333, "x": 2.14, "y": 2.4 },
|
||||
{ "time": 0.5, "x": 2.44, "y": 4.8 },
|
||||
{ "time": 1, "x": 6.23, "y": 0 }
|
||||
]
|
||||
},
|
||||
"left lower leg": {
|
||||
"rotate": [
|
||||
{ "time": 0, "angle": -22.98 },
|
||||
{ "time": 0.1333, "angle": -63.5 },
|
||||
{ "time": 0.2333, "angle": -73.76 },
|
||||
{ "time": 0.5, "angle": 5.11 },
|
||||
{ "time": 0.6333, "angle": -28.29 },
|
||||
{ "time": 0.7333, "angle": 4.08 },
|
||||
{ "time": 0.8666, "angle": 3.53 },
|
||||
{ "time": 1, "angle": -22.98 }
|
||||
],
|
||||
"translate": [
|
||||
{ "time": 0, "x": 0, "y": 0 },
|
||||
{ "time": 0.2333, "x": 2.55, "y": -0.47 },
|
||||
{ "time": 0.5, "x": 0, "y": 0, "curve": "stepped" },
|
||||
{ "time": 1, "x": 0, "y": 0 }
|
||||
]
|
||||
},
|
||||
"left foot": {
|
||||
"rotate": [
|
||||
{ "time": 0, "angle": -3.69 },
|
||||
{ "time": 0.1333, "angle": -10.42 },
|
||||
{ "time": 0.2333, "angle": -5.01 },
|
||||
{ "time": 0.3666, "angle": 3.87 },
|
||||
{ "time": 0.5, "angle": -3.87 },
|
||||
{ "time": 0.6333, "angle": 2.78 },
|
||||
{ "time": 0.7333, "angle": 1.68 },
|
||||
{ "time": 0.8666, "angle": -8.54 },
|
||||
{ "time": 1, "angle": -3.69 }
|
||||
]
|
||||
},
|
||||
"right shoulder": {
|
||||
"rotate": [
|
||||
{
|
||||
"time": 0,
|
||||
"angle": 5.29,
|
||||
"curve": [ 0.264, 0, 0.75, 1 ]
|
||||
},
|
||||
{ "time": 0.6333, "angle": 6.65 },
|
||||
{ "time": 1, "angle": 5.29 }
|
||||
]
|
||||
},
|
||||
"right arm": {
|
||||
"rotate": [
|
||||
{
|
||||
"time": 0,
|
||||
"angle": -4.02,
|
||||
"curve": [ 0.267, 0, 0.804, 0.99 ]
|
||||
},
|
||||
{
|
||||
"time": 0.6333,
|
||||
"angle": 19.78,
|
||||
"curve": [ 0.307, 0, 0.787, 0.99 ]
|
||||
},
|
||||
{ "time": 1, "angle": -4.02 }
|
||||
]
|
||||
},
|
||||
"right hand": {
|
||||
"rotate": [
|
||||
{ "time": 0, "angle": 8.98 },
|
||||
{ "time": 0.6333, "angle": 0.51 },
|
||||
{ "time": 1, "angle": 8.98 }
|
||||
]
|
||||
},
|
||||
"left shoulder": {
|
||||
"rotate": [
|
||||
{
|
||||
"time": 0,
|
||||
"angle": 6.25,
|
||||
"curve": [ 0.339, 0, 0.683, 1 ]
|
||||
},
|
||||
{
|
||||
"time": 0.5,
|
||||
"angle": -11.78,
|
||||
"curve": [ 0.281, 0, 0.686, 0.99 ]
|
||||
},
|
||||
{ "time": 1, "angle": 6.25 }
|
||||
],
|
||||
"translate": [
|
||||
{ "time": 0, "x": 1.15, "y": 0.23 }
|
||||
]
|
||||
},
|
||||
"left hand": {
|
||||
"rotate": [
|
||||
{
|
||||
"time": 0,
|
||||
"angle": -21.23,
|
||||
"curve": [ 0.295, 0, 0.755, 0.98 ]
|
||||
},
|
||||
{
|
||||
"time": 0.5,
|
||||
"angle": -27.28,
|
||||
"curve": [ 0.241, 0, 0.75, 0.97 ]
|
||||
},
|
||||
{ "time": 1, "angle": -21.23 }
|
||||
]
|
||||
},
|
||||
"left arm": {
|
||||
"rotate": [
|
||||
{
|
||||
"time": 0,
|
||||
"angle": 28.37,
|
||||
"curve": [ 0.339, 0, 0.683, 1 ]
|
||||
},
|
||||
{
|
||||
"time": 0.5,
|
||||
"angle": 60.09,
|
||||
"curve": [ 0.281, 0, 0.686, 0.99 ]
|
||||
},
|
||||
{ "time": 1, "angle": 28.37 }
|
||||
]
|
||||
},
|
||||
"torso": {
|
||||
"rotate": [
|
||||
{ "time": 0, "angle": -10.28 },
|
||||
{
|
||||
"time": 0.1333,
|
||||
"angle": -15.38,
|
||||
"curve": [ 0.545, 0, 0.818, 1 ]
|
||||
},
|
||||
{
|
||||
"time": 0.3666,
|
||||
"angle": -9.78,
|
||||
"curve": [ 0.58, 0.17, 0.669, 0.99 ]
|
||||
},
|
||||
{
|
||||
"time": 0.6333,
|
||||
"angle": -15.75,
|
||||
"curve": [ 0.235, 0.01, 0.795, 1 ]
|
||||
},
|
||||
{
|
||||
"time": 0.8666,
|
||||
"angle": -7.06,
|
||||
"curve": [ 0.209, 0, 0.816, 0.98 ]
|
||||
},
|
||||
{ "time": 1, "angle": -10.28 }
|
||||
],
|
||||
"translate": [
|
||||
{ "time": 0, "x": -1.29, "y": 1.68 }
|
||||
]
|
||||
},
|
||||
"right foot": {
|
||||
"rotate": [
|
||||
{ "time": 0, "angle": -5.25 },
|
||||
{ "time": 0.2333, "angle": -1.91 },
|
||||
{ "time": 0.3666, "angle": -6.45 },
|
||||
{ "time": 0.5, "angle": -5.39 },
|
||||
{ "time": 0.7333, "angle": -11.68 },
|
||||
{ "time": 0.8666, "angle": 0.46 },
|
||||
{ "time": 1, "angle": -5.25 }
|
||||
]
|
||||
},
|
||||
"right lower leg": {
|
||||
"rotate": [
|
||||
{
|
||||
"time": 0,
|
||||
"angle": -3.39,
|
||||
"curve": [ 0.316, 0.01, 0.741, 0.98 ]
|
||||
},
|
||||
{
|
||||
"time": 0.1333,
|
||||
"angle": -45.53,
|
||||
"curve": [ 0.229, 0, 0.738, 0.97 ]
|
||||
},
|
||||
{ "time": 0.2333, "angle": -4.83 },
|
||||
{ "time": 0.5, "angle": -19.53 },
|
||||
{ "time": 0.6333, "angle": -64.8 },
|
||||
{
|
||||
"time": 0.7333,
|
||||
"angle": -82.56,
|
||||
"curve": [ 0.557, 0.18, 1, 1 ]
|
||||
},
|
||||
{ "time": 1, "angle": -3.39 }
|
||||
],
|
||||
"translate": [
|
||||
{ "time": 0, "x": 0, "y": 0, "curve": "stepped" },
|
||||
{ "time": 0.5, "x": 0, "y": 0 },
|
||||
{ "time": 0.6333, "x": 2.18, "y": 0.21 },
|
||||
{ "time": 1, "x": 0, "y": 0 }
|
||||
]
|
||||
},
|
||||
"hip": {
|
||||
"rotate": [
|
||||
{ "time": 0, "angle": 0, "curve": "stepped" },
|
||||
{ "time": 1, "angle": 0 }
|
||||
],
|
||||
"translate": [
|
||||
{ "time": 0, "x": 0, "y": -4.16 },
|
||||
{
|
||||
"time": 0.1333,
|
||||
"x": 0,
|
||||
"y": -7.05,
|
||||
"curve": [ 0.359, 0.47, 0.646, 0.74 ]
|
||||
},
|
||||
{ "time": 0.3666, "x": 0, "y": 6.78 },
|
||||
{ "time": 0.5, "x": 0, "y": -6.13 },
|
||||
{
|
||||
"time": 0.6333,
|
||||
"x": 0,
|
||||
"y": -7.05,
|
||||
"curve": [ 0.359, 0.47, 0.646, 0.74 ]
|
||||
},
|
||||
{ "time": 0.8666, "x": 0, "y": 6.78 },
|
||||
{ "time": 1, "x": 0, "y": -4.16 }
|
||||
]
|
||||
},
|
||||
"neck": {
|
||||
"rotate": [
|
||||
{ "time": 0, "angle": 3.6 },
|
||||
{ "time": 0.1333, "angle": 17.49 },
|
||||
{ "time": 0.2333, "angle": 6.1 },
|
||||
{ "time": 0.3666, "angle": 3.45 },
|
||||
{ "time": 0.5, "angle": 5.17 },
|
||||
{ "time": 0.6333, "angle": 18.36 },
|
||||
{ "time": 0.7333, "angle": 6.09 },
|
||||
{ "time": 0.8666, "angle": 2.28 },
|
||||
{ "time": 1, "angle": 3.6 }
|
||||
]
|
||||
},
|
||||
"head": {
|
||||
"rotate": [
|
||||
{
|
||||
"time": 0,
|
||||
"angle": 3.6,
|
||||
"curve": [ 0, 0, 0.704, 1.17 ]
|
||||
},
|
||||
{ "time": 0.1333, "angle": -0.2 },
|
||||
{ "time": 0.2333, "angle": 6.1 },
|
||||
{ "time": 0.3666, "angle": 3.45 },
|
||||
{
|
||||
"time": 0.5,
|
||||
"angle": 5.17,
|
||||
"curve": [ 0, 0, 0.704, 1.61 ]
|
||||
},
|
||||
{ "time": 0.6666, "angle": 1.1 },
|
||||
{ "time": 0.7333, "angle": 6.09 },
|
||||
{ "time": 0.8666, "angle": 2.28 },
|
||||
{ "time": 1, "angle": 3.6 }
|
||||
]
|
||||
}
|
||||
},
|
||||
"slots": {
|
||||
"eyes": {
|
||||
"attachment": [
|
||||
{ "time": 0.7, "name": "eyes closed" },
|
||||
{ "time": 0.8, "name": null }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
|
||||
<script src="pixi.js"></script>
|
||||
<script src="../../src/pixi/loaders/SpineLoader.js"></script>
|
||||
<script src="../../src/pixi/extras/Spine.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
|
|
|||
104
examples/example 12 - Spine/index_goblins.html
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>pixi.js example 12 Spine</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #000000;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script src="pixi.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
|
||||
// create an array of assets to load
|
||||
|
||||
var assetsToLoader = ["data/goblins.json", "data/goblinsSpineData.json"];
|
||||
|
||||
// create a new loader
|
||||
loader = new PIXI.AssetLoader(assetsToLoader);
|
||||
|
||||
// use callback
|
||||
loader.onComplete = onAssetsLoaded;
|
||||
|
||||
//begin load
|
||||
loader.load();
|
||||
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0xFFFFFF, true);
|
||||
|
||||
// create a renderer instance
|
||||
var renderer = new PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight);
|
||||
|
||||
// set the canvas width and height to fill the screen
|
||||
renderer.view.style.display = "block";
|
||||
|
||||
// add render view to DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
function onAssetsLoaded()
|
||||
{
|
||||
var goblin = new PIXI.Spine("data/goblinsSpineData.json");
|
||||
|
||||
// set current skin
|
||||
goblin.skeleton.setSkinByName('goblin');
|
||||
goblin.skeleton.setSlotsToSetupPose();
|
||||
|
||||
// set the position
|
||||
goblin.position.x = window.innerWidth/2;
|
||||
goblin.position.y = window.innerHeight;
|
||||
|
||||
goblin.scale.x = goblin.scale.y = window.innerHeight / 400;
|
||||
|
||||
// play animation
|
||||
goblin.state.setAnimationByName("walk", true);
|
||||
|
||||
|
||||
stage.addChild(goblin);
|
||||
|
||||
stage.click = function()
|
||||
{
|
||||
// change current skin
|
||||
var currentSkinName = goblin.skeleton.skin.name;
|
||||
var newSkinName = (currentSkinName == 'goblin' ? 'goblingirl' : 'goblin');
|
||||
goblin.skeleton.setSkinByName(newSkinName);
|
||||
goblin.skeleton.setSlotsToSetupPose();
|
||||
};
|
||||
|
||||
var logo = PIXI.Sprite.fromImage("../../logo_small.png");
|
||||
stage.addChild(logo);
|
||||
|
||||
|
||||
logo.anchor.x = 1;
|
||||
logo.position.x = window.innerWidth
|
||||
logo.scale.x = logo.scale.y = 0.5;
|
||||
logo.position.y = window.innerHeight - 70;
|
||||
logo.setInteractive(true);
|
||||
logo.buttonMode = true;
|
||||
logo.click = logo.tap = function()
|
||||
{
|
||||
window.open("https://github.com/GoodBoyDigital/pixi.js", "_blank")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
function animate() {
|
||||
|
||||
requestAnimFrame( animate );
|
||||
renderer.render(stage);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
126
examples/example 13 - Graphics/index.html
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>pixi.js example 13 - Graphics</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #000000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="pixi.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0xFFFFFF, true);
|
||||
|
||||
stage.setInteractive(true);
|
||||
|
||||
var sprite= PIXI.Sprite.fromImage("spinObj_02.png");
|
||||
//stage.addChild(sprite);
|
||||
// create a renderer instance
|
||||
// the 5the parameter is the anti aliasing
|
||||
var renderer = PIXI.autoDetectRenderer(620, 380, null, false, true);
|
||||
|
||||
// set the canvas width and height to fill the screen
|
||||
//renderer.view.style.width = window.innerWidth + "px";
|
||||
//renderer.view.style.height = window.innerHeight + "px";
|
||||
renderer.view.style.display = "block";
|
||||
|
||||
// add render view to DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
var graphics = new PIXI.Graphics();
|
||||
|
||||
|
||||
// set a fill and line style
|
||||
graphics.beginFill(0xFF3300);
|
||||
graphics.lineStyle(10, 0xffd900, 1);
|
||||
|
||||
// draw a shape
|
||||
graphics.moveTo(50,50);
|
||||
graphics.lineTo(250, 50);
|
||||
graphics.lineTo(100, 100);
|
||||
graphics.lineTo(250, 220);
|
||||
graphics.lineTo(50, 220);
|
||||
graphics.lineTo(50, 50);
|
||||
graphics.endFill();
|
||||
|
||||
// set a fill and line style again
|
||||
graphics.lineStyle(10, 0xFF0000, 0.8);
|
||||
graphics.beginFill(0xFF700B, 1);
|
||||
|
||||
// draw a second shape
|
||||
graphics.moveTo(210,300);
|
||||
graphics.lineTo(450,320);
|
||||
graphics.lineTo(570,350);
|
||||
graphics.lineTo(580,20);
|
||||
graphics.lineTo(330,120);
|
||||
graphics.lineTo(410,200);
|
||||
graphics.lineTo(210,300);
|
||||
graphics.endFill();
|
||||
|
||||
// draw a rectangel
|
||||
graphics.lineStyle(2, 0x0000FF, 1);
|
||||
graphics.drawRect(50, 250, 100, 100);
|
||||
|
||||
// draw a circle
|
||||
graphics.lineStyle(0);
|
||||
graphics.beginFill(0xFFFF0B, 0.5);
|
||||
graphics.drawCircle(470, 200,100);
|
||||
|
||||
graphics.lineStyle(20, 0x33FF00);
|
||||
graphics.moveTo(30,30);
|
||||
graphics.lineTo(600, 300);
|
||||
|
||||
|
||||
stage.addChild(graphics);
|
||||
|
||||
// lets create moving shape
|
||||
var thing = new PIXI.Graphics();
|
||||
stage.addChild(thing);
|
||||
thing.position.x = 620/2;
|
||||
thing.position.y = 380/2;
|
||||
|
||||
var count = 0;
|
||||
|
||||
stage.click = stage.tap = function()
|
||||
{
|
||||
graphics.lineStyle(Math.random() * 30, Math.random() * 0xFFFFFF, 1);
|
||||
graphics.moveTo(Math.random() * 620,Math.random() * 380);
|
||||
graphics.lineTo(Math.random() * 620,Math.random() * 380);
|
||||
}
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
function animate() {
|
||||
|
||||
thing.clear();
|
||||
|
||||
count += 0.1;
|
||||
|
||||
thing.clear();
|
||||
thing.lineStyle(30, 0xff0000, 1);
|
||||
thing.beginFill(0xffFF00, 0.5);
|
||||
|
||||
thing.moveTo(-120 + Math.sin(count) * 20, -100 + Math.cos(count)* 20);
|
||||
thing.lineTo(120 + Math.cos(count) * 20, -100 + Math.sin(count)* 20);
|
||||
thing.lineTo(120 + Math.sin(count) * 20, 100 + Math.cos(count)* 20);
|
||||
thing.lineTo(-120 + Math.cos(count)* 20, 100 + Math.sin(count)* 20);
|
||||
thing.lineTo(-120 + Math.sin(count) * 20, -100 + Math.cos(count)* 20);
|
||||
|
||||
thing.rotation = count * 0.1;
|
||||
renderer.render(stage);
|
||||
requestAnimFrame( animate );
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
10349
examples/example 13 - Graphics/pixi.js
Normal file
BIN
examples/example 13 - Graphics/spinObj_01.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
examples/example 13 - Graphics/spinObj_02.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
examples/example 13 - Graphics/spinObj_03.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
examples/example 13 - Graphics/spinObj_04.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
examples/example 13 - Graphics/spinObj_05.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
examples/example 13 - Graphics/spinObj_06.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
examples/example 13 - Graphics/spinObj_07.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
examples/example 13 - Graphics/spinObj_08.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
examples/example 14 - Masking/BGrotate.jpg
Normal file
|
After Width: | Height: | Size: 136 KiB |
160
examples/example 14 - Masking/Copy of index.html
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>pixi.js example 14 - Masking</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #000000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="pixi.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
// create an new instance of a pixi stage
|
||||
var stage = new PIXI.Stage(0xFFFFFF, true);
|
||||
|
||||
stage.interactive = true;
|
||||
|
||||
var bg = PIXI.Sprite.fromImage("BGrotate.jpg");
|
||||
bg.anchor.x = 0.5;
|
||||
bg.anchor.y = 0.5;
|
||||
|
||||
bg.position.x = 620/2;
|
||||
bg.position.y = 380/2;
|
||||
|
||||
stage.addChild(bg);
|
||||
|
||||
var container = new PIXI.DisplayObjectContainer();
|
||||
container.position.x = 620/2;
|
||||
container.position.y = 380/2;
|
||||
|
||||
var bgFront = PIXI.Sprite.fromImage("SceneRotate.jpg");
|
||||
bgFront.anchor.x = 0.5;
|
||||
bgFront.anchor.y = 0.5;
|
||||
|
||||
container.addChild(bgFront);
|
||||
|
||||
var light2 = PIXI.Sprite.fromImage("LightRotate2.png");
|
||||
light2.anchor.x = 0.5;
|
||||
light2.anchor.y = 0.5;
|
||||
container.addChild(light2);
|
||||
|
||||
var light1 = PIXI.Sprite.fromImage("LightRotate1.png");
|
||||
light1.anchor.x = 0.5;
|
||||
light1.anchor.y = 0.5;
|
||||
container.addChild(light1);
|
||||
|
||||
var panda = PIXI.Sprite.fromImage("panda.png");
|
||||
panda.anchor.x = 0.5;
|
||||
panda.anchor.y = 0.5;
|
||||
|
||||
container.addChild(panda);
|
||||
|
||||
stage.addChild(container);
|
||||
|
||||
|
||||
// create a renderer instance
|
||||
var renderer = PIXI.autoDetectRenderer(620, 380);
|
||||
|
||||
// set the canvas width and height to fill the screen
|
||||
// renderer.view.style.width = window.innerWidth + "px";
|
||||
//renderer.view.style.height = window.innerHeight + "px";
|
||||
renderer.view.style.position = "absolute"
|
||||
renderer.view.style.marginLeft = "-310px";
|
||||
renderer.view.style.marginTop = "-190px";
|
||||
renderer.view.style.top = "50%";
|
||||
renderer.view.style.left = "50%";
|
||||
renderer.view.style.display = "block";
|
||||
// add render view to DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
|
||||
|
||||
// lets create moving shape
|
||||
var thing = new PIXI.Graphics();
|
||||
stage.addChild(thing);
|
||||
thing.position.x = 620/2;
|
||||
thing.position.y = 380/2;
|
||||
thing.lineStyle(0);
|
||||
|
||||
container.addFilter(thing);
|
||||
|
||||
var count = 0;
|
||||
|
||||
stage.click = stage.tap = function()
|
||||
{
|
||||
if(!container.filter)
|
||||
{
|
||||
container.addFilter(thing);
|
||||
|
||||
PIXI.runList(stage);
|
||||
}
|
||||
else
|
||||
{
|
||||
container.removeFilter(thing);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a pixi Logo!
|
||||
*/
|
||||
var logo = PIXI.Sprite.fromImage("../../logo_small.png")
|
||||
stage.addChild(logo);
|
||||
|
||||
logo.anchor.x = 1;
|
||||
logo.position.x = 620
|
||||
logo.scale.x = logo.scale.y = 0.5;
|
||||
logo.position.y = 320
|
||||
logo.interactive = true;
|
||||
logo.buttonMode = true;
|
||||
|
||||
logo.click = logo.tap = function()
|
||||
{
|
||||
window.open("https://github.com/GoodBoyDigital/pixi.js", "_blank")
|
||||
}
|
||||
|
||||
var help = new PIXI.Text("Click to turn masking on / off.", {font:"bold 12pt Arial", fill:"white"});
|
||||
help.position.y = 350;
|
||||
help.position.x = 10;
|
||||
stage.addChild(help);
|
||||
|
||||
requestAnimFrame(animate);
|
||||
|
||||
function animate() {
|
||||
|
||||
// thing.clear();
|
||||
bg.rotation += 0.01;
|
||||
bgFront.rotation -= 0.01;
|
||||
|
||||
|
||||
light1.rotation += 0.02;
|
||||
light2.rotation += 0.01;
|
||||
|
||||
panda.scale.x = 1 + Math.sin(count) * 0.04;
|
||||
panda.scale.y = 1 + Math.cos(count) * 0.04;
|
||||
|
||||
count += 0.1;
|
||||
|
||||
thing.clear();
|
||||
thing.lineStyle(5, 0x16f1ff, 1);
|
||||
thing.beginFill(0x8bc5ff, 0.4);
|
||||
thing.moveTo(-120 + Math.sin(count) * 20, -100 + Math.cos(count)* 20);
|
||||
thing.lineTo(120 + Math.cos(count) * 20, -100 + Math.sin(count)* 20);
|
||||
thing.lineTo(120 + Math.sin(count) * 20, 100 + Math.cos(count)* 20);
|
||||
thing.lineTo(-120 + Math.cos(count)* 20, 100 + Math.sin(count)* 20);
|
||||
thing.lineTo(-120 + Math.sin(count) * 20, -100 + Math.cos(count)* 20);
|
||||
thing.rotation = count * 0.1;
|
||||
|
||||
renderer.render(stage);
|
||||
requestAnimFrame( animate );
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
examples/example 14 - Masking/LightRotate1.png
Normal file
|
After Width: | Height: | Size: 209 KiB |
BIN
examples/example 14 - Masking/LightRotate2.png
Normal file
|
After Width: | Height: | Size: 169 KiB |