Type:

cacheAsBitmap : boolean

Sets if this DisplayObject should be cached as a bitmap.

When invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it
in a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a
performance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.

Cached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not
re-generate the cached bitmap automatically. To do that you need to call DisplayObject.updateCache.

To remove a cached bitmap, set this property to null. Cache this DisplayObject as a Bitmap. Set to null to remove an existing cached bitmap.

filterArea : Rectangle

Type:

filters : Array

Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas
Renderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter
using DisplayObject.filterArea.

To remove filters, set this property to null.

Note: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a
filter will reset this DisplayObjects blend mode to NORMAL. An Array of Phaser.Filter objects, or objects that extend them.

height : Number

Type:

hitArea : Rectangle | Circle | Ellipse | Polygon

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)

Type:

Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.
When applied it limits the visible area of this DisplayObject to the shape of the mask.
Under a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.
To remove a mask, set this property to null. The mask applied to this DisplayObject. Set to null to remove an existing mask.

Type:

The parent DisplayObjectContainer that this DisplayObject is a child of.
All DisplayObjects must belong to a parent in order to be rendered.
The root parent is the Stage object. This property is set automatically when the
DisplayObject is added to, or removed from, a DisplayObjectContainer.

width : Number

Type:

<readonly> worldAlpha : number

The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.
This value is the calculated total, based on the alpha values of all parents of this DisplayObjects
in the display list.

To obtain, and set, the local alpha value, see the alpha property.

Note: This property is only updated at the end of the updateTransform call, once per render. Until
that happens this property will contain values based on the previous frame. Be mindful of this if
accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

Type:

<readonly> worldPosition : PIXI.Point

The coordinates, in pixels, of this DisplayObject within the world.

This property contains the calculated total, based on the positions of all parents of this
DisplayObject in the display list.

Note: This property is only updated at the end of the updateTransform call, once per render. Until
that happens this property will contain values based on the previous frame. Be mindful of this if
accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

Type:

<readonly> worldRotation : number

The rotation, in radians, of this DisplayObject.

This property contains the calculated total, based on the rotations of all parents of this
DisplayObject in the display list.

Note: This property is only updated at the end of the updateTransform call, once per render. Until
that happens this property will contain values based on the previous frame. Be mindful of this if
accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

Type:

<readonly> worldScale : PIXI.Point

The global scale of this DisplayObject.

This property contains the calculated total, based on the scales of all parents of this
DisplayObject in the display list.

Note: This property is only updated at the end of the updateTransform call, once per render. Until
that happens this property will contain values based on the previous frame. Be mindful of this if
accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

Type:

This property contains the calculated total, based on the transforms of all parents of this
DisplayObject in the display list.

Note: This property is only updated at the end of the updateTransform call, once per render. Until
that happens this property will contain values based on the previous frame. Be mindful of this if
accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

generateTexture( [resolution] [, scaleMode], renderer)

Generates a RenderTexture based on this DisplayObject, which can they be used to texture other Sprites.
This can be useful if your DisplayObject is static, or complicated, and needs to be reused multiple times.

Please note that no garbage collection takes place on old textures. It is up to you to destroy old textures,
and references to them, so they don't linger in memory.

Parameters:

Name

Type

Argument

Default

Description

resolution

number

<optional>

1

The resolution of the texture being generated.

scaleMode

number

<optional>

PIXI.scaleModes.DEFAULT

See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values.