Bitbybit Docs
    Preparing search index...

    Class BabylonGizmoPositionGizmo

    The position gizmo: three arrows that drag the attached mesh along X, Y or Z, plus optional square handles that drag it within a plane. Snapping moves the mesh in fixed steps, and the axis and plane parts can be reached one by one to enable or disable them.

    Index

    Constructors

    create

    get

    • Reads the mesh a position gizmo is currently attached to.

      Parameters

      Returns AbstractMesh

      The attached mesh

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

      Parameters

      Returns Node

      The attached node

    • Reads the arrow of a position gizmo that drags along X, to enable or disable it on its own.

      Parameters

      Returns IAxisDragGizmo

      The X axis drag gizmo

    • Reads the arrow of a position gizmo that drags along Y, to enable or disable it on its own.

      Parameters

      Returns IAxisDragGizmo

      The Y axis drag gizmo

    • Reads the arrow of a position gizmo that drags along Z, to enable or disable it on its own.

      Parameters

      Returns IAxisDragGizmo

      The Z axis drag gizmo

    • Reads the handle of a position gizmo that drags within the plane facing X, the YZ plane, to enable or disable it on its own.

      Parameters

      Returns IPlaneDragGizmo

      The X plane drag gizmo

    • Reads the handle of a position gizmo that drags within the plane facing Y, the XZ plane, to enable or disable it on its own.

      Parameters

      Returns IPlaneDragGizmo

      The Y plane drag gizmo

    • Reads the handle of a position gizmo that drags within the plane facing Z, the XY plane, to enable or disable it on its own.

      Parameters

      Returns IPlaneDragGizmo

      The Z plane drag gizmo

    • Reads whether a position gizmo shows its plane handles.

      Parameters

      Returns boolean

      True when the plane handles are shown

    • Reads the step size a position gizmo snaps to, 0 meaning smooth movement.

      Parameters

      Returns number

      The snap distance

    • Tells whether the user is dragging a position gizmo right now.

      Parameters

      Returns boolean

      True while a drag is in progress

    set

    • Shows or hides the square handles of a position gizmo that drag the mesh within the XY, YZ and XZ planes, in addition to the axis arrows.

      Parameters

      Returns IPositionGizmo

      The same position gizmo

      bitbybit.babylon.gizmo.positionGizmo.planarGizmoEnabled({ positionGizmo, planarGizmoEnabled: true });
      
    • Makes a position gizmo move the mesh in steps of snapDistance scene units instead of smoothly; 0 turns snapping off.

      Parameters

      Returns IPositionGizmo

      The same position gizmo

      bitbybit.babylon.gizmo.positionGizmo.snapDistance({ positionGizmo, snapDistance: 0.5 });