.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited

.. role:: clio-readonly
   :class: clio-flag clio-flag-readonly


##############
ExplodeService
##############

.. js:class:: wvc.ExplodeService

   IExplodeService
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wvc.ExplodeService.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wvc.ExplodeService.serviceName`
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wvc.ExplodeService.webViewer`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wvc.ExplodeService.addEventListener`
   * :js:meth:`~wvc.ExplodeService.dispatchEvent`
   * :js:meth:`~wvc.ExplodeService.getActive`
   * :js:meth:`~wvc.ExplodeService.getMagnitude`
   * :js:meth:`~wvc.ExplodeService.removeEventListener`
   * :js:meth:`~wvc.ExplodeService.reset`
   * :js:meth:`~wvc.ExplodeService.setMagnitude`
   * :js:meth:`~wvc.ExplodeService.start`
   * :js:meth:`~wvc.ExplodeService.stop`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: wvc.ExplodeService.constructor

      .. rst-class:: sig-pretty-signature
      
         | ExplodeService(): :js:class:`ExplodeService <wvc.ExplodeService>`
      
      **Returns**\ : :js:class:`ExplodeService <wvc.ExplodeService>`
      



.. rst-class:: kind-group kind-properties

.. rubric:: Properties
   :class: kind-group-title


.. js:data:: wvc.ExplodeService.serviceName

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | serviceName: *"ExplodeService"*
      



.. rst-class:: kind-group kind-accessors

.. rubric:: Accessors
   :class: kind-group-title


.. js:method:: wvc.ExplodeService.webViewer

      .. rst-class:: sig-pretty-signature
      
         | *get* webViewer(): (*undefined* | *IWebViewer*\ )
      
      **Returns**\ : (*undefined* \| *IWebViewer*\ )
      
      .. rst-class:: sig-pretty-signature
      
         | *set* webViewer(**value**\ : (*undefined* | *IWebViewer*\ )): *void*
      
      **Parameters**
      
      
         **value**\ : (*undefined* \| *IWebViewer*\ )
      
      
      **Returns**\ : *void*
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wvc.ExplodeService.addEventListener

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | addEventListener(**type**\ : *string*\ , **callback**\ : (*None* | *EventListenerOrEventListenerObject*\ ), **options**\ : (*boolean* | *AddEventListenerOptions*\ )): *void*
      
      Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
      
      The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
      
      When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
      
      When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
      
      When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
      
      If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
      
      The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
      
      `MDN Reference <https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener>`__
      
      **Parameters**
      
      
         **type**\ : *string*
      
         **callback**\ : (*None* \| *EventListenerOrEventListenerObject*\ )
      
         **options**\ : (*boolean* \| *AddEventListenerOptions*\ )
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ExplodeService.dispatchEvent

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | dispatchEvent(**event**\ : *Event*\ ): *boolean*
      
      Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
      
      `MDN Reference <https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent>`__
      
      **Parameters**
      
      
         **event**\ : *Event*
      
      
      **Returns**\ : *boolean*
      



.. js:method:: wvc.ExplodeService.getActive

      .. rst-class:: sig-pretty-signature
      
         | getActive(): *boolean*
      
      Indicates whether there is a currently active explode operation.
      
      **Returns**\ : *boolean*
      
      
         boolean value indicating if there is an active explode operation.
      
      



.. js:method:: wvc.ExplodeService.getMagnitude

      .. rst-class:: sig-pretty-signature
      
         | getMagnitude(): *number*
      
      Gets the current explode magnitude. This will always return 0 when there is no active explode operation.
      
      **Returns**\ : *number*
      
      
         the current explode magnitude.
      
      



.. js:method:: wvc.ExplodeService.removeEventListener

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | removeEventListener(**type**\ : *string*\ , **callback**\ : (*None* | *EventListenerOrEventListenerObject*\ ), **options**\ : (*boolean* | *EventListenerOptions*\ )): *void*
      
      Removes the event listener in target's event listener list with the same type, callback, and options.
      
      `MDN Reference <https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener>`__
      
      **Parameters**
      
      
         **type**\ : *string*
      
         **callback**\ : (*None* \| *EventListenerOrEventListenerObject*\ )
      
         **options**\ : (*boolean* \| *EventListenerOptions*\ )
      
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ExplodeService.reset

      .. rst-class:: sig-pretty-signature
      
         | reset(): *void*
      
      Resets the explode service, clearing any active operations.
      
      **Returns**\ : *void*
      



.. js:method:: wvc.ExplodeService.setMagnitude

      .. rst-class:: sig-pretty-signature
      
         | setMagnitude(**magnitude**\ : *number*\ ): *Promise*
      
      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.
      
      **Parameters**
      
      
         **magnitude**\ : *number*
      
      
            the magnitude for the explosion.
      
      
      
      **Returns**\ : *Promise*
      
      
         a promise that resolves when this operation is complete.
      
      



.. js:method:: wvc.ExplodeService.start

      .. rst-class:: sig-pretty-signature
      
         | start(**nodeIds**\ : *number*\ [], **explosionVector**\ : *IPoint3*\ ): *Promise*
      
      Starts an explode operation. This will cancel any currently active explode operation.
      
      **Parameters**
      
      
         **nodeIds**\ : *number*\ []
      
      
            an array of node Ids 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**\ : *IPoint3*
      
      
            the vector to use for the center of the explosion.
      
      
      
      **Returns**\ : *Promise*
      
      
         a promise that resolves when this operation is complete.
      
      



.. js:method:: wvc.ExplodeService.stop

      .. rst-class:: sig-pretty-signature
      
         | stop(): *Promise*
      
      Terminates any active explode operation.
      
      **Returns**\ : *Promise*
      
      
         a promise that resolves when this operation is complete.
      
      




