Overview
Control 3D model tools from the host application using direct canvas messages and matching result events.
3D tools use direct postMessage commands. The command name is the message `type`, for example `set3DExplode`, `set3DTransparency`, or `set3DCrossSection`.
Every command should include a unique `requestId`. The canvas responds with a matching result event, such as `set3DExplodeResult`, so the host can confirm whether the tool was applied.
- Do not send these through `toolControl`; send the 3D command as the top-level message `type`.
- Use `enabled: true` to turn toggle tools on and `enabled: false` to turn them off.
- Use `requestId` to match a command with its `...Result` event.
- Use `threeDPartSelected` and `threeDPartSelectionCleared` for selection-driven part workflows.
These are the host-facing 3D tools exposed by the canvas integration.
- Reset 3D Model: Sends `reset3DModel` to restore the model view/state.
- 3D Select: Sends `set3DSelect` to let the user select model parts.
- Walkthrough: Sends `set3DWalkthrough` to enable model walkthrough navigation.
- Hide Parts: Sends `set3DHidePartsMode` to let users hide selected parts.
- Explode: Sends `set3DExplode` with `distance` from 0 to 100.
- Transparency: Sends `set3DTransparency` with `valuePercent` from 0 to 100.
- Cross Section: Sends `set3DCrossSection` with `x`, `y`, and `z` values from 0 to 100.
3D Tools
Command examples for reset, select, walkthrough, hide parts, explode, transparency, and cross-section.
API References
Message types, payload fields, result events, and part selection event shapes.
Canvas Setup
Initialize the canvas iframe before sending 3D commands.
Start with Tools for copy/paste command examples, then use API References for the complete payload and event contract.
3D workflows use the same file lifecycle and bridge setup as other canvas components.
- File Upload: Load a 3D-capable file
- Message Bridge: Bridge lifecycle and completion events
- Navigation: Viewport and inspection tools
