Compare commits
5 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e1f8766a71 | ||
![]() |
ad7ced5407 | ||
![]() |
85e6d1928e | ||
![]() |
b9363442ac | ||
![]() |
60ed64d8df |
8 changed files with 129 additions and 101 deletions
|
@ -5,7 +5,6 @@ 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');
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
/**
|
/**
|
||||||
* @license
|
* @license
|
||||||
* pixi.js - v1.5.0
|
* pixi.js - v1.5.1
|
||||||
* Copyright (c) 2012-2014, Mat Groves
|
* Copyright (c) 2012-2014, Mat Groves
|
||||||
* http://goodboydigital.com/
|
* http://goodboydigital.com/
|
||||||
*
|
*
|
||||||
* Compiled: 2014-02-12
|
* Compiled: 2014-02-13
|
||||||
*
|
*
|
||||||
* pixi.js is licensed under the MIT License.
|
* pixi.js is licensed under the MIT License.
|
||||||
* http://www.opensource.org/licenses/mit-license.php
|
* http://www.opensource.org/licenses/mit-license.php
|
||||||
|
@ -35,7 +35,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.1";
|
||||||
|
|
||||||
// the various blend modes supported by pixi
|
// the various blend modes supported by pixi
|
||||||
PIXI.blendModes = {
|
PIXI.blendModes = {
|
||||||
|
@ -1946,9 +1946,9 @@ 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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3945,7 +3945,7 @@ PIXI.getNextPowerOfTwo = function(number)
|
||||||
* 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
|
||||||
* }
|
* }
|
||||||
|
@ -4053,11 +4053,11 @@ PIXI.EventTarget = function () {
|
||||||
* @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;
|
||||||
|
@ -6619,7 +6619,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;
|
||||||
|
|
||||||
|
@ -6644,7 +6644,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;
|
||||||
|
@ -8814,6 +8813,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8833,6 +8834,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8847,6 +8850,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8863,6 +8868,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8875,6 +8882,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8895,6 +8904,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8916,6 +8927,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8938,6 +8951,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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8955,6 +8970,8 @@ PIXI.Graphics.prototype.clear = function()
|
||||||
this.graphicsData = [];
|
this.graphicsData = [];
|
||||||
|
|
||||||
this.bounds = null; //new PIXI.Rectangle();
|
this.bounds = null; //new PIXI.Rectangle();
|
||||||
|
|
||||||
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
14
bin/pixi.js
14
bin/pixi.js
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "pixi.js",
|
"name": "pixi.js",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
|
|
||||||
"main": "bin/pixi.js",
|
"main": "bin/pixi.js",
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "pixi.js",
|
"name": "pixi.js",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"description": "Pixi.js is a fast lightweight 2D library that works across all devices.",
|
"description": "Pixi.js is a fast lightweight 2D library that works across all devices.",
|
||||||
|
|
||||||
"author": "Mat Groves",
|
"author": "Mat Groves",
|
||||||
|
|
|
@ -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.5.0";
|
PIXI.VERSION = "v1.5.1";
|
||||||
|
|
||||||
// the various blend modes supported by pixi
|
// the various blend modes supported by pixi
|
||||||
PIXI.blendModes = {
|
PIXI.blendModes = {
|
||||||
|
|
|
@ -167,6 +167,16 @@ PIXI.BaseTexture.fromImage = function(imageUrl, crossorigin, scaleMode)
|
||||||
return baseTexture;
|
return baseTexture;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function that returns a base texture based on a canvas element
|
||||||
|
* If the image is not in the base texture cache it will be created and loaded
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @method fromCanvas
|
||||||
|
* @param canvas {Canvas} The canvas element source of the texture
|
||||||
|
* @param scaleMode {Number} Should be one of the PIXI.scaleMode consts
|
||||||
|
* @return BaseTexture
|
||||||
|
*/
|
||||||
PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode)
|
PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode)
|
||||||
{
|
{
|
||||||
if(!canvas._pixiId)
|
if(!canvas._pixiId)
|
||||||
|
|
|
@ -155,6 +155,7 @@ PIXI.Texture.prototype._updateWebGLuvs = function()
|
||||||
* @method fromImage
|
* @method fromImage
|
||||||
* @param imageUrl {String} The image url of the texture
|
* @param imageUrl {String} The image url of the texture
|
||||||
* @param crossorigin {Boolean} Whether requests should be treated as crossorigin
|
* @param crossorigin {Boolean} Whether requests should be treated as crossorigin
|
||||||
|
* @param scaleMode {Number} Should be one of the PIXI.scaleMode consts
|
||||||
* @return Texture
|
* @return Texture
|
||||||
*/
|
*/
|
||||||
PIXI.Texture.fromImage = function(imageUrl, crossorigin, scaleMode)
|
PIXI.Texture.fromImage = function(imageUrl, crossorigin, scaleMode)
|
||||||
|
@ -193,6 +194,7 @@ PIXI.Texture.fromFrame = function(frameId)
|
||||||
* @static
|
* @static
|
||||||
* @method fromCanvas
|
* @method fromCanvas
|
||||||
* @param canvas {Canvas} The canvas element source of the texture
|
* @param canvas {Canvas} The canvas element source of the texture
|
||||||
|
* @param scaleMode {Number} Should be one of the PIXI.scaleMode consts
|
||||||
* @return Texture
|
* @return Texture
|
||||||
*/
|
*/
|
||||||
PIXI.Texture.fromCanvas = function(canvas, scaleMode)
|
PIXI.Texture.fromCanvas = function(canvas, scaleMode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue