Add a widget to display and interact with geometries.

This extension require the following extension installed:

  • SDK3DVerse_ThreeJS_Ext
  • SDK3DVerse_ViewportDomOverlay_Ext

The gizmo handles are dom elements and should be defined in your stylesheet with the following css class. You can customize it if you want.

.gizmo-handle
{
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;

    cursor: pointer;
    pointer-events: initial;

    border-color: rgba(0,0,0,0.5);
    background: rgba(255,255,255,0.8);
    border-width: 1px;
    border-style: solid;
}

Methods

installExtension()

The colors can be defined as numbers or css-style strings.

Examples :

  • 0xff0000
  • 'rgb(250, 0,0)'
  • 'rgb(100%,0%,0%)'
  • 'hsl(0, 100%, 50%)'
  • '#ff0000'
  • '#f00'
  • 'red'
Properties
NameTypeDescription
basicMaterialColorColor

Unselected geometry material color

selectedMaterialColorColor

Selected geometry material color

edgeMaterialColorColor

Unselected geometry edge material color

selectedEdgeMaterialColorColor

Selected geometry edge material color

basicMaterialOpacityfloat

Unselected geometry material opacity

selectedMaterialOpacityfloat

Selected geometry material opacity

disableRenderingBoolean

Disable geometry rendering and keep only edition gizmos

isEntityVisible(entityRTID) → {Boolean}

Get entity visibility state of its geometry.

Parameters:
NameTypeDescription
entityRTIDstring

Entity unique identifier

Returns:

Visibility state

Type: 
Boolean

setEntityVisibility(entityRTID, isVisible)

Hide or show geometry of a given entity.

Parameters:
NameTypeDescription
entityRTIDstring

Entity unique identifier

isVisibleBoolean

Visibility state

setGeometryDisplay(geometryRendering, gizmoRendering)

Enable or disable geometry rendering. Does not affect the visibility state of the entities.

Parameters:
NameTypeDescription
geometryRenderingBoolean

Geometry rendering state

gizmoRenderingBoolean

Edition gizmo rendering state