Raycasters
A component that manages a raycaster for each world and automatically disposes it when its corresponding world is disposed. 📕 Tutorial. 📘 API.
Extends
Implements
Properties
enabled
enabled:
boolean
=true
Overrides
list
list:
Map
<string
,SimpleRaycaster
>
A Map that stores raycasters for each world. The key is the world's UUID, and the value is the corresponding SimpleRaycaster instance.
onDisposed
onDisposed:
Event
<unknown
>
Implementation of
uuid
static
readonly
uuid:"d5d8bdf0-db25-4952-b951-b643af207ace"
A unique identifier for the component. This UUID is used to register the component within the Components system.
Methods
delete()
delete(
world
):void
Deletes the SimpleRaycaster instance associated with the given world. If a SimpleRaycaster instance exists for the given world, it will be disposed and removed from the list.
Parameters
Parameter | Type | Description |
---|---|---|
world | World | The world for which to delete the SimpleRaycaster instance. |
Returns
void
dispose()
dispose():
void
Returns
void
Implementation of
get()
get(
world
):SimpleRaycaster
Retrieves a SimpleRaycaster instance for the given world. If a SimpleRaycaster instance already exists for the world, it will be returned. Otherwise, a new SimpleRaycaster instance will be created and added to the list.
Parameters
Parameter | Type | Description |
---|---|---|
world | World | The world for which to retrieve or create a SimpleRaycaster instance. |
Returns
The SimpleRaycaster instance for the given world.
isConfigurable()
isConfigurable():
this is Configurable<any, any>
Whether is component is Configurable.
Returns
this is Configurable<any, any>
Inherited from
isDisposeable()
isDisposeable():
this is Disposable
Whether is component is Disposable.
Returns
this is Disposable
Inherited from
isHideable()
isHideable():
this is Hideable
Whether is component is Hideable.
Returns
this is Hideable
Inherited from
isResizeable()
isResizeable():
this is Resizeable
Whether is component is Resizeable.
Returns
this is Resizeable
Inherited from
isUpdateable()
isUpdateable():
this is Updateable
Whether is component is Updateable.
Returns
this is Updateable