import type * as BABYLON from "@babylonjs/core"; import type { Base } from "./base-inputs"; /** * Parameters for the on-screen manipulators that let a user drag, rotate and scale an object directly: * which axes are enabled, snapping increments, size and color. */ export declare namespace BabylonGizmo { enum positionGizmoObservableSelectorEnum { /** Fires an event when any of it's sub gizmos are dragged */ onDragStartObservable = "onDragStartObservable", /** Fires an event when any of it's sub gizmos are being dragged */ onDragObservable = "onDragObservable", /** Fires an event when any of it's sub gizmos are released from dragging */ onDragEndObservable = "onDragEndObservable" } enum rotationGizmoObservableSelectorEnum { /** Fires an event when any of it's sub gizmos are dragged */ onDragStartObservable = "onDragStartObservable", /** Fires an event when any of it's sub gizmos are being dragged */ onDragObservable = "onDragObservable", /** Fires an event when any of it's sub gizmos are released from dragging */ onDragEndObservable = "onDragEndObservable" } enum scaleGizmoObservableSelectorEnum { /** Fires an event when any of it's sub gizmos are dragged */ onDragStartObservable = "onDragStartObservable", /** Fires an event when any of it's sub gizmos are being dragged */ onDragObservable = "onDragObservable", /** Fires an event when any of it's sub gizmos are released from dragging */ onDragEndObservable = "onDragEndObservable" } enum boundingBoxGizmoObservableSelectorEnum { /** * Fired when a rotation anchor or scale box is dragged */ onDragStartObservable = "onDragStartObservable", /** * Fired when a scale box is dragged */ onScaleBoxDragObservable = "onScaleBoxDragObservable", /** * Fired when a scale box drag is ended */ onScaleBoxDragEndObservable = "onScaleBoxDragEndObservable", /** * Fired when a rotation anchor is dragged */ onRotationSphereDragObservable = "onRotationSphereDragObservable", /** * Fired when a rotation anchor drag is ended */ onRotationSphereDragEndObservable = "onRotationSphereDragEndObservable" } /** * Feeds `babylon.gizmo.manager.createGizmoManager`: which gizmos to enable, which meshes they * may attach to, how the pointer attaches them and how large they are drawn. */ class CreateGizmoDto { constructor(positionGizmoEnabled?: boolean, rotationGizmoEnabled?: boolean, scaleGizmoEnabled?: boolean, boundingBoxGizmoEnabled?: boolean, attachableMeshes?: BABYLON.AbstractMesh[], clearGizmoOnEmptyPointerEvent?: boolean, scaleRatio?: number, usePointerToAttachGizmos?: boolean); /** * When true, the arrows that drag the mesh along an axis are shown * @default true */ positionGizmoEnabled?: boolean | undefined; /** * When true, the rings that turn the mesh around an axis are shown * @default false */ rotationGizmoEnabled?: boolean | undefined; /** * When true, the handles that stretch the mesh along an axis are shown * @default false */ scaleGizmoEnabled?: boolean | undefined; /** * When true, the frame with scale and rotate handles around the mesh is shown * @default false */ boundingBoxGizmoEnabled?: boolean | undefined; /** * When true, clicking a mesh attaches the gizmos to it; when false, attach them with * `attachToMesh` * @default true */ usePointerToAttachGizmos?: boolean | undefined; /** * When true, clicking into empty space detaches the gizmos * @default false */ clearGizmoOnEmptyPointerEvent?: boolean | undefined; /** * How large the gizmo handles are drawn; 1 is the default size and 2 doubles it * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ scaleRatio?: number | undefined; /** * The only meshes the pointer may attach the gizmos to; left out or empty, any mesh * qualifies * @default undefined * @optional true */ attachableMeshes?: BABYLON.AbstractMesh[] | undefined; } /** * Feeds `babylon.gizmo.base.getScaleRatio` with the one gizmo to read from, of any kind. */ class GizmoDto { constructor(gizmo?: BABYLON.IGizmo); /** * The gizmo to read from, of any kind * @default undefined */ gizmo: BABYLON.IGizmo; } /** * Feeds `babylon.gizmo.base.scaleRatio` with a gizmo and how large its handles are drawn. */ class SetGizmoScaleRatioDto { constructor(gizmo?: BABYLON.IGizmo, scaleRatio?: number); /** * The gizmo to change, of any kind * @default undefined */ gizmo: BABYLON.IGizmo; /** * How large the handles are drawn; 1 is the default size and 2 doubles it * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ scaleRatio?: number | undefined; } /** * Feeds the `babylon.gizmo.manager` methods that take just the manager: the gizmo getters and * `detachMesh`. */ class GizmoManagerDto { constructor(gizmoManager?: BABYLON.GizmoManager); /** * The gizmo manager, as `createGizmoManager` gave it * @default undefined */ gizmoManager: BABYLON.GizmoManager; } /** * Feeds the `babylon.gizmo.positionGizmo` getters with the position gizmo to read from. */ class PositionGizmoDto { constructor(positionGizmo?: BABYLON.IPositionGizmo); /** * The position gizmo, as `gizmo.manager.getPositionGizmo` reads it * @default undefined */ positionGizmo: BABYLON.IPositionGizmo; } /** * Feeds `babylon.gizmo.positionGizmo.planarGizmoEnabled` with a position gizmo and whether its * plane handles show. */ class SetPlanarGizmoEnabled { constructor(positionGizmo?: BABYLON.IPositionGizmo, planarGizmoEnabled?: boolean); /** * The position gizmo, as `gizmo.manager.getPositionGizmo` reads it * @default undefined */ positionGizmo: BABYLON.IPositionGizmo; /** * When true, the square handles that drag within a plane are shown next to the axis arrows * @default true */ planarGizmoEnabled?: boolean | undefined; } /** * Feeds `babylon.gizmo.scaleGizmo.snapDistance` with a scale gizmo and the step it scales in. */ class SetScaleGizmoSnapDistanceDto { constructor(scaleGizmo?: BABYLON.IScaleGizmo, snapDistance?: number); /** * The scale gizmo, as `gizmo.manager.getScaleGizmo` reads it * @default undefined */ scaleGizmo: BABYLON.IScaleGizmo; /** * The step the scale changes in while dragged; 0 scales smoothly * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ snapDistance?: number | undefined; } /** * Feeds `babylon.gizmo.scaleGizmo.setIncrementalSnap` with a scale gizmo and how its snapping * steps combine. */ class SetScaleGizmoIncrementalSnapDto { constructor(scaleGizmo?: BABYLON.IScaleGizmo, incrementalSnap?: boolean); /** * The scale gizmo, as `gizmo.manager.getScaleGizmo` reads it * @default undefined */ scaleGizmo: BABYLON.IScaleGizmo; /** * When true, the steps add up, 1.1 then 1.2; when false, they multiply, 1.1 then 1.21 * @default false */ incrementalSnap?: boolean | undefined; } /** * Feeds `babylon.gizmo.scaleGizmo.sensitivity` with a scale gizmo and how much a drag scales * the mesh. */ class SetScaleGizmoSensitivityDto { constructor(scaleGizmo?: BABYLON.IScaleGizmo, sensitivity?: number); /** * The scale gizmo, as `gizmo.manager.getScaleGizmo` reads it * @default undefined */ scaleGizmo: BABYLON.IScaleGizmo; /** * How much the scale changes for a given drag; 1 is the default and higher is faster * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ sensitivity?: number | undefined; } /** * Feeds the `babylon.gizmo.scaleGizmo` getters with the scale gizmo to read from. */ class ScaleGizmoDto { constructor(scaleGizmo?: BABYLON.IScaleGizmo); /** * The scale gizmo, as `gizmo.manager.getScaleGizmo` reads it * @default undefined */ scaleGizmo: BABYLON.IScaleGizmo; } /** * Feeds the `babylon.gizmo.boundingBoxGizmo` getters with the bounding box gizmo to read from. */ class BoundingBoxGizmoDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setRotationSphereSize` with a bounding box gizmo and * the size of its rotation handles. */ class SetBoundingBoxGizmoRotationSphereSizeDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, rotationSphereSize?: number); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * Size of the round rotation handles on the edges, in scene units unless a fixed screen * size is on * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 */ rotationSphereSize?: number | undefined; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setFixedDragMeshScreenSize` with a bounding box gizmo * and whether its handles keep a constant screen size. */ class SetBoundingBoxGizmoFixedDragMeshScreenSizeDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, fixedDragMeshScreenSize?: boolean); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * When true, the handles keep the same size on screen whatever the camera distance; it wins * over the bounds size option * @default false */ fixedDragMeshScreenSize?: boolean | undefined; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setFixedDragMeshBoundsSize` with a bounding box gizmo * and whether its handles scale with the mesh bounds. */ class SetBoundingBoxGizmoFixedDragMeshBoundsSizeDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, fixedDragMeshBoundsSize?: boolean); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * When true, the handles are sized relative to the bounds of the attached mesh rather than * a fixed world size * @default false */ fixedDragMeshBoundsSize?: boolean | undefined; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setFixedDragMeshScreenSizeDistanceFactor` with a * bounding box gizmo and the camera distance its handles are sized for. */ class SetBoundingBoxGizmoFixedDragMeshScreenSizeDistanceFactorDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, fixedDragMeshScreenSizeDistanceFactor?: number); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * The camera distance at which the handles appear at their world size when the fixed screen * size is on * @default 10 * @minimum 0 * @maximum Infinity * @step 0.1 */ fixedDragMeshScreenSizeDistanceFactor?: number | undefined; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setScalingSnapDistance` with a bounding box gizmo and * the drag step it scales in. */ class SetBoundingBoxGizmoScalingSnapDistanceDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, scalingSnapDistance?: number); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * The drag distance in scene units between scale steps; 0 scales smoothly * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ scalingSnapDistance?: number | undefined; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setRotationSnapDistance` with a bounding box gizmo and * the angle step it rotates in. */ class SetBoundingBoxGizmoRotationSnapDistanceDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, rotationSnapDistance?: number); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * The step in radians the mesh turns in while dragged; 0 turns it smoothly * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ rotationSnapDistance?: number | undefined; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setScaleBoxSize` with a bounding box gizmo and the size * of its scale handles. */ class SetBoundingBoxGizmoScaleBoxSizeDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, scaleBoxSize?: number); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * Size of the square scale handles on the corners, in scene units unless a fixed screen * size is on * @default 0.1 * @minimum 0 * @maximum Infinity * @step 0.1 */ scaleBoxSize?: number | undefined; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setIncrementalSnap` with a bounding box gizmo and how * its scale snapping steps combine. */ class SetBoundingBoxGizmoIncrementalSnapDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, incrementalSnap?: boolean); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * When true, the steps add up, 1.1 then 1.2; when false, they multiply, 1.1 then 1.21 * @default false */ incrementalSnap?: boolean | undefined; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setScalePivot` with a bounding box gizmo and the point * it scales the mesh around. */ class SetBoundingBoxGizmoScalePivotDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, scalePivot?: Base.Vector3); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * The pivot as fractions of the bounds: `[0.5, 0.5, 0.5]` the center, `[0.5, 0, 0.5]` the * bottom; unset, the opposite corner * @default undefined */ scalePivot: Base.Vector3; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setAxisFactor` with a bounding box gizmo and a drag * sensitivity per axis. */ class SetBoundingBoxGizmoAxisFactorDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, axisFactor?: Base.Vector3); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * A factor per axis as `[x, y, z]` that scales how fast dragging changes that axis; 1 is * normal * @default undefined */ axisFactor: Base.Vector3; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.setScaleDragSpeed` with a bounding box gizmo and how * fast a drag scales the mesh. */ class SetBoundingBoxGizmoScaleDragSpeedDto { constructor(boundingBoxGizmo?: BABYLON.BoundingBoxGizmo, scaleDragSpeed?: number); /** * The bounding box gizmo, as `gizmo.manager.getBoundingBoxGizmo` reads it * @default undefined */ boundingBoxGizmo: BABYLON.BoundingBoxGizmo; /** * How fast the scale changes for a given drag; 1 is the default and higher is faster * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ scaleDragSpeed?: number | undefined; } /** * Feeds `babylon.gizmo.positionGizmo.snapDistance` with a position gizmo and the step it moves * the mesh in. */ class SetPositionGizmoSnapDistanceDto { constructor(positionGizmo?: BABYLON.IPositionGizmo, snapDistance?: number); /** * The position gizmo, as `gizmo.manager.getPositionGizmo` reads it * @default undefined */ positionGizmo: BABYLON.IPositionGizmo; /** * The step in scene units the mesh moves in while dragged; 0 moves it smoothly * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ snapDistance?: number | undefined; } /** * Feeds `babylon.gizmo.rotationGizmo.snapDistance` with a rotation gizmo and the angle step it * turns in. */ class SetRotationGizmoSnapDistanceDto { constructor(rotationGizmo?: BABYLON.IRotationGizmo, snapDistance?: number); /** * The rotation gizmo, as `gizmo.manager.getRotationGizmo` reads it * @default undefined */ rotationGizmo: BABYLON.IRotationGizmo; /** * The step in radians the mesh turns in while dragged; 0 turns it smoothly * @default 0 * @minimum 0 * @maximum Infinity * @step 0.1 */ snapDistance?: number | undefined; } /** * Feeds `babylon.gizmo.rotationGizmo.sensitivity` with a rotation gizmo and how far a drag * turns the mesh. */ class SetRotationGizmoSensitivityDto { constructor(rotationGizmo?: BABYLON.IRotationGizmo, sensitivity?: number); /** * The rotation gizmo, as `gizmo.manager.getRotationGizmo` reads it * @default undefined */ rotationGizmo: BABYLON.IRotationGizmo; /** * How far the mesh turns for a given drag; 1 is the default and higher is faster * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ sensitivity?: number | undefined; } /** * Feeds the `babylon.gizmo.rotationGizmo` getters with the rotation gizmo to read from. */ class RotationGizmoDto { constructor(rotationGizmo?: BABYLON.IRotationGizmo); /** * The rotation gizmo, as `gizmo.manager.getRotationGizmo` reads it * @default undefined */ rotationGizmo: BABYLON.IRotationGizmo; } /** * Feeds `babylon.gizmo.axisScaleGizmo.getIsEnabled` with one axis handle of a scale gizmo. */ class AxisScaleGizmoDto { constructor(axisScaleGizmo?: BABYLON.IAxisScaleGizmo); /** * One axis handle of a scale gizmo, as `scaleGizmo.getXGizmo` and its siblings read it * @default undefined */ axisScaleGizmo: BABYLON.IAxisScaleGizmo; } /** * Feeds `babylon.gizmo.axisScaleGizmo.setIsEnabled` with one axis handle of a scale gizmo and * whether it is shown. */ class SetIsEnabledAxisScaleGizmoDto { constructor(axisScaleGizmo?: BABYLON.IAxisScaleGizmo, isEnabled?: boolean); /** * One axis handle of a scale gizmo, as `scaleGizmo.getXGizmo` and its siblings read it * @default undefined */ axisScaleGizmo: BABYLON.IAxisScaleGizmo; /** * When true, the handle is shown and usable; when false, that axis cannot be scaled * @default true */ isEnabled?: boolean | undefined; } /** * Feeds `babylon.gizmo.axisDragGizmo.getIsEnabled` with one arrow of a position gizmo. */ class AxisDragGizmoDto { constructor(axisDragGizmo?: BABYLON.IAxisDragGizmo); /** * One arrow of a position gizmo, as `positionGizmo.getXGizmo` and its siblings read it * @default undefined */ axisDragGizmo: BABYLON.IAxisDragGizmo; } /** * Feeds `babylon.gizmo.axisDragGizmo.setIsEnabled` with one arrow of a position gizmo and * whether it is shown. */ class SetIsEnabledAxisDragGizmoDto { constructor(axisDragGizmo?: BABYLON.IAxisDragGizmo, isEnabled?: boolean); /** * One arrow of a position gizmo, as `positionGizmo.getXGizmo` and its siblings read it * @default undefined */ axisDragGizmo: BABYLON.IAxisDragGizmo; /** * When true, the arrow is shown and usable; when false, the mesh cannot be dragged along * that axis * @default true */ isEnabled?: boolean | undefined; } /** * Feeds `babylon.gizmo.planeRotationGizmo.setIsEnabled` with one ring of a rotation gizmo and * whether it is shown. */ class SetIsEnabledPlaneRotationGizmoDto { constructor(planeRotationGizmo?: BABYLON.IPlaneRotationGizmo, isEnabled?: boolean); /** * One ring of a rotation gizmo, as `rotationGizmo.getXGizmo` and its siblings read it * @default undefined */ planeRotationGizmo: BABYLON.IPlaneRotationGizmo; /** * When true, the ring is shown and usable; when false, the mesh cannot be turned around * that axis * @default true */ isEnabled?: boolean | undefined; } /** * Feeds `babylon.gizmo.planeDragGizmo.setIsEnabled` with one plane handle of a position gizmo * and whether it is shown. */ class SetIsEnabledPlaneDragGizmoDto { constructor(planeDragGizmo?: BABYLON.IPlaneDragGizmo, isEnabled?: boolean); /** * One plane handle of a position gizmo, as `positionGizmo.getXPlaneGizmo` and its siblings * read it * @default undefined */ planeDragGizmo: BABYLON.IPlaneDragGizmo; /** * When true, the handle is shown and usable; when false, the mesh cannot slide in that * plane * @default true */ isEnabled?: boolean | undefined; } /** * Feeds `babylon.gizmo.planeDragGizmo.getIsEnabled` with one plane handle of a position gizmo. */ class PlaneDragGizmoDto { constructor(planeDragGizmo?: BABYLON.IPlaneDragGizmo); /** * One plane handle of a position gizmo, as `positionGizmo.getXPlaneGizmo` and its siblings * read it * @default undefined */ planeDragGizmo: BABYLON.IPlaneDragGizmo; } /** * Feeds `babylon.gizmo.planeRotationGizmo.getIsEnabled` with one ring of a rotation gizmo. */ class PlaneRotationGizmoDto { constructor(planeRotationGizmo?: BABYLON.IPlaneRotationGizmo); /** * One ring of a rotation gizmo, as `rotationGizmo.getXGizmo` and its siblings read it * @default undefined */ planeRotationGizmo: BABYLON.IPlaneRotationGizmo; } /** * Feeds `babylon.gizmo.manager.attachToMesh` with the manager and the mesh its gizmos should * appear on. */ class AttachToMeshDto { constructor(mesh?: BABYLON.AbstractMesh, gizmoManager?: BABYLON.GizmoManager); /** * The mesh the gizmos attach to; the mesh attached before is released */ mesh: BABYLON.AbstractMesh; /** * The gizmo manager, as `createGizmoManager` gave it */ gizmoManager: BABYLON.GizmoManager; } /** * Feeds `babylon.gizmo.positionGizmo.createPositionGizmoObservableSelector` with the name of * the drag event to select. */ class PositionGizmoObservableSelectorDto { constructor(selector?: positionGizmoObservableSelectorEnum); /** * Which event: drag start, drag or drag end */ selector: positionGizmoObservableSelectorEnum; } /** * Feeds `babylon.gizmo.boundingBoxGizmo.createBoundingBoxGizmoObservableSelector` with the name * of the handle event to select. */ class BoundingBoxGizmoObservableSelectorDto { constructor(selector?: boundingBoxGizmoObservableSelectorEnum); /** * Which event: a drag start, or a scale box or rotation sphere drag and its end */ selector: boundingBoxGizmoObservableSelectorEnum; } /** * Feeds `babylon.gizmo.rotationGizmo.createRotationGizmoObservableSelector` with the name of * the drag event to select. */ class RotationGizmoObservableSelectorDto { constructor(selector?: rotationGizmoObservableSelectorEnum); /** * Which event: drag start, drag or drag end */ selector: rotationGizmoObservableSelectorEnum; } /** * Feeds `babylon.gizmo.scaleGizmo.createScaleGizmoObservableSelector` with the name of the drag * event to select. */ class ScaleGizmoObservableSelectorDto { constructor(selector?: scaleGizmoObservableSelectorEnum); /** * Which event: drag start, drag or drag end */ selector: scaleGizmoObservableSelectorEnum; } }