Warning

Nightly releases are generated automatically from the latest source code and are intended for experimental purposes only. These builds may contain incomplete or untested features, bugs, or security vulnerabilities, and as such, are not for production use. Users should be aware that nightly releases may cause unexpected behavior, data loss, or system instability. Use of these releases is at the user's own risk, and it is advised to have adequate backups before testing. The software is provided as is with no guarantees or support.

ExplosionAPI

Interface ExplosionAPI

The ExplosionAPI provides a very basic explosion, which moves the parts away from a given point. The Explosion is completely circular. Overlapping parts are possible.

Example

// Get an instance of the ContextAPI
const myContext : ContextAPI = webvis.getContext( "example" )
const nodeID : number = myContext.add("someModelURL");

// Create a simple Explosion from the center of the node's BoxVolume.
myContext.createExplosion(nodeID);

// Perform the Explosion. All parts are moved away 0.3 times their distance to the center of the node.
myContext.performExplosion(0.3);

// Reset all transformations.
myContext.endExplosion();

Restrictions

Explosions cannot be performed on monolithic models.

interface ExplosionAPI {
    createExplosion(centerNodeID?: number): void;
    endExplosion(): void;
    performExplosion(explosionFactor: number): void;
}

Hierarchy (View Summary)

Methods

  • Creates an Explosion (around a given point).

    Parameters

    • OptionalcenterNodeID: number

      The nodeID of the node around which center the explosion is created.

    Returns void

  • Restores the initial transformations of all exploded parts.

    Returns void

  • Performs the actual Explosion.

    Parameters

    • explosionFactor: number

      The value by which the parts are expanded.

    Returns void