.. role:: ts-api-decorator

##############
ExplodeManager
##############

.. container:: ts-api-section

   .. js: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).



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~ExplodeManager.getActive`
   * :js:meth:`~ExplodeManager.getMagnitude`
   * :js:meth:`~ExplodeManager.setMagnitude`
   * :js:meth:`~ExplodeManager.start`
   * :js:meth:`~ExplodeManager.stop`





------------

Methods
=======

.. rst-class:: ts-api-section

getActive
---------

.. js:method:: ExplodeManager.getActive()



   Indicates whether there is a currently active explode operation.

   :returns: boolean value indicating if there is an active explode operation.


   :rtype: boolean

.. rst-class:: ts-api-section

getMagnitude
------------

.. js:method:: ExplodeManager.getMagnitude()



   Gets the current explode magnitude. This will always return 0 when there is no active explode operation.

   :returns: the current explode magnitude.


   :rtype: number

.. rst-class:: ts-api-section

setMagnitude
------------

.. js:method:: ExplodeManager.setMagnitude( magnitude)

   :param magnitude: the magnitude for the explosion.
   :type magnitude: number


   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.


   :rtype: Promise <void>

.. rst-class:: ts-api-section

start
-----

.. js:method:: ExplodeManager.start([ nodeIds[, explosionVector]])

   :param nodeIds: :ts-api-decorator:`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.
   :type nodeIds: [number]
   :param explosionVector: :ts-api-decorator:`optional` the vector to use for the center of the explosion.
   :type explosionVector: Point3


   Starts an explode operation. This will cancel any currently active explode operation.

   :returns: a promise that resolves when this operation is complete.


   :rtype: Promise <void>

.. rst-class:: ts-api-section

stop
----

.. js:method:: ExplodeManager.stop()



   Terminates any active explode operation.

   :returns: a promise that resolves when this operation is complete.


   :rtype: Promise <void>

