Lines
The viewer provides OccViewer.InteractiveLine allowing users to create and manipulate 3D line segments in a viewer. It supports customization of line properties such as type, width, and markers.
// line creation
const line = new InteractiveLine(Viewer);
line.pointFrom = {x: 0, y: 0, z: 0};
line.pointTo = {x: 100, y: 0, z: 0};
line.color = '#ff0000ff';
Points/Button
The viewer provides OccViewer.InteractivePoint allowing:
// point creation
const point = new InteractivePoint(Viewer);
point.iconId = ButtonIconId.Sphere;
point.size = 1.0;
point.zLayer = ZLayerId.TopOSD;
Text
The viewer provides OccViewer.InteractiveText allowing users to create and manage 3D text labels within the viewer. These labels can be positioned, customized with text, and optionally wrapped based on specified length.
// text creation
const text = new InteractiveText(Viewer);
text.text = 'Text Example';
text.textWrapping = -1.0;
text.position = {x: 0.0, y: 0.0, z: 50.0};
text.color = '#ff0000';