Documentation first draft
This commit is contained in:
parent
5786d33f94
commit
0558060de2
65 changed files with 2106 additions and 423 deletions
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/DisplayObject.js - The Foo API</title>
|
||||
<title>pixi/DisplayObject.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/DisplayObjectContainer.js - The Foo API</title>
|
||||
<title>pixi/DisplayObjectContainer.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/MovieClip.js - The Foo API</title>
|
||||
<title>pixi/MovieClip.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/Pixi.js - The Foo API</title>
|
||||
<title>pixi/Pixi.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/Point.js - The Foo API</title>
|
||||
<title>pixi/Point.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/Rectangle.js - The Foo API</title>
|
||||
<title>pixi/Rectangle.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/Sprite.js - The Foo API</title>
|
||||
<title>pixi/Sprite.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
PIXI.blendModes = {};
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/Stage.js - The Foo API</title>
|
||||
<title>pixi/Stage.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
// constructor
|
||||
|
@ -141,6 +145,7 @@ PIXI.Stage.prototype = Object.create( PIXI.DisplayObjectContainer.prototype );
|
|||
|
||||
/**
|
||||
@method updateTransform
|
||||
@internal
|
||||
*/
|
||||
PIXI.Stage.prototype.updateTransform = function()
|
||||
{
|
||||
|
@ -151,15 +156,18 @@ PIXI.Stage.prototype.updateTransform = function()
|
|||
this.children[i].updateTransform();
|
||||
}
|
||||
}
|
||||
/*
|
||||
PIXI.Stage.prototype.setFilter = function(filters)
|
||||
{
|
||||
this.filters = filters;
|
||||
}*/
|
||||
|
||||
/**
|
||||
@method __addChild
|
||||
*/
|
||||
* @method setBackgroundColor
|
||||
* @param backgroundColor {Number}
|
||||
*/
|
||||
PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor)
|
||||
{
|
||||
this.backgroundColor = backgroundColor ? backgroundColor : 0x000000;
|
||||
this.backgroundColorSplit = HEXtoRGB(this.backgroundColor);
|
||||
this.backgroundColorString = "#" + this.backgroundColor.toString(16);
|
||||
}
|
||||
|
||||
PIXI.Stage.prototype.__addChild = function(child)
|
||||
{
|
||||
//this.__childrenAdded.push(child);
|
||||
|
@ -176,9 +184,7 @@ PIXI.Stage.prototype.__addChild = function(child)
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
@method __removeChild
|
||||
*/
|
||||
|
||||
PIXI.Stage.prototype.__removeChild = function(child)
|
||||
{
|
||||
this.__childrenRemoved.push(child);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/extras/Rope.js - The Foo API</title>
|
||||
<title>pixi/extras/Rope.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/extras/Strip.js - The Foo API</title>
|
||||
<title>pixi/extras/Strip.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/loaders/AssetLoader.js - The Foo API</title>
|
||||
<title>pixi/loaders/AssetLoader.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
* A Class that loads a bunch of images / 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 / 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 'loaded' event
|
||||
* As each individual item is loaded this class will dispatch a 'progress' event
|
||||
* @class AssetLoader
|
||||
|
@ -131,7 +131,6 @@ PIXI.AssetLoader = function(assetURLs)
|
|||
{
|
||||
PIXI.EventTarget.call( this );
|
||||
|
||||
|
||||
/**
|
||||
* The array of asset URLs that are going to be loaded
|
||||
* @property assetURLs
|
||||
|
@ -142,6 +141,16 @@ PIXI.AssetLoader = function(assetURLs)
|
|||
this.assets = [];
|
||||
}
|
||||
|
||||
/**
|
||||
Fired when an item has loaded
|
||||
@event onProgress
|
||||
**/
|
||||
|
||||
/**
|
||||
Fired when all the assets have loaded
|
||||
@event onComplete
|
||||
**/
|
||||
|
||||
// constructor
|
||||
PIXI.AssetLoader.constructor = PIXI.AssetLoader;
|
||||
|
||||
|
@ -160,7 +169,7 @@ PIXI.AssetLoader.prototype.load = function()
|
|||
var filename = this.assetURLs[i];
|
||||
var fileType = filename.split('.').pop().toLowerCase();
|
||||
// what are we loading?
|
||||
var type;
|
||||
var type = null;
|
||||
|
||||
for (var j=0; j < imageTypes.length; j++)
|
||||
{
|
||||
|
@ -171,7 +180,7 @@ PIXI.AssetLoader.prototype.load = function()
|
|||
}
|
||||
}
|
||||
|
||||
if(!type)
|
||||
if(type != "img")
|
||||
{
|
||||
for (var j=0; j < spriteSheetTypes.length; j++)
|
||||
{
|
||||
|
@ -185,6 +194,7 @@ PIXI.AssetLoader.prototype.load = function()
|
|||
|
||||
if(type == "img")
|
||||
{
|
||||
|
||||
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: 'progress', content: this } );
|
||||
this.dispatchEvent( { type: 'onProgress', content: this } );
|
||||
if(this.onProgress)this.onProgress();
|
||||
|
||||
if(this.loadCount == 0)
|
||||
{
|
||||
this.dispatchEvent( { type: 'loaded', content: this } );
|
||||
this.dispatchEvent( { type: 'onComplete', content: this } );
|
||||
if(this.onComplete)this.onComplete();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/loaders/SpriteSheetLoader.js - The Foo API</title>
|
||||
<title>pixi/loaders/SpriteSheetLoader.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/renderers/CanvasRenderer.js - The Foo API</title>
|
||||
<title>pixi/renderers/CanvasRenderer.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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 = "#FF0000";
|
||||
this.count = 0;
|
||||
|
||||
/**
|
||||
|
@ -187,6 +186,10 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
|
|||
stage.updateTransform();
|
||||
|
||||
this.context.setTransform(1,0,0,1,0,0);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/renderers/WebGLBatch.js - The Foo API</title>
|
||||
<title>pixi/renderers/WebGLBatch.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
PIXI._batchs = [];
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/renderers/WebGLRenderer.js - The Foo API</title>
|
||||
<title>pixi/renderers/WebGLRenderer.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
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's or Sprite Cloud'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);
|
||||
|
||||
// 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 && 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 && this.batchs[index-1].blendMode == this.batchs[index+1].blendMode)
|
||||
{
|
||||
//console.log("MERGE")
|
||||
this.batchs[index-1].merge(this.batchs[index+1]);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/renderers/WebGLShaders.js - The Foo API</title>
|
||||
<title>pixi/renderers/WebGLShaders.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
PIXI.shaderFragmentSrc = [ "precision mediump float;",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/textures/BaseTexture.js - The Foo API</title>
|
||||
<title>pixi/textures/BaseTexture.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
PIXI.BaseTextureCache = {};
|
||||
|
@ -158,7 +158,7 @@ PIXI.BaseTexture = function(imageUrl)
|
|||
scope.dispatchEvent( { type: 'loaded', content: scope } );
|
||||
}
|
||||
|
||||
$.proxy(this.onImageLoaded, this);
|
||||
//$.proxy(this.onImageLoaded, this);
|
||||
this.image.src = imageUrl;
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/textures/Texture.js - The Foo API</title>
|
||||
<title>pixi/textures/Texture.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
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
|
||||
*/
|
||||
PIXI.Texture.fromFrameId = function(frameId)
|
||||
PIXI.Texture.fromFrame = function(frameId)
|
||||
{
|
||||
var texture = PIXI.TextureCache[frameId];
|
||||
if(!texture)throw new Error("The frameId '"+ frameId +"' does not exist in the texture cache " + this);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/utils/Detector.js - The Foo API</title>
|
||||
<title>pixi/utils/Detector.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/utils/EventTarget.js - The Foo API</title>
|
||||
<title>pixi/utils/EventTarget.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>pixi/utils/Utils.js - The Foo API</title>
|
||||
<title>pixi/utils/Utils.js - Pixi.js API</title>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||||
|
@ -15,11 +15,11 @@
|
|||
<div id="hd" class="yui3-g header">
|
||||
<div class="yui3-u-3-4">
|
||||
|
||||
<h1><img src="../assets/css/logo.png" title="The Foo API"></h1>
|
||||
<h1><img src="../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 >> 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255];
|
||||
}
|
||||
|
||||
var AjaxRequest = function()
|
||||
{
|
||||
var activexmodes = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"] //activeX versions to check for in IE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue