Optional
options: GraphicsComponentOptionsAnchor to apply to graphics by default
If set to true graphics added to the component will be copied. This can affect performance
Optional
Readonly
dependenciesOptionally list any component types this component depends on If the owner entity does not have these components, new components will be added to the entity
Only components with zero-arg constructors are supported as automatic component dependencies
Flip all graphics horizontally along the y-axis
Flip all graphics vertically along the x-axis
Offset to apply to graphics by default
Draws after the entity transform has been applied, and after graphics component graphics has been drawn
Draws after the entity transform has bene applied, but before graphics component graphics have been drawn
Sets or gets wither all drawings should have an opacity applied
Optional
Readonly
optionalOptional
ownerCurrent owning [[Entity]], if any, of this component. Null if not added to any [[Entity]]
Readonly
typeType of this component, must be a unique type among component types in you game.
Sets or gets wether any drawing should be visible in this component
Returns the currently displayed graphics and their offsets, empty array if hidden
Clones any properties on this component, if that property value has a clone()
method it will be called
Remove any instance(s) of a graphic currently being shown in the default layer
Remove all currently shown graphics in the default layer
Optional
onOptional callback called when a component is added to an entity
Optional
onOptional callback called when a component is added to an entity
Show a graphic by name on the default layer, returns the new [[Graphic]]
Optional
options: GraphicsShowOptionsUse a graphic only, swap out any graphics on the default layer, returns the new [[Graphic]]
Optional
options: GraphicsShowOptions
Component to manage drawings, using with the position component