|
@@ -8899,6 +8899,17 @@ declare module "babylonjs/Maths/math.axis" {
|
|
|
/** Z axis */
|
|
|
static Z: Vector3;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * Defines cartesian components.
|
|
|
+ */
|
|
|
+ export enum Coordinate {
|
|
|
+ /** X axis */
|
|
|
+ X = 0,
|
|
|
+ /** Y axis */
|
|
|
+ Y = 1,
|
|
|
+ /** Z axis */
|
|
|
+ Z = 2
|
|
|
+ }
|
|
|
}
|
|
|
declare module "babylonjs/Maths/math.frustum" {
|
|
|
import { Matrix } from "babylonjs/Maths/math.vector";
|
|
@@ -19581,6 +19592,254 @@ declare module "babylonjs/Cameras/Inputs/freeCameraMouseInput" {
|
|
|
getSimpleName(): string;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/Cameras/Inputs/BaseCameraMouseWheelInput" {
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
+ import { Observable } from "babylonjs/Misc/observable";
|
|
|
+ import { Camera } from "babylonjs/Cameras/camera";
|
|
|
+ import { ICameraInput } from "babylonjs/Cameras/cameraInputsManager";
|
|
|
+ /**
|
|
|
+ * Base class for mouse wheel input..
|
|
|
+ * See FollowCameraMouseWheelInput in src/Cameras/Inputs/freeCameraMouseWheelInput.ts
|
|
|
+ * for example usage.
|
|
|
+ */
|
|
|
+ export abstract class BaseCameraMouseWheelInput implements ICameraInput<Camera> {
|
|
|
+ /**
|
|
|
+ * Defines the camera the input is attached to.
|
|
|
+ */
|
|
|
+ abstract camera: Camera;
|
|
|
+ /**
|
|
|
+ * How fast is the camera moves in relation to X axis mouseWheel events.
|
|
|
+ * Use negative value to reverse direction.
|
|
|
+ */
|
|
|
+ wheelPrecisionX: number;
|
|
|
+ /**
|
|
|
+ * How fast is the camera moves in relation to Y axis mouseWheel events.
|
|
|
+ * Use negative value to reverse direction.
|
|
|
+ */
|
|
|
+ wheelPrecisionY: number;
|
|
|
+ /**
|
|
|
+ * How fast is the camera moves in relation to Z axis mouseWheel events.
|
|
|
+ * Use negative value to reverse direction.
|
|
|
+ */
|
|
|
+ wheelPrecisionZ: number;
|
|
|
+ /**
|
|
|
+ * Observable for when a mouse wheel move event occurs.
|
|
|
+ */
|
|
|
+ onChangedObservable: Observable<{
|
|
|
+ wheelDeltaX: number;
|
|
|
+ wheelDeltaY: number;
|
|
|
+ wheelDeltaZ: number;
|
|
|
+ }>;
|
|
|
+ private _wheel;
|
|
|
+ private _observer;
|
|
|
+ /**
|
|
|
+ * Attach the input controls to a specific dom element to get the input from.
|
|
|
+ * @param element Defines the element the controls should be listened from
|
|
|
+ * @param noPreventDefault Defines whether event caught by the controls
|
|
|
+ * should call preventdefault().
|
|
|
+ * (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
|
|
|
+ */
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ /**
|
|
|
+ * Detach the current controls from the specified dom element.
|
|
|
+ * @param element Defines the element to stop listening the inputs from
|
|
|
+ */
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ /**
|
|
|
+ * Called for each rendered frame.
|
|
|
+ */
|
|
|
+ checkInputs(): void;
|
|
|
+ /**
|
|
|
+ * Gets the class name of the current intput.
|
|
|
+ * @returns the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Get the friendly name associated with the input class.
|
|
|
+ * @returns the input friendly name
|
|
|
+ */
|
|
|
+ getSimpleName(): string;
|
|
|
+ /**
|
|
|
+ * Incremental value of multiple mouse wheel movements of the X axis.
|
|
|
+ * Should be zero-ed when read.
|
|
|
+ */
|
|
|
+ protected _wheelDeltaX: number;
|
|
|
+ /**
|
|
|
+ * Incremental value of multiple mouse wheel movements of the Y axis.
|
|
|
+ * Should be zero-ed when read.
|
|
|
+ */
|
|
|
+ protected _wheelDeltaY: number;
|
|
|
+ /**
|
|
|
+ * Incremental value of multiple mouse wheel movements of the Z axis.
|
|
|
+ * Should be zero-ed when read.
|
|
|
+ */
|
|
|
+ protected _wheelDeltaZ: number;
|
|
|
+ /**
|
|
|
+ * Firefox uses a different scheme to report scroll distances to other
|
|
|
+ * browsers. Rather than use complicated methods to calculate the exact
|
|
|
+ * multiple we need to apply, let's just cheat and use a constant.
|
|
|
+ * https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode
|
|
|
+ * https://stackoverflow.com/questions/20110224/what-is-the-height-of-a-line-in-a-wheel-event-deltamode-dom-delta-line
|
|
|
+ */
|
|
|
+ private readonly _ffMultiplier;
|
|
|
+ /**
|
|
|
+ * Different event attributes for wheel data fall into a few set ranges.
|
|
|
+ * Some relevant but dated date here:
|
|
|
+ * https://stackoverflow.com/questions/5527601/normalizing-mousewheel-speed-across-browsers
|
|
|
+ */
|
|
|
+ private readonly _normalize;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module "babylonjs/Cameras/Inputs/freeCameraMouseWheelInput" {
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
+ import { FreeCamera } from "babylonjs/Cameras/freeCamera";
|
|
|
+ import { BaseCameraMouseWheelInput } from "babylonjs/Cameras/Inputs/BaseCameraMouseWheelInput";
|
|
|
+ import { Coordinate } from "babylonjs/Maths/math.axis";
|
|
|
+ /**
|
|
|
+ * Manage the mouse wheel inputs to control a free camera.
|
|
|
+ * @see https://doc.babylonjs.com/how_to/customizing_camera_inputs
|
|
|
+ */
|
|
|
+ export class FreeCameraMouseWheelInput extends BaseCameraMouseWheelInput {
|
|
|
+ /**
|
|
|
+ * Defines the camera the input is attached to.
|
|
|
+ */
|
|
|
+ camera: FreeCamera;
|
|
|
+ /**
|
|
|
+ * Gets the class name of the current input.
|
|
|
+ * @returns the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's X axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelXMoveRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's X axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelXMoveRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's Y axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelYMoveRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's Y axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelYMoveRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's Z axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelZMoveRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's Z axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelZMoveRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which rotation axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's X axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelXRotateRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured rotation axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's X axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelXRotateRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which rotation axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's Y axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelYRotateRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured rotation axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's Y axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelYRotateRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which rotation axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's Z axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelZRotateRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured rotation axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's Z axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelZRotateRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to the scene) the mouse wheel's X axis
|
|
|
+ * controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelXMoveScene(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to the scene) the mouse wheel's
|
|
|
+ * X axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelXMoveScene(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to the scene) the mouse wheel's Y axis
|
|
|
+ * controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelYMoveScene(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to the scene) the mouse wheel's
|
|
|
+ * Y axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelYMoveScene(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to the scene) the mouse wheel's Z axis
|
|
|
+ * controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelZMoveScene(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to the scene) the mouse wheel's
|
|
|
+ * Z axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelZMoveScene(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Called for each rendered frame.
|
|
|
+ */
|
|
|
+ checkInputs(): void;
|
|
|
+ private _moveRelative;
|
|
|
+ private _rotateRelative;
|
|
|
+ private _moveScene;
|
|
|
+ /**
|
|
|
+ * These are set to the desired default behaviour.
|
|
|
+ */
|
|
|
+ private _wheelXAction;
|
|
|
+ private _wheelXActionCoordinate;
|
|
|
+ private _wheelYAction;
|
|
|
+ private _wheelYActionCoordinate;
|
|
|
+ private _wheelZAction;
|
|
|
+ private _wheelZActionCoordinate;
|
|
|
+ /**
|
|
|
+ * Update the camera according to any configured properties for the 3
|
|
|
+ * mouse-wheel axis.
|
|
|
+ */
|
|
|
+ private _updateCamera;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs/Cameras/Inputs/freeCameraTouchInput" {
|
|
|
import { Nullable } from "babylonjs/types";
|
|
|
import { ICameraInput } from "babylonjs/Cameras/cameraInputsManager";
|
|
@@ -19656,6 +19915,7 @@ declare module "babylonjs/Cameras/freeCameraInputsManager" {
|
|
|
import { FreeCamera } from "babylonjs/Cameras/freeCamera";
|
|
|
import { CameraInputsManager } from "babylonjs/Cameras/cameraInputsManager";
|
|
|
import { FreeCameraMouseInput } from "babylonjs/Cameras/Inputs/freeCameraMouseInput";
|
|
|
+ import { FreeCameraMouseWheelInput } from "babylonjs/Cameras/Inputs/freeCameraMouseWheelInput";
|
|
|
import { Nullable } from "babylonjs/types";
|
|
|
/**
|
|
|
* Default Inputs manager for the FreeCamera.
|
|
@@ -19668,6 +19928,10 @@ declare module "babylonjs/Cameras/freeCameraInputsManager" {
|
|
|
*/
|
|
|
_mouseInput: Nullable<FreeCameraMouseInput>;
|
|
|
/**
|
|
|
+ * @hidden
|
|
|
+ */
|
|
|
+ _mouseWheelInput: Nullable<FreeCameraMouseWheelInput>;
|
|
|
+ /**
|
|
|
* Instantiates a new FreeCameraInputsManager.
|
|
|
* @param camera Defines the camera the inputs belong to
|
|
|
*/
|
|
@@ -19689,6 +19953,16 @@ declare module "babylonjs/Cameras/freeCameraInputsManager" {
|
|
|
*/
|
|
|
removeMouse(): FreeCameraInputsManager;
|
|
|
/**
|
|
|
+ * Add mouse wheel input support to the input manager.
|
|
|
+ * @returns the current input manager
|
|
|
+ */
|
|
|
+ addMouseWheel(): FreeCameraInputsManager;
|
|
|
+ /**
|
|
|
+ * Removes the mouse wheel input support from the manager
|
|
|
+ * @returns the current input manager
|
|
|
+ */
|
|
|
+ removeMouseWheel(): FreeCameraInputsManager;
|
|
|
+ /**
|
|
|
* Add touch input support to the input manager.
|
|
|
* @returns the current input manager
|
|
|
*/
|
|
@@ -23390,6 +23664,10 @@ declare module "babylonjs/Materials/Node/nodeMaterial" {
|
|
|
*/
|
|
|
get mode(): NodeMaterialModes;
|
|
|
/**
|
|
|
+ * A free comment about the material
|
|
|
+ */
|
|
|
+ comment: string;
|
|
|
+ /**
|
|
|
* Create a new node based material
|
|
|
* @param name defines the material name
|
|
|
* @param scene defines the hosting scene
|
|
@@ -50189,6 +50467,7 @@ declare module "babylonjs/Cameras/Inputs/index" {
|
|
|
export * from "babylonjs/Cameras/Inputs/freeCameraGamepadInput";
|
|
|
export * from "babylonjs/Cameras/Inputs/freeCameraKeyboardMoveInput";
|
|
|
export * from "babylonjs/Cameras/Inputs/freeCameraMouseInput";
|
|
|
+ export * from "babylonjs/Cameras/Inputs/freeCameraMouseWheelInput";
|
|
|
export * from "babylonjs/Cameras/Inputs/freeCameraTouchInput";
|
|
|
export * from "babylonjs/Cameras/Inputs/freeCameraVirtualJoystickInput";
|
|
|
}
|
|
@@ -71300,6 +71579,18 @@ declare module "babylonjs/Navigation/INavigationEngine" {
|
|
|
*/
|
|
|
getAgentVelocityToRef(index: number, result: Vector3): void;
|
|
|
/**
|
|
|
+ * Gets the agent next target point on the path
|
|
|
+ * @param index agent index returned by addAgent
|
|
|
+ * @returns world space position
|
|
|
+ */
|
|
|
+ getAgentNextTargetPath(index: number): Vector3;
|
|
|
+ /**
|
|
|
+ * Gets the agent next target point on the path
|
|
|
+ * @param index agent index returned by addAgent
|
|
|
+ * @param result output world space position
|
|
|
+ */
|
|
|
+ getAgentNextTargetPathToRef(index: number, result: Vector3): void;
|
|
|
+ /**
|
|
|
* remove a particular agent previously created
|
|
|
* @param index agent index returned by addAgent
|
|
|
*/
|
|
@@ -71654,6 +71945,18 @@ declare module "babylonjs/Navigation/Plugins/recastJSPlugin" {
|
|
|
*/
|
|
|
getAgentVelocityToRef(index: number, result: Vector3): void;
|
|
|
/**
|
|
|
+ * Returns the agent next target point on the path
|
|
|
+ * @param index agent index returned by addAgent
|
|
|
+ * @returns world space position
|
|
|
+ */
|
|
|
+ getAgentNextTargetPath(index: number): Vector3;
|
|
|
+ /**
|
|
|
+ * Returns the agent next target point on the path
|
|
|
+ * @param index agent index returned by addAgent
|
|
|
+ * @param result output world space position
|
|
|
+ */
|
|
|
+ getAgentNextTargetPathToRef(index: number, result: Vector3): void;
|
|
|
+ /**
|
|
|
* Asks a particular agent to go to a destination. That destination is constrained by the navigation mesh
|
|
|
* @param index agent index returned by addAgent
|
|
|
* @param destination targeted world position
|
|
@@ -89628,6 +89931,17 @@ declare module BABYLON {
|
|
|
/** Z axis */
|
|
|
static Z: Vector3;
|
|
|
}
|
|
|
+ /**
|
|
|
+ * Defines cartesian components.
|
|
|
+ */
|
|
|
+ export enum Coordinate {
|
|
|
+ /** X axis */
|
|
|
+ X = 0,
|
|
|
+ /** Y axis */
|
|
|
+ Y = 1,
|
|
|
+ /** Z axis */
|
|
|
+ Z = 2
|
|
|
+ }
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
@@ -99869,6 +100183,246 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
+ * Base class for mouse wheel input..
|
|
|
+ * See FollowCameraMouseWheelInput in src/Cameras/Inputs/freeCameraMouseWheelInput.ts
|
|
|
+ * for example usage.
|
|
|
+ */
|
|
|
+ export abstract class BaseCameraMouseWheelInput implements ICameraInput<Camera> {
|
|
|
+ /**
|
|
|
+ * Defines the camera the input is attached to.
|
|
|
+ */
|
|
|
+ abstract camera: Camera;
|
|
|
+ /**
|
|
|
+ * How fast is the camera moves in relation to X axis mouseWheel events.
|
|
|
+ * Use negative value to reverse direction.
|
|
|
+ */
|
|
|
+ wheelPrecisionX: number;
|
|
|
+ /**
|
|
|
+ * How fast is the camera moves in relation to Y axis mouseWheel events.
|
|
|
+ * Use negative value to reverse direction.
|
|
|
+ */
|
|
|
+ wheelPrecisionY: number;
|
|
|
+ /**
|
|
|
+ * How fast is the camera moves in relation to Z axis mouseWheel events.
|
|
|
+ * Use negative value to reverse direction.
|
|
|
+ */
|
|
|
+ wheelPrecisionZ: number;
|
|
|
+ /**
|
|
|
+ * Observable for when a mouse wheel move event occurs.
|
|
|
+ */
|
|
|
+ onChangedObservable: Observable<{
|
|
|
+ wheelDeltaX: number;
|
|
|
+ wheelDeltaY: number;
|
|
|
+ wheelDeltaZ: number;
|
|
|
+ }>;
|
|
|
+ private _wheel;
|
|
|
+ private _observer;
|
|
|
+ /**
|
|
|
+ * Attach the input controls to a specific dom element to get the input from.
|
|
|
+ * @param element Defines the element the controls should be listened from
|
|
|
+ * @param noPreventDefault Defines whether event caught by the controls
|
|
|
+ * should call preventdefault().
|
|
|
+ * (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
|
|
|
+ */
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ /**
|
|
|
+ * Detach the current controls from the specified dom element.
|
|
|
+ * @param element Defines the element to stop listening the inputs from
|
|
|
+ */
|
|
|
+ detachControl(element: Nullable<HTMLElement>): void;
|
|
|
+ /**
|
|
|
+ * Called for each rendered frame.
|
|
|
+ */
|
|
|
+ checkInputs(): void;
|
|
|
+ /**
|
|
|
+ * Gets the class name of the current intput.
|
|
|
+ * @returns the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Get the friendly name associated with the input class.
|
|
|
+ * @returns the input friendly name
|
|
|
+ */
|
|
|
+ getSimpleName(): string;
|
|
|
+ /**
|
|
|
+ * Incremental value of multiple mouse wheel movements of the X axis.
|
|
|
+ * Should be zero-ed when read.
|
|
|
+ */
|
|
|
+ protected _wheelDeltaX: number;
|
|
|
+ /**
|
|
|
+ * Incremental value of multiple mouse wheel movements of the Y axis.
|
|
|
+ * Should be zero-ed when read.
|
|
|
+ */
|
|
|
+ protected _wheelDeltaY: number;
|
|
|
+ /**
|
|
|
+ * Incremental value of multiple mouse wheel movements of the Z axis.
|
|
|
+ * Should be zero-ed when read.
|
|
|
+ */
|
|
|
+ protected _wheelDeltaZ: number;
|
|
|
+ /**
|
|
|
+ * Firefox uses a different scheme to report scroll distances to other
|
|
|
+ * browsers. Rather than use complicated methods to calculate the exact
|
|
|
+ * multiple we need to apply, let's just cheat and use a constant.
|
|
|
+ * https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode
|
|
|
+ * https://stackoverflow.com/questions/20110224/what-is-the-height-of-a-line-in-a-wheel-event-deltamode-dom-delta-line
|
|
|
+ */
|
|
|
+ private readonly _ffMultiplier;
|
|
|
+ /**
|
|
|
+ * Different event attributes for wheel data fall into a few set ranges.
|
|
|
+ * Some relevant but dated date here:
|
|
|
+ * https://stackoverflow.com/questions/5527601/normalizing-mousewheel-speed-across-browsers
|
|
|
+ */
|
|
|
+ private readonly _normalize;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * Manage the mouse wheel inputs to control a free camera.
|
|
|
+ * @see https://doc.babylonjs.com/how_to/customizing_camera_inputs
|
|
|
+ */
|
|
|
+ export class FreeCameraMouseWheelInput extends BaseCameraMouseWheelInput {
|
|
|
+ /**
|
|
|
+ * Defines the camera the input is attached to.
|
|
|
+ */
|
|
|
+ camera: FreeCamera;
|
|
|
+ /**
|
|
|
+ * Gets the class name of the current input.
|
|
|
+ * @returns the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's X axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelXMoveRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's X axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelXMoveRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's Y axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelYMoveRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's Y axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelYMoveRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's Z axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelZMoveRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's Z axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelZMoveRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which rotation axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's X axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelXRotateRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured rotation axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's X axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelXRotateRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which rotation axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's Y axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelYRotateRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured rotation axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's Y axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelYRotateRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which rotation axis (relative to camera's orientation) the mouse
|
|
|
+ * wheel's Z axis controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelZRotateRelative(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured rotation axis (relative to camera's orientation) the
|
|
|
+ * mouse wheel's Z axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelZRotateRelative(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to the scene) the mouse wheel's X axis
|
|
|
+ * controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelXMoveScene(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to the scene) the mouse wheel's
|
|
|
+ * X axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelXMoveScene(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to the scene) the mouse wheel's Y axis
|
|
|
+ * controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelYMoveScene(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to the scene) the mouse wheel's
|
|
|
+ * Y axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelYMoveScene(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Set which movement axis (relative to the scene) the mouse wheel's Z axis
|
|
|
+ * controls.
|
|
|
+ * @param axis The axis to be moved. Set null to clear.
|
|
|
+ */
|
|
|
+ set wheelZMoveScene(axis: Nullable<Coordinate>);
|
|
|
+ /**
|
|
|
+ * Get the configured movement axis (relative to the scene) the mouse wheel's
|
|
|
+ * Z axis controls.
|
|
|
+ * @returns The configured axis or null if none.
|
|
|
+ */
|
|
|
+ get wheelZMoveScene(): Nullable<Coordinate>;
|
|
|
+ /**
|
|
|
+ * Called for each rendered frame.
|
|
|
+ */
|
|
|
+ checkInputs(): void;
|
|
|
+ private _moveRelative;
|
|
|
+ private _rotateRelative;
|
|
|
+ private _moveScene;
|
|
|
+ /**
|
|
|
+ * These are set to the desired default behaviour.
|
|
|
+ */
|
|
|
+ private _wheelXAction;
|
|
|
+ private _wheelXActionCoordinate;
|
|
|
+ private _wheelYAction;
|
|
|
+ private _wheelYActionCoordinate;
|
|
|
+ private _wheelZAction;
|
|
|
+ private _wheelZActionCoordinate;
|
|
|
+ /**
|
|
|
+ * Update the camera according to any configured properties for the 3
|
|
|
+ * mouse-wheel axis.
|
|
|
+ */
|
|
|
+ private _updateCamera;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
* Manage the touch inputs to control the movement of a free camera.
|
|
|
* @see https://doc.babylonjs.com/how_to/customizing_camera_inputs
|
|
|
*/
|
|
@@ -99947,6 +100501,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
_mouseInput: Nullable<FreeCameraMouseInput>;
|
|
|
/**
|
|
|
+ * @hidden
|
|
|
+ */
|
|
|
+ _mouseWheelInput: Nullable<FreeCameraMouseWheelInput>;
|
|
|
+ /**
|
|
|
* Instantiates a new FreeCameraInputsManager.
|
|
|
* @param camera Defines the camera the inputs belong to
|
|
|
*/
|
|
@@ -99968,6 +100526,16 @@ declare module BABYLON {
|
|
|
*/
|
|
|
removeMouse(): FreeCameraInputsManager;
|
|
|
/**
|
|
|
+ * Add mouse wheel input support to the input manager.
|
|
|
+ * @returns the current input manager
|
|
|
+ */
|
|
|
+ addMouseWheel(): FreeCameraInputsManager;
|
|
|
+ /**
|
|
|
+ * Removes the mouse wheel input support from the manager
|
|
|
+ * @returns the current input manager
|
|
|
+ */
|
|
|
+ removeMouseWheel(): FreeCameraInputsManager;
|
|
|
+ /**
|
|
|
* Add touch input support to the input manager.
|
|
|
* @returns the current input manager
|
|
|
*/
|
|
@@ -103425,6 +103993,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
get mode(): NodeMaterialModes;
|
|
|
/**
|
|
|
+ * A free comment about the material
|
|
|
+ */
|
|
|
+ comment: string;
|
|
|
+ /**
|
|
|
* Create a new node based material
|
|
|
* @param name defines the material name
|
|
|
* @param scene defines the hosting scene
|
|
@@ -148558,6 +149130,18 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getAgentVelocityToRef(index: number, result: Vector3): void;
|
|
|
/**
|
|
|
+ * Gets the agent next target point on the path
|
|
|
+ * @param index agent index returned by addAgent
|
|
|
+ * @returns world space position
|
|
|
+ */
|
|
|
+ getAgentNextTargetPath(index: number): Vector3;
|
|
|
+ /**
|
|
|
+ * Gets the agent next target point on the path
|
|
|
+ * @param index agent index returned by addAgent
|
|
|
+ * @param result output world space position
|
|
|
+ */
|
|
|
+ getAgentNextTargetPathToRef(index: number, result: Vector3): void;
|
|
|
+ /**
|
|
|
* remove a particular agent previously created
|
|
|
* @param index agent index returned by addAgent
|
|
|
*/
|
|
@@ -148907,6 +149491,18 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getAgentVelocityToRef(index: number, result: Vector3): void;
|
|
|
/**
|
|
|
+ * Returns the agent next target point on the path
|
|
|
+ * @param index agent index returned by addAgent
|
|
|
+ * @returns world space position
|
|
|
+ */
|
|
|
+ getAgentNextTargetPath(index: number): Vector3;
|
|
|
+ /**
|
|
|
+ * Returns the agent next target point on the path
|
|
|
+ * @param index agent index returned by addAgent
|
|
|
+ * @param result output world space position
|
|
|
+ */
|
|
|
+ getAgentNextTargetPathToRef(index: number, result: Vector3): void;
|
|
|
+ /**
|
|
|
* Asks a particular agent to go to a destination. That destination is constrained by the navigation mesh
|
|
|
* @param index agent index returned by addAgent
|
|
|
* @param destination targeted world position
|