|
@@ -18575,6 +18575,71 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
+ * Particle emitter emitting particles from a custom list of positions.
|
|
|
+ */
|
|
|
+ export class CustomParticleEmitter implements IParticleEmitterType {
|
|
|
+ /**
|
|
|
+ * Gets or sets the position generator that will create the inital position of each particle.
|
|
|
+ * Index will be provided when used with GPU particle. Particle will be provided when used with CPU particles
|
|
|
+ */
|
|
|
+ particlePositionGenerator: (index: number, particle: Nullable<Particle>, outPosition: Vector3) => void;
|
|
|
+ /**
|
|
|
+ * Gets or sets the destination generator that will create the final destination of each particle.
|
|
|
+ * * Index will be provided when used with GPU particle. Particle will be provided when used with CPU particles
|
|
|
+ */
|
|
|
+ particleDestinationGenerator: (index: number, particle: Nullable<Particle>, outDestination: Vector3) => void;
|
|
|
+ /**
|
|
|
+ * Creates a new instance CustomParticleEmitter
|
|
|
+ */
|
|
|
+ constructor();
|
|
|
+ /**
|
|
|
+ * Called by the particle System when the direction is computed for the created particle.
|
|
|
+ * @param worldMatrix is the world matrix of the particle system
|
|
|
+ * @param directionToUpdate is the direction vector to update with the result
|
|
|
+ * @param particle is the particle we are computed the direction for
|
|
|
+ */
|
|
|
+ startDirectionFunction(worldMatrix: Matrix, directionToUpdate: Vector3, particle: Particle): void;
|
|
|
+ /**
|
|
|
+ * Called by the particle System when the position is computed for the created particle.
|
|
|
+ * @param worldMatrix is the world matrix of the particle system
|
|
|
+ * @param positionToUpdate is the position vector to update with the result
|
|
|
+ * @param particle is the particle we are computed the position for
|
|
|
+ */
|
|
|
+ startPositionFunction(worldMatrix: Matrix, positionToUpdate: Vector3, particle: Particle): void;
|
|
|
+ /**
|
|
|
+ * Clones the current emitter and returns a copy of it
|
|
|
+ * @returns the new emitter
|
|
|
+ */
|
|
|
+ clone(): CustomParticleEmitter;
|
|
|
+ /**
|
|
|
+ * Called by the GPUParticleSystem to setup the update shader
|
|
|
+ * @param effect defines the update shader
|
|
|
+ */
|
|
|
+ applyToShader(effect: Effect): void;
|
|
|
+ /**
|
|
|
+ * Returns a string to use to update the GPU particles update shader
|
|
|
+ * @returns a string containng the defines string
|
|
|
+ */
|
|
|
+ getEffectDefines(): string;
|
|
|
+ /**
|
|
|
+ * Returns the string "PointParticleEmitter"
|
|
|
+ * @returns a string containing the class name
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
+ * Serializes the particle system to a JSON object.
|
|
|
+ * @returns the JSON object
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ /**
|
|
|
+ * Parse properties from a JSON object
|
|
|
+ * @param serializationObject defines the JSON object
|
|
|
+ */
|
|
|
+ parse(serializationObject: any): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
* Interface representing a particle system in Babylon.js.
|
|
|
* This groups the common functionalities that needs to be implemented in order to create a particle system.
|
|
|
* A particle system represents a way to manage particles from their emission to their animation and rendering.
|
|
@@ -42370,6 +42435,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
onXRSessionInit: Observable<XRSession>;
|
|
|
/**
|
|
|
+ * Fires when the reference space changed
|
|
|
+ */
|
|
|
+ onXRReferenceSpaceChanged: Observable<XRReferenceSpace>;
|
|
|
+ /**
|
|
|
* Underlying xr session
|
|
|
*/
|
|
|
session: XRSession;
|
|
@@ -42378,11 +42447,16 @@ declare module BABYLON {
|
|
|
* or get the offset the player is currently at.
|
|
|
*/
|
|
|
viewerReferenceSpace: XRReferenceSpace;
|
|
|
+ private _referenceSpace;
|
|
|
/**
|
|
|
* The current reference space used in this session. This reference space can constantly change!
|
|
|
* It is mainly used to offset the camera's position.
|
|
|
*/
|
|
|
- referenceSpace: XRReferenceSpace;
|
|
|
+ get referenceSpace(): XRReferenceSpace;
|
|
|
+ /**
|
|
|
+ * Set a new reference space and triggers the observable
|
|
|
+ */
|
|
|
+ set referenceSpace(newReferenceSpace: XRReferenceSpace);
|
|
|
/**
|
|
|
* The base reference space from which the session started. good if you want to reset your
|
|
|
* reference space
|
|
@@ -42520,6 +42594,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
export interface IWebXRFeature extends IDisposable {
|
|
|
/**
|
|
|
+ * Is this feature attached
|
|
|
+ */
|
|
|
+ attached: boolean;
|
|
|
+ /**
|
|
|
* Attach the feature to the session
|
|
|
* Will usually be called by the features manager
|
|
|
*
|
|
@@ -42775,6 +42853,22 @@ declare module BABYLON {
|
|
|
private _buttonIndex;
|
|
|
private _axesIndices;
|
|
|
/**
|
|
|
+ * Thumbstick component type
|
|
|
+ */
|
|
|
+ static THUMBSTICK: string;
|
|
|
+ /**
|
|
|
+ * Touchpad component type
|
|
|
+ */
|
|
|
+ static TOUCHPAD: string;
|
|
|
+ /**
|
|
|
+ * trigger component type
|
|
|
+ */
|
|
|
+ static TRIGGER: string;
|
|
|
+ /**
|
|
|
+ * squeeze component type
|
|
|
+ */
|
|
|
+ static SQUEEZE: string;
|
|
|
+ /**
|
|
|
* Observers registered here will be triggered when the state of a button changes
|
|
|
* State change is either pressed / touched / value
|
|
|
*/
|
|
@@ -43650,7 +43744,7 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
- * Represents an XR input
|
|
|
+ * Represents an XR controller
|
|
|
*/
|
|
|
export class WebXRController {
|
|
|
private scene;
|
|
@@ -43677,6 +43771,7 @@ declare module BABYLON {
|
|
|
onDisposeObservable: Observable<{}>;
|
|
|
private _tmpQuaternion;
|
|
|
private _tmpVector;
|
|
|
+ private _uniqueId;
|
|
|
/**
|
|
|
* Creates the controller
|
|
|
* @see https://doc.babylonjs.com/how_to/webxr
|
|
@@ -43688,6 +43783,10 @@ declare module BABYLON {
|
|
|
/** The underlying input source for the controller */
|
|
|
inputSource: XRInputSource, controllerProfile?: string);
|
|
|
/**
|
|
|
+ * Get this controllers unique id
|
|
|
+ */
|
|
|
+ get uniqueId(): string;
|
|
|
+ /**
|
|
|
* Updates the controller pose based on the given XRFrame
|
|
|
* @param xrFrame xr frame to update the pose with
|
|
|
* @param referenceSpace reference space to use
|
|
@@ -43778,42 +43877,89 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
- * Handles pointer input automatically for the pointer of XR controllers
|
|
|
+ * Options interface for the pointer selection module
|
|
|
*/
|
|
|
- export class WebXRControllerPointerSelection {
|
|
|
- private static _idCounter;
|
|
|
- private _tmpRay;
|
|
|
+ export interface IWebXRControllerPointerSelectionOptions {
|
|
|
/**
|
|
|
- * Creates a WebXRControllerPointerSelection
|
|
|
- * @param input input manager to setup pointer selection
|
|
|
+ * the xr input to use with this pointer selection
|
|
|
*/
|
|
|
- constructor(input: WebXRInput);
|
|
|
- private _convertNormalToDirectionOfRay;
|
|
|
- private _updatePointerDistance;
|
|
|
+ xrInput: WebXRInput;
|
|
|
+ /**
|
|
|
+ * Different button type to use instead of the main component
|
|
|
+ */
|
|
|
+ overrideButtonId?: string;
|
|
|
}
|
|
|
-}
|
|
|
-declare module BABYLON {
|
|
|
/**
|
|
|
- * Enables teleportation
|
|
|
+ * A module that will enable pointer selection for motion controllers of XR Input Sources
|
|
|
*/
|
|
|
- export class WebXRControllerTeleportation {
|
|
|
- private _teleportationFillColor;
|
|
|
- private _teleportationBorderColor;
|
|
|
+ export class WebXRControllerPointerSelection implements IWebXRFeature {
|
|
|
+ private _xrSessionManager;
|
|
|
+ private readonly _options;
|
|
|
+ /**
|
|
|
+ * The module's name
|
|
|
+ */
|
|
|
+ static readonly Name: string;
|
|
|
+ /**
|
|
|
+ * The (Babylon) version of this module.
|
|
|
+ * This is an integer representing the implementation version.
|
|
|
+ * This number does not correspond to the webxr specs version
|
|
|
+ */
|
|
|
+ static readonly Version: number;
|
|
|
+ /**
|
|
|
+ * This color will be set to the laser pointer when selection is triggered
|
|
|
+ */
|
|
|
+ onPickedLaserPointerColor: Color3;
|
|
|
+ /**
|
|
|
+ * This color will be applied to the selection ring when selection is triggered
|
|
|
+ */
|
|
|
+ onPickedSelectionMeshColor: Color3;
|
|
|
+ /**
|
|
|
+ * default color of the selection ring
|
|
|
+ */
|
|
|
+ selectionMeshDefaultColor: Color3;
|
|
|
+ /**
|
|
|
+ * Default color of the laser pointer
|
|
|
+ */
|
|
|
+ lasterPointerDefaultColor: Color3;
|
|
|
+ private static _idCounter;
|
|
|
+ private _observerTracked;
|
|
|
+ private _attached;
|
|
|
private _tmpRay;
|
|
|
- private _tmpVector;
|
|
|
+ private _controllers;
|
|
|
+ /**
|
|
|
+ * Is this feature attached
|
|
|
+ */
|
|
|
+ get attached(): boolean;
|
|
|
+ private _scene;
|
|
|
/**
|
|
|
- * when set to true (default) teleportation will wait for thumbstick changes.
|
|
|
- * When set to false teleportation will be disabled.
|
|
|
+ * constructs a new background remover module
|
|
|
+ * @param _xrSessionManager the session manager for this module
|
|
|
+ * @param _options read-only options to be used in this module
|
|
|
+ */
|
|
|
+ constructor(_xrSessionManager: WebXRSessionManager, _options: IWebXRControllerPointerSelectionOptions);
|
|
|
+ /**
|
|
|
+ * attach this feature
|
|
|
+ * Will usually be called by the features manager
|
|
|
*
|
|
|
- * If set to false while teleporting results can be unexpected.
|
|
|
+ * @returns true if successful.
|
|
|
*/
|
|
|
- enabled: boolean;
|
|
|
+ attach(): boolean;
|
|
|
/**
|
|
|
- * Creates a WebXRControllerTeleportation
|
|
|
- * @param input input manager to add teleportation to
|
|
|
- * @param floorMeshes floormeshes which can be teleported to
|
|
|
+ * detach this feature.
|
|
|
+ * Will usually be called by the features manager
|
|
|
+ *
|
|
|
+ * @returns true if successful.
|
|
|
*/
|
|
|
- constructor(input: WebXRInput, floorMeshes?: Array<AbstractMesh>);
|
|
|
+ detach(): boolean;
|
|
|
+ private _attachController;
|
|
|
+ private _detachController;
|
|
|
+ private _generateNewMeshPair;
|
|
|
+ private _convertNormalToDirectionOfRay;
|
|
|
+ private _updatePointerDistance;
|
|
|
+ /**
|
|
|
+ * Dispose this feature and all of the resources attached
|
|
|
+ */
|
|
|
+ dispose(): void;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -43910,6 +44056,238 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
+ * Class containing static functions to help procedurally build meshes
|
|
|
+ */
|
|
|
+ export class LinesBuilder {
|
|
|
+ /**
|
|
|
+ * Creates a line system mesh. A line system is a pool of many lines gathered in a single mesh
|
|
|
+ * * A line system mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of lines as an input parameter
|
|
|
+ * * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineSystem to this static function
|
|
|
+ * * The parameter `lines` is an array of lines, each line being an array of successive Vector3
|
|
|
+ * * The optional parameter `instance` is an instance of an existing LineSystem object to be updated with the passed `lines` parameter
|
|
|
+ * * The optional parameter `colors` is an array of line colors, each line colors being an array of successive Color4, one per line point
|
|
|
+ * * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need the alpha blending (faster)
|
|
|
+ * * Updating a simple Line mesh, you just need to update every line in the `lines` array : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
+ * * When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines
|
|
|
+ * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#line-system
|
|
|
+ * @param name defines the name of the new line system
|
|
|
+ * @param options defines the options used to create the line system
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @returns a new line system mesh
|
|
|
+ */
|
|
|
+ static CreateLineSystem(name: string, options: {
|
|
|
+ lines: Vector3[][];
|
|
|
+ updatable?: boolean;
|
|
|
+ instance?: Nullable<LinesMesh>;
|
|
|
+ colors?: Nullable<Color4[][]>;
|
|
|
+ useVertexAlpha?: boolean;
|
|
|
+ }, scene: Nullable<Scene>): LinesMesh;
|
|
|
+ /**
|
|
|
+ * Creates a line mesh
|
|
|
+ * A line mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of points as an input parameter
|
|
|
+ * * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineMesh to this static function
|
|
|
+ * * The parameter `points` is an array successive Vector3
|
|
|
+ * * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
+ * * The optional parameter `colors` is an array of successive Color4, one per line point
|
|
|
+ * * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need alpha blending (faster)
|
|
|
+ * * When updating an instance, remember that only point positions can change, not the number of points
|
|
|
+ * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#lines
|
|
|
+ * @param name defines the name of the new line system
|
|
|
+ * @param options defines the options used to create the line system
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @returns a new line mesh
|
|
|
+ */
|
|
|
+ static CreateLines(name: string, options: {
|
|
|
+ points: Vector3[];
|
|
|
+ updatable?: boolean;
|
|
|
+ instance?: Nullable<LinesMesh>;
|
|
|
+ colors?: Color4[];
|
|
|
+ useVertexAlpha?: boolean;
|
|
|
+ }, scene?: Nullable<Scene>): LinesMesh;
|
|
|
+ /**
|
|
|
+ * Creates a dashed line mesh
|
|
|
+ * * A dashed line mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of points as an input parameter
|
|
|
+ * * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineMesh to this static function
|
|
|
+ * * The parameter `points` is an array successive Vector3
|
|
|
+ * * The parameter `dashNb` is the intended total number of dashes (positive integer, default 200)
|
|
|
+ * * The parameter `dashSize` is the size of the dashes relatively the dash number (positive float, default 3)
|
|
|
+ * * The parameter `gapSize` is the size of the gap between two successive dashes relatively the dash number (positive float, default 1)
|
|
|
+ * * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
+ * * When updating an instance, remember that only point positions can change, not the number of points
|
|
|
+ * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
+ * @param name defines the name of the mesh
|
|
|
+ * @param options defines the options used to create the mesh
|
|
|
+ * @param scene defines the hosting scene
|
|
|
+ * @returns the dashed line mesh
|
|
|
+ * @see https://doc.babylonjs.com/how_to/parametric_shapes#dashed-lines
|
|
|
+ */
|
|
|
+ static CreateDashedLines(name: string, options: {
|
|
|
+ points: Vector3[];
|
|
|
+ dashSize?: number;
|
|
|
+ gapSize?: number;
|
|
|
+ dashNb?: number;
|
|
|
+ updatable?: boolean;
|
|
|
+ instance?: LinesMesh;
|
|
|
+ }, scene?: Nullable<Scene>): LinesMesh;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * The options container for the teleportation module
|
|
|
+ */
|
|
|
+ export interface IWebXRTeleportationOptions {
|
|
|
+ /**
|
|
|
+ * Babylon XR Input class for controller
|
|
|
+ */
|
|
|
+ xrInput: WebXRInput;
|
|
|
+ /**
|
|
|
+ * A list of meshes to use as floor meshes.
|
|
|
+ * Meshes can be added and removed after initializing the feature using the
|
|
|
+ * addFloorMesh and removeFloorMesh functions
|
|
|
+ */
|
|
|
+ floorMeshes: AbstractMesh[];
|
|
|
+ /**
|
|
|
+ * Provide your own teleportation mesh instead of babylon's wonderful doughnut.
|
|
|
+ * If you want to support rotation, make sure your mesh has a direction indicator.
|
|
|
+ *
|
|
|
+ * When left untouched, the default mesh will be initialized.
|
|
|
+ */
|
|
|
+ teleportationTargetMesh?: AbstractMesh;
|
|
|
+ /**
|
|
|
+ * Values to configure the default target mesh
|
|
|
+ */
|
|
|
+ defaultTargetMeshOptions?: {
|
|
|
+ /**
|
|
|
+ * Fill color of the teleportation area
|
|
|
+ */
|
|
|
+ teleportationFillColor?: string;
|
|
|
+ /**
|
|
|
+ * Border color for the teleportation area
|
|
|
+ */
|
|
|
+ teleportationBorderColor?: string;
|
|
|
+ /**
|
|
|
+ * Override the default material of the torus and arrow
|
|
|
+ */
|
|
|
+ torusArrowMaterial?: Material;
|
|
|
+ /**
|
|
|
+ * Disable the mesh's animation sequence
|
|
|
+ */
|
|
|
+ disableAnimation?: boolean;
|
|
|
+ };
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * This is a teleportation feature to be used with webxr-enabled motion controllers.
|
|
|
+ * When enabled and attached, the feature will allow a user to move aroundand rotate in the scene using
|
|
|
+ * the input of the attached controllers.
|
|
|
+ */
|
|
|
+ export class WebXRMotionControllerTeleportation implements IWebXRFeature {
|
|
|
+ private _xrSessionManager;
|
|
|
+ private _options;
|
|
|
+ /**
|
|
|
+ * The module's name
|
|
|
+ */
|
|
|
+ static readonly Name: string;
|
|
|
+ /**
|
|
|
+ * The (Babylon) version of this module.
|
|
|
+ * This is an integer representing the implementation version.
|
|
|
+ * This number does not correspond to the webxr specs version
|
|
|
+ */
|
|
|
+ static readonly Version: number;
|
|
|
+ /**
|
|
|
+ * Is rotation enabled when moving forward?
|
|
|
+ * Disabling this feature will prevent the user from deciding the direction when teleporting
|
|
|
+ */
|
|
|
+ rotationEnabled: boolean;
|
|
|
+ /**
|
|
|
+ * Should the module support parabolic ray on top of direct ray
|
|
|
+ * If enabled, the user will be able to point "at the sky" and move according to predefined radius distance
|
|
|
+ * Very helpful when moving between floors / different heights
|
|
|
+ */
|
|
|
+ parabolicRayEnabled: boolean;
|
|
|
+ /**
|
|
|
+ * The distance from the user to the inspection point in the direction of the controller
|
|
|
+ * A higher number will allow the user to move further
|
|
|
+ * defaults to 5 (meters, in xr units)
|
|
|
+ */
|
|
|
+ parabolicCheckRadius: number;
|
|
|
+ /**
|
|
|
+ * How much rotation should be applied when rotating right and left
|
|
|
+ */
|
|
|
+ rotationAngle: number;
|
|
|
+ /**
|
|
|
+ * Distance to travel when moving backwards
|
|
|
+ */
|
|
|
+ backwardsTeleportationDistance: number;
|
|
|
+ private _observerTracked;
|
|
|
+ private _attached;
|
|
|
+ /**
|
|
|
+ * Is this feature attached
|
|
|
+ */
|
|
|
+ get attached(): boolean;
|
|
|
+ /**
|
|
|
+ * Add a new mesh to the floor meshes array
|
|
|
+ * @param mesh the mesh to use as floor mesh
|
|
|
+ */
|
|
|
+ addFloorMesh(mesh: AbstractMesh): void;
|
|
|
+ /**
|
|
|
+ * Remove a mesh from the floor meshes array
|
|
|
+ * @param mesh the mesh to remove
|
|
|
+ */
|
|
|
+ removeFloorMesh(mesh: AbstractMesh): void;
|
|
|
+ /**
|
|
|
+ * Remove a mesh from the floor meshes array using its name
|
|
|
+ * @param name the mesh name to remove
|
|
|
+ */
|
|
|
+ removeFloorMeshByName(name: string): void;
|
|
|
+ private _tmpRay;
|
|
|
+ private _tmpVector;
|
|
|
+ private _controllers;
|
|
|
+ /**
|
|
|
+ * constructs a new anchor system
|
|
|
+ * @param _xrSessionManager an instance of WebXRSessionManager
|
|
|
+ * @param _options configuration object for this feature
|
|
|
+ */
|
|
|
+ constructor(_xrSessionManager: WebXRSessionManager, _options: IWebXRTeleportationOptions);
|
|
|
+ private _selectionFeature;
|
|
|
+ /**
|
|
|
+ * This function sets a selection feature that will be disabled when
|
|
|
+ * the forward ray is shown and will be reattached when hidden.
|
|
|
+ * This is used to remove the selection rays when moving.
|
|
|
+ * @param selectionFeature the feature to disable when forward movement is enabled
|
|
|
+ */
|
|
|
+ setSelectionFeature(selectionFeature: IWebXRFeature): void;
|
|
|
+ /**
|
|
|
+ * attach this feature
|
|
|
+ * Will usually be called by the features manager
|
|
|
+ *
|
|
|
+ * @returns true if successful.
|
|
|
+ */
|
|
|
+ attach(): boolean;
|
|
|
+ /**
|
|
|
+ * detach this feature.
|
|
|
+ * Will usually be called by the features manager
|
|
|
+ *
|
|
|
+ * @returns true if successful.
|
|
|
+ */
|
|
|
+ detach(): boolean;
|
|
|
+ /**
|
|
|
+ * Dispose this feature and all of the resources attached
|
|
|
+ */
|
|
|
+ dispose(): void;
|
|
|
+ private _currentTeleportationControllerId;
|
|
|
+ private _attachController;
|
|
|
+ private _detachController;
|
|
|
+ private createDefaultTargetMesh;
|
|
|
+ private setTargetMeshVisibility;
|
|
|
+ private setTargetMeshPosition;
|
|
|
+ private _quadraticBezierCurve;
|
|
|
+ private showParabolicPath;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
* Options for the default xr helper
|
|
|
*/
|
|
|
export class WebXRDefaultExperienceOptions {
|
|
@@ -43953,7 +44331,7 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* Enables teleportation
|
|
|
*/
|
|
|
- teleportation: WebXRControllerTeleportation;
|
|
|
+ teleportation: WebXRMotionControllerTeleportation;
|
|
|
/**
|
|
|
* Enables ui for entering/exiting xr
|
|
|
*/
|
|
@@ -44444,6 +44822,11 @@ declare module BABYLON {
|
|
|
* This number does not correspond to the webxr specs version
|
|
|
*/
|
|
|
static readonly Version: number;
|
|
|
+ private _attached;
|
|
|
+ /**
|
|
|
+ * Is this feature attached
|
|
|
+ */
|
|
|
+ get attached(): boolean;
|
|
|
/**
|
|
|
* Execute a hit test on the current running session using a select event returned from a transient input (such as touch)
|
|
|
* @param event the (select) event to use to select with
|
|
@@ -44465,6 +44848,8 @@ declare module BABYLON {
|
|
|
* Triggered when new babylon (transformed) hit test results are available
|
|
|
*/
|
|
|
onHitTestResultObservable: Observable<IWebXRHitResult[]>;
|
|
|
+ private _onSelectEnabled;
|
|
|
+ private _xrFrameObserver;
|
|
|
/**
|
|
|
* Creates a new instance of the (legacy version) hit test feature
|
|
|
* @param _xrSessionManager an instance of WebXRSessionManager
|
|
@@ -44475,9 +44860,6 @@ declare module BABYLON {
|
|
|
* options to use when constructing this feature
|
|
|
*/
|
|
|
options?: IWebXRHitTestOptions);
|
|
|
- private _onSelectEnabled;
|
|
|
- private _xrFrameObserver;
|
|
|
- private _attached;
|
|
|
/**
|
|
|
* Populated with the last native XR Hit Results
|
|
|
*/
|
|
@@ -44567,8 +44949,12 @@ declare module BABYLON {
|
|
|
* This can execute N times every frame
|
|
|
*/
|
|
|
onPlaneUpdatedObservable: Observable<IWebXRPlane>;
|
|
|
- private _enabled;
|
|
|
private _attached;
|
|
|
+ /**
|
|
|
+ * Is this feature attached
|
|
|
+ */
|
|
|
+ get attached(): boolean;
|
|
|
+ private _enabled;
|
|
|
private _detectedPlanes;
|
|
|
private _lastFrameDetected;
|
|
|
private _observerTracked;
|
|
@@ -44672,10 +45058,14 @@ declare module BABYLON {
|
|
|
* Observers registered here will be executed when an anchor was removed from the session
|
|
|
*/
|
|
|
onAnchorRemovedObservable: Observable<IWebXRAnchor>;
|
|
|
+ private _attached;
|
|
|
+ /**
|
|
|
+ * Is this feature attached
|
|
|
+ */
|
|
|
+ get attached(): boolean;
|
|
|
private _planeDetector;
|
|
|
private _hitTestModule;
|
|
|
private _enabled;
|
|
|
- private _attached;
|
|
|
private _trackedAnchors;
|
|
|
private _lastFrameDetected;
|
|
|
private _observerTracked;
|
|
@@ -44782,6 +45172,11 @@ declare module BABYLON {
|
|
|
* registered observers will be triggered when the background state changes
|
|
|
*/
|
|
|
onBackgroundStateChangedObservable: Observable<boolean>;
|
|
|
+ private _attached;
|
|
|
+ /**
|
|
|
+ * Is this feature attached
|
|
|
+ */
|
|
|
+ get attached(): boolean;
|
|
|
/**
|
|
|
* constructs a new background remover module
|
|
|
* @param _xrSessionManager the session manager for this module
|
|
@@ -45949,85 +46344,6 @@ declare module BABYLON.Debug {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
- * Class containing static functions to help procedurally build meshes
|
|
|
- */
|
|
|
- export class LinesBuilder {
|
|
|
- /**
|
|
|
- * Creates a line system mesh. A line system is a pool of many lines gathered in a single mesh
|
|
|
- * * A line system mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of lines as an input parameter
|
|
|
- * * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineSystem to this static function
|
|
|
- * * The parameter `lines` is an array of lines, each line being an array of successive Vector3
|
|
|
- * * The optional parameter `instance` is an instance of an existing LineSystem object to be updated with the passed `lines` parameter
|
|
|
- * * The optional parameter `colors` is an array of line colors, each line colors being an array of successive Color4, one per line point
|
|
|
- * * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need the alpha blending (faster)
|
|
|
- * * Updating a simple Line mesh, you just need to update every line in the `lines` array : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
- * * When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines
|
|
|
- * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes#line-system
|
|
|
- * @param name defines the name of the new line system
|
|
|
- * @param options defines the options used to create the line system
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @returns a new line system mesh
|
|
|
- */
|
|
|
- static CreateLineSystem(name: string, options: {
|
|
|
- lines: Vector3[][];
|
|
|
- updatable?: boolean;
|
|
|
- instance?: Nullable<LinesMesh>;
|
|
|
- colors?: Nullable<Color4[][]>;
|
|
|
- useVertexAlpha?: boolean;
|
|
|
- }, scene: Nullable<Scene>): LinesMesh;
|
|
|
- /**
|
|
|
- * Creates a line mesh
|
|
|
- * A line mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of points as an input parameter
|
|
|
- * * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineMesh to this static function
|
|
|
- * * The parameter `points` is an array successive Vector3
|
|
|
- * * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
- * * The optional parameter `colors` is an array of successive Color4, one per line point
|
|
|
- * * The optional parameter `useVertexAlpha` is to be set to `false` (default `true`) when you don't need alpha blending (faster)
|
|
|
- * * When updating an instance, remember that only point positions can change, not the number of points
|
|
|
- * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes#lines
|
|
|
- * @param name defines the name of the new line system
|
|
|
- * @param options defines the options used to create the line system
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @returns a new line mesh
|
|
|
- */
|
|
|
- static CreateLines(name: string, options: {
|
|
|
- points: Vector3[];
|
|
|
- updatable?: boolean;
|
|
|
- instance?: Nullable<LinesMesh>;
|
|
|
- colors?: Color4[];
|
|
|
- useVertexAlpha?: boolean;
|
|
|
- }, scene?: Nullable<Scene>): LinesMesh;
|
|
|
- /**
|
|
|
- * Creates a dashed line mesh
|
|
|
- * * A dashed line mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of points as an input parameter
|
|
|
- * * Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineMesh to this static function
|
|
|
- * * The parameter `points` is an array successive Vector3
|
|
|
- * * The parameter `dashNb` is the intended total number of dashes (positive integer, default 200)
|
|
|
- * * The parameter `dashSize` is the size of the dashes relatively the dash number (positive float, default 3)
|
|
|
- * * The parameter `gapSize` is the size of the gap between two successive dashes relatively the dash number (positive float, default 1)
|
|
|
- * * The optional parameter `instance` is an instance of an existing LineMesh object to be updated with the passed `points` parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#lines-and-dashedlines
|
|
|
- * * When updating an instance, remember that only point positions can change, not the number of points
|
|
|
- * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
|
- * @param name defines the name of the mesh
|
|
|
- * @param options defines the options used to create the mesh
|
|
|
- * @param scene defines the hosting scene
|
|
|
- * @returns the dashed line mesh
|
|
|
- * @see https://doc.babylonjs.com/how_to/parametric_shapes#dashed-lines
|
|
|
- */
|
|
|
- static CreateDashedLines(name: string, options: {
|
|
|
- points: Vector3[];
|
|
|
- dashSize?: number;
|
|
|
- gapSize?: number;
|
|
|
- dashNb?: number;
|
|
|
- updatable?: boolean;
|
|
|
- instance?: LinesMesh;
|
|
|
- }, scene?: Nullable<Scene>): LinesMesh;
|
|
|
- }
|
|
|
-}
|
|
|
-declare module BABYLON {
|
|
|
- /**
|
|
|
* As raycast might be hard to debug, the RayHelper can help rendering the different rays
|
|
|
* in order to better appreciate the issue one might have.
|
|
|
* @see http://doc.babylonjs.com/babylon101/raycasts#debugging
|
|
@@ -64047,6 +64363,8 @@ declare module BABYLON {
|
|
|
* Avoids computing bones velocities and computes only mesh's velocity itself (position, rotation, scaling).
|
|
|
*/
|
|
|
excludedSkinnedMeshesFromVelocity: AbstractMesh[];
|
|
|
+ /** Gets or sets a boolean indicating if transparent meshes should be rendered */
|
|
|
+ renderTransparentMeshes: boolean;
|
|
|
private _scene;
|
|
|
private _multiRenderTarget;
|
|
|
private _ratio;
|