ExplodeManager
- class ExplodeManager()
This class provides an interface to the explode related features of the viewer. More information can be found [here](https://docs.techsoft3d.com/communicator/latest/prog_guide/viewing/scene_attributes/explode.html).
Methods
getActive
- ExplodeManager.getActive()
Indicates whether there is a currently active explode operation.
- Returns
boolean value indicating if there is an active explode operation.
- Return type
boolean
getMagnitude
- ExplodeManager.getMagnitude()
Gets the current explode magnitude. This will always return 0 when there is no active explode operation.
- Returns
the current explode magnitude.
- Return type
number
setMagnitude
- ExplodeManager.setMagnitude(magnitude)
- Arguments
magnitude (
number()
) – the magnitude for the explosion.
Sets the explosion magnitude if there is an active explosion operation. A value of 1.0 indicates that the distance between a part’s exploded center, and exploded center will be double.
- Returns
a promise that resolves when this operation is complete.
- Return type
Promise <void>
start
- ExplodeManager.start([nodeIds[, explosionVector]])
- Arguments
nodeIds (
[number]()
) – optional an array of NodeId for the parts that should be exploded. If this parameter is omitted or is an empty array, the entire model will be considered for explosion.explosionVector (
Point3()
) – optional the vector to use for the center of the explosion.
Starts an explode operation. This will cancel any currently active explode operation.
- Returns
a promise that resolves when this operation is complete.
- Return type
Promise <void>
stop
- ExplodeManager.stop()
Terminates any active explode operation.
- Returns
a promise that resolves when this operation is complete.
- Return type
Promise <void>