Documentation update
This commit is contained in:
parent
7a977ace5c
commit
18dca7aee1
88 changed files with 21329 additions and 331 deletions
|
@ -1,53 +1,58 @@
|
|||
/**
|
||||
* @author Mat Groves http://matgroves.com/
|
||||
*/
|
||||
var PIXI = PIXI || {};
|
||||
|
||||
PIXI.blendModes = {};
|
||||
PIXI.blendModes.NORMAL = 0;
|
||||
PIXI.blendModes.SCREEN = 1;
|
||||
|
||||
|
||||
/**
|
||||
* @class A Sprite
|
||||
* @augments PIXI.DisplayObjectContainer
|
||||
* @constructor
|
||||
* @param {PIXI.textures.Texture} texture {@link PIXI.textures.Texture}
|
||||
* @return A new Sprite.
|
||||
*/
|
||||
@class Sprite
|
||||
@extends DisplayObjectContainer
|
||||
@constructor
|
||||
@param texture {Texture}
|
||||
@type String
|
||||
*/
|
||||
PIXI.Sprite = function(texture)
|
||||
{
|
||||
PIXI.DisplayObjectContainer.call( this );
|
||||
|
||||
/**
|
||||
/**
|
||||
* The anchor sets the origin point of the texture.
|
||||
* The default is 0,0 this means the textures origin is the top left
|
||||
* Setting than anchor to 0.5,0.5 means the textures origin is centered
|
||||
* Setting the anchor to 1,1 would mean the textures origin points will be the bottom right
|
||||
* @type #Point
|
||||
*/
|
||||
* @property anchor
|
||||
* @type Point
|
||||
*/
|
||||
this.anchor = new PIXI.Point();
|
||||
|
||||
/**
|
||||
* The texture that the sprite is using
|
||||
* @type #Point
|
||||
* @property texture
|
||||
* @type Texture
|
||||
*/
|
||||
this.texture = texture;
|
||||
|
||||
/**
|
||||
* The blend mode of sprite.
|
||||
* currently supports PIXI.blendModes.NORMAL and PIXI.blendModes.SCREEN
|
||||
* @property blendMode
|
||||
* @type uint
|
||||
*/
|
||||
this.blendMode = PIXI.blendModes.NORMAL;
|
||||
|
||||
/**
|
||||
* The width of the sprite (this is initially set by the texture)
|
||||
* @property width
|
||||
* @type #Number
|
||||
*/
|
||||
this.width = 1;
|
||||
|
||||
/**
|
||||
* The height of the sprite (this is initially set by the texture)
|
||||
* @property height
|
||||
* @type #Number
|
||||
*/
|
||||
this.height = 1;
|
||||
|
@ -72,9 +77,9 @@ PIXI.Sprite.constructor = PIXI.Sprite;
|
|||
PIXI.Sprite.prototype = Object.create( PIXI.DisplayObjectContainer.prototype );
|
||||
|
||||
/**
|
||||
* The PIXI texture that is displayed by the sprite
|
||||
* @param {PIXI.Texture} texture {@link PIXI.Texture}
|
||||
*/
|
||||
@method setTexture
|
||||
@param texture {Texture} The PIXI texture that is displayed by the sprite
|
||||
*/
|
||||
PIXI.Sprite.prototype.setTexture = function(texture)
|
||||
{
|
||||
// stop current texture;
|
||||
|
@ -107,8 +112,10 @@ PIXI.Sprite.prototype.onTextureUpdate = function(event)
|
|||
*
|
||||
* Helper function that creates a sprite that will contain a texture from the TextureCache based on tjhe frameId
|
||||
* The frame ids are created when a Texture packer file has been loaded
|
||||
* @param The frame Id of the texture in the cache
|
||||
* @return {PIXI.Sprite} texture {@link PIXI.Sprite}
|
||||
* @method fromFrame
|
||||
* @static
|
||||
* @param frameId {String} The frame Id of the texture in the cache
|
||||
* @return {Sprite} A new Sprite using a texture from the texture cache matching the frameId
|
||||
*/
|
||||
PIXI.Sprite.fromFrame = function(frameId)
|
||||
{
|
||||
|
@ -121,8 +128,10 @@ PIXI.Sprite.fromFrame = function(frameId)
|
|||
*
|
||||
* Helper function that creates a sprite that will contain a texture based on an image url
|
||||
* If the image is not in the texture cache it will be loaded
|
||||
* @method fromImage
|
||||
* @static
|
||||
* @param The image url of the texture
|
||||
* @return {PIXI.Sprite} texture {@link PIXI.Sprite}
|
||||
* @return {Sprite} A new Sprite using a texture from the texture cache matching the image id
|
||||
*/
|
||||
PIXI.Sprite.fromImage = function(imageId)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue