Documentation first draft

This commit is contained in:
Mat Groves 2013-02-24 17:12:35 +00:00
parent 5786d33f94
commit 0558060de2
65 changed files with 2106 additions and 423 deletions

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;DisplayObject.js - The Foo API</title>
<title>pixi&#x2F;DisplayObject.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;DisplayObjectContainer.js - The Foo API</title>
<title>pixi&#x2F;DisplayObjectContainer.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;MovieClip.js - The Foo API</title>
<title>pixi&#x2F;MovieClip.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,12 +115,13 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**
* A MovieClip is a simple way to display an animation depicted by a list of textures.
* @class MovieClip
* @extends Sprite
* @constructor
* @param textures {Array} an array of {Texture} objects that make up the animation
*&#x2F;

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;Pixi.js - The Foo API</title>
<title>pixi&#x2F;Pixi.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;Point.js - The Foo API</title>
<title>pixi&#x2F;Point.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;Rectangle.js - The Foo API</title>
<title>pixi&#x2F;Rectangle.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;Sprite.js - The Foo API</title>
<title>pixi&#x2F;Sprite.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
PIXI.blendModes = {};

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;Stage.js - The Foo API</title>
<title>pixi&#x2F;Stage.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**
@ -123,15 +123,19 @@ A Stage represents the root of the display tree. Everything connected to the sta
@class Stage
@extends DisplayObjectContainer
@constructor
@param backgroundColor {Number} the background color of the stage
*&#x2F;
PIXI.Stage = function()
PIXI.Stage = function(backgroundColor)
{
PIXI.DisplayObjectContainer.call( this );
this.worldTransform = mat3.identity();
this.__childrenAdded = [];
this.__childrenRemoved = [];
this.childIndex = 0;
this.stage= this;
this.setBackgroundColor(backgroundColor);
}
&#x2F;&#x2F; constructor
@ -141,6 +145,7 @@ PIXI.Stage.prototype = Object.create( PIXI.DisplayObjectContainer.prototype );
&#x2F;**
@method updateTransform
@internal
*&#x2F;
PIXI.Stage.prototype.updateTransform = function()
{
@ -151,15 +156,18 @@ PIXI.Stage.prototype.updateTransform = function()
this.children[i].updateTransform();
}
}
&#x2F;*
PIXI.Stage.prototype.setFilter = function(filters)
{
this.filters = filters;
}*&#x2F;
&#x2F;**
@method __addChild
*&#x2F;
* @method setBackgroundColor
* @param backgroundColor {Number}
*&#x2F;
PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor)
{
this.backgroundColor = backgroundColor ? backgroundColor : 0x000000;
this.backgroundColorSplit = HEXtoRGB(this.backgroundColor);
this.backgroundColorString = &quot;#&quot; + this.backgroundColor.toString(16);
}
PIXI.Stage.prototype.__addChild = function(child)
{
&#x2F;&#x2F;this.__childrenAdded.push(child);
@ -176,9 +184,7 @@ PIXI.Stage.prototype.__addChild = function(child)
}
&#x2F;**
@method __removeChild
*&#x2F;
PIXI.Stage.prototype.__removeChild = function(child)
{
this.__childrenRemoved.push(child);

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;extras&#x2F;Rope.js - The Foo API</title>
<title>pixi&#x2F;extras&#x2F;Rope.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;extras&#x2F;Strip.js - The Foo API</title>
<title>pixi&#x2F;extras&#x2F;Strip.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;loaders&#x2F;AssetLoader.js - The Foo API</title>
<title>pixi&#x2F;loaders&#x2F;AssetLoader.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,11 +115,11 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**
* A Class that loads a bunch of images &#x2F; sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrameId(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId()
* A Class that loads a bunch of images &#x2F; sprite sheet files. Once the assets have been loaded they are added to the PIXI Texture cache and can be accessed easily through PIXI.Texture.fromFrame(), PIXI.Texture.fromImage() and PIXI.Sprite.fromImage(), PIXI.Sprite.fromFromeId()
* When all items have been loaded this class will dispatch a &#x27;loaded&#x27; event
* As each individual item is loaded this class will dispatch a &#x27;progress&#x27; event
* @class AssetLoader
@ -131,7 +131,6 @@ PIXI.AssetLoader = function(assetURLs)
{
PIXI.EventTarget.call( this );
&#x2F;**
* The array of asset URLs that are going to be loaded
* @property assetURLs
@ -142,6 +141,16 @@ PIXI.AssetLoader = function(assetURLs)
this.assets = [];
}
&#x2F;**
Fired when an item has loaded
@event onProgress
**&#x2F;
&#x2F;**
Fired when all the assets have loaded
@event onComplete
**&#x2F;
&#x2F;&#x2F; constructor
PIXI.AssetLoader.constructor = PIXI.AssetLoader;
@ -160,7 +169,7 @@ PIXI.AssetLoader.prototype.load = function()
var filename = this.assetURLs[i];
var fileType = filename.split(&#x27;.&#x27;).pop().toLowerCase();
&#x2F;&#x2F; what are we loading?
var type;
var type = null;
for (var j=0; j &lt; imageTypes.length; j++)
{
@ -171,7 +180,7 @@ PIXI.AssetLoader.prototype.load = function()
}
}
if(!type)
if(type != &quot;img&quot;)
{
for (var j=0; j &lt; spriteSheetTypes.length; j++)
{
@ -185,6 +194,7 @@ PIXI.AssetLoader.prototype.load = function()
if(type == &quot;img&quot;)
{
var texture = PIXI.Texture.fromImage(filename);
if(!texture.hasLoaded)
{
@ -232,11 +242,13 @@ PIXI.AssetLoader.prototype.load = function()
PIXI.AssetLoader.prototype.onAssetLoaded = function()
{
this.loadCount--;
this.dispatchEvent( { type: &#x27;progress&#x27;, content: this } );
this.dispatchEvent( { type: &#x27;onProgress&#x27;, content: this } );
if(this.onProgress)this.onProgress();
if(this.loadCount == 0)
{
this.dispatchEvent( { type: &#x27;loaded&#x27;, content: this } );
this.dispatchEvent( { type: &#x27;onComplete&#x27;, content: this } );
if(this.onComplete)this.onComplete();
}
}

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;loaders&#x2F;SpriteSheetLoader.js - The Foo API</title>
<title>pixi&#x2F;loaders&#x2F;SpriteSheetLoader.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;renderers&#x2F;CanvasRenderer.js - The Foo API</title>
<title>pixi&#x2F;renderers&#x2F;CanvasRenderer.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,11 +115,11 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**
* the CanvasRenderer is draws the stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.
* the CanvasRenderer draws the stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.
* Dont forget to add the view to your DOM or you will not see anything :)
* @class CanvasRenderer
* @param width {Number} the width of the canvas view
@ -153,7 +153,6 @@ PIXI.CanvasRenderer = function(width, height)
this.view.width = this.width;
this.view.height = this.height;
this.view.background = &quot;#FF0000&quot;;
this.count = 0;
&#x2F;**
@ -187,6 +186,10 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
stage.updateTransform();
this.context.setTransform(1,0,0,1,0,0);
&#x2F;&#x2F; update the background color
if(this.view.style.backgroundColor!=stage.backgroundColorString)this.view.style.backgroundColor = stage.backgroundColorString;
this.context.clearRect(0, 0, this.width, this.height)
this.renderDisplayObject(stage);
}

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;renderers&#x2F;WebGLBatch.js - The Foo API</title>
<title>pixi&#x2F;renderers&#x2F;WebGLBatch.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
PIXI._batchs = [];

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;renderers&#x2F;WebGLRenderer.js - The Foo API</title>
<title>pixi&#x2F;renderers&#x2F;WebGLRenderer.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
PIXI._defaultFrame = new PIXI.Rectangle(0,0,1,1);
@ -124,6 +124,7 @@ PIXI._defaultFrame = new PIXI.Rectangle(0,0,1,1);
* the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. So no need for Sprite Batch&#x27;s or Sprite Cloud&#x27;s
* Dont forget to add the view to your DOM or you will not see anything :)
* @class WebGLRenderer
* @constructor
* @param width {Number} the width of the canvas view
* @default 0
* @param height {Number} the height of the canvas view
@ -310,7 +311,7 @@ PIXI.WebGLRenderer.prototype.render = function(stage)
gl.clear(gl.COLOR_BUFFER_BIT)
gl.clearColor(0, 0, 0, 1.0);
gl.clearColor(stage.backgroundColorSplit[0], stage.backgroundColorSplit[1], stage.backgroundColorSplit[2], 1.0);
&#x2F;&#x2F; set the correct blend mode!
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
@ -618,7 +619,7 @@ PIXI.WebGLRenderer.prototype.removeDisplayObject = function(displayObject)
if(this.batchs[index-1] instanceof PIXI.WebGLBatch &amp;&amp; this.batchs[index+1] instanceof PIXI.WebGLBatch)
{
if(this.batchs[index-1].texture == this.batchs[index+1].texture)
if(this.batchs[index-1].texture == this.batchs[index+1].texture &amp;&amp; this.batchs[index-1].blendMode == this.batchs[index+1].blendMode)
{
&#x2F;&#x2F;console.log(&quot;MERGE&quot;)
this.batchs[index-1].merge(this.batchs[index+1]);

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;renderers&#x2F;WebGLShaders.js - The Foo API</title>
<title>pixi&#x2F;renderers&#x2F;WebGLShaders.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -116,7 +116,7 @@
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
PIXI.shaderFragmentSrc = [ &quot;precision mediump float;&quot;,

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;textures&#x2F;BaseTexture.js - The Foo API</title>
<title>pixi&#x2F;textures&#x2F;BaseTexture.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
PIXI.BaseTextureCache = {};
@ -158,7 +158,7 @@ PIXI.BaseTexture = function(imageUrl)
scope.dispatchEvent( { type: &#x27;loaded&#x27;, content: scope } );
}
$.proxy(this.onImageLoaded, this);
&#x2F;&#x2F;$.proxy(this.onImageLoaded, this);
this.image.src = imageUrl;
&#x2F;**

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;textures&#x2F;Texture.js - The Foo API</title>
<title>pixi&#x2F;textures&#x2F;Texture.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
PIXI.TextureCache = {};
@ -229,11 +229,11 @@ PIXI.Texture.fromImage = function(imageUrl)
*
* Helper function that returns a texture based on a frame id
* If the frame id is not in the texture cache an error will be thrown
* @method fromFrameId
* @method fromFrame
* @param frameId {String} The frame id of the texture
* @return Texture
*&#x2F;
PIXI.Texture.fromFrameId = function(frameId)
PIXI.Texture.fromFrame = function(frameId)
{
var texture = PIXI.TextureCache[frameId];
if(!texture)throw new Error(&quot;The frameId &#x27;&quot;+ frameId +&quot;&#x27; does not exist in the texture cache &quot; + this);

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;utils&#x2F;Detector.js - The Foo API</title>
<title>pixi&#x2F;utils&#x2F;Detector.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -115,7 +115,7 @@
<div class="file">
<pre class="code prettyprint linenums">
&#x2F;**
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F;
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;utils&#x2F;EventTarget.js - The Foo API</title>
<title>pixi&#x2F;utils&#x2F;EventTarget.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;utils&#x2F;Utils.js - The Foo API</title>
<title>pixi&#x2F;utils&#x2F;Utils.js - Pixi.js API</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0pr2&#x2F;build&#x2F;cssgrids&#x2F;cssgrids-min.css">
<link rel="stylesheet" href="..&#x2F;assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="..&#x2F;assets/css/main.css" id="site_styles">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="..&#x2F;assets/css/logo.png" title="The Foo API"></h1>
<h1><img src="..&#x2F;logo_small.png" title="Pixi.js API"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.2.1</em>
<em>API Docs for: 0.9</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -128,6 +128,10 @@ window.requestAnimFrame = (function() {
};
})();
function HEXtoRGB(hex) {
return [(hex &gt;&gt; 16 &amp; 0xFF) &#x2F; 255, ( hex &gt;&gt; 8 &amp; 0xFF) &#x2F; 255, (hex &amp; 0xFF)&#x2F; 255];
}
var AjaxRequest = function()
{
var activexmodes = [&quot;Msxml2.XMLHTTP&quot;, &quot;Microsoft.XMLHTTP&quot;] &#x2F;&#x2F;activeX versions to check for in IE