Home > @modelo.io/api > Scene3D

Scene3D class

Scene3D describes the contents in the scene and provides a number of ways to change them.

A Scene3D object is created internally when Viewer3D is initialized. It can be obtained by call Viewer3D.getScene().


export default class Scene3D extends Scene 




addPawn(pawn, changeCamera)Pawn is a small object which can be inserted into the scene. It can be out of another model or created dynamically.
addText3D(text, changeCamera)
addVisualize(visualize)Add a visualization to the scene.
getClippingData()Get the current scene's clipping data.
getElementBBox(elementName)Get the bounding box of single element.
getElementGuid(elementName)Get GUID of the element by its name.
getElementNameByGuid(guid)Get the element ID of element by specifying its GUID.
getElementsBBox(elementNames)Get the bounding box of elements.
getElementsNames(elementType, inverted)Return the element names of element of certain type.
getVisualize(visualizeName, index)
getVisualizes(visualizeName)Get the visualize objects by its name.
hasContours()Check if the scene has contour lines.
isElementVisible(elementName)Check the visibility of element.
removePawn(pawn)Remove pawn object from the scene.
removeVisualize(visualize)Remove visualize from the scene.
setElementsColor(elementNames, color)Change the element colors by given element names.
setElementsVisibility(elementNames, surfaceVisible, lineVisible)Change the elements visibility.
setModelVisibility(modelId, visible)Change the visibility of model.