docs updated

This commit is contained in:
Mat Groves 2013-04-06 21:09:38 +01:00
parent 7657d78604
commit 6dacba9b33
45 changed files with 1023 additions and 748 deletions

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;DisplayObject.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;DisplayObject.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;DisplayObject.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -182,8 +182,8 @@ PIXI.DisplayObject = function()
this.worldAlpha = 1;
this.color = [];
this.worldTransform = mat3.identity();
this.localTransform = mat3.identity();
this.worldTransform = PIXI.mat3.create()&#x2F;&#x2F;mat3.identity();
this.localTransform = PIXI.mat3.create()&#x2F;&#x2F;mat3.identity();
this.dynamic = true;
&#x2F;&#x2F; chach that puppy!
@ -211,20 +211,37 @@ PIXI.DisplayObject.prototype.updateTransform = function()
this._sr = Math.sin(this.rotation);
this._cr = Math.cos(this.rotation);
}
this.localTransform[0] = this._cr * this.scale.x;
this.localTransform[1] = -this._sr * this.scale.y
this.localTransform[3] = this._sr * this.scale.x;
this.localTransform[4] = this._cr * this.scale.y;
&#x2F;&#x2F;&#x2F;AAARR GETTER SETTTER!
var localTransform = this.localTransform;
var parentTransform = this.parent.worldTransform;
var worldTransform = this.worldTransform;
&#x2F;&#x2F;console.log(localTransform)
localTransform[0] = this._cr * this.scale.x;
localTransform[1] = -this._sr * this.scale.y
localTransform[3] = this._sr * this.scale.x;
localTransform[4] = this._cr * this.scale.y;
this.localTransform[2] = this.position.x;
this.localTransform[5] = this.position.y;
&#x2F;&#x2F;&#x2F;AAARR GETTER SETTTER!
localTransform[2] = this.position.x;
localTransform[5] = this.position.y;
&#x2F;&#x2F; Cache the matrix values (makes for huge speed increases!)
var a00 = localTransform[0], a01 = localTransform[1], a02 = localTransform[2],
a10 = localTransform[3], a11 = localTransform[4], a12 = localTransform[5],
&#x2F;&#x2F; TODO optimize?
mat3.multiply(this.localTransform, this.parent.worldTransform, this.worldTransform);
b00 = parentTransform[0], b01 = parentTransform[1], b02 = parentTransform[2],
b10 = parentTransform[3], b11 = parentTransform[4], b12 = parentTransform[5];
worldTransform[0] = b00 * a00 + b01 * a10;
worldTransform[1] = b00 * a01 + b01 * a11;
worldTransform[2] = b00 * a02 + b01 * a12 + b02;
worldTransform[3] = b10 * a00 + b11 * a10;
worldTransform[4] = b10 * a01 + b11 * a11;
worldTransform[5] = b10 * a02 + b11 * a12 + b12;
&#x2F;&#x2F; because we are using affine transformation, we can optimise the matrix concatenation process.. wooo!
&#x2F;&#x2F; mat3.multiply(this.localTransform, this.parent.worldTransform, this.worldTransform);
this.worldAlpha = this.alpha * this.parent.worldAlpha;
}

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;DisplayObjectContainer.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;DisplayObjectContainer.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;DisplayObjectContainer.js</h1>
<div class="file">
<pre class="code prettyprint linenums">

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>pixi&#x2F;InteractionManager.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">
<title>src&#x2F;pixi&#x2F;InteractionManager.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;InteractionManager.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;InteractionManager.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -143,7 +143,7 @@ PIXI.InteractionManager = function(stage)
&#x2F;&#x2F; helpers
this.tempPoint = new PIXI.Point();
this.tempMatrix = mat3.create();
&#x2F;&#x2F;this.tempMatrix = mat3.create();
this.mouseoverEnabled = true;
@ -277,7 +277,7 @@ PIXI.InteractionManager.prototype.hitTest = function(interactionData)
tempPoint.y = a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id;
var x1 = -item.width * item.anchor.x
var x1 = -item.width * item.anchor.x;
if(tempPoint.x &gt; x1 &amp;&amp; tempPoint.x &lt; x1 + item.width)
{
@ -349,12 +349,19 @@ PIXI.InteractionManager.prototype.onMouseDown = function(event)
PIXI.InteractionManager.prototype.onMouseUp = function(event)
{
if(this.currentOver)
{
this.mouse.target = this.currentOver;
if(this.currentOver.mouseup)this.currentOver.mouseup(this.mouse);
}
if(this.currentDown)
{
this.mouse.target = this.currentDown;
if(this.currentDown.mouseup)this.currentDown.mouseup(this.mouse);
&#x2F;&#x2F; click!
if(this.currentOver == this.currentDown)if(this.currentDown.click)this.currentDown.click(this.mouse);
if(this.currentOver == this.currentDown)if(this.currentDown.click)this.currentDown.click(this.mouse);
this.currentDown = null;
}
}

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;MovieClip.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;MovieClip.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;MovieClip.js</h1>
<div class="file">
<pre class="code prettyprint linenums">

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;Pixi.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;Pixi.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;Pixi.js</h1>
<div class="file">
<pre class="code prettyprint linenums">

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;Point.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;Point.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;Point.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -136,14 +136,14 @@ PIXI.Point = function(x, y)
* @type Number
* @default 0
*&#x2F;
this.x = x ? x : 0;
this.x = x || 0;
&#x2F;**
* @property y
* @type Number
* @default 0
*&#x2F;
this.y = y ? y : 0;
this.y = y || 0;
}
&#x2F;**

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;Rectangle.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;Rectangle.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;Rectangle.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -138,28 +138,28 @@ PIXI.Rectangle = function(x, y, width, height)
* @type Number
* @default 0
*&#x2F;
this.x = x ? x : 0;
this.x = x || 0;
&#x2F;**
* @property y
* @type Number
* @default 0
*&#x2F;
this.y = y ? y : 0;
this.y = y || 0;
&#x2F;**
* @property width
* @type Number
* @default 0
*&#x2F;
this.width = width ? width : 0;
this.width = width || 0;
&#x2F;**
* @property height
* @type Number
* @default 0
*&#x2F;
this.height = height ? height : 0;
this.height = height || 0;
}
&#x2F;**

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;Sprite.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;Sprite.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;Sprite.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -291,7 +291,7 @@ PIXI.Sprite.prototype.setInteractive = function(interactive)
this.interactive = interactive;
&#x2F;&#x2F; TODO more to be done here..
&#x2F;&#x2F; need to sort out a re-crawl!
if(stage)stage.dirty = true;
if(this.stage)this.stage.dirty = true;
}
&#x2F;**

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;Stage.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;Stage.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;Stage.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -134,14 +134,14 @@ PIXI.Stage = function(backgroundColor, interactive)
{
PIXI.DisplayObjectContainer.call( this );
this.worldTransform = mat3.identity();
this.worldTransform = PIXI.mat3.create()&#x2F;&#x2F;.&#x2F;&#x2F;identity();
this.__childrenAdded = [];
this.__childrenRemoved = [];
this.childIndex = 0;
this.stage= this;
&#x2F;&#x2F; interaction!
this.interactive = interactive ? true : false;
this.interactive = !!interactive;
this.interactionManager = new PIXI.InteractionManager(this);
this.setBackgroundColor(backgroundColor);
@ -182,7 +182,7 @@ PIXI.Stage.prototype.updateTransform = function()
*&#x2F;
PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor)
{
this.backgroundColor = backgroundColor ? backgroundColor : 0x000000;
this.backgroundColor = backgroundColor || 0x000000;
this.backgroundColorSplit = HEXtoRGB(this.backgroundColor);
this.backgroundColorString = &quot;#&quot; + this.backgroundColor.toString(16);
}

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;extras&#x2F;Rope.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;extras&#x2F;Rope.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;extras&#x2F;Rope.js</h1>
<div class="file">
<pre class="code prettyprint linenums">

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;extras&#x2F;Strip.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;extras&#x2F;Strip.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;extras&#x2F;Strip.js</h1>
<div class="file">
<pre class="code prettyprint linenums">

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;loaders&#x2F;AssetLoader.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;loaders&#x2F;AssetLoader.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;loaders&#x2F;AssetLoader.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -143,6 +143,8 @@ PIXI.AssetLoader = function(assetURLs)
this.assetURLs = assetURLs;
this.assets = [];
this.crossorigin = false;
}
&#x2F;**
@ -199,8 +201,8 @@ PIXI.AssetLoader.prototype.load = function()
if(type == &quot;img&quot;)
{
var texture = PIXI.Texture.fromImage(filename);
if(!texture.hasLoaded)
var texture = PIXI.Texture.fromImage(filename, this.crossorigin);
if(!texture.baseTexture.hasLoaded)
{
var scope = this;
@ -216,12 +218,19 @@ PIXI.AssetLoader.prototype.load = function()
&#x2F;&#x2F; already loaded!
this.loadCount--;
&#x2F;&#x2F; if this hits zero here.. then everything was cached!
if(this.loadCount == 0)
{
this.dispatchEvent( { type: &#x27;onComplete&#x27;, content: this } );
if(this.onComplete)this.onComplete();
}
}
}
else if(type == &quot;atlas&quot;)
{
var spriteSheetLoader = new PIXI.SpriteSheetLoader(filename);
spriteSheetLoader.crossorigin = this.crossorigin;
this.assets.push(spriteSheetLoader);
var scope = this;

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;loaders&#x2F;SpriteSheetLoader.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;loaders&#x2F;SpriteSheetLoader.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;loaders&#x2F;SpriteSheetLoader.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -147,7 +147,8 @@ PIXI.SpriteSheetLoader = function(url)
this.url = url;
this.baseUrl = url.replace(&#x2F;[^\&#x2F;]*$&#x2F;, &#x27;&#x27;);
this.texture;
this.frames = {};
this.frames = {};
this.crossorigin = false;
}
&#x2F;&#x2F; constructor
@ -180,7 +181,7 @@ PIXI.SpriteSheetLoader.prototype.onLoaded = function()
var textureUrl = this.baseUrl + jsondata.meta.image;
this.texture = PIXI.Texture.fromImage(textureUrl).baseTexture;
this.texture = PIXI.Texture.fromImage(textureUrl, this.crossorigin).baseTexture;
&#x2F;&#x2F; if(!this.texture)this.texture = new PIXI.Texture(textureUrl);

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;renderers&#x2F;CanvasRenderer.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;renderers&#x2F;CanvasRenderer.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;renderers&#x2F;CanvasRenderer.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -122,30 +122,39 @@
* @author Mat Groves http:&#x2F;&#x2F;matgroves.com&#x2F; @Doormat23
*&#x2F;
&#x2F;**
* 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
* @constructor
* @param width {Number} the width of the canvas view
* @default 0
* @param height {Number} the height of the canvas view
* @default 0
* @param view {Canvas} the canvas to use as a view, optional
* @param transparent {Boolean} the transparency of the render view, default false
* @default false
*
*&#x2F;
PIXI.CanvasRenderer = function(width, height, view)
PIXI.CanvasRenderer = function(width, height, view, transparent)
{
this.transparent = transparent;
&#x2F;**
* The width of the canvas view
* @property width
* @type Number
* @default 800
*&#x2F;
this.width = width ? width : 800;
this.width = width || 800;
&#x2F;**
* The height of the canvas view
* @property height
* @type Number
* @default 600
*&#x2F;
this.height = height ? height : 600;
this.height = height || 600;
this.refresh = true;
@ -154,7 +163,7 @@ PIXI.CanvasRenderer = function(width, height, view)
* @property view
* @type Canvas
*&#x2F;
this.view = view ? view : document.createElement( &#x27;canvas&#x27; );
this.view = view || document.createElement( &#x27;canvas&#x27; );
&#x2F;&#x2F; hack to enable some hardware acceleration!
&#x2F;&#x2F;this.view.style[&quot;transform&quot;] = &quot;translatez(0)&quot;;
@ -195,7 +204,7 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
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;
if(this.view.style.backgroundColor!=stage.backgroundColorString &amp;&amp; !this.transparent)this.view.style.backgroundColor = stage.backgroundColorString;
this.context.clearRect(0, 0, this.width, this.height)
this.renderDisplayObject(stage);

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;renderers&#x2F;WebGLBatch.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;renderers&#x2F;WebGLBatch.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;renderers&#x2F;WebGLBatch.js</h1>
<div class="file">
<pre class="code prettyprint linenums">

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;renderers&#x2F;WebGLRenderer.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;renderers&#x2F;WebGLRenderer.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;renderers&#x2F;WebGLRenderer.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -134,16 +134,21 @@ PIXI._defaultFrame = new PIXI.Rectangle(0,0,1,1);
* @param height {Number} the height of the canvas view
* @default 0
* @param view {Canvas} the canvas to use as a view, optional
* @param transparent {Boolean} the transparency of the render view, default false
* @default false
*
*&#x2F;
PIXI.WebGLRenderer = function(width, height, view)
PIXI.WebGLRenderer = function(width, height, view, transparent)
{
this.width = width ? width : 800;
this.height = height ? height : 600;
&#x2F;&#x2F;console.log(transparent)
this.transparent = !!transparent;
this.view = view ? view : document.createElement( &#x27;canvas&#x27; );
this.width = width || 800;
this.height = height || 600;
this.view = view || document.createElement( &#x27;canvas&#x27; );
this.view.width = this.width;
this.view.height = this.height;
this.view.background = &quot;#FF0000&quot;;
&#x2F;&#x2F; deal with losing context..
var scope = this;
@ -155,7 +160,9 @@ PIXI.WebGLRenderer = function(width, height, view)
try
{
this.gl = this.view.getContext(&quot;experimental-webgl&quot;, {
alpha: false
alpha: this.transparent,
antialias:false, &#x2F;&#x2F; SPEED UP??
premultipliedAlpha:false
});
}
catch (e)
@ -171,10 +178,9 @@ PIXI.WebGLRenderer = function(width, height, view)
this.batch = new PIXI.WebGLBatch(gl);
gl.disable(gl.DEPTH_TEST);
gl.enable(gl.BLEND);
gl.colorMask(true, true, true, false);
this.projectionMatrix = mat4.create();
gl.colorMask(true, true, true, this.transparent);
this.projectionMatrix = PIXI.mat4.create();
this.resize(this.width, this.height)
this.contextLost = false;
}
@ -249,8 +255,6 @@ PIXI.WebGLRenderer.prototype.checkVisibility = function(displayObject, globalVis
&#x2F;&#x2F; update texture!!
}
if(child.cacheVisible != actualVisibility)
{
child.cacheVisible = actualVisibility;
@ -269,8 +273,6 @@ PIXI.WebGLRenderer.prototype.checkVisibility = function(displayObject, globalVis
{
this.checkVisibility(child, actualVisibility);
}
};
}
@ -289,15 +291,9 @@ PIXI.WebGLRenderer.prototype.render = function(stage)
for (var i=0; i &lt; stage.__childrenRemoved.length; i++)
{
this.removeDisplayObject(stage.__childrenRemoved[i]);
&#x2F;&#x2F; stage.__childrenRemoved[i].cacheVisible = false;
}
&#x2F;*
&#x2F;&#x2F; no add all new sprites
for (var i=0; i &lt; stage.__childrenAdded.length; i++)
{
stage.__childrenAdded[i].cacheVisible = false;
&#x2F;&#x2F; this.addDisplayObject(stage.__childrenAdded[i]);
}*&#x2F;
&#x2F;&#x2F; update any textures
for (var i=0; i &lt; PIXI.texturesToUpdate.length; i++) this.updateTexture(PIXI.texturesToUpdate[i]);
@ -309,14 +305,15 @@ PIXI.WebGLRenderer.prototype.render = function(stage)
&#x2F;&#x2F; recursivly loop through all items!
this.checkVisibility(stage, true);
&#x2F;&#x2F; update the scen graph
&#x2F;&#x2F; update the scene graph
stage.updateTransform();
var gl = this.gl;
gl.clear(gl.COLOR_BUFFER_BIT)
gl.clearColor(stage.backgroundColorSplit[0], stage.backgroundColorSplit[1], stage.backgroundColorSplit[2], 1.0);
gl.clearColor(stage.backgroundColorSplit[0], stage.backgroundColorSplit[1], stage.backgroundColorSplit[2], 0);
&#x2F;&#x2F; set the correct blend mode!
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
@ -670,10 +667,13 @@ PIXI.WebGLRenderer.prototype.resize = function(width, height)
this.view.height = height;
this.gl.viewport(0, 0, this.width, this.height);
mat4.identity(this.projectionMatrix);
mat4.scale(this.projectionMatrix, [2&#x2F;this.width, -2&#x2F;this.height, 1]);
mat4.translate(this.projectionMatrix, [-this.width&#x2F;2, -this.height&#x2F;2, 0]);
var projectionMatrix = this.projectionMatrix;
projectionMatrix[0] = 2&#x2F;this.width;
projectionMatrix[5] = -2&#x2F;this.height;
projectionMatrix[12] = -1;
projectionMatrix[13] = 1;
}
&#x2F;**
@ -712,10 +712,9 @@ PIXI.WebGLRenderer.prototype.renderStrip = function(strip)
var gl = this.gl;
var shaderProgram = this.shaderProgram;
&#x2F;&#x2F; mat
var mat4Real = mat3.toMat4(strip.worldTransform);
mat4.transpose(mat4Real);
mat4.multiply(this.projectionMatrix, mat4Real, mat4Real )
var mat4Real = PIXI.mat3.toMat4(strip.worldTransform);
PIXI.mat4.transpose(mat4Real);
PIXI.mat4.multiply(this.projectionMatrix, mat4Real, mat4Real )
gl.uniformMatrix4fv(this.shaderProgram.mvMatrixUniform, false, mat4Real);

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;renderers&#x2F;WebGLShaders.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;renderers&#x2F;WebGLShaders.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;renderers&#x2F;WebGLShaders.js</h1>
<div class="file">
<pre class="code prettyprint linenums">

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;textures&#x2F;BaseTexture.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;textures&#x2F;BaseTexture.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;textures&#x2F;BaseTexture.js</h1>
<div class="file">
<pre class="code prettyprint linenums">

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;textures&#x2F;Texture.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;textures&#x2F;Texture.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;textures&#x2F;Texture.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -202,6 +202,11 @@ PIXI.Texture.prototype.setFrame = function(frame)
this.frame = frame;
this.width = frame.width;
this.height = frame.height;
if(frame.x + frame.width &gt; this.baseTexture.width || frame.y + frame.height &gt; this.baseTexture.height)
{
throw new Error(&quot;Texture Error: frame does not fit inside the base Texture dimensions &quot; + this);
}
&#x2F;&#x2F;this.updateFrame = true;
}
@ -214,7 +219,7 @@ PIXI.Texture.prototype.setFrame = function(frame)
* @param imageUrl {String} The image url of the texture
* @return Texture
*&#x2F;
PIXI.Texture.fromImage = function(imageUrl)
PIXI.Texture.fromImage = function(imageUrl, crossorigin)
{
var texture = PIXI.TextureCache[imageUrl];
@ -224,8 +229,11 @@ PIXI.Texture.fromImage = function(imageUrl)
if(!baseTexture)
{
var image = new Image();&#x2F;&#x2F;new Image();
if (crossorigin)
{
image.crossOrigin = &#x27;&#x27;;
}
image.src = imageUrl;
baseTexture = new PIXI.BaseTexture(image);
PIXI.BaseTextureCache[imageUrl] = baseTexture;
}

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;utils&#x2F;Detector.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;utils&#x2F;Detector.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;utils&#x2F;Detector.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -130,8 +130,10 @@
* @param width {Number} the width of the renderers view
* @param height {Number} the height of the renderers view
* @param view {Canvas} the canvas to use as a view, optional
* @param transparent {Boolean} the transparency of the render view, default false
* @default false
*&#x2F;
PIXI.autoDetectRenderer = function(width, height, view)
PIXI.autoDetectRenderer = function(width, height, view, transparent)
{
if(!width)width = 800;
if(!height)height = 600;
@ -142,10 +144,10 @@ PIXI.autoDetectRenderer = function(width, height, view)
&#x2F;&#x2F;console.log(webgl);
if( webgl )
{
return new PIXI.WebGLRenderer(width, height, view);
return new PIXI.WebGLRenderer(width, height, view, transparent);
}
return new PIXI.CanvasRenderer(width, height, view);
return new PIXI.CanvasRenderer(width, height, view, transparent);
};

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;utils&#x2F;EventTarget.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;utils&#x2F;EventTarget.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;utils&#x2F;EventTarget.js</h1>
<div class="file">
<pre class="code prettyprint linenums">
@ -127,7 +127,7 @@ PIXI.EventTarget = function () {
var listeners = {};
this.addEventListener = function ( type, listener ) {
this.addEventListener = this.on = function ( type, listener ) {
if ( listeners[ type ] === undefined ) {
@ -143,7 +143,7 @@ PIXI.EventTarget = function () {
};
this.dispatchEvent = function ( event ) {
this.dispatchEvent = this.emit = function ( event ) {
for ( var listener in listeners[ event.type ] ) {
@ -153,7 +153,7 @@ PIXI.EventTarget = function () {
};
this.removeEventListener = function ( type, listener ) {
this.removeEventListener = this.off = function ( type, listener ) {
var index = listeners[ type ].indexOf( listener );

View file

@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<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">
<title>src&#x2F;pixi&#x2F;utils&#x2F;Utils.js - Pixi.JS</title>
<link rel="stylesheet" href="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;3.8.0&#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">
<link rel="shortcut icon" type="image/png" href="..&#x2F;assets/favicon.png">
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0pr2&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
<script src="http:&#x2F;&#x2F;yui.yahooapis.com&#x2F;combo?3.8.0&#x2F;build&#x2F;yui&#x2F;yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
@ -15,11 +15,11 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.js API"></h1>
<h1><img src="http:&#x2F;&#x2F;www.goodboydigital.com&#x2F;pixijs&#x2F;logo_small.png" title="Pixi.JS"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 1.0</em>
<em>API Docs for: 1.0.0</em>
</div>
</div>
<div id="bd" class="yui3-g">
@ -114,7 +114,7 @@
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1 class="file-heading">File: pixi&#x2F;utils&#x2F;Utils.js</h1>
<h1 class="file-heading">File: src&#x2F;pixi&#x2F;utils&#x2F;Utils.js</h1>
<div class="file">
<pre class="code prettyprint linenums">