Bitbybit Docs
    Preparing search index...

    Class BabylonGizmoRotationGizmo

    The rotation gizmo: three rings that turn the attached mesh around X, Y or Z. Snapping turns it in fixed angle steps, sensitivity sets how far a drag turns it, and each ring can be reached on its own to enable or disable it.

    Index

    Constructors

    create

    get

    • Reads the mesh a rotation gizmo is currently attached to, or null when none is.

      Parameters

      Returns Nullable<AbstractMesh>

      The attached mesh, or null

    • Reads the node a rotation gizmo is currently attached to, which may be a transform node rather than a mesh.

      Parameters

      Returns Node

      The attached node

    • Reads the ring of a rotation gizmo that turns around X, to enable or disable it on its own.

      Parameters

      Returns IPlaneRotationGizmo

      The X plane rotation gizmo

    • Reads the ring of a rotation gizmo that turns around Y, to enable or disable it on its own.

      Parameters

      Returns IPlaneRotationGizmo

      The Y plane rotation gizmo

    • Reads the ring of a rotation gizmo that turns around Z, to enable or disable it on its own.

      Parameters

      Returns IPlaneRotationGizmo

      The Z plane rotation gizmo

    • Reads the angle step in radians a rotation gizmo snaps to, 0 meaning smooth rotation.

      Parameters

      Returns number

      The snap distance in radians

    • Reads how far a rotation gizmo turns the mesh for a given drag.

      Parameters

      Returns number

      The sensitivity

    set

    • Makes a rotation gizmo turn the mesh in steps of snapDistance radians instead of smoothly; 0 turns snapping off.

      Parameters

      Returns IRotationGizmo

      The same rotation gizmo

      bitbybit.babylon.gizmo.rotationGizmo.snapDistance({ rotationGizmo, snapDistance: Math.PI / 12 });
      
    • Sets how far a rotation gizmo turns the mesh for a given drag; 1 is the default and higher values turn it faster.

      Parameters

      Returns IRotationGizmo

      The same rotation gizmo