Skip to main content

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

Disposable . onDisposed


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

Component.enabled

set enabled(value): void

Component.enabled

Parameters

ParameterType
valueboolean

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

ParameterTypeDescription
worldWorldThe world for which to create the MeshCullerRenderer.

Returns

MeshCullerRenderer

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

ParameterTypeDescription
worldWorldThe world for which to delete the MeshCullerRenderer.

Returns

void


dispose()

dispose(): void

Disposable.dispose

Returns

void

Implementation of

Disposable . dispose


isConfigurable()

isConfigurable(): this is Configurable<any, any>

Whether is component is Configurable.

Returns

this is Configurable<any, any>

Inherited from

Component . isConfigurable


isDisposeable()

isDisposeable(): this is Disposable

Whether is component is Disposable.

Returns

this is Disposable

Inherited from

Component . isDisposeable


isHideable()

isHideable(): this is Hideable

Whether is component is Hideable.

Returns

this is Hideable

Inherited from

Component . isHideable


isResizeable()

isResizeable(): this is Resizeable

Whether is component is Resizeable.

Returns

this is Resizeable

Inherited from

Component . isResizeable


isUpdateable()

isUpdateable(): this is Updateable

Whether is component is Updateable.

Returns

this is Updateable

Inherited from

Component . isUpdateable


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

ParameterTypeDescription
meshesIterable<InstancedMesh<BufferGeometry<NormalBufferAttributes>, Material | Material[]>>The meshes to update.

Returns

void