Renderable

Donot use this class directly. Use Inheritance instead. This is a base class for all components that can be rendered, such as sprites, text, etc. These components are identified by the renderer and rendered accordingly. Renderables are components that can be rendered to the screen. Every renderable inherits from this class.

Properties
NameTypeDefaultDescription
blendModeBLEND_MODERenderable.BLEND_MODE.NORMAL

Blend mode of the object.

filterFilter

The filter applied to the object.

renderOrdernumber0

Lower values draw first within the current scene or renderable-parent pass; a renderable draws before its descendants.

Extends

Members

(static, readonly) BLEND_MODE :string

Available blend modes for the renderable.

Type:
  • string
Properties
NameTypeDescription
NORMALstring
MULTIPLYstring
SCREENstring
OVERLAYstring
DARKENstring
LIGHTENstring
COLOR_DODGEstring
COLOR_BURNstring
HARD_LIGHTstring
SOFT_LIGHTstring
DIFFERENCEstring
EXCLUSIONstring
HUEstring
SATURATIONstring
COLORstring
LUMINOSITYstring

blendMode

Blend mode of the object

filter

The filter applied to the object

(readonly) properties

The entity that this component is attached to.

Methods

deserialize(props)

Populates the component properties from a data object. Override this method for custom property handling.

Parameters:
NameTypeDescription
propsobject

The properties object (usually from JSON).

Inherited From

drawChildren()

Draw this entity's nested renderables in deterministic order. @protected