Display Object
Last updated
Was this helpful?
Last updated
Was this helpful?
The base class for all objects that are rendered on the screen.
This is an abstract class and can not be used on its own; rather it should be extended.
Below are list of DisplayObjects that supported:
p-container
Adds support for children to DisplayObject
p-graphics
Shape-drawing display object similar to the Canvas API
p-sprite
Draws textures (i.e. images)
p-text
Draws text using the Canvas API internally
p-bitmap-text
More scaleable solution for text rendering, reusing glyph textures
p-tiling-sprite
Draws textures/images in a tiled fashion
p-animated-sprite
Draws an animation of multiple images
p-mesh
Provides a lower-level API for drawing meshes with custom data
p-nine-slice-plane
Mesh-related
p-simple-plane
Mesh-related
p-simple-rope
Mesh-related
Description of all props below can be found at:
Reactive column
below indicates that this object will be reactive on props changed
events
Array
[]
shouldRender
Boolean
true
sometimes you just want to create this object and don't want to render it on screen (Eg: use it as mask for other object)
alpha
Number
1
angle
Number
0
buttonMode
Boolean
false
cacheAsBitmap
Boolean
false
cursor
Enum
undefined
can be one of: 'help' | 'wait' | 'crosshair' | 'not-allowed' | 'zoom-in' | 'grab' | undefined
filterArea
Rectangle
undefined
filters
Array<Filter>
undefined
interactive
Boolean
false
isMask
Boolean
false
isSprite
Boolean
false
mask
Container | MaskData
undefined
name
String
undefined
pivotX
Number
0
pivotY
Number
0
renderable
Boolean
true
rotation
Number
0
scaleX
Number
1
scaleY
Number
1
skewX
Number
0
skewY
Number
0
visible
Boolean
true
x
Number
0
y
Number
0
zIndex
Number
0
ready
current display object instance
interactive events
event will be emitted with prefix "on". To listen to it, do this: @onclick ,...
All interactive events can be found here: