S3D.graphics
The S3D.graphics
namespace is where you can interact with the rendered model in the viewport.
S3D.graphics.highlightElement
#
Description: Allows highlighting of model elements.
Operation Type: Synchronous
Params: S3D.graphics.highlightElement(elementType, elementId, null?, addToSelection?)
Key | Type | Accepts |
---|---|---|
elementType | string | node , member , plate , etc. |
elementId | integer, integer[] | An element ID or an array of IDs. |
addToSelection | boolean | true to add to the current selection. |
Sample:
S3D.structure.getSelectedItems
#
Description: Returns all selected items. This is a fast and useful way to identify selected member IDs and access the GUI to identify parts of the model.
Operation Type: Synchronous
Params: (No arguments)
Sample:
S3D.graphics.locator
#
Description: Displays an animation to locate a model element.
Operation Type: Synchronous
Params: S3D.graphics.locator(elementType, elementId)
Key | Type | Accepts |
---|---|---|
elementType | string | node , member , plate , etc. |
elementId | integer | An element ID. |
Sample:
S3D.graphics.refreshAllCanvas
#
Description: Offers a fast, lightweight redraw function. Useful for highlighting any non-model changes that need re-rendering.
Operation Type: Asynchronous
Params: S3D.graphics.refreshAllCanvas(callback?)
Sample:
S3D.graphics.screenshot
#
Description: Take a screenshot of the model.
Operation Type: Asynchronous
Params: S3D.graphics.screenshot(callback?)
Sample:
S3D.graphics.setCameraView
#
important
This is for the modeling renderer. To get this functionality with the 3D renderer see S3D.renderer.setView
Description: Set the camera angle for the detailed render.
Operation Type: Synchronous
Params: S3D.graphics.setCameraView(view: string, no_redraw: boolean = false)
view: top
, side
, front
, iso
Sample: