Request

Response

    Autodesk.Viewing.Extensions

    ExplodeExtension

    Use its activate() method to enable the explode UI.

    The extension id is: Autodesk.Explode

    Examples

    viewer.loadExtension('Autodesk.Explode')
    

    Methods

    Initializes and registers the ExplodeTool.

    Deactivate the extension, deregister the ExplodeTool, and remove the UI from the toolbar.

    Invoked by the viewer when the toolbar UI is available.

    Parameters

    toolbar*toolbar instance.
    * Required

    activate()

    Activates the tool and UI.

    deactivate()

    Hides the explode UI and deactivates the ExplodeTool (resets the explode scale).

    isActive()

    Returns

    typedescription
    boolean true if the ExplodeTool is active.

    getScale()

    Returns

    typedescription
    number Between 0 and 1.

    setScale(value)

    Sets scale of the explode and applies an explode operation.

    Parameters

    value*
    number
    Between 0 and 1.
    * Required

    getMagnitude()

    Returns

    typedescription
    number 0 - +inf.

    setMagnitude(value)

    Sets magnitude of the explode and applies an explode operation.

    Parameters

    value*
    number
    0 - +inf.
    * Required

    getDepthDampening()

    Returns

    typedescription
    number 1 - +inf.

    setDepthDampening(value)

    Sets depth dampening of the explode and applies an explode operation.

    Parameters

    value*
    number
    0 - +inf.
    * Required

    setStrategy(strategy)

    Specifies the algorithm used for exploding models.

    Parameters

    strategy*
    string
    Either ‘hierarchy’ or ‘radial’.
    * Required

    getStrategy()

    Returns an identifier for the algorithm used for exploding models.

    Returns

    typedescription
    string

    setUIEnabled(enable)

    Enable / Disable the explode button & slider. Doesn’t affect the state of the explode scale itself.

    Parameters

    enable*
    boolean
    enable / disable the UI.
    * Required