Documentation updated
pixi build republished
This commit is contained in:
parent
11e047fe7b
commit
a1faefe5c7
28 changed files with 7889 additions and 2608 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -122,7 +122,7 @@
|
|||
|
||||
|
||||
<div class="foundat">
|
||||
Defined in: <a href="../files/src_pixi_InteractionManager.js.html#l330"><code>src/pixi/InteractionManager.js:330</code></a>
|
||||
Defined in: <a href="../files/src_pixi_InteractionManager.js.html#l483"><code>src/pixi/InteractionManager.js:483</code></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -176,7 +176,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l330"><code>src/pixi/InteractionManager.js:330</code></a>
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l483"><code>src/pixi/InteractionManager.js:483</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -205,6 +205,8 @@
|
|||
<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>
|
||||
|
||||
|
@ -217,6 +219,21 @@
|
|||
<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_getLocalPosition">getLocalPosition</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
|
@ -229,13 +246,6 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
<a href="#property_local">local</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property">
|
||||
|
@ -255,6 +265,116 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_getLocalPosition" class="method item">
|
||||
<h3 class="name"><code>getLocalPosition</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>displayObject</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<span class="returns-inline">
|
||||
<span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l507"><code>src/pixi/InteractionManager.js:507</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This will return the local coords of the specified displayObject for this InteractionData</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">displayObject</code>
|
||||
<span class="type"><a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
<p>The DisplayObject that you would like the local coords off</p>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="returns">
|
||||
<h4>Returns:</h4>
|
||||
|
||||
<div class="returns-description">
|
||||
|
||||
|
||||
<span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>:
|
||||
|
||||
A point containing the coords of the InteractionData position relative to the DisplayObject
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
|
@ -284,7 +404,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l336"><code>src/pixi/InteractionManager.js:336</code></a>
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l489"><code>src/pixi/InteractionManager.js:489</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -302,50 +422,6 @@
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_local" class="property item">
|
||||
<h3 class="name"><code>local</code></h3>
|
||||
<span class="type"><a href="../classes/Point.html" class="crosslink">Point</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l343"><code>src/pixi/InteractionManager.js:343</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This point stores the local coords of where the touch/mouse event happened</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -372,7 +448,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l350"><code>src/pixi/InteractionManager.js:350</code></a>
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l499"><code>src/pixi/InteractionManager.js:499</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
@ -239,8 +239,6 @@ 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>
|
||||
|
||||
|
@ -253,28 +251,6 @@ 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_disableMouseOver">disableMouseOver</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<a href="#method_enableMouseOver">enableMouseOver</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="index-section properties">
|
||||
|
@ -313,122 +289,6 @@ This manager also supports multitouch.</p>
|
|||
</div>
|
||||
|
||||
|
||||
<div id="methods" class="api-class-tabpanel">
|
||||
<h2 class="off-left">Methods</h2>
|
||||
|
||||
|
||||
<div id="method_disableMouseOver" class="method item">
|
||||
<h3 class="name"><code>disableMouseOver</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l53"><code>src/pixi/InteractionManager.js:53</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This method will disable rollover/rollout for ALL interactive items
|
||||
You may wish to use this an optimization if your app does not require rollover/rollout funcitonality</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_enableMouseOver" class="method item">
|
||||
<h3 class="name"><code>enableMouseOver</code></h3>
|
||||
|
||||
|
||||
<span class="paren">()</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_InteractionManager.js.html#l66"><code>src/pixi/InteractionManager.js:66</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This method will enable rollover/rollout for ALL interactive items
|
||||
It is enabled by default</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="properties" class="api-class-tabpanel">
|
||||
|
|
|
@ -322,6 +322,13 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_mouseupoutside">mouseupoutside</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
|
@ -371,6 +378,13 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_touchendoutside">touchendoutside</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method inherited">
|
||||
|
@ -437,6 +451,13 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_hitArea">hitArea</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
|
@ -747,11 +768,11 @@
|
|||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/Sprite.html#method_click">Sprite</a>:
|
||||
<a href="../classes/DisplayObject.html#method_click">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l86"><code>src/pixi/Sprite.js:86</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l91"><code>src/pixi/DisplayObject.js:91</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -762,7 +783,7 @@
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the users clicks on the sprite with thier mouse</p>
|
||||
<p>A callback that is used when the users clicks on the displayObject with their mouse</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1005,11 +1026,11 @@
|
|||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/Sprite.html#method_mousedown">Sprite</a>:
|
||||
<a href="../classes/DisplayObject.html#method_mousedown">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l92"><code>src/pixi/Sprite.js:92</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l97"><code>src/pixi/DisplayObject.js:97</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1089,11 +1110,11 @@
|
|||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/Sprite.html#method_mouseout">Sprite</a>:
|
||||
<a href="../classes/DisplayObject.html#method_mouseout">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l111"><code>src/pixi/Sprite.js:111</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l123"><code>src/pixi/DisplayObject.js:123</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1104,7 +1125,7 @@
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the users mouse leaves the sprite</p>
|
||||
<p>A callback that is used when the users mouse leaves the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1173,11 +1194,11 @@
|
|||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/Sprite.html#method_mouseover">Sprite</a>:
|
||||
<a href="../classes/DisplayObject.html#method_mouseover">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l105"><code>src/pixi/Sprite.js:105</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l117"><code>src/pixi/DisplayObject.js:117</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1188,7 +1209,7 @@
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the users mouse rolls over the sprite</p>
|
||||
<p>A callback that is used when the users mouse rolls over the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1257,11 +1278,11 @@
|
|||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/Sprite.html#method_mouseup">Sprite</a>:
|
||||
<a href="../classes/DisplayObject.html#method_mouseup">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l98"><code>src/pixi/Sprite.js:98</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l103"><code>src/pixi/DisplayObject.js:103</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1272,8 +1293,93 @@
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the user releases the mouse that was over the sprite
|
||||
for this callback to be fired the mouse must have been pressed down over the sprite</p>
|
||||
<p>A callback that is used when the user releases the mouse that was over the displayObject
|
||||
for this callback to be fired the mouse must have been pressed down over the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">interactionData</code>
|
||||
<span class="type"><a href="../classes/InteractionData.html" class="crosslink">InteractionData</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_mouseupoutside" class="method item inherited">
|
||||
<h3 class="name"><code>mouseupoutside</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>interactionData</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_mouseupoutside">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l110"><code>src/pixi/DisplayObject.js:110</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject
|
||||
for this callback to be fired, The touch must have started over the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1480,11 +1586,11 @@ for this callback to be fired the mouse must have been pressed down over the spr
|
|||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/Sprite.html#method_setInteractive">Sprite</a>:
|
||||
<a href="../classes/DisplayObject.html#method_setInteractive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l164"><code>src/pixi/Sprite.js:164</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l164"><code>src/pixi/DisplayObject.js:164</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1568,7 +1674,7 @@ for this callback to be fired the mouse must have been pressed down over the spr
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l146"><code>src/pixi/Sprite.js:146</code></a>
|
||||
<a href="../files/src_pixi_Sprite.js.html#l83"><code>src/pixi/Sprite.js:83</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1702,11 +1808,11 @@ for this callback to be fired the mouse must have been pressed down over the spr
|
|||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/Sprite.html#method_tap">Sprite</a>:
|
||||
<a href="../classes/DisplayObject.html#method_tap">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l121"><code>src/pixi/Sprite.js:121</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l134"><code>src/pixi/DisplayObject.js:134</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1717,7 +1823,7 @@ for this callback to be fired the mouse must have been pressed down over the spr
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the users taps on the sprite with thier finger
|
||||
<p>A callback that is used when the users taps on the sprite with their finger
|
||||
basically a touch version of click</p>
|
||||
</div>
|
||||
|
||||
|
@ -1787,11 +1893,11 @@ basically a touch version of click</p>
|
|||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/Sprite.html#method_touchend">Sprite</a>:
|
||||
<a href="../classes/DisplayObject.html#method_touchend">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l134"><code>src/pixi/Sprite.js:134</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l147"><code>src/pixi/DisplayObject.js:147</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1802,8 +1908,92 @@ basically a touch version of click</p>
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the user releases the touch that was over the sprite
|
||||
for this callback to be fired. The touch must have started over the sprite</p>
|
||||
<p>A callback that is used when the user releases a touch over the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">interactionData</code>
|
||||
<span class="type"><a href="../classes/InteractionData.html" class="crosslink">InteractionData</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_touchendoutside" class="method item inherited">
|
||||
<h3 class="name"><code>touchendoutside</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>interactionData</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_touchendoutside">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l153"><code>src/pixi/DisplayObject.js:153</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the user releases the touch that was over the displayObject
|
||||
for this callback to be fired, The touch must have started over the sprite</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1872,11 +2062,11 @@ for this callback to be fired. The touch must have started over the sprite</p>
|
|||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/Sprite.html#method_touchstart">Sprite</a>:
|
||||
<a href="../classes/DisplayObject.html#method_touchstart">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l128"><code>src/pixi/Sprite.js:128</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l141"><code>src/pixi/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1887,7 +2077,7 @@ for this callback to be fired. The touch must have started over the sprite</p>
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the user touch's over the sprite</p>
|
||||
<p>A callback that is used when the user touch's over the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -2223,6 +2413,48 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_hitArea" class="property item inherited">
|
||||
<h3 class="name"><code>hitArea</code></h3>
|
||||
<span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_hitArea">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This is the defined area that will pick up mouse / touch events. It is null by default.
|
||||
Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@
|
|||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_click">click</a>
|
||||
|
||||
|
||||
|
@ -300,32 +300,39 @@
|
|||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_mousedown">mousedown</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_mouseout">mouseout</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_mouseover">mouseover</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_mouseup">mouseup</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_mouseupoutside">mouseupoutside</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method inherited">
|
||||
|
@ -335,7 +342,7 @@
|
|||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_setInteractive">setInteractive</a>
|
||||
|
||||
|
||||
|
@ -349,21 +356,28 @@
|
|||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_tap">tap</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_touchend">touchend</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method">
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_touchendoutside">touchendoutside</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item method inherited">
|
||||
<a href="#method_touchstart">touchstart</a>
|
||||
|
||||
|
||||
|
@ -413,6 +427,13 @@
|
|||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
<a href="#property_hitArea">hitArea</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="index-item property inherited">
|
||||
|
@ -674,7 +695,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div id="method_click" class="method item">
|
||||
<div id="method_click" class="method item inherited">
|
||||
<h3 class="name"><code>click</code></h3>
|
||||
|
||||
|
||||
|
@ -708,15 +729,12 @@
|
|||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_click">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l86"><code>src/pixi/Sprite.js:86</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l91"><code>src/pixi/DisplayObject.js:91</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -727,7 +745,7 @@
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the users clicks on the sprite with thier mouse</p>
|
||||
<p>A callback that is used when the users clicks on the displayObject with their mouse</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -809,7 +827,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l189"><code>src/pixi/Sprite.js:189</code></a>
|
||||
<a href="../files/src_pixi_Sprite.js.html#l113"><code>src/pixi/Sprite.js:113</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -916,7 +934,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l205"><code>src/pixi/Sprite.js:205</code></a>
|
||||
<a href="../files/src_pixi_Sprite.js.html#l129"><code>src/pixi/Sprite.js:129</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -975,7 +993,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div id="method_mousedown" class="method item">
|
||||
<div id="method_mousedown" class="method item inherited">
|
||||
<h3 class="name"><code>mousedown</code></h3>
|
||||
|
||||
|
||||
|
@ -1009,15 +1027,12 @@
|
|||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_mousedown">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l92"><code>src/pixi/Sprite.js:92</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l97"><code>src/pixi/DisplayObject.js:97</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1062,7 +1077,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div id="method_mouseout" class="method item">
|
||||
<div id="method_mouseout" class="method item inherited">
|
||||
<h3 class="name"><code>mouseout</code></h3>
|
||||
|
||||
|
||||
|
@ -1096,15 +1111,12 @@
|
|||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_mouseout">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l111"><code>src/pixi/Sprite.js:111</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l123"><code>src/pixi/DisplayObject.js:123</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1115,7 +1127,7 @@
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the users mouse leaves the sprite</p>
|
||||
<p>A callback that is used when the users mouse leaves the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1149,7 +1161,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div id="method_mouseover" class="method item">
|
||||
<div id="method_mouseover" class="method item inherited">
|
||||
<h3 class="name"><code>mouseover</code></h3>
|
||||
|
||||
|
||||
|
@ -1183,15 +1195,12 @@
|
|||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_mouseover">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l105"><code>src/pixi/Sprite.js:105</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l117"><code>src/pixi/DisplayObject.js:117</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1202,7 +1211,7 @@
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the users mouse rolls over the sprite</p>
|
||||
<p>A callback that is used when the users mouse rolls over the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1236,7 +1245,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div id="method_mouseup" class="method item">
|
||||
<div id="method_mouseup" class="method item inherited">
|
||||
<h3 class="name"><code>mouseup</code></h3>
|
||||
|
||||
|
||||
|
@ -1270,15 +1279,12 @@
|
|||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_mouseup">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l98"><code>src/pixi/Sprite.js:98</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l103"><code>src/pixi/DisplayObject.js:103</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1289,8 +1295,93 @@
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the user releases the mouse that was over the sprite
|
||||
for this callback to be fired the mouse must have been pressed down over the sprite</p>
|
||||
<p>A callback that is used when the user releases the mouse that was over the displayObject
|
||||
for this callback to be fired the mouse must have been pressed down over the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">interactionData</code>
|
||||
<span class="type"><a href="../classes/InteractionData.html" class="crosslink">InteractionData</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_mouseupoutside" class="method item inherited">
|
||||
<h3 class="name"><code>mouseupoutside</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>interactionData</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_mouseupoutside">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l110"><code>src/pixi/DisplayObject.js:110</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject
|
||||
for this callback to be fired, The touch must have started over the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1408,7 +1499,7 @@ for this callback to be fired the mouse must have been pressed down over the spr
|
|||
</div>
|
||||
|
||||
|
||||
<div id="method_setInteractive" class="method item">
|
||||
<div id="method_setInteractive" class="method item inherited">
|
||||
<h3 class="name"><code>setInteractive</code></h3>
|
||||
|
||||
|
||||
|
@ -1442,15 +1533,12 @@ for this callback to be fired the mouse must have been pressed down over the spr
|
|||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_setInteractive">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l164"><code>src/pixi/Sprite.js:164</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l164"><code>src/pixi/DisplayObject.js:164</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1537,7 +1625,7 @@ for this callback to be fired the mouse must have been pressed down over the spr
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l146"><code>src/pixi/Sprite.js:146</code></a>
|
||||
<a href="../files/src_pixi_Sprite.js.html#l83"><code>src/pixi/Sprite.js:83</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1582,7 +1670,7 @@ for this callback to be fired the mouse must have been pressed down over the spr
|
|||
</div>
|
||||
|
||||
|
||||
<div id="method_tap" class="method item">
|
||||
<div id="method_tap" class="method item inherited">
|
||||
<h3 class="name"><code>tap</code></h3>
|
||||
|
||||
|
||||
|
@ -1616,15 +1704,12 @@ for this callback to be fired the mouse must have been pressed down over the spr
|
|||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_tap">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l121"><code>src/pixi/Sprite.js:121</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l134"><code>src/pixi/DisplayObject.js:134</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1635,7 +1720,7 @@ for this callback to be fired the mouse must have been pressed down over the spr
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the users taps on the sprite with thier finger
|
||||
<p>A callback that is used when the users taps on the sprite with their finger
|
||||
basically a touch version of click</p>
|
||||
</div>
|
||||
|
||||
|
@ -1670,7 +1755,7 @@ basically a touch version of click</p>
|
|||
</div>
|
||||
|
||||
|
||||
<div id="method_touchend" class="method item">
|
||||
<div id="method_touchend" class="method item inherited">
|
||||
<h3 class="name"><code>touchend</code></h3>
|
||||
|
||||
|
||||
|
@ -1704,15 +1789,12 @@ basically a touch version of click</p>
|
|||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_touchend">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l134"><code>src/pixi/Sprite.js:134</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l147"><code>src/pixi/DisplayObject.js:147</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1723,8 +1805,7 @@ basically a touch version of click</p>
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the user releases the touch that was over the sprite
|
||||
for this callback to be fired. The touch must have started over the sprite</p>
|
||||
<p>A callback that is used when the user releases a touch over the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1758,7 +1839,92 @@ for this callback to be fired. The touch must have started over the sprite</p>
|
|||
</div>
|
||||
|
||||
|
||||
<div id="method_touchstart" class="method item">
|
||||
<div id="method_touchendoutside" class="method item inherited">
|
||||
<h3 class="name"><code>touchendoutside</code></h3>
|
||||
|
||||
|
||||
<div class="args">
|
||||
<span class="paren">(</span><ul class="args-list inline commas">
|
||||
|
||||
<li class="arg">
|
||||
|
||||
<code>interactionData</code>
|
||||
|
||||
</li>
|
||||
|
||||
</ul><span class="paren">)</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_touchendoutside">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l153"><code>src/pixi/DisplayObject.js:153</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the user releases the touch that was over the displayObject
|
||||
for this callback to be fired, The touch must have started over the sprite</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="params">
|
||||
<h4>Parameters:</h4>
|
||||
|
||||
<ul class="params-list">
|
||||
|
||||
<li class="param">
|
||||
|
||||
<code class="param-name">interactionData</code>
|
||||
<span class="type"><a href="../classes/InteractionData.html" class="crosslink">InteractionData</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="param-description">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="method_touchstart" class="method item inherited">
|
||||
<h3 class="name"><code>touchstart</code></h3>
|
||||
|
||||
|
||||
|
@ -1792,15 +1958,12 @@ for this callback to be fired. The touch must have started over the sprite</p>
|
|||
<div class="meta">
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
Defined in
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#method_touchstart">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_Sprite.js.html#l128"><code>src/pixi/Sprite.js:128</code></a>
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l141"><code>src/pixi/DisplayObject.js:141</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1811,7 +1974,7 @@ for this callback to be fired. The touch must have started over the sprite</p>
|
|||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>A callback that is used when the user touch's over the sprite</p>
|
||||
<p>A callback that is used when the user touch's over the displayObject</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -2068,6 +2231,48 @@ currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN</p>
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="property_hitArea" class="property item inherited">
|
||||
<h3 class="name"><code>hitArea</code></h3>
|
||||
<span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="meta">
|
||||
|
||||
|
||||
<p>Inherited from
|
||||
<a href="../classes/DisplayObject.html#property_hitArea">DisplayObject</a>:
|
||||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_DisplayObject.js.html#l62"><code>src/pixi/DisplayObject.js:62</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
<p>This is the defined area that will pick up mouse / touch events. It is null by default.
|
||||
Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -414,7 +414,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_textures_Texture.js.html#l177"><code>src/pixi/textures/Texture.js:177</code></a>
|
||||
<a href="../files/src_pixi_textures_Texture.js.html#l162"><code>src/pixi/textures/Texture.js:162</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -833,7 +833,7 @@
|
|||
|
||||
|
||||
|
||||
<a href="../files/src_pixi_textures_Texture.js.html#l189"><code>src/pixi/textures/Texture.js:189</code></a>
|
||||
<a href="../files/src_pixi_textures_Texture.js.html#l174"><code>src/pixi/textures/Texture.js:174</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
@ -484,7 +484,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#l535"><code>src/pixi/renderers/WebGLRenderer.js:535</code></a>
|
||||
<a href="../files/src_pixi_renderers_WebGLRenderer.js.html#l544"><code>src/pixi/renderers/WebGLRenderer.js:544</code></a>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
436
docs/data.json
436
docs/data.json
|
@ -476,7 +476,7 @@
|
|||
"extension_for": [],
|
||||
"module": "PIXI",
|
||||
"file": "src/pixi/InteractionManager.js",
|
||||
"line": 330,
|
||||
"line": 483,
|
||||
"is_constructor": 1
|
||||
},
|
||||
"MovieClip": {
|
||||
|
@ -980,28 +980,28 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/renderers/WebGLRenderer.js",
|
||||
"line": 232,
|
||||
"line": 241,
|
||||
"access": "private",
|
||||
"tagname": "",
|
||||
"class": "WebGLRenderer"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/renderers/WebGLRenderer.js",
|
||||
"line": 261,
|
||||
"line": 270,
|
||||
"access": "private",
|
||||
"tagname": "",
|
||||
"class": "WebGLRenderer"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/renderers/WebGLRenderer.js",
|
||||
"line": 457,
|
||||
"line": 466,
|
||||
"access": "private",
|
||||
"tagname": "",
|
||||
"class": "WebGLRenderer"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/renderers/WebGLRenderer.js",
|
||||
"line": 535,
|
||||
"line": 544,
|
||||
"description": "resizes the webGL view to the specified width and height",
|
||||
"itemtype": "method",
|
||||
"name": "resize",
|
||||
|
@ -1021,21 +1021,14 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/renderers/WebGLRenderer.js",
|
||||
"line": 559,
|
||||
"line": 568,
|
||||
"access": "private",
|
||||
"tagname": "",
|
||||
"class": "WebGLRenderer"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/renderers/WebGLRenderer.js",
|
||||
"line": 587,
|
||||
"access": "private",
|
||||
"tagname": "",
|
||||
"class": "WebGLRenderer"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/renderers/WebGLRenderer.js",
|
||||
"line": 664,
|
||||
"line": 596,
|
||||
"access": "private",
|
||||
"tagname": "",
|
||||
"class": "WebGLRenderer"
|
||||
|
@ -1047,6 +1040,13 @@
|
|||
"tagname": "",
|
||||
"class": "WebGLRenderer"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/renderers/WebGLRenderer.js",
|
||||
"line": 682,
|
||||
"access": "private",
|
||||
"tagname": "",
|
||||
"class": "WebGLRenderer"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/renderers/WebGLShaders.js",
|
||||
"line": 2,
|
||||
|
@ -1183,7 +1183,7 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/textures/Texture.js",
|
||||
"line": 177,
|
||||
"line": 162,
|
||||
"description": "Adds a texture to the textureCache.",
|
||||
"itemtype": "method",
|
||||
"name": "addTextureToCache",
|
||||
|
@ -1203,7 +1203,7 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/textures/Texture.js",
|
||||
"line": 189,
|
||||
"line": 174,
|
||||
"description": "Remove a texture from the textureCache.",
|
||||
"itemtype": "method",
|
||||
"name": "removeTextureFromCache",
|
||||
|
@ -1347,7 +1347,181 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 82,
|
||||
"line": 62,
|
||||
"description": "This is the defined area that will pick up mouse / touch events. It is null by default.\nSetting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)",
|
||||
"itemtype": "property",
|
||||
"name": "hitArea",
|
||||
"type": "Rectangle",
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 91,
|
||||
"description": "A callback that is used when the users clicks on the displayObject with their mouse",
|
||||
"itemtype": "method",
|
||||
"name": "click",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 97,
|
||||
"description": "A callback that is used when the user clicks the mouse down over the sprite",
|
||||
"itemtype": "method",
|
||||
"name": "mousedown",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 103,
|
||||
"description": "A callback that is used when the user releases the mouse that was over the displayObject\nfor this callback to be fired the mouse must have been pressed down over the displayObject",
|
||||
"itemtype": "method",
|
||||
"name": "mouseup",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 110,
|
||||
"description": "A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject\nfor this callback to be fired, The touch must have started over the displayObject",
|
||||
"itemtype": "method",
|
||||
"name": "mouseupoutside",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 117,
|
||||
"description": "A callback that is used when the users mouse rolls over the displayObject",
|
||||
"itemtype": "method",
|
||||
"name": "mouseover",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 123,
|
||||
"description": "A callback that is used when the users mouse leaves the displayObject",
|
||||
"itemtype": "method",
|
||||
"name": "mouseout",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 134,
|
||||
"description": "A callback that is used when the users taps on the sprite with their finger\nbasically a touch version of click",
|
||||
"itemtype": "method",
|
||||
"name": "tap",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 141,
|
||||
"description": "A callback that is used when the user touch's over the displayObject",
|
||||
"itemtype": "method",
|
||||
"name": "touchstart",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 147,
|
||||
"description": "A callback that is used when the user releases a touch over the displayObject",
|
||||
"itemtype": "method",
|
||||
"name": "touchend",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 153,
|
||||
"description": "A callback that is used when the user releases the touch that was over the displayObject\nfor this callback to be fired, The touch must have started over the sprite",
|
||||
"itemtype": "method",
|
||||
"name": "touchendoutside",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 164,
|
||||
"description": "Indicates if the sprite will have touch and mouse interactivity. It is false by default",
|
||||
"itemtype": "method",
|
||||
"name": "setInteractive",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactive",
|
||||
"description": "",
|
||||
"type": "Boolean"
|
||||
}
|
||||
],
|
||||
"class": "DisplayObject"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/DisplayObject.js",
|
||||
"line": 178,
|
||||
"access": "private",
|
||||
"tagname": "",
|
||||
"class": "DisplayObject"
|
||||
|
@ -1459,23 +1633,7 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/InteractionManager.js",
|
||||
"line": 53,
|
||||
"description": "This method will disable rollover/rollout for ALL interactive items\nYou may wish to use this an optimization if your app does not require rollover/rollout funcitonality",
|
||||
"itemtype": "method",
|
||||
"name": "disableMouseOver",
|
||||
"class": "InteractionManager"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/InteractionManager.js",
|
||||
"line": 66,
|
||||
"description": "This method will enable rollover/rollout for ALL interactive items\nIt is enabled by default",
|
||||
"itemtype": "method",
|
||||
"name": "enableMouseOver",
|
||||
"class": "InteractionManager"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/InteractionManager.js",
|
||||
"line": 336,
|
||||
"line": 489,
|
||||
"description": "This point stores the global coords of where the touch/mouse event happened",
|
||||
"itemtype": "property",
|
||||
"name": "global",
|
||||
|
@ -1484,22 +1642,32 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/InteractionManager.js",
|
||||
"line": 343,
|
||||
"description": "This point stores the local coords of where the touch/mouse event happened",
|
||||
"itemtype": "property",
|
||||
"name": "local",
|
||||
"type": "Point",
|
||||
"class": "InteractionData"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/InteractionManager.js",
|
||||
"line": 350,
|
||||
"line": 499,
|
||||
"description": "The target Sprite that was interacted with",
|
||||
"itemtype": "property",
|
||||
"name": "target",
|
||||
"type": "Sprite",
|
||||
"class": "InteractionData"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/InteractionManager.js",
|
||||
"line": 507,
|
||||
"description": "This will return the local coords of the specified displayObject for this InteractionData",
|
||||
"itemtype": "method",
|
||||
"name": "getLocalPosition",
|
||||
"params": [
|
||||
{
|
||||
"name": "displayObject",
|
||||
"description": "The DisplayObject that you would like the local coords off",
|
||||
"type": "DisplayObject"
|
||||
}
|
||||
],
|
||||
"return": {
|
||||
"description": "A point containing the coords of the InteractionData position relative to the DisplayObject",
|
||||
"type": "Point"
|
||||
},
|
||||
"class": "InteractionData"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/MovieClip.js",
|
||||
"line": 1,
|
||||
|
@ -1749,135 +1917,7 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 86,
|
||||
"description": "A callback that is used when the users clicks on the sprite with thier mouse",
|
||||
"itemtype": "method",
|
||||
"name": "click",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "Sprite",
|
||||
"module": "PIXI"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 92,
|
||||
"description": "A callback that is used when the user clicks the mouse down over the sprite",
|
||||
"itemtype": "method",
|
||||
"name": "mousedown",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "Sprite",
|
||||
"module": "PIXI"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 98,
|
||||
"description": "A callback that is used when the user releases the mouse that was over the sprite\nfor this callback to be fired the mouse must have been pressed down over the sprite",
|
||||
"itemtype": "method",
|
||||
"name": "mouseup",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "Sprite",
|
||||
"module": "PIXI"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 105,
|
||||
"description": "A callback that is used when the users mouse rolls over the sprite",
|
||||
"itemtype": "method",
|
||||
"name": "mouseover",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "Sprite",
|
||||
"module": "PIXI"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 111,
|
||||
"description": "A callback that is used when the users mouse leaves the sprite",
|
||||
"itemtype": "method",
|
||||
"name": "mouseout",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "Sprite",
|
||||
"module": "PIXI"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 121,
|
||||
"description": "A callback that is used when the users taps on the sprite with thier finger\nbasically a touch version of click",
|
||||
"itemtype": "method",
|
||||
"name": "tap",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "Sprite",
|
||||
"module": "PIXI"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 128,
|
||||
"description": "A callback that is used when the user touch's over the sprite",
|
||||
"itemtype": "method",
|
||||
"name": "touchstart",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "Sprite",
|
||||
"module": "PIXI"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 134,
|
||||
"description": "A callback that is used when the user releases the touch that was over the sprite\nfor this callback to be fired. The touch must have started over the sprite",
|
||||
"itemtype": "method",
|
||||
"name": "touchend",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactionData",
|
||||
"description": "",
|
||||
"type": "InteractionData"
|
||||
}
|
||||
],
|
||||
"class": "Sprite",
|
||||
"module": "PIXI"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 146,
|
||||
"line": 83,
|
||||
"itemtype": "method",
|
||||
"name": "setTexture",
|
||||
"params": [
|
||||
|
@ -1892,23 +1932,7 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 164,
|
||||
"description": "Indicates if the sprite will have touch and mouse interactivity. It is false by default",
|
||||
"itemtype": "method",
|
||||
"name": "setInteractive",
|
||||
"params": [
|
||||
{
|
||||
"name": "interactive",
|
||||
"description": "",
|
||||
"type": "Boolean"
|
||||
}
|
||||
],
|
||||
"class": "Sprite",
|
||||
"module": "PIXI"
|
||||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 177,
|
||||
"line": 101,
|
||||
"access": "private",
|
||||
"tagname": "",
|
||||
"class": "Sprite",
|
||||
|
@ -1916,7 +1940,7 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 189,
|
||||
"line": 113,
|
||||
"description": "Helper function that creates a sprite that will contain a texture from the TextureCache based on the frameId\n The frame ids are created when a Texture packer file has been loaded",
|
||||
"itemtype": "method",
|
||||
"name": "fromFrame",
|
||||
|
@ -1937,7 +1961,7 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/Sprite.js",
|
||||
"line": 205,
|
||||
"line": 129,
|
||||
"description": "Helper function that creates a sprite that will contain a texture based on an image url\n If the image is not in the texture cache it will be loaded",
|
||||
"itemtype": "method",
|
||||
"name": "fromImage",
|
||||
|
@ -1964,7 +1988,7 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/Stage.js",
|
||||
"line": 35,
|
||||
"line": 37,
|
||||
"itemtype": "method",
|
||||
"name": "updateTransform",
|
||||
"internal": "",
|
||||
|
@ -1973,7 +1997,7 @@
|
|||
},
|
||||
{
|
||||
"file": "src/pixi/Stage.js",
|
||||
"line": 59,
|
||||
"line": 60,
|
||||
"itemtype": "method",
|
||||
"name": "setBackgroundColor",
|
||||
"params": [
|
||||
|
@ -1994,7 +2018,7 @@
|
|||
},
|
||||
{
|
||||
"message": "unknown tag: internal",
|
||||
"line": " src/pixi/Stage.js:35"
|
||||
"line": " src/pixi/Stage.js:37"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
|
@ -2078,32 +2102,32 @@
|
|||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:232"
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:241"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:261"
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:270"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:457"
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:466"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:559"
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:568"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:587"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:664"
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:596"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:673"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/renderers/WebGLRenderer.js:682"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/renderers/WebGLShaders.js:2"
|
||||
|
@ -2138,7 +2162,7 @@
|
|||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/DisplayObject.js:82"
|
||||
"line": " src/pixi/DisplayObject.js:178"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
|
@ -2174,7 +2198,7 @@
|
|||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
"line": " src/pixi/Sprite.js:177"
|
||||
"line": " src/pixi/Sprite.js:101"
|
||||
},
|
||||
{
|
||||
"message": "Missing item type",
|
||||
|
|
|
@ -179,6 +179,14 @@ PIXI.DisplayObject = function()
|
|||
*/
|
||||
this.stage = null;
|
||||
|
||||
/**
|
||||
* This is the defined area that will pick up mouse / touch events. It is null by default.
|
||||
* Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)
|
||||
* @property hitArea
|
||||
* @type Rectangle
|
||||
*/
|
||||
this.hitArea = null;
|
||||
|
||||
this.worldAlpha = 1;
|
||||
this.color = [];
|
||||
|
||||
|
@ -192,13 +200,101 @@ PIXI.DisplayObject = function()
|
|||
|
||||
this.renderable = false;
|
||||
|
||||
// NOT YET :/ This only applies to children within the container..
|
||||
this.interactive = true;
|
||||
// [readonly] best not to toggle directly! use setInteractive()
|
||||
this.interactive = false;
|
||||
this.buttonMode = false;
|
||||
|
||||
/*
|
||||
* MOUSE Callbacks
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the users clicks on the displayObject with their mouse
|
||||
* @method click
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the user clicks the mouse down over the sprite
|
||||
* @method mousedown
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the user releases the mouse that was over the displayObject
|
||||
* for this callback to be fired the mouse must have been pressed down over the displayObject
|
||||
* @method mouseup
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject
|
||||
* for this callback to be fired, The touch must have started over the displayObject
|
||||
* @method mouseupoutside
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the users mouse rolls over the displayObject
|
||||
* @method mouseover
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the users mouse leaves the displayObject
|
||||
* @method mouseout
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* TOUCH Callbacks
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the users taps on the sprite with their finger
|
||||
* basically a touch version of click
|
||||
* @method tap
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the user touch's over the displayObject
|
||||
* @method touchstart
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the user releases a touch over the displayObject
|
||||
* @method touchend
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the user releases the touch that was over the displayObject
|
||||
* for this callback to be fired, The touch must have started over the sprite
|
||||
* @method touchendoutside
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
}
|
||||
|
||||
// constructor
|
||||
PIXI.DisplayObject.constructor = PIXI.DisplayObject;
|
||||
|
||||
/**
|
||||
* Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
|
|
@ -165,60 +165,44 @@ PIXI.InteractionManager = function(stage)
|
|||
this.pool = [];
|
||||
|
||||
this.interactiveItems = [];
|
||||
|
||||
this.last = 0;
|
||||
}
|
||||
|
||||
// constructor
|
||||
PIXI.InteractionManager.constructor = PIXI.InteractionManager;
|
||||
|
||||
/**
|
||||
* This method will disable rollover/rollout for ALL interactive items
|
||||
* You may wish to use this an optimization if your app does not require rollover/rollout funcitonality
|
||||
* @method disableMouseOver
|
||||
*/
|
||||
PIXI.InteractionManager.prototype.disableMouseOver = function()
|
||||
{
|
||||
if(!this.mouseoverEnabled)return;
|
||||
|
||||
this.mouseoverEnabled = false;
|
||||
if(this.target)this.target.view.removeEventListener('mousemove', this.onMouseMove.bind(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will enable rollover/rollout for ALL interactive items
|
||||
* It is enabled by default
|
||||
* @method enableMouseOver
|
||||
*/
|
||||
PIXI.InteractionManager.prototype.enableMouseOver = function()
|
||||
{
|
||||
if(this.mouseoverEnabled)return;
|
||||
|
||||
this.mouseoverEnabled = false;
|
||||
if(this.target)this.target.view.addEventListener('mousemove', this.onMouseMove.bind(this));
|
||||
}
|
||||
|
||||
PIXI.InteractionManager.prototype.collectInteractiveSprite = function(displayObject)
|
||||
PIXI.InteractionManager.prototype.collectInteractiveSprite = function(displayObject, iParent)
|
||||
{
|
||||
var children = displayObject.children;
|
||||
var length = children.length;
|
||||
|
||||
for (var i = length - 1; i >= 0; i--)
|
||||
//this.interactiveItems = [];
|
||||
/// make an interaction tree... {item.__interactiveParent}
|
||||
for (var i = length-1; i >= 0; i--)
|
||||
{
|
||||
var child = children[i];
|
||||
|
||||
// only sprite's right now...
|
||||
if(child instanceof PIXI.Sprite)
|
||||
// push all interactive bits
|
||||
if(child.interactive)
|
||||
{
|
||||
if(child.interactive)this.interactiveItems.push(child);
|
||||
iParent.interactiveChildren = true;
|
||||
//child.__iParent = iParent;
|
||||
this.interactiveItems.push(child);
|
||||
|
||||
if(child.children.length > 0)
|
||||
{
|
||||
this.collectInteractiveSprite(child, child);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// use this to optimize..
|
||||
if(!child.interactive)continue;
|
||||
}
|
||||
|
||||
if(child.children.length > 0)
|
||||
{
|
||||
this.collectInteractiveSprite(child);
|
||||
child.__iParent = null;
|
||||
|
||||
if(child.children.length > 0)
|
||||
{
|
||||
this.collectInteractiveSprite(child, iParent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -226,10 +210,10 @@ PIXI.InteractionManager.prototype.collectInteractiveSprite = function(displayObj
|
|||
PIXI.InteractionManager.prototype.setTarget = function(target)
|
||||
{
|
||||
this.target = target;
|
||||
if(this.mouseoverEnabled)target.view.addEventListener('mousemove', this.onMouseMove.bind(this), true);
|
||||
target.view.addEventListener('mousemove', this.onMouseMove.bind(this), true);
|
||||
target.view.addEventListener('mousedown', this.onMouseDown.bind(this), true);
|
||||
target.view.addEventListener('mouseup', this.onMouseUp.bind(this), true);
|
||||
target.view.addEventListener('mouseout', this.onMouseUp.bind(this), true);
|
||||
document.body.addEventListener('mouseup', this.onMouseUp.bind(this), true);
|
||||
target.view.addEventListener('mouseout', this.onMouseUp.bind(this), true);
|
||||
|
||||
// aint no multi touch just yet!
|
||||
target.view.addEventListener("touchstart", this.onTouchStart.bind(this), true);
|
||||
|
@ -237,20 +221,37 @@ PIXI.InteractionManager.prototype.setTarget = function(target)
|
|||
target.view.addEventListener("touchmove", this.onTouchMove.bind(this), true);
|
||||
}
|
||||
|
||||
PIXI.InteractionManager.prototype.hitTest = function(interactionData)
|
||||
PIXI.InteractionManager.prototype.update = function()
|
||||
{
|
||||
// frequency of 30fps??
|
||||
var now = Date.now();
|
||||
var diff = now - this.last;
|
||||
diff = (diff * 30) / 1000;
|
||||
if(diff < 1)return;
|
||||
this.last = now;
|
||||
//
|
||||
|
||||
// ok.. so mouse events??
|
||||
// yes for now :)
|
||||
// OPTIMSE - how often to check??
|
||||
if(this.dirty)
|
||||
{
|
||||
this.dirty = false;
|
||||
|
||||
var len = this.interactiveItems.length;
|
||||
|
||||
for (var i=0; i < this.interactiveItems.length; i++) {
|
||||
this.interactiveItems[i].interactiveChildren = true;
|
||||
}
|
||||
|
||||
this.interactiveItems = [];
|
||||
|
||||
if(this.stage.interactive)this.interactiveItems.push(this.stage);
|
||||
// go through and collect all the objects that are interactive..
|
||||
this.collectInteractiveSprite(this.stage);
|
||||
this.collectInteractiveSprite(this.stage, this.stage);
|
||||
}
|
||||
|
||||
var tempPoint = this.tempPoint;
|
||||
var tempMatrix = this.tempMatrix;
|
||||
var global = interactionData.global;
|
||||
|
||||
// loop through interactive objects!
|
||||
var length = this.interactiveItems.length;
|
||||
|
||||
for (var i = 0; i < length; i++)
|
||||
|
@ -258,42 +259,38 @@ PIXI.InteractionManager.prototype.hitTest = function(interactionData)
|
|||
var item = this.interactiveItems[i];
|
||||
if(!item.visible)continue;
|
||||
|
||||
// TODO this could do with some optimizing!
|
||||
// maybe store the inverse?
|
||||
// or do a lazy check first?
|
||||
//mat3.inverse(item.worldTransform, tempMatrix);
|
||||
//tempPoint.x = tempMatrix[0] * global.x + tempMatrix[1] * global.y + tempMatrix[2];
|
||||
//tempPoint.y = tempMatrix[4] * global.y + tempMatrix[3] * global.x + tempMatrix[5];
|
||||
|
||||
// OPTIMIZED! assuming the matrix transform is affine.. which it totally shold be!
|
||||
|
||||
var worldTransform = item.worldTransform;
|
||||
|
||||
var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2],
|
||||
a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5],
|
||||
id = 1 / (a00 * a11 + a01 * -a10);
|
||||
|
||||
tempPoint.x = a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id;
|
||||
tempPoint.y = a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id;
|
||||
|
||||
|
||||
var x1 = -item.width * item.anchor.x;
|
||||
|
||||
if(tempPoint.x > x1 && tempPoint.x < x1 + item.width)
|
||||
// OPTIMISATION - only calculate every time if the mousemove function exists..
|
||||
// OK so.. does the object have any other interactive functions?
|
||||
// hit-test the clip!
|
||||
if(item.mouseover || item.mouseout || item.buttonMode)
|
||||
{
|
||||
var y1 = -item.height * item.anchor.y;
|
||||
|
||||
if(tempPoint.y > y1 && tempPoint.y < y1 + item.height)
|
||||
// ok so there are some functions so lets hit test it..
|
||||
item.__hit = this.hitTest(item, this.mouse);
|
||||
// ok so deal with interactions..
|
||||
// loks like there was a hit!
|
||||
if(item.__hit)
|
||||
{
|
||||
interactionData.local.x = tempPoint.x;
|
||||
interactionData.local.y = tempPoint.y;
|
||||
|
||||
return item;
|
||||
if(!item.__isOver)
|
||||
{
|
||||
if(item.buttonMode)this.target.view.style.cursor = "pointer";
|
||||
if(item.mouseover)item.mouseover(this.mouse);
|
||||
item.__isOver = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(item.__isOver)
|
||||
{
|
||||
// roll out!
|
||||
if(item.buttonMode)this.target.view.style.cursor = "default";
|
||||
if(item.mouseout)item.mouseout(this.mouse);
|
||||
item.__isOver = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
// --->
|
||||
}
|
||||
}
|
||||
|
||||
PIXI.InteractionManager.prototype.onMouseMove = function(event)
|
||||
|
@ -306,66 +303,172 @@ PIXI.InteractionManager.prototype.onMouseMove = function(event)
|
|||
this.mouse.global.x = (event.clientX - rect.left) * (this.target.width / rect.width);
|
||||
this.mouse.global.y = (event.clientY - rect.top) * ( this.target.height / rect.height);
|
||||
|
||||
var item = this.hitTest(this.mouse);
|
||||
var length = this.interactiveItems.length;
|
||||
var global = this.mouse.global;
|
||||
|
||||
if(this.currentOver != item)
|
||||
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
if(this.currentOver)
|
||||
var item = this.interactiveItems[i];
|
||||
|
||||
if(item.mousemove)
|
||||
{
|
||||
this.mouse.target = this.currentOver;
|
||||
if(this.currentOver.mouseout)this.currentOver.mouseout(this.mouse);
|
||||
this.currentOver = null;
|
||||
//call the function!
|
||||
item.mousemove(this.mouse);
|
||||
}
|
||||
|
||||
this.target.view.style.cursor = "default";
|
||||
}
|
||||
|
||||
if(item)
|
||||
{
|
||||
|
||||
if(this.currentOver == item)return;
|
||||
|
||||
this.currentOver = item;
|
||||
this.target.view.style.cursor = "pointer";
|
||||
this.mouse.target = item;
|
||||
if(item.mouseover)item.mouseover(this.mouse);
|
||||
}
|
||||
}
|
||||
|
||||
PIXI.InteractionManager.prototype.onMouseDown = function(event)
|
||||
{
|
||||
var rect = this.target.view.getBoundingClientRect();
|
||||
this.mouse.global.x = (event.clientX - rect.left) * (this.target.width / rect.width);
|
||||
this.mouse.global.y = (event.clientY - rect.top) * (this.target.height / rect.height);
|
||||
event.preventDefault();
|
||||
|
||||
var item = this.hitTest(this.mouse);
|
||||
if(item)
|
||||
// loop through inteaction tree...
|
||||
// hit test each item! ->
|
||||
// --->--->--->--->
|
||||
// get interactive items under point??
|
||||
// --->--->--->--->
|
||||
//stage.__i
|
||||
var length = this.interactiveItems.length;
|
||||
var global = this.mouse.global;
|
||||
|
||||
var index = 0;
|
||||
var parent = this.stage;
|
||||
|
||||
// while
|
||||
// hit test
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
this.currentDown = item;
|
||||
this.mouse.target = item;
|
||||
if(item.mousedown)item.mousedown(this.mouse);
|
||||
var item = this.interactiveItems[i];
|
||||
|
||||
if(item.mousedown || item.click)
|
||||
{
|
||||
item.__mouseIsDown = true;
|
||||
item.__hit = this.hitTest(item, this.mouse);
|
||||
|
||||
if(item.__hit)
|
||||
{
|
||||
//call the function!
|
||||
if(item.mousedown)item.mousedown(this.mouse);
|
||||
item.__isDown = true;
|
||||
|
||||
// just the one!
|
||||
if(!item.interactiveChildren)break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PIXI.InteractionManager.prototype.onMouseUp = function(event)
|
||||
{
|
||||
if(this.currentOver)
|
||||
{
|
||||
this.mouse.target = this.currentOver;
|
||||
if(this.currentOver.mouseup)this.currentOver.mouseup(this.mouse);
|
||||
}
|
||||
event.preventDefault();
|
||||
var global = this.mouse.global;
|
||||
|
||||
if(this.currentDown)
|
||||
|
||||
var length = this.interactiveItems.length;
|
||||
var up = false;
|
||||
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
this.mouse.target = this.currentDown;
|
||||
// click!
|
||||
if(this.currentOver == this.currentDown)if(this.currentDown.click)this.currentDown.click(this.mouse);
|
||||
var item = this.interactiveItems[i];
|
||||
|
||||
|
||||
this.currentDown = null;
|
||||
if(item.mouseup || item.mouseupoutside || item.click)
|
||||
{
|
||||
item.__hit = this.hitTest(item, this.mouse);
|
||||
|
||||
if(item.__hit && !up)
|
||||
{
|
||||
//call the function!
|
||||
if(item.mouseup)
|
||||
{
|
||||
item.mouseup(this.mouse);
|
||||
}
|
||||
if(item.__isDown)
|
||||
{
|
||||
if(item.click)item.click(this.mouse);
|
||||
}
|
||||
|
||||
if(!item.interactiveChildren)up = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(item.__isDown)
|
||||
{
|
||||
if(item.mouseupoutside)item.mouseupoutside(this.mouse);
|
||||
}
|
||||
}
|
||||
|
||||
item.__isDown = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
|
||||
{
|
||||
var global = interactionData.global;
|
||||
|
||||
if(!item.visible)return false;
|
||||
|
||||
if(item instanceof PIXI.Sprite)
|
||||
{
|
||||
var worldTransform = item.worldTransform;
|
||||
|
||||
var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2],
|
||||
a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5],
|
||||
id = 1 / (a00 * a11 + a01 * -a10);
|
||||
|
||||
var x = a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id;
|
||||
var y = a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id;
|
||||
|
||||
var x1 = -item.width * item.anchor.x;
|
||||
|
||||
if(x > x1 && x < x1 + item.width)
|
||||
{
|
||||
var y1 = -item.height * item.anchor.y;
|
||||
|
||||
if(y > y1 && y < y1 + item.height)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(item.hitArea)
|
||||
{
|
||||
var worldTransform = item.worldTransform;
|
||||
var hitArea = item.hitArea;
|
||||
|
||||
var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2],
|
||||
a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5],
|
||||
id = 1 / (a00 * a11 + a01 * -a10);
|
||||
|
||||
var x = a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id;
|
||||
var y = a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id;
|
||||
|
||||
var x1 = hitArea.x;
|
||||
if(x > x1 && x < x1 + hitArea.width)
|
||||
{
|
||||
var y1 = hitArea.y;
|
||||
|
||||
if(y > y1 && y < y1 + hitArea.height)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var length = item.children.length;
|
||||
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
var item = item.children[i];
|
||||
var hit = this.hitTest(item, interactionData);
|
||||
if(hit)return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
PIXI.InteractionManager.prototype.onTouchMove = function(event)
|
||||
{
|
||||
|
@ -377,21 +480,27 @@ PIXI.InteractionManager.prototype.onTouchMove = function(event)
|
|||
for (var i=0; i < changedTouches.length; i++)
|
||||
{
|
||||
var touchEvent = changedTouches[i];
|
||||
|
||||
var touchData = this.touchs[touchEvent.identifier];
|
||||
|
||||
// update the touch position
|
||||
touchData.global.x = (touchEvent.clientX - rect.left) * (this.target.width / rect.width);
|
||||
touchData.global.y = (touchEvent.clientY - rect.top) * (this.target.height / rect.height);
|
||||
}
|
||||
|
||||
var length = this.interactiveItems.length;
|
||||
for (var i = 0; i < length; i++)
|
||||
{
|
||||
var item = this.interactiveItems[i];
|
||||
if(item.touchmove)item.touchmove(touchData);
|
||||
}
|
||||
}
|
||||
|
||||
PIXI.InteractionManager.prototype.onTouchStart = function(event)
|
||||
{
|
||||
event.preventDefault();
|
||||
var rect = this.target.view.getBoundingClientRect();
|
||||
var changedTouches = event.changedTouches;
|
||||
|
||||
var changedTouches = event.changedTouches;
|
||||
for (var i=0; i < changedTouches.length; i++)
|
||||
{
|
||||
var touchEvent = changedTouches[i];
|
||||
|
@ -400,18 +509,31 @@ PIXI.InteractionManager.prototype.onTouchStart = function(event)
|
|||
if(!touchData)touchData = new PIXI.InteractionData();
|
||||
|
||||
this.touchs[touchEvent.identifier] = touchData;
|
||||
|
||||
touchData.global.x = (touchEvent.clientX - rect.left) * (this.target.width / rect.width);
|
||||
touchData.global.y = (touchEvent.clientY - rect.top) * (this.target.height / rect.height);
|
||||
|
||||
var item = this.hitTest(touchData);
|
||||
if(item)
|
||||
var length = this.interactiveItems.length;
|
||||
|
||||
for (var j = 0; j < length; j++)
|
||||
{
|
||||
touchData.currentDown = item;
|
||||
touchData.target = item;
|
||||
if(item.touchstart)item.touchstart(touchData);
|
||||
var item = this.interactiveItems[j];
|
||||
|
||||
if(item.touchstart || item.tap)
|
||||
{
|
||||
item.__hit = this.hitTest(item, touchData);
|
||||
|
||||
if(item.__hit)
|
||||
{
|
||||
//call the function!
|
||||
if(item.touchstart)item.touchstart(touchData);
|
||||
item.__isDown = true;
|
||||
|
||||
if(!item.interactiveChildren)break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PIXI.InteractionManager.prototype.onTouchEnd = function(event)
|
||||
|
@ -425,22 +547,53 @@ PIXI.InteractionManager.prototype.onTouchEnd = function(event)
|
|||
{
|
||||
var touchEvent = changedTouches[i];
|
||||
var touchData = this.touchs[touchEvent.identifier];
|
||||
|
||||
var up = false;
|
||||
touchData.global.x = (touchEvent.clientX - rect.left) * (this.target.width / rect.width);
|
||||
touchData.global.y = (touchEvent.clientY - rect.top) * (this.target.height / rect.height);
|
||||
|
||||
if(touchData.currentDown)
|
||||
var length = this.interactiveItems.length;
|
||||
for (var j = 0; j < length; j++)
|
||||
{
|
||||
if(touchData.currentDown.touchend)touchData.currentDown.touchend(touchData);
|
||||
|
||||
var item = this.hitTest(touchData);
|
||||
if(item == touchData.currentDown)
|
||||
{
|
||||
if(touchData.currentDown.tap)touchData.currentDown.tap(touchData);
|
||||
}
|
||||
touchData.currentDown = null;
|
||||
}
|
||||
var item = this.interactiveItems[j];
|
||||
item.__hit = this.hitTest(item, touchData);
|
||||
|
||||
if(itemTouchData == touchData)
|
||||
{
|
||||
// so this one WAS down...
|
||||
|
||||
// hitTest??
|
||||
|
||||
if(item.touchend || item.tap)
|
||||
{
|
||||
if(item.__hit && !up)
|
||||
{
|
||||
if(item.touchend)item.touchend(touchData);
|
||||
if(item.__isDown)
|
||||
{
|
||||
if(item.tap)item.tap(touchData);
|
||||
}
|
||||
|
||||
if(!item.interactiveChildren)up = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(item.__isDown)
|
||||
{
|
||||
if(item.touchendoutside)item.touchendoutside(touchData);
|
||||
}
|
||||
}
|
||||
|
||||
item.__isDown = false;
|
||||
}
|
||||
|
||||
item.__touchIdentifier = null;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
// remove the touch..
|
||||
this.pool.push(touchData);
|
||||
this.touchs[touchEvent.identifier] = null;
|
||||
|
@ -460,11 +613,7 @@ PIXI.InteractionData = function()
|
|||
*/
|
||||
this.global = new PIXI.Point();
|
||||
|
||||
/**
|
||||
* This point stores the local coords of where the touch/mouse event happened
|
||||
* @property local
|
||||
* @type Point
|
||||
*/
|
||||
// this is here for legacy... but will remove
|
||||
this.local = new PIXI.Point();
|
||||
|
||||
/**
|
||||
|
@ -475,6 +624,26 @@ PIXI.InteractionData = function()
|
|||
this.target;
|
||||
}
|
||||
|
||||
/**
|
||||
* This will return the local coords of the specified displayObject for this InteractionData
|
||||
* @method getLocalPosition
|
||||
* @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
|
||||
* @return {Point} A point containing the coords of the InteractionData position relative to the DisplayObject
|
||||
*/
|
||||
PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
|
||||
{
|
||||
var worldTransform = displayObject.worldTransform;
|
||||
var global = this.global;
|
||||
|
||||
// do a cheeky transform to get the mouse coords;
|
||||
var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2],
|
||||
a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5],
|
||||
id = 1 / (a00 * a11 + a01 * -a10);
|
||||
// set the mouse coords...
|
||||
return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
|
||||
a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id)
|
||||
}
|
||||
|
||||
// constructor
|
||||
PIXI.InteractionData.constructor = PIXI.InteractionData;
|
||||
|
||||
|
|
|
@ -168,14 +168,14 @@ PIXI.Sprite = function(texture)
|
|||
* @property width
|
||||
* @type #Number
|
||||
*/
|
||||
this.width = 1;
|
||||
this.width = 0;
|
||||
|
||||
/**
|
||||
* The height of the sprite (this is initially set by the texture)
|
||||
* @property height
|
||||
* @type #Number
|
||||
*/
|
||||
this.height = 1;
|
||||
this.height = 0;
|
||||
|
||||
if(texture.baseTexture.hasLoaded)
|
||||
{
|
||||
|
@ -191,72 +191,9 @@ PIXI.Sprite = function(texture)
|
|||
|
||||
this.renderable = true;
|
||||
|
||||
|
||||
|
||||
// [readonly] best not to toggle directly! use setInteractive()
|
||||
this.interactive = false;
|
||||
|
||||
|
||||
// thi next bit is here for the docs...
|
||||
|
||||
/*
|
||||
* MOUSE Callbacks
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the users clicks on the sprite with thier mouse
|
||||
* @method click
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the user clicks the mouse down over the sprite
|
||||
* @method mousedown
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the user releases the mouse that was over the sprite
|
||||
* for this callback to be fired the mouse must have been pressed down over the sprite
|
||||
* @method mouseup
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the users mouse rolls over the sprite
|
||||
* @method mouseover
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the users mouse leaves the sprite
|
||||
* @method mouseout
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/*
|
||||
* TOUCH Callbacks
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the users taps on the sprite with thier finger
|
||||
* basically a touch version of click
|
||||
* @method tap
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the user touch's over the sprite
|
||||
* @method touchstart
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A callback that is used when the user releases the touch that was over the sprite
|
||||
* for this callback to be fired. The touch must have started over the sprite
|
||||
* @method touchend
|
||||
* @param interactionData {InteractionData}
|
||||
*/
|
||||
}
|
||||
|
||||
// constructor
|
||||
|
@ -281,26 +218,13 @@ PIXI.Sprite.prototype.setTexture = function(texture)
|
|||
this.updateFrame = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the sprite will have touch and mouse interactivity. It is false by default
|
||||
* @method setInteractive
|
||||
* @param interactive {Boolean}
|
||||
*/
|
||||
PIXI.Sprite.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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
PIXI.Sprite.prototype.onTextureUpdate = function(event)
|
||||
{
|
||||
this.width = this.texture.frame.width;
|
||||
this.height = this.texture.frame.height;
|
||||
this.width = this.width || this.texture.frame.width;
|
||||
this.height = this.height || this.texture.frame.height;
|
||||
this.updateFrame = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -138,7 +138,9 @@ PIXI.Stage = function(backgroundColor, interactive)
|
|||
this.__childrenAdded = [];
|
||||
this.__childrenRemoved = [];
|
||||
this.childIndex = 0;
|
||||
this.stage= this;
|
||||
this.stage= this;
|
||||
|
||||
this.stage.hitArea = new PIXI.Rectangle(0,0,100000, 100000);
|
||||
|
||||
// interaction!
|
||||
this.interactive = !!interactive;
|
||||
|
@ -168,12 +170,11 @@ PIXI.Stage.prototype.updateTransform = function()
|
|||
if(this.dirty)
|
||||
{
|
||||
this.dirty = false;
|
||||
|
||||
// update interactive!
|
||||
this.interactionManager.dirty = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(this.interactive)this.interactionManager.update();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -189,16 +189,19 @@ PIXI.SpriteSheetLoader.prototype.onLoaded = function()
|
|||
for (var i in frameData)
|
||||
{
|
||||
var rect = frameData[i].frame;
|
||||
PIXI.TextureCache[i] = new PIXI.Texture(this.texture, {x:rect.x, y:rect.y, width:rect.w, height:rect.h});
|
||||
|
||||
if(frameData[i].trimmed)
|
||||
if (rect)
|
||||
{
|
||||
//var realSize = frameData[i].spriteSourceSize;
|
||||
PIXI.TextureCache[i].realSize = frameData[i].spriteSourceSize;
|
||||
PIXI.TextureCache[i].trim.x = 0// (realSize.x / rect.w)
|
||||
// calculate the offset!
|
||||
PIXI.TextureCache[i] = new PIXI.Texture(this.texture, {x:rect.x, y:rect.y, width:rect.w, height:rect.h});
|
||||
|
||||
if(frameData[i].trimmed)
|
||||
{
|
||||
//var realSize = frameData[i].spriteSourceSize;
|
||||
PIXI.TextureCache[i].realSize = frameData[i].spriteSourceSize;
|
||||
PIXI.TextureCache[i].trim.x = 0// (realSize.x / rect.w)
|
||||
// calculate the offset!
|
||||
}
|
||||
// this.frames[i] = ;
|
||||
}
|
||||
// this.frames[i] = ;
|
||||
}
|
||||
|
||||
if(this.texture.hasLoaded)
|
||||
|
|
|
@ -162,7 +162,7 @@ PIXI.WebGLRenderer = function(width, height, view, transparent)
|
|||
this.gl = this.view.getContext("experimental-webgl", {
|
||||
alpha: this.transparent,
|
||||
antialias:false, // SPEED UP??
|
||||
premultipliedAlpha:false
|
||||
premultipliedAlpha:true
|
||||
});
|
||||
}
|
||||
catch (e)
|
||||
|
@ -286,6 +286,15 @@ PIXI.WebGLRenderer.prototype.render = function(stage)
|
|||
{
|
||||
if(this.contextLost)return;
|
||||
|
||||
|
||||
|
||||
// if rendering a new stage clear the batchs..
|
||||
if(this.__stage !== stage)
|
||||
{
|
||||
if(this.__stage)this.checkVisibility(this.__stage, false)
|
||||
this.__stage = stage;
|
||||
}
|
||||
|
||||
// update children if need be
|
||||
// best to remove first!
|
||||
for (var i=0; i < stage.__childrenRemoved.length; i++)
|
||||
|
|
|
@ -274,23 +274,8 @@ PIXI.Texture.fromFrame = function(frameId)
|
|||
*/
|
||||
PIXI.Texture.fromCanvas = function(canvas)
|
||||
{
|
||||
// create a canvas id??
|
||||
var texture = PIXI.TextureCache[canvas];
|
||||
|
||||
if(!texture)
|
||||
{
|
||||
var baseTexture = PIXI.BaseTextureCache[canvas];
|
||||
if(!baseTexture)
|
||||
{
|
||||
baseTexture = new PIXI.BaseTexture(canvas);
|
||||
PIXI.BaseTextureCache[canvas] = baseTexture;
|
||||
}
|
||||
texture = new PIXI.Texture(baseTexture);
|
||||
|
||||
PIXI.TextureCache[canvas] = texture;
|
||||
}
|
||||
|
||||
return texture;
|
||||
var baseTexture = new PIXI.BaseTexture(canvas);
|
||||
return new PIXI.Texture(baseTexture);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue