merge dev into master
This commit is contained in:
commit
58f9cf44bb
10 changed files with 31 additions and 13 deletions
|
@ -5,6 +5,7 @@ module.exports = function(grunt) {
|
|||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||
grunt.loadNpmTasks('grunt-contrib-yuidoc');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
||||
grunt.loadTasks('tasks');
|
||||
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
var sprite= PIXI.Sprite.fromImage("spinObj_02.png");
|
||||
//stage.addChild(sprite);
|
||||
// create a renderer instance
|
||||
// the 5the parameter is the anti aliasing
|
||||
var renderer = PIXI.autoDetectRenderer(620, 380, null, false, true);
|
||||
var renderer = PIXI.autoDetectRenderer(620, 380, null, false /* transparent */, true /* antialias */);
|
||||
|
||||
// set the canvas width and height to fill the screen
|
||||
//renderer.view.style.width = window.innerWidth + "px";
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
|
||||
// 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
|
||||
document.body.appendChild(renderer.view);
|
||||
|
|
|
@ -16,7 +16,7 @@ PIXI.WEBGL_RENDERER = 0;
|
|||
PIXI.CANVAS_RENDERER = 1;
|
||||
|
||||
// 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
|
||||
PIXI.blendModes = {
|
||||
|
|
|
@ -466,8 +466,8 @@ PIXI.Sprite.fromFrame = function(frameId)
|
|||
* @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
|
||||
*/
|
||||
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);
|
||||
};
|
||||
|
|
|
@ -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};
|
||||
|
||||
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.graphicsData.push(this.currentPath);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -202,6 +206,8 @@ PIXI.Graphics.prototype.lineTo = function(x, y)
|
|||
{
|
||||
this.currentPath.points.push(x, y);
|
||||
this.dirty = true;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -218,6 +224,8 @@ PIXI.Graphics.prototype.beginFill = function(color, alpha)
|
|||
this.filling = true;
|
||||
this.fillColor = color || 0;
|
||||
this.fillAlpha = (arguments.length < 2) ? 1 : alpha;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -230,6 +238,8 @@ PIXI.Graphics.prototype.endFill = function()
|
|||
this.filling = false;
|
||||
this.fillColor = null;
|
||||
this.fillAlpha = 1;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -250,6 +260,8 @@ PIXI.Graphics.prototype.drawRect = function( x, y, width, height )
|
|||
|
||||
this.graphicsData.push(this.currentPath);
|
||||
this.dirty = true;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -271,6 +283,8 @@ PIXI.Graphics.prototype.drawCircle = function( x, y, radius)
|
|||
|
||||
this.graphicsData.push(this.currentPath);
|
||||
this.dirty = true;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -293,6 +307,8 @@ PIXI.Graphics.prototype.drawEllipse = function( x, y, width, height)
|
|||
|
||||
this.graphicsData.push(this.currentPath);
|
||||
this.dirty = true;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -310,6 +326,8 @@ PIXI.Graphics.prototype.clear = function()
|
|||
this.graphicsData = [];
|
||||
|
||||
this.bounds = null; //new PIXI.Rectangle();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -273,7 +273,7 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
|
|||
// set the textures uvs temporarily
|
||||
// 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;
|
||||
|
||||
|
@ -298,7 +298,6 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
|
|||
uvs.x3 = 0 - offsetX;
|
||||
uvs.y3 = (1 *scaleY) - offsetY;
|
||||
|
||||
|
||||
// get the tilingSprites current alpha
|
||||
var alpha = tilingSprite.worldAlpha;
|
||||
var tint = tilingSprite.tint;
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
* @param width=800 {Number} the width 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 [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 [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(!height)height = 600;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* Adds event emitter functionality to a class
|
||||
*
|
||||
* @class EventTarget
|
||||
*
|
||||
* @example
|
||||
* function MyEmitter() {
|
||||
* PIXI.EventTarget.call(this); //mixes in event target stuff
|
||||
* }
|
||||
|
|
|
@ -57,8 +57,8 @@ module.exports = function(config) {
|
|||
browsers : ['Firefox'],
|
||||
|
||||
// If browser does not capture in given timeout [ms], kill it
|
||||
// CLI --capture-timeout 5000
|
||||
captureTimeout : 5000,
|
||||
// CLI --capture-timeout 60000
|
||||
captureTimeout : 60000,
|
||||
|
||||
// Auto run tests on start (when browsers are captured) and exit
|
||||
// CLI --single-run --no-single-run
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue