Skip to main content
Version: 2.x

Exploded view tool

This section describes the exploded view tool, which contains helper functions and logic for inspecting and exploding a given asset. The constructor of this tool needs to be supplied with a tree index which is the tree index of the root of the asset, and an instance of the Cognite3DModel that the asset belongs to.

note

For performance reasons, the root tree index must have a subtree size of less than 1000, else it will throw an error.

ExplodedViewTool contains two instance methods: expand and reset. expand takes a float describing how far the individual nodes should be expanded (this will vary based on the initial vector between the node and root). reset resets the tool and any transform that has been applied to any nodes.

note

ExplodedViewTool contains a promise: readyPromise, which indicates when the tool is ready to be used. This indicates if the tool has cached necessary data from the Cognite Fusion API to determine the individual locations of the nodes in the subtree.

Below is an example that expands a given pipe asset (that has a tree index of 570730) which is animated by a sine function. Another good usecase would be to bind the expand function to a slider which the user can manipulate to expand the asset.

Live Editor