Bitbybit Docs
    Preparing search index...

    Class BabylonGizmoScaleGizmo

    The scale gizmo: three handles that stretch the attached mesh along X, Y or Z and a center handle that scales it evenly. Snapping scales in fixed steps, sensitivity sets how much a drag scales, and each axis handle can be reached on its own.

    Index

    Constructors

    create

    get

    • Reads the handle of a scale gizmo that stretches along X, to enable or disable it on its own.

      Parameters

      Returns IAxisScaleGizmo

      The X axis scale gizmo

    • Reads the handle of a scale gizmo that stretches along Y, to enable or disable it on its own.

      Parameters

      Returns IAxisScaleGizmo

      The Y axis scale gizmo

    • Reads the handle of a scale gizmo that stretches along Z, to enable or disable it on its own.

      Parameters

      Returns IAxisScaleGizmo

      The Z axis scale gizmo

    • Reads whether a scale gizmo's snapping steps add up rather than multiply.

      Parameters

      Returns boolean

      True when snapping is incremental

    • Reads the step size a scale gizmo snaps to, 0 meaning smooth scaling.

      Parameters

      Returns number

      The snap distance

    • Reads how much a scale gizmo changes the scale for a given drag.

      Parameters

      Returns number

      The sensitivity

    set

    • Makes a scale gizmo change the scale in steps of snapDistance instead of smoothly; 0 turns snapping off. setIncrementalSnap chooses how the steps combine.

      Parameters

      Returns IScaleGizmo

      The same scale gizmo

      bitbybit.babylon.gizmo.scaleGizmo.snapDistance({ scaleGizmo, snapDistance: 0.1 });
      bitbybit.babylon.gizmo.scaleGizmo.setIncrementalSnap({ scaleGizmo, incrementalSnap: true });
    • Chooses how a scale gizmo's snapping steps combine: incremental steps add up, 1.1 then 1.2 then 1.3 for a step of 0.1, while the default multiplies, 1.1 then 1.21 then 1.33.

      Parameters

      Returns IScaleGizmo

      The same scale gizmo

    • Sets how much a scale gizmo changes the scale for a given drag; 1 is the default and higher values scale faster.

      Parameters

      Returns IScaleGizmo

      The same scale gizmo