Exploder
The Exploder component is responsible for managing the explosion of 3D model fragments (generally by floor). 📕 Tutorial. 📘 API.
Extends
Implements
Properties
enabled
enabled:
boolean
=true
Overrides
groupName
groupName:
string
="spatialStructures"
The group name used for the explosion animation. This property specifies the group of fragments that will be affected by the explosion. Default value is "storeys".
height
height:
number
=10
The height of the explosion animation. This property determines the vertical distance by which fragments are moved during the explosion. Default value is 10.
list
list:
Set
<string
>
A set of strings representing the exploded items. This set is used to keep track of which items have been exploded.
onDisposed
readonly
onDisposed:Event
<unknown
>
Implementation of
uuid
static
readonly
uuid:"d260618b-ce88-4c7d-826c-6debb91de3e2"
A unique identifier for the component. This UUID is used to register the component within the Components system.
Methods
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
set()
set(
active
):void
Sets the explosion state of the fragments.
Parameters
Parameter | Type | Description |
---|---|---|
active | boolean | A boolean indicating whether to activate or deactivate the explosion. |
Returns
void
Remarks
This method applies a vertical transformation to the fragments based on the active
parameter.
If active
is true, the fragments are moved upwards by a distance determined by the height
property.
If active
is false, the fragments are moved back to their original position.
The method also keeps track of the exploded items using the list
set.
Throws
Will throw an error if the Classifier
or FragmentsManager
components are not found in the components
system.