Readonly
entityThe entity to which the component is attached.
Notifies when the component is detached from the entity.
Whether the component has been initialized.
The light intensity (lux).
The component name.
Protected
Optional
addedProtected
handleCreates a handle (weak reference) to a trackable object.
A handle to a trackable object.
Handles created through this function are automatically cleared when the component is detached/removed.
const handle = this.handle(Entity, this.world.find("Some Entity"));
const handle = this.handle(MyScriptComponent);
Protected
Optional
initializeProtected
Optional
initializeProtected
Optional
postProtected
Optional
postImmediately triggers asynchronous initialization if the component hasn't already been initialized.
This can be used in cases where one component references another in its asynchronous initialize function, but it is required that the referenced component has already been asynchronously initialized.
Immediately triggers initialization if the component hasn't already been initialized.
This can be used in cases where one component references another in its initialize function, but it is required that the referenced component has already been initialized.
Protected
subscribeSubscribes to a subscribable object.
Subscriptions created through this function are automatically unsubscribed when the component is detached/removed.
The subscribable object for which to subscribe.
The callback function that is triggered when the object's value is updated.
Protected
unsubscribeUnsubscribes from a subscribable object.
The object from which to unsubscribe.
The callback function for the subscription.
True if the subscription was canceled, false otherwise.
Protected
Optional
updateProtected
Optional
updateGenerated using TypeDoc
A core component that emits a directed light.