Add a widget to translate, scale or rotate selected entities on the active viewport.

Methods

disable()

Disable and hide the gizmo

enable()

Enable and show the gizmo

enableSave(value)

Once enabled, the widget will commit changes to the entity transformed. This will make the change persistent.

Disabled by default

Parameters:
NameTypeDescription
valueboolean

Commit changes flag.

isEnabled() → {bool}

Return true if the gizmo extension is enabled.

Returns:

Enable state

Type: 
bool

setAxisVisibleState(xState, yState, zState)

Show or hide X, Y or Z axis of the translation, rotation and scale controller.

Parameters:
NameTypeDescription
xStateboolean

Visible state of the X axis

yStateboolean

Visible state of the Y axis

zStateboolean

Visible state of the Z axis

setControlMode(controlMode)

Set the widget to the following transformation mode :

  • translate
  • rotate
  • scale
  • rectTool
Parameters:
NameTypeDescription
controlModeString

Either translate / rotate / scale / rectTool

setRotationSnap(value)

Enable a snap in rotation control mode, the rotation will be rounded with the given value in radians. Set 0 to disable it.

Parameters:
NameTypeDescription
valueNumber

Snapping value

setScaleSnap(value)

Enable a snap in scale control mode, the scale will be rounded with the given value. Set 0 to disable it.

Parameters:
NameTypeDescription
valueNumber

Snapping value

setSpace(space)

Sets the coordinate space in which transformations are applied.

Parameters:
NameTypeDescription
spaceString

Either world / local

setTranslationSnap(value)

Enable a snap in translation control mode, the translation will be rounded with the given value. Set 0 to disable it.

Parameters:
NameTypeDescription
valueNumber

Snapping value