Interactivity Added
-Interaction Manager added to pixi.js to enable mouse and touch interactivity. - Interactive example added to examples folder - docs updated - build file updated
This commit is contained in:
parent
9a0cd873b5
commit
f5cc062922
63 changed files with 4844 additions and 280 deletions
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../logo_small.png" title="Pixi.js API"></h1>
|
||||
<h1><img src="http://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.js API"></h1>
|
||||
|
||||
</div>
|
||||
<div class="yui3-u-1-4 version">
|
||||
<em>API Docs for: 0.9</em>
|
||||
<em>API Docs for: 1.0</em>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bd" class="yui3-g">
|
||||
|
@ -51,6 +51,10 @@
|
|||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionData.html">InteractionData</a></li>
|
||||
|
||||
<li><a href="../classes/InteractionManager.html">InteractionManager</a></li>
|
||||
|
||||
<li><a href="../classes/MovieClip.html">MovieClip</a></li>
|
||||
|
||||
<li><a href="../classes/Point.html">Point</a></li>
|
||||
|
@ -129,13 +133,14 @@ PIXI._defaultFrame = new PIXI.Rectangle(0,0,1,1);
|
|||
* @default 0
|
||||
* @param height {Number} the height of the canvas view
|
||||
* @default 0
|
||||
* @param view {Canvas} the canvas to use as a view, optional
|
||||
*/
|
||||
PIXI.WebGLRenderer = function(width, height)
|
||||
PIXI.WebGLRenderer = function(width, height, view)
|
||||
{
|
||||
this.width = width ? width : 800;
|
||||
this.height = height ? height : 600;
|
||||
|
||||
this.view = document.createElement( 'canvas' );
|
||||
this.view = view ? view : document.createElement( 'canvas' );
|
||||
this.view.width = this.width;
|
||||
this.view.height = this.height;
|
||||
this.view.background = "#FF0000";
|
||||
|
@ -284,7 +289,7 @@ PIXI.WebGLRenderer.prototype.render = function(stage)
|
|||
for (var i=0; i < stage.__childrenRemoved.length; i++)
|
||||
{
|
||||
this.removeDisplayObject(stage.__childrenRemoved[i]);
|
||||
// stage.__childrenRemoved[i].cacheVisible = false;
|
||||
// stage.__childrenRemoved[i].cacheVisible = false;
|
||||
}
|
||||
/*
|
||||
// no add all new sprites
|
||||
|
@ -334,6 +339,17 @@ PIXI.WebGLRenderer.prototype.render = function(stage)
|
|||
}
|
||||
}
|
||||
|
||||
// interaction
|
||||
// run interaction!
|
||||
if(stage.interactive)
|
||||
{
|
||||
//need to add some events!
|
||||
if(!stage._interactiveEventsAdded)
|
||||
{
|
||||
stage._interactiveEventsAdded = true;
|
||||
stage.interactionManager.setTarget(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue