English fixes
This commit is contained in:
parent
4aebb843fd
commit
54bf9b96b3
35 changed files with 92 additions and 99 deletions
|
@ -13,7 +13,7 @@
|
||||||
PIXI.InteractionManager = function(stage)
|
PIXI.InteractionManager = function(stage)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* a refference to the stage
|
* a reference to the stage
|
||||||
*
|
*
|
||||||
* @property stage
|
* @property stage
|
||||||
* @type Stage
|
* @type Stage
|
||||||
|
@ -199,7 +199,7 @@ PIXI.InteractionManager.prototype.update = function()
|
||||||
|
|
||||||
// ok.. so mouse events??
|
// ok.. so mouse events??
|
||||||
// yes for now :)
|
// yes for now :)
|
||||||
// OPTIMSE - how often to check??
|
// OPTIMISE - how often to check??
|
||||||
if(this.dirty)
|
if(this.dirty)
|
||||||
{
|
{
|
||||||
this.dirty = false;
|
this.dirty = false;
|
||||||
|
@ -240,7 +240,7 @@ PIXI.InteractionManager.prototype.update = function()
|
||||||
item.__hit = this.hitTest(item, this.mouse);
|
item.__hit = this.hitTest(item, this.mouse);
|
||||||
this.mouse.target = item;
|
this.mouse.target = item;
|
||||||
// ok so deal with interactions..
|
// ok so deal with interactions..
|
||||||
// loks like there was a hit!
|
// looks like there was a hit!
|
||||||
if(item.__hit)
|
if(item.__hit)
|
||||||
{
|
{
|
||||||
if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor;
|
if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor;
|
||||||
|
@ -267,7 +267,7 @@ PIXI.InteractionManager.prototype.update = function()
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is called when the mouse moves accross the renderer element
|
* Is called when the mouse moves across the renderer element
|
||||||
*
|
*
|
||||||
* @method onMouseMove
|
* @method onMouseMove
|
||||||
* @param event {Event} The DOM event of the mouse moving
|
* @param event {Event} The DOM event of the mouse moving
|
||||||
|
@ -307,7 +307,7 @@ PIXI.InteractionManager.prototype.onMouseDown = function(event)
|
||||||
{
|
{
|
||||||
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
this.mouse.originalEvent = event || window.event; //IE uses window.event
|
||||||
|
|
||||||
// loop through inteaction tree...
|
// loop through interaction tree...
|
||||||
// hit test each item! ->
|
// hit test each item! ->
|
||||||
// get interactive items under point??
|
// get interactive items under point??
|
||||||
//stage.__i
|
//stage.__i
|
||||||
|
@ -411,7 +411,7 @@ PIXI.InteractionManager.prototype.onMouseUp = function(event)
|
||||||
*
|
*
|
||||||
* @method hitTest
|
* @method hitTest
|
||||||
* @param item {DisplayObject} The displayObject to test for a hit
|
* @param item {DisplayObject} The displayObject to test for a hit
|
||||||
* @param interactionData {InteractionData} The interactiondata object to update in the case of a hit
|
* @param interactionData {InteractionData} The interactionData object to update in the case of a hit
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
|
PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
|
||||||
|
@ -482,10 +482,10 @@ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is called when a touch is moved accross the renderer element
|
* Is called when a touch is moved across the renderer element
|
||||||
*
|
*
|
||||||
* @method onTouchMove
|
* @method onTouchMove
|
||||||
* @param event {Event} The DOM event of a touch moving accross the renderer view
|
* @param event {Event} The DOM event of a touch moving across the renderer view
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
PIXI.InteractionManager.prototype.onTouchMove = function(event)
|
PIXI.InteractionManager.prototype.onTouchMove = function(event)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Circle object can be used to specify a hit area for displayobjects
|
* The Circle object can be used to specify a hit area for displayObjects
|
||||||
*
|
*
|
||||||
* @class Circle
|
* @class Circle
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Ellipse object can be used to specify a hit area for displayobjects
|
* The Ellipse object can be used to specify a hit area for displayObjects
|
||||||
*
|
*
|
||||||
* @class Ellipse
|
* @class Ellipse
|
||||||
* @constructor
|
* @constructor
|
||||||
|
@ -55,7 +55,7 @@ PIXI.Ellipse.prototype.clone = function()
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the x, and y coords passed to this function are contained within this ellipse
|
* Checks if the x and y coords passed to this function are contained within this ellipse
|
||||||
*
|
*
|
||||||
* @method contains
|
* @method contains
|
||||||
* @param x {Number} The X coord of the point to test
|
* @param x {Number} The X coord of the point to test
|
||||||
|
|
|
@ -49,7 +49,7 @@ PIXI.Polygon.prototype.clone = function()
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the x, and y coords passed to this function are contained within this polygon
|
* Checks if the x and y coords passed to this function are contained within this polygon
|
||||||
*
|
*
|
||||||
* @method contains
|
* @method contains
|
||||||
* @param x {Number} The X coord of the point to test
|
* @param x {Number} The X coord of the point to test
|
||||||
|
|
|
@ -55,7 +55,7 @@ PIXI.Rectangle.prototype.clone = function()
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the x, and y coords passed to this function are contained within this Rectangle
|
* Checks if the x and y coords passed to this function are contained within this Rectangle
|
||||||
*
|
*
|
||||||
* @method contains
|
* @method contains
|
||||||
* @param x {Number} The X coord of the point to test
|
* @param x {Number} The X coord of the point to test
|
||||||
|
|
|
@ -104,7 +104,7 @@ PIXI.DisplayObject = function()
|
||||||
this.stage = null;
|
this.stage = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [read-only] The multiplied alpha of the displayobject
|
* [read-only] The multiplied alpha of the displayObject
|
||||||
*
|
*
|
||||||
* @property worldAlpha
|
* @property worldAlpha
|
||||||
* @type Number
|
* @type Number
|
||||||
|
@ -123,7 +123,7 @@ PIXI.DisplayObject = function()
|
||||||
this._interactive = false;
|
this._interactive = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true
|
* This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true
|
||||||
*
|
*
|
||||||
* @property defaultCursor
|
* @property defaultCursor
|
||||||
* @type String
|
* @type String
|
||||||
|
@ -152,7 +152,7 @@ PIXI.DisplayObject = function()
|
||||||
this.localTransform = PIXI.mat3.create(); //mat3.identity();
|
this.localTransform = PIXI.mat3.create(); //mat3.identity();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [NYI] Unkown
|
* [NYI] Unknown
|
||||||
*
|
*
|
||||||
* @property color
|
* @property color
|
||||||
* @type Array<>
|
* @type Array<>
|
||||||
|
@ -169,7 +169,7 @@ PIXI.DisplayObject = function()
|
||||||
*/
|
*/
|
||||||
this.dynamic = true;
|
this.dynamic = true;
|
||||||
|
|
||||||
// chach that puppy!
|
// cached sin rotation and cos rotation
|
||||||
this._sr = 0;
|
this._sr = 0;
|
||||||
this._cr = 1;
|
this._cr = 1;
|
||||||
|
|
||||||
|
@ -177,11 +177,6 @@ PIXI.DisplayObject = function()
|
||||||
this.filterArea = new PIXI.Rectangle(0,0,1,1);
|
this.filterArea = new PIXI.Rectangle(0,0,1,1);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
this._bounds = new PIXI.Rectangle(0, 0, 1, 1);
|
this._bounds = new PIXI.Rectangle(0, 0, 1, 1);
|
||||||
this._currentBounds = null;
|
this._currentBounds = null;
|
||||||
this._mask = null;
|
this._mask = null;
|
||||||
|
@ -241,7 +236,7 @@ PIXI.DisplayObject = function()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A callback that is used when the user touch's over the displayObject
|
* A callback that is used when the user touches over the displayObject
|
||||||
* @method touchstart
|
* @method touchstart
|
||||||
* @param interactionData {InteractionData}
|
* @param interactionData {InteractionData}
|
||||||
*/
|
*/
|
||||||
|
@ -319,7 +314,7 @@ Object.defineProperty(PIXI.DisplayObject.prototype, 'worldVisible', {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
* Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
|
||||||
* In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
* In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping.
|
||||||
* To remove a mask, set this property to null.
|
* To remove a mask, set this property to null.
|
||||||
*
|
*
|
||||||
* @property mask
|
* @property mask
|
||||||
|
|
|
@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype = Object.create( PIXI.DisplayObject.protot
|
||||||
PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer;
|
PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set
|
* The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set
|
||||||
*
|
*
|
||||||
* @property width
|
* @property width
|
||||||
* @type Number
|
* @type Number
|
||||||
|
@ -49,7 +49,7 @@ Object.defineProperty(PIXI.DisplayObjectContainer.prototype, 'width', {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set
|
* The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set
|
||||||
*
|
*
|
||||||
* @property height
|
* @property height
|
||||||
* @type Number
|
* @type Number
|
||||||
|
@ -86,7 +86,7 @@ PIXI.DisplayObjectContainer.prototype.addChild = function(child)
|
||||||
|
|
||||||
this.children.push(child);
|
this.children.push(child);
|
||||||
|
|
||||||
// update the stage refference..
|
// update the stage reference..
|
||||||
|
|
||||||
if(this.stage)child.setStageReference(this.stage);
|
if(this.stage)child.setStageReference(this.stage);
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ PIXI.DisplayObjectContainer.prototype.swapChildren = function(child, child2)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Child at the specified index
|
* Returns the child at the specified index
|
||||||
*
|
*
|
||||||
* @method getChildAt
|
* @method getChildAt
|
||||||
* @param index {Number} The index to get the child from
|
* @param index {Number} The index to get the child from
|
||||||
|
@ -188,7 +188,7 @@ PIXI.DisplayObjectContainer.prototype.removeChild = function(child)
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Updates the container's children's transform for rendering
|
* Updates the container's childrens transform for rendering
|
||||||
*
|
*
|
||||||
* @method updateTransform
|
* @method updateTransform
|
||||||
* @private
|
* @private
|
||||||
|
@ -249,7 +249,7 @@ PIXI.DisplayObjectContainer.prototype.getBounds = function()
|
||||||
bounds.width = maxX - minX;
|
bounds.width = maxX - minX;
|
||||||
bounds.height = maxY - minY;
|
bounds.height = maxY - minY;
|
||||||
|
|
||||||
// TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate
|
// TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate
|
||||||
//this._currentBounds = bounds;
|
//this._currentBounds = bounds;
|
||||||
|
|
||||||
return bounds;
|
return bounds;
|
||||||
|
|
|
@ -49,7 +49,7 @@ PIXI.MovieClip = function(textures)
|
||||||
this.onComplete = null;
|
this.onComplete = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [read-only] The index MovieClips current frame (this may not have to be a whole number)
|
* [read-only] The MovieClips current frame index (this may not have to be a whole number)
|
||||||
*
|
*
|
||||||
* @property currentFrame
|
* @property currentFrame
|
||||||
* @type Number
|
* @type Number
|
||||||
|
|
|
@ -9,7 +9,7 @@ PIXI.blendModes.MULTIPLY = 2;
|
||||||
PIXI.blendModes.SCREEN = 3;
|
PIXI.blendModes.SCREEN = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The SPrite object is the base for all textured objects that are rendered to the screen
|
* The Sprite object is the base for all textured objects that are rendered to the screen
|
||||||
*
|
*
|
||||||
* @class Sprite
|
* @class Sprite
|
||||||
* @extends DisplayObjectContainer
|
* @extends DisplayObjectContainer
|
||||||
|
@ -95,7 +95,7 @@ PIXI.Sprite.prototype = Object.create( PIXI.DisplayObjectContainer.prototype );
|
||||||
PIXI.Sprite.prototype.constructor = PIXI.Sprite;
|
PIXI.Sprite.prototype.constructor = PIXI.Sprite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The width of the sprite, setting this will actually modify the scale to acheive the value set
|
* The width of the sprite, setting this will actually modify the scale to achieve the value set
|
||||||
*
|
*
|
||||||
* @property width
|
* @property width
|
||||||
* @type Number
|
* @type Number
|
||||||
|
@ -111,7 +111,7 @@ Object.defineProperty(PIXI.Sprite.prototype, 'width', {
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The height of the sprite, setting this will actually modify the scale to acheive the value set
|
* The height of the sprite, setting this will actually modify the scale to achieve the value set
|
||||||
*
|
*
|
||||||
* @property height
|
* @property height
|
||||||
* @type Number
|
* @type Number
|
||||||
|
@ -233,7 +233,7 @@ PIXI.Sprite.prototype.getBounds = function()
|
||||||
bounds.y = minY;
|
bounds.y = minY;
|
||||||
bounds.height = maxY - minY;
|
bounds.height = maxY - minY;
|
||||||
|
|
||||||
// store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate
|
// store a reference so that if this function gets called again in the render cycle we do not have to recalculate
|
||||||
this._currentBounds = bounds;
|
this._currentBounds = bounds;
|
||||||
|
|
||||||
return bounds;
|
return bounds;
|
||||||
|
@ -318,7 +318,7 @@ PIXI.Sprite.prototype._renderCanvas = function(renderSession)
|
||||||
|
|
||||||
var transform = this.worldTransform;
|
var transform = this.worldTransform;
|
||||||
|
|
||||||
// alow for trimming
|
// allow for trimming
|
||||||
|
|
||||||
context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]);
|
context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]);
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ PIXI.Sprite.prototype._renderCanvas = function(renderSession)
|
||||||
|
|
||||||
this.cachedTint = this.tint;
|
this.cachedTint = this.tint;
|
||||||
|
|
||||||
//TODO clean up cacheing - how to clean up the caches?
|
//TODO clean up caching - how to clean up the caches?
|
||||||
this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint);
|
this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ PIXI.Stage = function(backgroundColor)
|
||||||
*/
|
*/
|
||||||
this.dirty = true;
|
this.dirty = true;
|
||||||
|
|
||||||
//the stage is it's own stage
|
//the stage is its own stage
|
||||||
this.stage = this;
|
this.stage = this;
|
||||||
|
|
||||||
//optimize hit detection a bit
|
//optimize hit detection a bit
|
||||||
|
@ -65,7 +65,7 @@ PIXI.Stage.prototype.constructor = PIXI.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element.
|
* Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element.
|
||||||
* This is useful for when you have other DOM elements ontop of the Canvas element.
|
* This is useful for when you have other DOM elements on top of the Canvas element.
|
||||||
*
|
*
|
||||||
* @method setInteractionDelegate
|
* @method setInteractionDelegate
|
||||||
* @param domElement {DOMElement} This new domElement which will receive mouse/touch events
|
* @param domElement {DOMElement} This new domElement which will receive mouse/touch events
|
||||||
|
|
|
@ -50,7 +50,7 @@ PIXI.TilingSprite.prototype.constructor = PIXI.TilingSprite;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The width of the sprite, setting this will actually modify the scale to acheive the value set
|
* The width of the sprite, setting this will actually modify the scale to achieve the value set
|
||||||
*
|
*
|
||||||
* @property width
|
* @property width
|
||||||
* @type Number
|
* @type Number
|
||||||
|
@ -66,7 +66,7 @@ Object.defineProperty(PIXI.TilingSprite.prototype, 'width', {
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The height of the TilingSprite, setting this will actually modify the scale to acheive the value set
|
* The height of the TilingSprite, setting this will actually modify the scale to achieve the value set
|
||||||
*
|
*
|
||||||
* @property height
|
* @property height
|
||||||
* @type Number
|
* @type Number
|
||||||
|
@ -157,7 +157,7 @@ PIXI.TilingSprite.prototype._renderCanvas = function(renderSession)
|
||||||
|
|
||||||
var transform = this.worldTransform;
|
var transform = this.worldTransform;
|
||||||
|
|
||||||
// alow for trimming
|
// allow for trimming
|
||||||
|
|
||||||
context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]);
|
context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]);
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ PIXI.TilingSprite.prototype.getBounds = function()
|
||||||
bounds.y = minY;
|
bounds.y = minY;
|
||||||
bounds.height = maxY - minY;
|
bounds.height = maxY - minY;
|
||||||
|
|
||||||
// store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate
|
// store a reference so that if this function gets called again in the render cycle we do not have to recalculate
|
||||||
this._currentBounds = bounds;
|
this._currentBounds = bounds;
|
||||||
|
|
||||||
return bounds;
|
return bounds;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the base class for creating a pixi.js filter. Currently only webGL supports filters.
|
* This is the base class for creating a pixi.js filter. Currently only webGL supports filters.
|
||||||
* If you want to make a custom filter this should be your base class.
|
* If you want to make a custom filter this should be your base class.
|
||||||
* @class AbstractFilter
|
* @class AbstractFilter
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|
|
@ -35,7 +35,7 @@ Object.defineProperty(PIXI.BlurFilter.prototype, 'blur', {
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the strength of the blurX property simultaneously
|
* Sets the strength of the blurX property
|
||||||
*
|
*
|
||||||
* @property blurX
|
* @property blurX
|
||||||
* @type Number the strength of the blurX
|
* @type Number the strength of the blurX
|
||||||
|
@ -51,7 +51,7 @@ Object.defineProperty(PIXI.BlurFilter.prototype, 'blurX', {
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the strength of the blurX property simultaneously
|
* Sets the strength of the blurX property
|
||||||
*
|
*
|
||||||
* @property blurY
|
* @property blurY
|
||||||
* @type Number the strength of the blurY
|
* @type Number the strength of the blurY
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* This turns your displayObjects to black and white.
|
* This lowers the color depth of your image by the given amount, producing an image with a smaller palette.
|
||||||
* @class ColorStepFilter
|
* @class ColorStepFilter
|
||||||
* @contructor
|
* @contructor
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* This filter applies a pixlate effect making display objects appear 'blocky'
|
* This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer
|
||||||
* @class PixelateFilter
|
* @class DotScreenFilter
|
||||||
* @contructor
|
* @contructor
|
||||||
*/
|
*/
|
||||||
PIXI.DotScreenFilter = function()
|
PIXI.DotScreenFilter = function()
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* This filter applies a pixlate effect making display objects appear 'blocky'
|
* This filter applies a pixelate effect making display objects appear 'blocky'
|
||||||
* @class PixelateFilter
|
* @class PixelateFilter
|
||||||
* @contructor
|
* @contructor
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* This filter applies a pixlate effect making display objects appear 'blocky'
|
* This filter applies a twist effect making display objects appear twisted in the given direction
|
||||||
* @class PixelateFilter
|
* @class TwistFilter
|
||||||
* @contructor
|
* @contructor
|
||||||
*/
|
*/
|
||||||
PIXI.TwistFilter = function()
|
PIXI.TwistFilter = function()
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The atlas file loader is used to load in Atlas data and parsing it
|
* The atlas file loader is used to load in Atlas data and parse it
|
||||||
* When loaded this class will dispatch a 'loaded' event
|
* When loaded this class will dispatch a 'loaded' event
|
||||||
* If load failed this class will dispatch a 'error' event
|
* If loading fails this class will dispatch an 'error' event
|
||||||
* @class AtlasLoader
|
* @class AtlasLoader
|
||||||
* @extends EventTarget
|
* @extends EventTarget
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif')
|
* The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif')
|
||||||
* Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()
|
* Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId()
|
||||||
* When loaded this class will dispatch a 'loaded' event
|
* When loaded this class will dispatch a 'loaded' event
|
||||||
*
|
*
|
||||||
* @class ImageLoader
|
* @class ImageLoader
|
||||||
|
@ -73,7 +73,7 @@ PIXI.ImageLoader.prototype.onLoaded = function()
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @method loadFramedSpriteSheet
|
* @method loadFramedSpriteSheet
|
||||||
* @param frameWidth {Number} with of each frame
|
* @param frameWidth {Number} width of each frame
|
||||||
* @param frameHeight {Number} height of each frame
|
* @param frameHeight {Number} height of each frame
|
||||||
* @param textureName {String} if given, the frames will be cached in <textureName>-<ord> format
|
* @param textureName {String} if given, the frames will be cached in <textureName>-<ord> format
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The json file loader is used to load in JSON data and parsing it
|
* The json file loader is used to load in JSON data and parse it
|
||||||
* When loaded this class will dispatch a 'loaded' event
|
* When loaded this class will dispatch a 'loaded' event
|
||||||
* If load failed this class will dispatch a 'error' event
|
* If loading fails this class will dispatch an 'error' event
|
||||||
*
|
*
|
||||||
* @class JsonLoader
|
* @class JsonLoader
|
||||||
* @uses EventTarget
|
* @uses EventTarget
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Spine loader is used to load in JSON spine data
|
* The Spine loader is used to load in JSON spine data
|
||||||
* To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format
|
* To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format
|
||||||
* Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load
|
* Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load
|
||||||
* See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source
|
* See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source
|
||||||
* You will need to generate a sprite sheet to accompany the spine data
|
* You will need to generate a sprite sheet to accompany the spine data
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The sprite sheet loader is used to load in JSON sprite sheet data
|
* The sprite sheet loader is used to load in JSON sprite sheet data
|
||||||
* To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format
|
* To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format
|
||||||
* There is a free version so thats nice, although the paid version is great value for money.
|
* There is a free version so thats nice, although the paid version is great value for money.
|
||||||
* It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed.
|
* It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed.
|
||||||
* Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId()
|
* Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId()
|
||||||
* This loader will also load the image file that the Spritesheet points to as well as the data.
|
* This loader will load the image file that the Spritesheet points to as well as the data.
|
||||||
* When loaded this class will dispatch a 'loaded' event
|
* When loaded this class will dispatch a 'loaded' event
|
||||||
*
|
*
|
||||||
* @class SpriteSheetLoader
|
* @class SpriteSheetLoader
|
||||||
|
|
|
@ -80,8 +80,8 @@ PIXI.Graphics.prototype.constructor = PIXI.Graphics;
|
||||||
/**
|
/**
|
||||||
* If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite.
|
* If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite.
|
||||||
* This is useful if your graphics element does not change often as it will speed up the rendering of the object
|
* This is useful if your graphics element does not change often as it will speed up the rendering of the object
|
||||||
* It is also usful as the graphics object will always be aliased because it will be rendered using canvas
|
* It is also usful as the graphics object will always be antialiased because it will be rendered using canvas
|
||||||
* Not recommended if you are conastanly redrawing the graphics element.
|
* Not recommended if you are constanly redrawing the graphics element.
|
||||||
*
|
*
|
||||||
* @property cacheAsBitmap
|
* @property cacheAsBitmap
|
||||||
* @default false
|
* @default false
|
||||||
|
@ -331,7 +331,7 @@ PIXI.Graphics.prototype._renderWebGL = function(renderSession)
|
||||||
|
|
||||||
PIXI.WebGLGraphics.renderGraphics(this, renderSession);
|
PIXI.WebGLGraphics.renderGraphics(this, renderSession);
|
||||||
|
|
||||||
// only rende rif it has children!
|
// only render if it has children!
|
||||||
if(this.children.length)
|
if(this.children.length)
|
||||||
{
|
{
|
||||||
renderSession.spriteBatch.start();
|
renderSession.spriteBatch.start();
|
||||||
|
@ -529,7 +529,7 @@ PIXI.Graphics.prototype._generateCachedSprite = function()
|
||||||
this._cachedSprite.buffer.resize(bounds.width, bounds.height);
|
this._cachedSprite.buffer.resize(bounds.width, bounds.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
// leverage the anchor to account for the offest of the element
|
// leverage the anchor to account for the offset of the element
|
||||||
this._cachedSprite.anchor.x = -( bounds.x / bounds.width );
|
this._cachedSprite.anchor.x = -( bounds.x / bounds.width );
|
||||||
this._cachedSprite.anchor.y = -( bounds.y / bounds.height );
|
this._cachedSprite.anchor.y = -( bounds.y / bounds.height );
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,6 @@ PIXI.CanvasRenderer.prototype.render = function(stage)
|
||||||
this.context.setTransform(1,0,0,1,0,0);
|
this.context.setTransform(1,0,0,1,0,0);
|
||||||
this.context.clearRect(0, 0, this.width, this.height);
|
this.context.clearRect(0, 0, this.width, this.height);
|
||||||
this.renderDisplayObject(stage);
|
this.renderDisplayObject(stage);
|
||||||
//as
|
|
||||||
|
|
||||||
// run interaction!
|
// run interaction!
|
||||||
if(stage.interactive)
|
if(stage.interactive)
|
||||||
|
@ -177,7 +176,7 @@ PIXI.CanvasRenderer.prototype.resize = function(width, height)
|
||||||
*/
|
*/
|
||||||
PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context)
|
PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context)
|
||||||
{
|
{
|
||||||
// no loger recurrsive!
|
// no longer recurrsive!
|
||||||
//var transform;
|
//var transform;
|
||||||
//var context = this.context;
|
//var context = this.context;
|
||||||
|
|
||||||
|
@ -283,7 +282,6 @@ PIXI.CanvasBuffer = function(width, height)
|
||||||
this.canvas = document.createElement( "canvas" );
|
this.canvas = document.createElement( "canvas" );
|
||||||
this.context = this.canvas.getContext( "2d" );
|
this.context = this.canvas.getContext( "2d" );
|
||||||
|
|
||||||
// this.context.f
|
|
||||||
this.canvas.width = width;
|
this.canvas.width = width;
|
||||||
this.canvas.height = height;
|
this.canvas.height = height;
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,8 +16,8 @@ PIXI.CanvasTinter = function()
|
||||||
PIXI.CanvasTinter.getTintedTexture = function(sprite, color)
|
PIXI.CanvasTinter.getTintedTexture = function(sprite, color)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// cach on sprite
|
// cache on sprite
|
||||||
// cach on texture
|
// cache on texture
|
||||||
// no cache
|
// no cache
|
||||||
|
|
||||||
var texture = sprite.texture;
|
var texture = sprite.texture;
|
||||||
|
@ -50,7 +50,7 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color)
|
||||||
{
|
{
|
||||||
|
|
||||||
texture.tintCache[stringColor] = canvas;
|
texture.tintCache[stringColor] = canvas;
|
||||||
// if we are not converting the texture to an image then we need to lose the refferance to the canvas
|
// if we are not converting the texture to an image then we need to lose the reference to the canvas
|
||||||
PIXI.CanvasTinter.canvas = null;
|
PIXI.CanvasTinter.canvas = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
PIXI.glContexts = []; // this is where we store the webGL contexts for easy access.
|
PIXI.glContexts = []; // this is where we store the webGL contexts for easy access.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer
|
* the WebGLRenderer 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.
|
* should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's.
|
||||||
* So no need for Sprite Batch's or Sprite Cloud's
|
* 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 :)
|
* Dont forget to add the view to your DOM or you will not see anything :)
|
||||||
*
|
*
|
||||||
|
@ -15,7 +15,7 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy acce
|
||||||
* @param width=0 {Number} the width of the canvas view
|
* @param width=0 {Number} the width of the canvas view
|
||||||
* @param height=0 {Number} the height of the canvas view
|
* @param height=0 {Number} the height of the canvas view
|
||||||
* @param view {Canvas} the canvas to use as a view, optional
|
* @param view {Canvas} the canvas to use as a view, optional
|
||||||
* @param transparent=false {Boolean} the transparency of the render view, default false
|
* @param transparent=false {Boolean} If the render view is transparent, default false
|
||||||
* @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment)
|
* @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -126,7 +126,7 @@ PIXI.WebGLRenderer.prototype.render = function(stage)
|
||||||
if(this.contextLost)return;
|
if(this.contextLost)return;
|
||||||
|
|
||||||
|
|
||||||
// if rendering a new stage clear the batchs..
|
// if rendering a new stage clear the batches..
|
||||||
if(this.__stage !== stage)
|
if(this.__stage !== stage)
|
||||||
{
|
{
|
||||||
// TODO make this work
|
// TODO make this work
|
||||||
|
|
|
@ -67,7 +67,7 @@ PIXI.PixiShader.prototype.init = function()
|
||||||
// Begin worst hack eva //
|
// Begin worst hack eva //
|
||||||
|
|
||||||
// WHY??? ONLY on my chrome pixel the line above returns -1 when using filters?
|
// WHY??? ONLY on my chrome pixel the line above returns -1 when using filters?
|
||||||
// maybe its somthing to do with the current state of the gl context.
|
// maybe its something to do with the current state of the gl context.
|
||||||
// Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel
|
// Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel
|
||||||
// If theres any webGL people that know why could happen please help :)
|
// If theres any webGL people that know why could happen please help :)
|
||||||
if(this.colorAttribute === -1)
|
if(this.colorAttribute === -1)
|
||||||
|
@ -165,7 +165,7 @@ PIXI.PixiShader.prototype.initUniforms = function()
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture is has loaded)
|
* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)
|
||||||
*
|
*
|
||||||
* @method PIXI.PixiShader#initSampler2D
|
* @method PIXI.PixiShader#initSampler2D
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -148,7 +148,7 @@ PIXI.WebGLFilterManager.prototype.popFilter = function()
|
||||||
gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertexArray);
|
gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertexArray);
|
||||||
|
|
||||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer);
|
gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer);
|
||||||
// nnow set the uvs..
|
// now set the uvs..
|
||||||
this.uvArray[2] = filterArea.width/this.width;
|
this.uvArray[2] = filterArea.width/this.width;
|
||||||
this.uvArray[5] = filterArea.height/this.height;
|
this.uvArray[5] = filterArea.height/this.height;
|
||||||
this.uvArray[6] = filterArea.width/this.width;
|
this.uvArray[6] = filterArea.width/this.width;
|
||||||
|
@ -160,7 +160,7 @@ PIXI.WebGLFilterManager.prototype.popFilter = function()
|
||||||
var outputTexture = this.texturePool.pop();
|
var outputTexture = this.texturePool.pop();
|
||||||
if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height);
|
if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height);
|
||||||
|
|
||||||
// need to clear this FBO as it may have some left over elements from a prvious filter.
|
// need to clear this FBO as it may have some left over elements from a previous filter.
|
||||||
gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer );
|
gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer );
|
||||||
gl.clear(gl.COLOR_BUFFER_BIT);
|
gl.clear(gl.COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ PIXI.WebGLFilterManager.prototype.initShaderBuffers = function()
|
||||||
|
|
||||||
|
|
||||||
// bind and upload the vertexs..
|
// bind and upload the vertexs..
|
||||||
// keep a refferance to the vertexFloatData..
|
// keep a reference to the vertexFloatData..
|
||||||
this.vertexArray = new Float32Array([0.0, 0.0,
|
this.vertexArray = new Float32Array([0.0, 0.0,
|
||||||
1.0, 0.0,
|
1.0, 0.0,
|
||||||
0.0, 1.0,
|
0.0, 1.0,
|
||||||
|
|
|
@ -53,12 +53,12 @@ PIXI.WebGLGraphics.renderGraphics = function(graphics, renderSession)//projectio
|
||||||
|
|
||||||
renderSession.shaderManager.activatePrimitiveShader();
|
renderSession.shaderManager.activatePrimitiveShader();
|
||||||
|
|
||||||
// This could be speeded up fo sure!
|
// This could be speeded up for sure!
|
||||||
// var m = PIXI.mat3.clone(graphics.worldTransform);
|
// var m = PIXI.mat3.clone(graphics.worldTransform);
|
||||||
|
|
||||||
PIXI.mat3.transpose(graphics.worldTransform, PIXI.tempMatrix);
|
PIXI.mat3.transpose(graphics.worldTransform, PIXI.tempMatrix);
|
||||||
|
|
||||||
// set the matrix transform for the
|
// set the matrix transform
|
||||||
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
||||||
gl.uniformMatrix3fv(shader.translationMatrix, false, PIXI.tempMatrix);
|
gl.uniformMatrix3fv(shader.translationMatrix, false, PIXI.tempMatrix);
|
||||||
|
@ -310,7 +310,7 @@ PIXI.WebGLGraphics.buildLine = function(graphicsData, webGLData)
|
||||||
var firstPoint = new PIXI.Point( points[0], points[1] );
|
var firstPoint = new PIXI.Point( points[0], points[1] );
|
||||||
var lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] );
|
var lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] );
|
||||||
|
|
||||||
// if the first point is the last point - goona have issues :)
|
// if the first point is the last point - gonna have issues :)
|
||||||
if(firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y)
|
if(firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y)
|
||||||
{
|
{
|
||||||
points.pop();
|
points.pop();
|
||||||
|
|
|
@ -188,7 +188,7 @@ PIXI.WebGLSpriteBatch.prototype.render = function(sprite)
|
||||||
verticies[index++] = alpha;
|
verticies[index++] = alpha;
|
||||||
verticies[index++] = tint;
|
verticies[index++] = tint;
|
||||||
|
|
||||||
// increment the batchs
|
// increment the batchsize
|
||||||
this.currentBatchSize++;
|
this.currentBatchSize++;
|
||||||
|
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the textures uvs temporarily
|
// set the textures uvs temporarily
|
||||||
// TODO create a seperate 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 Float32Array(8);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* @param text {String} The copy that you would like the text to display
|
* @param text {String} The copy that you would like the text to display
|
||||||
* @param style {Object} The style parameters
|
* @param style {Object} The style parameters
|
||||||
* @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously)
|
* @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously)
|
||||||
* @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right')
|
* @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text
|
||||||
*/
|
*/
|
||||||
PIXI.BitmapText = function(text, style)
|
PIXI.BitmapText = function(text, style)
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ PIXI.BitmapText.prototype.setText = function(text)
|
||||||
* @method setStyle
|
* @method setStyle
|
||||||
* @param style {Object} The style parameters
|
* @param style {Object} The style parameters
|
||||||
* @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously)
|
* @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously)
|
||||||
* @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right')
|
* @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text
|
||||||
*/
|
*/
|
||||||
PIXI.BitmapText.prototype.setStyle = function(style)
|
PIXI.BitmapText.prototype.setStyle = function(style)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ PIXI.BitmapText.prototype.updateText = function()
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the transfor of this object
|
* Updates the transform of this object
|
||||||
*
|
*
|
||||||
* @method updateTransform
|
* @method updateTransform
|
||||||
* @private
|
* @private
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Text Object will create a line(s) of text to split a line you can use '\n'
|
* A Text Object will create a line(s) of text. To split a line you can use '\n'
|
||||||
*
|
*
|
||||||
* @class Text
|
* @class Text
|
||||||
* @extends Sprite
|
* @extends Sprite
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
* @param [style] {Object} The style parameters
|
* @param [style] {Object} The style parameters
|
||||||
* @param [style.font] {String} default 'bold 20pt Arial' The style and size of the font
|
* @param [style.font] {String} default 'bold 20pt Arial' The style and size of the font
|
||||||
* @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00'
|
* @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00'
|
||||||
* @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right')
|
* @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text
|
||||||
* @param [style.stroke] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00'
|
* @param [style.stroke] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00'
|
||||||
* @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
* @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
||||||
* @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used
|
* @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used
|
||||||
|
@ -42,7 +42,7 @@ PIXI.Text.prototype.constructor = PIXI.Text;
|
||||||
* @param [style] {Object} The style parameters
|
* @param [style] {Object} The style parameters
|
||||||
* @param [style.font='bold 20pt Arial'] {String} The style and size of the font
|
* @param [style.font='bold 20pt Arial'] {String} The style and size of the font
|
||||||
* @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00'
|
* @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00'
|
||||||
* @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right')
|
* @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text
|
||||||
* @param [style.stroke='black'] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00'
|
* @param [style.stroke='black'] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00'
|
||||||
* @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
* @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke)
|
||||||
* @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used
|
* @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used
|
||||||
|
@ -179,7 +179,7 @@ PIXI.Text.prototype._renderWebGL = function(renderSession)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the transfor of this object
|
* Updates the transform of this object
|
||||||
*
|
*
|
||||||
* @method updateTransform
|
* @method updateTransform
|
||||||
* @private
|
* @private
|
||||||
|
|
|
@ -143,7 +143,7 @@ PIXI.BaseTexture.prototype.updateSourceImage = function(newSrc)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function that returns a base texture based on an image url
|
* Helper function that returns a base texture based on an image url
|
||||||
* If the image is not in the base texture cache it will be created and loaded
|
* If the image is not in the base texture cache it will be created and loaded
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @method fromImage
|
* @method fromImage
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
/**
|
/**
|
||||||
A RenderTexture is a special texture that allows any pixi displayObject to be rendered to it.
|
A RenderTexture is a special texture that allows any pixi displayObject to be rendered to it.
|
||||||
|
|
||||||
__Hint__: All DisplayObjects (exmpl. Sprites) that renders on RenderTexture should be preloaded.
|
__Hint__: All DisplayObjects (exmpl. Sprites) that render on RenderTexture should be preloaded.
|
||||||
Otherwise black rectangles will be drawn instead.
|
Otherwise black rectangles will be drawn instead.
|
||||||
|
|
||||||
RenderTexture takes snapshot of DisplayObject passed to render method. If DisplayObject is passed to render method, position and rotation of it will be ignored. For example:
|
RenderTexture takes snapshot of DisplayObject passed to render method. If DisplayObject is passed to render method, position and rotation of it will be ignored. For example:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This helper function will automatically detect which renderer you should be using.
|
* This helper function will automatically detect which renderer you should be using.
|
||||||
* WebGL is the preferred renderer as it is a lot fastest. If webGL is not supported by
|
* WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by
|
||||||
* the browser then this function will return a canvas renderer
|
* the browser then this function will return a canvas renderer
|
||||||
*
|
*
|
||||||
* @method autoDetectRenderer
|
* @method autoDetectRenderer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue