DarknessComponent
Hierarchy
- Component
- DarknessComponent
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
optionaloptions: DarknessComponentOptions
Returns DarknessComponent
Properties
publiccolor
optionalreadonlyinheriteddependencies
Optionally 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
publicheight
publicintensity
inheritedowner
publicwidth
Methods
inheritedclone
Clones any properties on this component, if that property value has a
clone()method it will be calledReturns Component
inheriteddeserialize
Parameters
data: Record<string, any>
Returns void
optionalinheritedonAdd
Optional callback called when a component is added to an entity
Parameters
owner: Entity
Returns void
optionalinheritedonRemove
Optional callback called when a component is removed from an entity
Parameters
previousOwner: Entity
Returns void
inheritedserialize
Returns Record<string, any>
inheritedtoJSON
Parameters
pretty: boolean = false
Returns string
Controls the darkness veil drawn over a scene or room by the LightingSystem.
With
width/heightofInfinity(the default) the veil covers the whole screen. With finite dimensions the veil is a "room" rectangle in world pixels centered on the owning entity's position.