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
Name | Type | Description |
---|---|---|
value | boolean | Commit changes flag. |
isEnabled() → {bool}
Return true if the gizmo extension is enabled.
Enable state
- Type:
- bool
setAxisVisibleState(xState, yState, zState)
Show or hide X, Y or Z axis of the translation, rotation and scale controller.
Name | Type | Description |
---|---|---|
xState | boolean | Visible state of the X axis |
yState | boolean | Visible state of the Y axis |
zState | boolean | Visible state of the Z axis |
setControlMode(controlMode)
Set the widget to the following transformation mode :
- translate
- rotate
- scale
- rectTool
Name | Type | Description |
---|---|---|
controlMode | String | 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.
Name | Type | Description |
---|---|---|
value | Number | 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.
Name | Type | Description |
---|---|---|
value | Number | Snapping value |
setSpace(space)
Sets the coordinate space in which transformations are applied.
Name | Type | Description |
---|---|---|
space | String | 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.
Name | Type | Description |
---|---|---|
value | Number | Snapping value |