Cullers
A component that provides culling functionality for meshes in a 3D scene. 📕 Tutorial. 📘 API.
Extends
Implements
Properties
list
list:
Map
<string
,MeshCullerRenderer
>
A map of MeshCullerRenderer instances, keyed by their world UUIDs.
onDisposed
readonly
onDisposed:Event
<unknown
>
An event that is triggered when the Cullers component is disposed.
Implementation of
uuid
static
readonly
uuid:"69f2a50d-c266-44fc-b1bd-fa4d34be89e6"
A unique identifier for the component. This UUID is used to register the component within the Components system.
Accessors
enabled
get
enabled():boolean
set
enabled(value
):void
Parameters
Parameter | Type |
---|---|
value | boolean |
Returns
boolean
Methods
create()
create(
world
):MeshCullerRenderer
Creates a new MeshCullerRenderer for the given world. If a MeshCullerRenderer already exists for the world, it will return the existing one.
Parameters
Parameter | Type | Description |
---|---|---|
world | World | The world for which to create the MeshCullerRenderer. |
Returns
The newly created or existing MeshCullerRenderer for the given world.
delete()
delete(
world
):void
Deletes the MeshCullerRenderer associated with the given world. If a MeshCullerRenderer 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 MeshCullerRenderer. |
Returns
void
dispose()
dispose():
void
Returns
void
Implementation of
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
Inherited from
updateInstanced()
updateInstanced(
meshes
):void
Updates the given instanced meshes inside the all the cullers. You should use this if you change the count property, e.g. when changing the visibility of fragments.
Parameters
Parameter | Type | Description |
---|---|---|
meshes | Iterable <InstancedMesh <BufferGeometry <NormalBufferAttributes >, Material | Material []>> | The meshes to update. |
Returns
void