merge dev into master

This commit is contained in:
Chad Engler 2014-02-13 08:06:25 -08:00
commit 58f9cf44bb
10 changed files with 31 additions and 13 deletions

View file

@ -5,6 +5,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-yuidoc'); grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadTasks('tasks'); grunt.loadTasks('tasks');

View file

@ -25,8 +25,7 @@
var sprite= PIXI.Sprite.fromImage("spinObj_02.png"); var sprite= PIXI.Sprite.fromImage("spinObj_02.png");
//stage.addChild(sprite); //stage.addChild(sprite);
// create a renderer instance // create a renderer instance
// the 5the parameter is the anti aliasing var renderer = PIXI.autoDetectRenderer(620, 380, null, false /* transparent */, true /* antialias */);
var renderer = PIXI.autoDetectRenderer(620, 380, null, false, true);
// set the canvas width and height to fill the screen // set the canvas width and height to fill the screen
//renderer.view.style.width = window.innerWidth + "px"; //renderer.view.style.width = window.innerWidth + "px";

View file

@ -32,7 +32,8 @@
// create a renderer instance // create a renderer instance
var renderer = PIXI.autoDetectRenderer(400, 300,false,true); var renderer = PIXI.autoDetectRenderer(400, 300, null, true, true);
// add the renderer view element to the DOM // add the renderer view element to the DOM
document.body.appendChild(renderer.view); document.body.appendChild(renderer.view);

View file

