API

Class PlaneRotationGizmo

Single plane rotation gizmo

Hierarchy (View Summary)

  • Gizmo
    • PlaneRotationGizmo

Implements

Index
_rootMesh: Mesh

The root mesh of the gizmo

angle: number = 0

Accumulated relative angle value for rotation on the axis. Reset to 0 when a dragStart occurs

dragBehavior: PointerDragBehavior

Drag behavior responsible for the gizmos dragging interactions

gizmoLayer: UtilityLayerRenderer = UtilityLayerRenderer.DefaultUtilityLayer

[Object] The utility layer the gizmo will be added to

onSnapObservable: Observable<{ snapDistance: number }> = ...

Event that fires each time the gizmo snaps to a new location.

  • snapDistance is the change in angle
sensitivity: number = 1

Custom sensitivity value for the drag strength

snapDistance: number = 0

Rotation distance in radians that the gizmo will snap to (Default: 0)

MaxDragAngle: number = ...

The maximum angle between the camera and the rotation allowed for interaction If a rotation plane appears 'flat', a lower value allows interaction.

PreserveScaling: boolean = false

When enabled, any gizmo operation will preserve scaling sign. Default is off. Only valid for TransformNode derived classes (Mesh, AbstractMesh, ...)

UseAbsoluteScaling: boolean = true

There are 2 ways to preserve scaling: using mesh scaling or absolute scaling. Depending of hierarchy, non uniform scaling and LH or RH coordinates. One is preferable than the other. If the scaling to be preserved is the local scaling, then set this value to false. Default is true which means scaling to be preserved is absolute one (with hierarchy applied)

  • get additionalTransformNode(): TransformNode | undefined

    Additional transform applied to the gizmo. It's useful when the gizmo is attached to a bone: if the bone is part of a skeleton attached to a mesh, you should define the mesh as additionalTransformNode if you want the gizmo to be displayed at the bone's correct location. Otherwise, as the gizmo is relative to the skeleton root, the mesh transformation will not be taken into account.

    Returns TransformNode | undefined

  • set additionalTransformNode(value: TransformNode | undefined): void

    Additional transform applied to the gizmo. It's useful when the gizmo is attached to a bone: if the bone is part of a skeleton attached to a mesh, you should define the mesh as additionalTransformNode if you want the gizmo to be displayed at the bone's correct location. Otherwise, as the gizmo is relative to the skeleton root, the mesh transformation will not be taken into account.

    Parameters

    Returns void