Skip to main content

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

Component.enabled

Overrides

Component . enabled


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>

Disposable.onDisposed

Implementation of

Disposable . onDisposed


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

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


set()

set(active): void

Sets the explosion state of the fragments.

Parameters

ParameterTypeDescription
activebooleanA 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.