@ -16,7 +16,7 @@ PIXI.WEBGL_RENDERER = 0;
PIXI.CANVAS_RENDERER = 1; PIXI.CANVAS_RENDERER = 1;
// useful for testing against if your lib is using pixi. // useful for testing against if your lib is using pixi.
PIXI.VERSION = "v1.4.4"; PIXI.VERSION = "v1.5.0";
// the various blend modes supported by pixi // the various blend modes supported by pixi
PIXI.blendModes = { PIXI.blendModes = {

View file

@ -466,8 +466,8 @@ PIXI.Sprite.fromFrame = function(frameId)
* @param imageId {String} The image url of the texture * @param imageId {String} The image url of the texture
* @return {Sprite} A new Sprite using a texture from the texture cache matching the image id * @return {Sprite} A new Sprite using a texture from the texture cache matching the image id
*/ */
PIXI.Sprite.fromImage = function(imageId) PIXI.Sprite.fromImage = function(imageId, crossorigin, scaleMode)
{ {
var texture = PIXI.Texture.fromImage(imageId); var texture = PIXI.Texture.fromImage(imageId, crossorigin, scaleMode);
return new PIXI.Sprite(texture); return new PIXI.Sprite(texture);
}; };

View file

@ -169,6 +169,8 @@ PIXI.Graphics.prototype.lineStyle = function(lineWidth, color, alpha)
fillColor:this.fillColor, fillAlpha:this.fillAlpha, fill:this.filling, points:[], type:PIXI.Graphics.POLY}; fillColor:this.fillColor, fillAlpha:this.fillAlpha, fill:this.filling, points:[], type:PIXI.Graphics.POLY};
this.graphicsData.push(this.currentPath); this.graphicsData.push(this.currentPath);
return this;
}; };
/** /**
@ -188,6 +190,8 @@ PIXI.Graphics.prototype.moveTo = function(x, y)
this.currentPath.points.push(x, y); this.currentPath.points.push(x, y);
this.graphicsData.push(this.currentPath); this.graphicsData.push(this.currentPath);
return this;
}; };
/** /**
@ -202,6 +206,8 @@ PIXI.Graphics.prototype.lineTo = function(x, y)
{ {
this.currentPath.points.push(x, y); this.currentPath.points.push(x, y);
this.dirty = true; this.dirty = true;
return this;
}; };
/** /**
@ -218,6 +224,8 @@ PIXI.Graphics.prototype.beginFill = function(color, alpha)
this.filling = true; this.filling = true;
this.fillColor = color || 0; this.fillColor = color || 0;
this.fillAlpha = (arguments.length < 2) ? 1 : alpha; this.fillAlpha = (arguments.length < 2) ? 1 : alpha;
return this;
}; };
/** /**
@ -230,6 +238,8 @@ PIXI.Graphics.prototype.endFill = function()
this.filling = false; this.filling = false;
this.fillColor = null; this.fillColor = null;
this.fillAlpha = 1; this.fillAlpha = 1;
return this;
}; };
/** /**
@ -250,6 +260,8 @@ PIXI.Graphics.prototype.drawRect = function( x, y, width, height )
this.graphicsData.push(this.currentPath); this.graphicsData.push(this.currentPath);
this.dirty = true; this.dirty = true;
return this;
}; };
/** /**
@ -271,6 +283,8 @@ PIXI.Graphics.prototype.drawCircle = function( x, y, radius)
this.graphicsData.push(this.currentPath); this.graphicsData.push(this.currentPath);
this.dirty = true; this.dirty = true;
return this;
}; };
/** /**
@ -293,6 +307,8 @@ PIXI.Graphics.prototype.drawEllipse = function( x, y, width, height)
this.graphicsData.push(this.currentPath); this.graphicsData.push(this.currentPath);
this.dirty = true; this.dirty = true;
return this;
}; };
/** /**
@ -310,6 +326,8 @@ PIXI.Graphics.prototype.clear = function()
this.graphicsData = []; this.graphicsData = [];
this.bounds = null; //new PIXI.Rectangle(); this.bounds = null; //new PIXI.Rectangle();
return this;
}; };
/** /**

View file

@ -273,7 +273,7 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
// set the textures uvs temporarily // set the textures uvs temporarily
// TODO create a separate texture so that we can tile part of a texture // TODO create a separate texture so that we can tile part of a texture
if(!tilingSprite._uvs)tilingSprite._uvs = new Float32Array(8); if(!tilingSprite._uvs)tilingSprite._uvs = new PIXI.TextureUvs();
var uvs = tilingSprite._uvs; var uvs = tilingSprite._uvs;
@ -298,7 +298,6 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
uvs.x3 = 0 - offsetX; uvs.x3 = 0 - offsetX;
uvs.y3 = (1 *scaleY) - offsetY; uvs.y3 = (1 *scaleY) - offsetY;
// get the tilingSprites current alpha // get the tilingSprites current alpha
var alpha = tilingSprite.worldAlpha; var alpha = tilingSprite.worldAlpha;
var tint = tilingSprite.tint; var tint = tilingSprite.tint;

View file

@ -11,11 +11,11 @@
* @param width=800 {Number} the width of the renderers view * @param width=800 {Number} the width of the renderers view
* @param height=600 {Number} the height of the renderers view * @param height=600 {Number} the height of the renderers view
* @param [view] {Canvas} the canvas to use as a view, optional * @param [view] {Canvas} the canvas to use as a view, optional
* @param [antialias=false] {Boolean} sets antialias (only applicable in webGL chrome at the moment)
* @param [transparent=false] {Boolean} the transparency of the render view, default false * @param [transparent=false] {Boolean} the transparency of the render view, default false
* @param [antialias=false] {Boolean} sets antialias (only applicable in webGL chrome at the moment)
* *
*/ */
PIXI.autoDetectRenderer = function(width, height, view,antialias,transparent) PIXI.autoDetectRenderer = function(width, height, view, transparent, antialias)
{ {
if(!width)width = 800; if(!width)width = 800;
if(!height)height = 600; if(!height)height = 600;

View file

@ -11,7 +11,7 @@
* Adds event emitter functionality to a class * Adds event emitter functionality to a class
* *
* @class EventTarget * @class EventTarget
* * @example
* function MyEmitter() { * function MyEmitter() {
* PIXI.EventTarget.call(this); //mixes in event target stuff * PIXI.EventTarget.call(this); //mixes in event target stuff
* } * }

View file

@ -57,8 +57,8 @@ module.exports = function(config) {
browsers : ['Firefox'], browsers : ['Firefox'],
// If browser does not capture in given timeout [ms], kill it // If browser does not capture in given timeout [ms], kill it
// CLI --capture-timeout 5000 // CLI --capture-timeout 60000
captureTimeout : 5000, captureTimeout : 60000,
// Auto run tests on start (when browsers are captured) and exit // Auto run tests on start (when browsers are captured) and exit
// CLI --single-run --no-single-run // CLI --single-run --no-single-run