Disposer
A tool to safely remove meshes, geometries, materials and other items from memory to prevent memory leaks.
Extends
Properties
enabled
enabled:
boolean
=true
Overrides
uuid
static
readonly
uuid:"76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe"
A unique identifier for the component. This UUID is used to register the component within the Components system.
Methods
destroy()
destroy(
object
,materials
,recursive
):void
Removes a mesh, its geometry and its materials from memory. If you are using any of these in other parts of the application, make sure that you remove them from the mesh before disposing it.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
object | Object3D <Object3DEventMap > | undefined | the object |
to remove. | |||
materials | boolean | true | whether to dispose the materials of the mesh. |
recursive | boolean | true | whether to recursively dispose the children of the mesh. |
Returns
void
disposeGeometry()
disposeGeometry(
geometry
):void
Disposes a geometry from memory.
Parameters
Parameter | Type | Description |
---|---|---|
geometry | BufferGeometry <NormalBufferAttributes > | the |
to remove. |
Returns
void
get()
get():
Set
<string
>
Return the UUIDs of all disposed components.
Returns
Set
<string
>
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