phaser-multires
Version:
A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.
1,324 lines (1,314 loc) • 144 kB
JavaScript
/**
* @namespace PIXI
*/
/**
* @fileoverview
* @author Mat Groves http://matgroves.com/ @Doormat23
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 1
*/
/**
* @class PIXI.DisplayObject
* @description The base class for all objects that are rendered on the screen.
This is an abstract class and should not be used on its own rather it should be extended.
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 5
*/
/**
* @description The coordinate of the object relative to the local coordinates of the parent.
* @member PIXI.DisplayObject#position
* @type {Point}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 14
*/
/**
* @description The scale factor of the object.
* @member PIXI.DisplayObject#scale
* @type {Point}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 22
*/
/**
* @description The pivot point of the displayObject that it rotates around
* @member PIXI.DisplayObject#pivot
* @type {Point}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 30
*/
/**
* @description The rotation of the object in radians.
* @member PIXI.DisplayObject#rotation
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 38
*/
/**
* @description The opacity of the object.
* @member PIXI.DisplayObject#alpha
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 46
*/
/**
* @description The visibility of the object.
* @member PIXI.DisplayObject#visible
* @type {Boolean}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 54
*/
/**
* @description This is the defined area that will pick up mouse / touch events. It is null by default.
Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)
* @member PIXI.DisplayObject#hitArea
* @type {(Rectangle|Circle|Ellipse|Polygon)}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 62
*/
/**
* @description Can this object be rendered
* @member PIXI.DisplayObject#renderable
* @type {Boolean}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 71
*/
/**
* @description [read-only] The display object container that contains this display object.
* @member PIXI.DisplayObject#parent
* @type {PIXI.DisplayObjectContainer}
* @readonly
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 79
*/
/**
* @description [read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.
* @member PIXI.DisplayObject#stage
* @type {Stage}
* @readonly
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 88
*/
/**
* @description [read-only] The multiplied alpha of the displayObject
* @member PIXI.DisplayObject#worldAlpha
* @type {Number}
* @readonly
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 97
*/
/**
* @description [read-only] Current transform of the object based on world (parent) factors
* @member PIXI.DisplayObject#worldTransform
* @type {Matrix}
* @readonly
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 106
*/
/**
* @description The position of the Display Object based on the world transform.
This value is updated at the end of updateTransform and takes all parent transforms into account.
* @member PIXI.DisplayObject#worldPosition
* @type {Point}
* @readonly
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 116
*/
/**
* @description The scale of the Display Object based on the world transform.
This value is updated at the end of updateTransform and takes all parent transforms into account.
* @member PIXI.DisplayObject#worldScale
* @type {Point}
* @readonly
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 126
*/
/**
* @description The rotation of the Display Object, in radians, based on the world transform.
This value is updated at the end of updateTransform and takes all parent transforms into account.
* @member PIXI.DisplayObject#worldRotation
* @type {Number}
* @readonly
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 136
*/
/**
* @description cached sin rotation and cos rotation
* @member PIXI.DisplayObject#_sr
* @type {Number}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 146
*/
/**
* @description cached sin rotation and cos rotation
* @member PIXI.DisplayObject#_cr
* @type {Number}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 155
*/
/**
* @description The area the filter is applied to like the hitArea this is used as more of an optimisation
rather than figuring out the dimensions of the displayObject each frame you can set this rectangle
* @member PIXI.DisplayObject#filterArea
* @type {Rectangle}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 164
*/
/**
* @description The original, cached bounds of the object
* @member PIXI.DisplayObject#_bounds
* @type {Rectangle}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 173
*/
/**
* @description The most up-to-date bounds of the object
* @member PIXI.DisplayObject#_currentBounds
* @type {Rectangle}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 182
*/
/**
* @description The original, cached mask of the object
* @member PIXI.DisplayObject#_mask
* @type {Rectangle}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 191
*/
/**
* @description Cached internal flag.
* @member PIXI.DisplayObject#_cacheAsBitmap
* @type {Boolean}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 200
*/
/**
* @description Cached internal flag.
* @member PIXI.DisplayObject#_cacheIsDirty
* @type {Boolean}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 209
*/
/**
* @description Destroy this DisplayObject.
Removes all references to transformCallbacks, its parent, the stage, filters, bounds, mask and cached Sprites.
* @method PIXI.DisplayObject#destroy
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 223
*/
/**
* @description [read-only] Indicates if the sprite is globally visible.
* @member PIXI.DisplayObject#worldVisible
* @type {Boolean}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 258
*/
/**
* @description 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.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping.
To remove a mask, set this property to null.
* @member PIXI.DisplayObject#mask
* @type {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 282
*/
/**
* @description Sets the filters for the displayObject.
IMPORTANT: This is a webGL only feature and will be ignored by the Canvas renderer.
To remove filters simply set this property to 'null'.
You cannot have a filter and a multiply blend mode active at the same time. Setting a filter will reset
this objects blend mode to NORMAL.
* @member PIXI.DisplayObject#filters
* @type {Array<Filter>}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 307
*/
/**
* @description Set if this display object is cached as a bitmap.
This basically takes a snap shot of the display object as it is at that moment. It can provide a performance benefit for complex static displayObjects.
To remove simply set this property to 'null'
* @member PIXI.DisplayObject#cacheAsBitmap
* @type {Boolean}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 355
*/
/**
* @description Retrieves the bounds of the displayObject as a rectangle object
* @method PIXI.DisplayObject#getBounds
* @param {Matrix} matrix -
* @return {Rectangle} the rectangular bounding area
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 497
*/
/**
* @description Retrieves the local bounds of the displayObject as a rectangle object
* @method PIXI.DisplayObject#getLocalBounds
* @return {Rectangle} the rectangular bounding area
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 510
*/
/**
* @description Sets the object's stage reference, the stage this object is connected to
* @method PIXI.DisplayObject#setStageReference
* @param {Stage} stage - the stage that the object will have as its current stage reference
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 521
*/
/**
* @description Empty, to be overridden by classes that require it.
* @method PIXI.DisplayObject#preUpdate
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 532
*/
/**
* @description Useful function that returns a texture of the displayObject object that can then be used to create sprites
This can be quite useful if your displayObject is static / complicated and needs to be reused multiple times.
* @method PIXI.DisplayObject#generateTexture
* @param {Number} resolution - The resolution of the texture being generated
* @param {Number} scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values
* @param {(PIXI.CanvasRenderer|PIXI.WebGLRenderer)} renderer - The renderer used to generate the texture.
* @return {PIXI.RenderTexture} a texture of the graphics object
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 541
*/
/**
* @description Generates and updates the cached sprite for this object.
* @method PIXI.DisplayObject#updateCache
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 565
*/
/**
* @description Calculates the global position of the display object
* @method PIXI.DisplayObject#toGlobal
* @param {Point} position - The world origin to calculate from
* @return {Point} A point object representing the position of this object
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 575
*/
/**
* @description Calculates the local position of the display object relative to another point
* @method PIXI.DisplayObject#toLocal
* @param {Point} position - The world origin to calculate from
* @param {PIXI.DisplayObject} [from] - The DisplayObject to calculate the global position from
* @return {Point} A point object representing the position of this object
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 589
*/
/**
* @description Internal method.
* @method PIXI.DisplayObject#_renderCachedSprite
* @param {Object} renderSession - The render session
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 610
*/
/**
* @description Internal method.
* @method PIXI.DisplayObject#_generateCachedSprite
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 631
*/
/**
* @description Destroys the cached sprite.
* @method PIXI.DisplayObject#_destroyCachedSprite
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 678
*/
/**
* @description Renders the object using the WebGL renderer
* @method PIXI.DisplayObject#_renderWebGL
* @param {RenderSession} renderSession -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 694
*/
/**
* @description Renders the object using the Canvas renderer
* @method PIXI.DisplayObject#_renderCanvas
* @param {RenderSession} renderSession -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 708
*/
/**
* @description The position of the displayObject on the x axis relative to the local coordinates of the parent.
* @member PIXI.DisplayObject#x
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 722
*/
/**
* @description The position of the displayObject on the y axis relative to the local coordinates of the parent.
* @member PIXI.DisplayObject#y
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObject.js
* @sourceline 740
*/
/**
* @fileoverview
* @author Mat Groves http://matgroves.com/ @Doormat23
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 1
*/
/**
* @class PIXI.DisplayObjectContainer
* @description A DisplayObjectContainer represents a collection of display objects.
It is the base class of all display objects that act as a container for other objects.
* @augments PIXI.DisplayObject
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 5
*/
/**
* @description [read-only] The array of children of this container.
* @member PIXI.DisplayObjectContainer#children
* @type {Array<DisplayObject>}
* @readonly
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 17
*/
/**
* @description If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.
If this property is `true` then the children will _not_ be considered as valid for Input events.
Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.
* @member PIXI.DisplayObjectContainer#ignoreChildInput
* @type {Boolean}
* @default
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 26
*/
/**
* @description The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set
* @member PIXI.DisplayObjectContainer#width
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 43
*/
/**
* @description The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set
* @member PIXI.DisplayObjectContainer#height
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 72
*/
/**
* @description Adds a child to the container.
* @method PIXI.DisplayObjectContainer#addChild
* @param {PIXI.DisplayObject} child - The DisplayObject to add to the container
* @return {PIXI.DisplayObject} The child that was added.
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 102
*/
/**
* @description Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown
* @method PIXI.DisplayObjectContainer#addChildAt
* @param {PIXI.DisplayObject} child - The child to add
* @param {Number} index - The index to place the child in
* @return {PIXI.DisplayObject} The child that was added.
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 114
*/
/**
* @description Swaps the position of 2 Display Objects within this container.
* @method PIXI.DisplayObjectContainer#swapChildren
* @param {PIXI.DisplayObject} child -
* @param {PIXI.DisplayObject} child2 -
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 145
*/
/**
* @description Returns the index position of a child DisplayObject instance
* @method PIXI.DisplayObjectContainer#getChildIndex
* @param {PIXI.DisplayObject} child - The DisplayObject instance to identify
* @return {Number} The index position of the child display object to identify
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 170
*/
/**
* @description Changes the position of an existing child in the display object container
* @method PIXI.DisplayObjectContainer#setChildIndex
* @param {PIXI.DisplayObject} child - The child DisplayObject instance for which you want to change the index number
* @param {Number} index - The resulting index number for the child display object
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 187
*/
/**
* @description Returns the child at the specified index
* @method PIXI.DisplayObjectContainer#getChildAt
* @param {Number} index - The index to get the child from
* @return {PIXI.DisplayObject} The child at the given index, if any.
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 205
*/
/**
* @description Removes a child from the container.
* @method PIXI.DisplayObjectContainer#removeChild
* @param {PIXI.DisplayObject} child - The DisplayObject to remove
* @return {PIXI.DisplayObject} The child that was removed.
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 222
*/
/**
* @description Removes a child from the specified index position.
* @method PIXI.DisplayObjectContainer#removeChildAt
* @param {Number} index - The index to get the child from
* @return {PIXI.DisplayObject} The child that was removed.
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 237
*/
/**
* @description Removes all children from this container that are within the begin and end indexes.
* @method PIXI.DisplayObjectContainer#removeChildren
* @param {Number} beginIndex - The beginning position. Default value is 0.
* @param {Number} endIndex - The ending position. Default value is size of the container.
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 255
*/
/**
* @description Retrieves the bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.
* @method PIXI.DisplayObjectContainer#getBounds
* @return {Rectangle} The rectangular bounding area
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 318
*/
/**
* @description Retrieves the non-global local bounds of the displayObjectContainer as a rectangle. The calculation takes all visible children into consideration.
* @method PIXI.DisplayObjectContainer#getLocalBounds
* @return {Rectangle} The rectangular bounding area
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 381
*/
/**
* @description Sets the containers Stage reference. This is the Stage that this object, and all of its children, is connected to.
* @method PIXI.DisplayObjectContainer#setStageReference
* @param {Stage} stage - the stage that the container will have as its current stage reference
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 410
*/
/**
* @description Removes the current stage reference from the container and all of its children.
* @method PIXI.DisplayObjectContainer#removeStageReference
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 426
*/
/**
* @description Renders the object using the WebGL renderer
* @method PIXI.DisplayObjectContainer#_renderWebGL
* @param {RenderSession} renderSession -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 441
*/
/**
* @description Renders the object using the Canvas renderer
* @method PIXI.DisplayObjectContainer#_renderCanvas
* @param {RenderSession} renderSession -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/DisplayObjectContainer.js
* @sourceline 499
*/
/**
* @fileoverview
* @author Mat Groves http://matgroves.com/ @Doormat23
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 1
*/
/**
* @class PIXI.Sprite
* @description The Sprite object is the base for all textured objects that are rendered to the screen
* @augments PIXI.DisplayObjectContainer
* @param {PIXI.Texture} texture - The texture for this sprite
A sprite can be created directly from an image like this :
var sprite = new PIXI.Sprite.fromImage('assets/image.png');
yourStage.addChild(sprite);
then obviously don't forget to add it to the stage you have already created
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 5
*/
/**
* @description The anchor sets the origin point of the texture.
The default is 0,0 this means the texture's 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 corner
* @member PIXI.Sprite#anchor
* @type {Point}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 22
*/
/**
* @description The texture that the sprite is using
* @member PIXI.Sprite#texture
* @type {PIXI.Texture}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 33
*/
/**
* @description The width of the sprite (this is initially set by the texture)
* @member PIXI.Sprite#_width
* @type {Number}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 41
*/
/**
* @description The height of the sprite (this is initially set by the texture)
* @member PIXI.Sprite#_height
* @type {Number}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 50
*/
/**
* @description The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.
* @member PIXI.Sprite#tint
* @type {Number}
* @default 0xFFFFFF
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 59
*/
/**
* @description The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.
* @member PIXI.Sprite#cachedTint
* @type {Number}
* @default -1
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 68
*/
/**
* @description A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)
* @member PIXI.Sprite#tintedTexture
* @type {Canvas}
* @default null
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 78
*/
/**
* @description The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.
Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.
* @member PIXI.Sprite#blendMode
* @type {Number}
* @default PIXI.blendModes.NORMAL;
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 87
*/
/**
* @description The shader that will be used to render the texture to the stage. Set to null to remove a current shader.
* @member PIXI.Sprite#shader
* @type {PIXI.AbstractFilter}
* @default null
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 98
*/
/**
* @description Controls if this Sprite is processed by the core Phaser game loops and Group loops.
* @member PIXI.Sprite#exists
* @type {Boolean}
* @default true
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 107
*/
/**
* @description The width of the sprite, setting this will actually modify the scale to achieve the value set
* @member PIXI.Sprite#width
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 129
*/
/**
* @description The height of the sprite, setting this will actually modify the scale to achieve the value set
* @member PIXI.Sprite#height
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 148
*/
/**
* @description Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous
texture this Sprite was using.
* @method PIXI.Sprite#setTexture
* @param {PIXI.Texture} texture - The PIXI texture that is displayed by the sprite
* @param {Boolean} [destroy=false] - Call Texture.destroy on the current texture before replacing it with the new one?
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 167
*/
/**
* @description When the texture is updated, this event will fire to update the scale and frame
* @method PIXI.Sprite#onTextureUpdate
* @param {} event -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 189
*/
/**
* @description Returns the bounds of the Sprite as a rectangle.
The bounds calculation takes the worldTransform into account.
It is important to note that the transform is not updated when you call this method.
So if this Sprite is the child of a Display Object which has had its transform
updated since the last render pass, those changes will not yet have been applied
to this Sprites worldTransform. If you need to ensure that all parent transforms
are factored into this getBounds operation then you should call `updateTransform`
on the root most object in this Sprites display list first.
* @method PIXI.Sprite#getBounds
* @param {Matrix} matrix - the transformation matrix of the sprite
* @return {Rectangle} the framing rectangle
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 203
*/
/**
* @description Renders the object using the WebGL renderer
* @method PIXI.Sprite#_renderWebGL
* @param {RenderSession} renderSession -
* @param {Matrix} [matrix] - - Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 319
*/
/**
* @description Renders the object using the Canvas renderer
* @method PIXI.Sprite#_renderCanvas
* @param {RenderSession} renderSession -
* @param {Matrix} [matrix] - - Optional matrix. If provided the Display Object will be rendered using this matrix, otherwise it will use its worldTransform.
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 389
*/
/**
* @description Helper function that creates a sprite that will contain a texture from the TextureCache based on the frameId
The frame ids are created when a Texture packer file has been loaded
* @method PIXI.Sprite.fromFrame
* @param {String} frameId - The frame Id of the texture in the cache
* @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 497
*/
/**
* @description 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 PIXI.Sprite.fromImage
* @param {String} imageId - The image url of the texture
* @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/Sprite.js
* @sourceline 516
*/
/**
* @fileoverview
* @author Mat Groves http://matgroves.com/
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/SpriteBatch.js
* @sourceline 1
*/
/**
* @class PIXI.SpriteBatch
* @description The SpriteBatch class is a really fast version of the DisplayObjectContainer
built solely for speed, so use when you need a lot of sprites or particles.
And it's extremely easy to use :
var container = new PIXI.SpriteBatch();
stage.addChild(container);
for(var i = 0; i < 100; i++)
{
var sprite = new PIXI.Sprite.fromImage("myImage.png");
container.addChild(sprite);
}
And here you have a hundred sprites that will be renderer at the speed of light
* @param {PIXI.Texture} texture -
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/SpriteBatch.js
* @sourceline 5
*/
/**
* @description Renders the object using the WebGL renderer
* @method PIXI.SpriteBatch#_renderWebGL
* @param {RenderSession} renderSession -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/SpriteBatch.js
* @sourceline 64
*/
/**
* @description Renders the object using the Canvas renderer
* @method PIXI.SpriteBatch#_renderCanvas
* @param {RenderSession} renderSession -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/display/SpriteBatch.js
* @sourceline 96
*/
/**
* @fileoverview
* @author Mat Groves http://matgroves.com/ @Doormat23
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Rope.js
* @sourceline 1
*/
/**
* @class PIXI.Rope
* @augments PIXI.Strip
* @param {PIXI.Texture} texture - - The texture to use on the rope.
* @param {Array} points - - An array of {PIXI.Point}.
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Rope.js
* @sourceline 6
*/
/**
* @fileoverview
* @author Mat Groves http://matgroves.com/
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Strip.js
* @sourceline 1
*/
/**
* @class PIXI.Strip
* @augments PIXI.DisplayObjectContainer
* @param {PIXI.Texture} texture - The texture to use
* @param {Number} width - the width
* @param {Number} height - the height
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Strip.js
* @sourceline 5
*/
/**
* @description The texture of the strip
* @member PIXI.Strip#texture
* @type {PIXI.Texture}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Strip.js
* @sourceline 20
*/
/**
* @description Whether the strip is dirty or not
* @member PIXI.Strip#dirty
* @type {Boolean}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Strip.js
* @sourceline 43
*/
/**
* @description The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.
* @member PIXI.Strip#blendMode
* @type {Number}
* @default PIXI.blendModes.NORMAL;
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Strip.js
* @sourceline 51
*/
/**
* @description Triangles in canvas mode are automatically antialiased, use this value to force triangles to overlap a bit with each other.
* @member PIXI.Strip#canvasPadding
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Strip.js
* @sourceline 60
*/
/**
* @description Renders a flat strip
* @method PIXI.Strip#renderStripFlat
* @param {PIXI.Strip} strip - The Strip to render
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Strip.js
* @sourceline 344
*/
/**
* @description When the texture is updated, this event will fire to update the scale and frame
* @method PIXI.Strip#onTextureUpdate
* @param {} event -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Strip.js
* @sourceline 392
*/
/**
* @description Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.
* @method PIXI.Strip#getBounds
* @param {Matrix} matrix - the transformation matrix of the sprite
* @return {Rectangle} the framing rectangle
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Strip.js
* @sourceline 405
*/
/**
* @description Different drawing buffer modes supported
* @member PIXI.Strip.
* @type {{TRIANGLE_STRIP: number, TRIANGLES: number}}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/Strip.js
* @sourceline 462
*/
/**
* @fileoverview
* @author Mat Groves http://matgroves.com/
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 1
*/
/**
* @class PIXI.TilingSprite
* @description A tiling sprite is a fast way of rendering a tiling image
* @augments PIXI.Sprite
* @param {PIXI.Texture} texture - the texture of the tiling sprite
* @param {Number} width - the width of the tiling sprite
* @param {Number} height - the height of the tiling sprite
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 5
*/
/**
* @description The width of the tiling sprite
* @member PIXI.TilingSprite#width
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 19
*/
/**
* @description The height of the tiling sprite
* @member PIXI.TilingSprite#height
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 27
*/
/**
* @description The scaling of the image that is being tiled
* @member PIXI.TilingSprite#tileScale
* @type {Point}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 35
*/
/**
* @description A point that represents the scale of the texture object
* @member PIXI.TilingSprite#tileScaleOffset
* @type {Point}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 43
*/
/**
* @description The offset position of the image that is being tiled
* @member PIXI.TilingSprite#tilePosition
* @type {Point}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 51
*/
/**
* @description Whether this sprite is renderable or not
* @member PIXI.TilingSprite#renderable
* @type {Boolean}
* @default true
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 59
*/
/**
* @description The tint applied to the sprite. This is a hex value
* @member PIXI.TilingSprite#tint
* @type {Number}
* @default 0xFFFFFF
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 68
*/
/**
* @description If enabled a green rectangle will be drawn behind the generated tiling texture, allowing you to visually
debug the texture being used.
* @member PIXI.TilingSprite#textureDebug
* @type {Boolean}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 77
*/
/**
* @description The blend mode to be applied to the sprite
* @member PIXI.TilingSprite#blendMode
* @type {Number}
* @default PIXI.blendModes.NORMAL;
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 86
*/
/**
* @description The CanvasBuffer object that the tiled texture is drawn to.
* @member PIXI.TilingSprite#canvasBuffer
* @type {PIXICanvasBuffer}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 95
*/
/**
* @description An internal Texture object that holds the tiling texture that was generated from TilingSprite.texture.
* @member PIXI.TilingSprite#tilingTexture
* @type {PIXITexture}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 103
*/
/**
* @description The Context fill pattern that is used to draw the TilingSprite in Canvas mode only (will be null in WebGL).
* @member PIXI.TilingSprite#tilePattern
* @type {PIXITexture}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 111
*/
/**
* @description If true the TilingSprite will run generateTexture on its **next** render pass.
This is set by the likes of Phaser.LoadTexture.setFrame.
* @member PIXI.TilingSprite#refreshTexture
* @type {Boolean}
* @default true
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 119
*/
/**
* @description Renders the object using the WebGL renderer
* @method PIXI.TilingSprite#_renderWebGL
* @param {RenderSession} renderSession -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 148
*/
/**
* @description Renders the object using the Canvas renderer
* @method PIXI.TilingSprite#_renderCanvas
* @param {RenderSession} renderSession -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 216
*/
/**
* @description When the texture is updated, this event will fire to update the scale and frame
* @method PIXI.TilingSprite#onTextureUpdate
* @param {} event -
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 320
*/
/**
* @method PIXI.TilingSprite#generateTilingTexture
* @param {Boolean} forcePowerOfTwo - Whether we want to force the texture to be a power of two
* @param {RenderSession} renderSession -
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 332
*/
/**
* @description Returns the framing rectangle of the sprite as a PIXI.Rectangle object
* @method PIXI.TilingSprite#getBounds
* @return {Rectangle} the framing rectangle
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 417
*/
/**
* @description The width of the sprite, setting this will actually modify the scale to achieve the value set
* @member PIXI.TilingSprite#width
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 517
*/
/**
* @description The height of the TilingSprite, setting this will actually modify the scale to achieve the value set
* @member PIXI.TilingSprite#height
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/extras/TilingSprite.js
* @sourceline 535
*/
/**
* @fileoverview
* @author Mat Groves http://matgroves.com/ @Doormat23
* @sourcefile /Users/rich/Documents/phaser/src/pixi/filters/AbstractFilter.js
* @sourceline 1
*/
/**
* @class PIXI.AbstractFilter
* @description This is the base class for creating a PIXI filter. Currently only webGL supports filters.
If you want to make a custom filter this should be your base class.
* @param {Array} fragmentSrc - The fragment source in an array of strings.
* @param {Object} uniforms - An object containing the uniforms for this filter.
* @sourcefile /Users/rich/Documents/phaser/src/pixi/filters/AbstractFilter.js
* @sourceline 5
*/
/**
* @description An array of passes - some filters contain a few steps this array simply stores the steps in a liniear fashion.
For example the blur filter has two passes blurX and blurY.
* @member PIXI.AbstractFilter#passes
* @type {Array}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/filters/AbstractFilter.js
* @sourceline 16
*/
/**
* @member PIXI.AbstractFilter#shaders
* @type {Array}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/filters/AbstractFilter.js
* @sourceline 25
*/
/**
* @member PIXI.AbstractFilter#dirty
* @type {Boolean}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/filters/AbstractFilter.js
* @sourceline 32
*/
/**
* @member PIXI.AbstractFilter#padding
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/filters/AbstractFilter.js
* @sourceline 38
*/
/**
* @member PIXI.AbstractFilter#uniforms
* @type {Object}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/filters/AbstractFilter.js
* @sourceline 44
*/
/**
* @member PIXI.AbstractFilter#fragmentSrc
* @type {Array}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/filters/AbstractFilter.js
* @sourceline 51
*/
/**
* @description Syncs the uniforms between the class object and the shaders.
* @method PIXI.AbstractFilter#syncUniforms
* @sourcefile /Users/rich/Documents/phaser/src/pixi/filters/AbstractFilter.js
* @sourceline 61
*/
/**
* @fileoverview
* @author Mat Groves http://matgroves.com/ @Doormat23
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 1
*/
/**
* @class PIXI.Graphics
* @description The Graphics class contains methods used to draw primitive shapes such as lines, circles and rectangles to the display, and color and fill them.
* @augments PIXI.DisplayObjectContainer
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 5
*/
/**
* @description The alpha value used when filling the Graphics object.
* @member PIXI.Graphics#fillAlpha
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 18
*/
/**
* @description The width (thickness) of any lines drawn.
* @member PIXI.Graphics#lineWidth
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 26
*/
/**
* @description The color of any lines drawn.
* @member PIXI.Graphics#lineColor
* @type {String}
* @default 0
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 34
*/
/**
* @description Graphics data
* @member PIXI.Graphics#graphicsData
* @type {Array}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 43
*/
/**
* @description The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to reset the tint.
* @member PIXI.Graphics#tint
* @type {Number}
* @default 0xFFFFFF
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 52
*/
/**
* @description The blend mode to be applied to the graphic shape. Apply a value of PIXI.blendModes.NORMAL to reset the blend mode.
* @member PIXI.Graphics#blendMode
* @type {Number}
* @default PIXI.blendModes.NORMAL;
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 61
*/
/**
* @description Current path
* @member PIXI.Graphics#currentPath
* @type {Object}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 70
*/
/**
* @description Array containing some WebGL-related properties used by the WebGL renderer.
* @member PIXI.Graphics#_webGL
* @type {Array}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 79
*/
/**
* @description Whether this shape is being used as a mask.
* @member PIXI.Graphics#isMask
* @type {Boolean}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 88
*/
/**
* @description The bounds' padding used for bounds calculation.
* @member PIXI.Graphics#boundsPadding
* @type {Number}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 96
*/
/**
* @description Used to detect if the graphics object has changed. If this is set to true then the graphics object will be recalculated.
* @member PIXI.Graphics#dirty
* @type {Boolean}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 106
*/
/**
* @description Used to detect if the webgl graphics object has changed. If this is set to true then the graphics object will be recalculated.
* @member PIXI.Graphics#webGLDirty
* @type {Boolean}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 115
*/
/**
* @description Used to detect if the cached sprite object needs to be updated.
* @member PIXI.Graphics#cachedSpriteDirty
* @type {Boolean}
* @access private
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 124
*/
/**
* @description Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method.
* @method PIXI.Graphics#lineStyle
* @param {Number} lineWidth - width of the line to draw, will update the objects stored style
* @param {Number} color - color of the line to draw, will update the objects stored style
* @param {Number} alpha - alpha of the line to draw, will update the objects stored style
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 139
*/
/**
* @description Moves the current drawing position to x, y.
* @method PIXI.Graphics#moveTo
* @param {Number} x - the X coordinate to move to
* @param {Number} y - the Y coordinate to move to
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 173
*/
/**
* @description Draws a line using the current line style from the current drawing position to (x, y);
The current drawing position is then set to (x, y).
* @method PIXI.Graphics#lineTo
* @param {Number} x - the X coordinate to draw to
* @param {Number} y - the Y coordinate to draw to
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 188
*/
/**
* @description Calculate the points for a quadratic bezier curve and then draws it.
Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c
* @method PIXI.Graphics#quadraticCurveTo
* @param {Number} cpX - Control point x
* @param {Number} cpY - Control point y
* @param {Number} toX - Destination point x
* @param {Number} toY - Destination point y
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 210
*/
/**
* @description Calculate the points for a bezier curve and then draws it.
* @method PIXI.Graphics#bezierCurveTo
* @param {Number} cpX - Control point x
* @param {Number} cpY - Control point y
* @param {Number} cpX2 - Second Control point x
* @param {Number} cpY2 - Second Control point y
* @param {Number} toX - Destination point x
* @param {Number} toY - Destination point y
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 264
*/
/**
* @description The arc method creates an arc/curve (used to create circles, or parts of circles).
* @method PIXI.Graphics#arc
* @param {Number} cx - The x-coordinate of the center of the circle
* @param {Number} cy - The y-coordinate of the center of the circle
* @param {Number} radius - The radius of the circle
* @param {Number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)
* @param {Number} endAngle - The ending angle, in radians
* @param {Boolean} anticlockwise - Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.
* @param {Number} segments - Optional. The number of segments to use when calculating the arc. The default is 40. If you need more fidelity use a higher number.
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 391
*/
/**
* @description Specifies a simple one-color fill that subsequent calls to other Graphics methods
(such as lineTo() or drawCircle()) use when drawing.
* @method PIXI.Graphics#beginFill
* @param {Number} color - the color of the fill
* @param {Number} alpha - the alpha of the fill
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 476
*/
/**
* @description Applies a fill to the lines and shapes that were added since the last call to the beginFill() method.
* @method PIXI.Graphics#endFill
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 504
*/
/**
* @method PIXI.Graphics#drawRect
* @param {Number} x - The X coord of the top-left of the rectangle
* @param {Number} y - The Y coord of the top-left of the rectangle
* @param {Number} width - The width of the rectangle
* @param {Number} height - The height of the rectangle
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 519
*/
/**
* @method PIXI.Graphics#drawRoundedRect
* @param {Number} x - The X coord of the top-left of the rectangle
* @param {Number} y - The Y coord of the top-left of the rectangle
* @param {Number} width - The width of the rectangle
* @param {Number} height - The height of the rectangle
* @param {Number} radius - Radius of the rectangle corners. In WebGL this must be a value between 0 and 9.
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 535
*/
/**
* @description Draws a circle.
* @method PIXI.Graphics#drawCircle
* @param {Number} x - The X coordinate of the center of the circle
* @param {Number} y - The Y coordinate of the center of the circle
* @param {Number} diameter - The diameter of the circle
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 550
*/
/**
* @description Draws an ellipse.
* @method PIXI.Graphics#drawEllipse
* @param {Number} x - The X coordinate of the center of the ellipse
* @param {Number} y - The Y coordinate of the center of the ellipse
* @param {Number} width - The half width of the ellipse
* @param {Number} height - The half height of the ellipse
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 566
*/
/**
* @description Draws a polygon using the given path.
* @method PIXI.Graphics#drawPolygon
* @param {(Array|PhaserPolygon)} path - The path data used to construct the polygon. Can either be an array of points or a Phaser.Polygon object.
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 583
*/
/**
* @description Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.
* @method PIXI.Graphics#clear
* @return {PIXI.Graphics}
* @sourcefile /Users/rich/Documents/phaser/src/pixi/primitives/Graphics.js
* @sourceline 618
*/
/**
* @description Useful function that returns a texture of the graphics object that can then be used to create sprites
This can be quite useful if your geometry is complicated and needs to be reused multiple times.
* @method PIXI.Graphics#generateTexture
* @param {Number} [res