API

Class ScaleGizmo

Gizmo that enables scaling a mesh along 3 axis

Hierarchy (View Summary)

Implements

Index
_rootMesh: Mesh

The root mesh of the gizmo

gizmoLayer: UtilityLayerRenderer = UtilityLayerRenderer.DefaultUtilityLayer

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

onDragEndObservable: Observable<DragStartEndEvent> = ...

Fires an event when any of it's sub gizmos are released from dragging

onDragObservable: Observable<DragEvent> = ...

Fires an event when any of it's sub gizmos are being dragged

onDragStartObservable: Observable<DragStartEndEvent> = ...

Fires an event when any of it's sub gizmos are dragged

uniformScaleGizmo: IAxisScaleGizmo

Internal gizmo used to scale all axis equally

Internal gizmo used for interactions on the x axis

Internal gizmo used for interactions on the y axis

Internal gizmo used for interactions on the z axis

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(transformNode: 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

  • get updateGizmoRotationToMatchAttachedMesh(): boolean

    If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true) NOTE: This is only possible for meshes with uniform scaling, as otherwise it's not possible to decompose the rotation

    Returns boolean

  • set updateGizmoRotationToMatchAttachedMesh(value: boolean): void

    If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true) NOTE: This is only possible for meshes with uniform scaling, as otherwise it's not possible to decompose the rotation

    Parameters

    • value: boolean

    Returns void