|
@@ -45902,10 +45902,102 @@ declare module "babylonjs/XR/features/WebXRAbstractFeature" {
|
|
|
protected _addNewAttachObserver<T>(observable: Observable<T>, callback: (eventData: T, eventState: EventState) => void): void;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/Rendering/utilityLayerRenderer" {
|
|
|
+ import { IDisposable, Scene } from "babylonjs/scene";
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
+ import { Observable } from "babylonjs/Misc/observable";
|
|
|
+ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
|
+ import { HemisphericLight } from "babylonjs/Lights/hemisphericLight";
|
|
|
+ import { Camera } from "babylonjs/Cameras/camera";
|
|
|
+ /**
|
|
|
+ * Renders a layer on top of an existing scene
|
|
|
+ */
|
|
|
+ export class UtilityLayerRenderer implements IDisposable {
|
|
|
+ /** the original scene that will be rendered on top of */
|
|
|
+ originalScene: Scene;
|
|
|
+ private _pointerCaptures;
|
|
|
+ private _lastPointerEvents;
|
|
|
+ private static _DefaultUtilityLayer;
|
|
|
+ private static _DefaultKeepDepthUtilityLayer;
|
|
|
+ private _sharedGizmoLight;
|
|
|
+ private _renderCamera;
|
|
|
+ /**
|
|
|
+ * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
|
|
|
+ * @returns the camera that is used when rendering the utility layer
|
|
|
+ */
|
|
|
+ getRenderCamera(): Camera;
|
|
|
+ /**
|
|
|
+ * Sets the camera that should be used when rendering the utility layer (If set to null the last active camera will be used)
|
|
|
+ * @param cam the camera that should be used when rendering the utility layer
|
|
|
+ */
|
|
|
+ setRenderCamera(cam: Nullable<Camera>): void;
|
|
|
+ /**
|
|
|
+ * @hidden
|
|
|
+ * Light which used by gizmos to get light shading
|
|
|
+ */
|
|
|
+ _getSharedGizmoLight(): HemisphericLight;
|
|
|
+ /**
|
|
|
+ * If the picking should be done on the utility layer prior to the actual scene (Default: true)
|
|
|
+ */
|
|
|
+ pickUtilitySceneFirst: boolean;
|
|
|
+ /**
|
|
|
+ * A shared utility layer that can be used to overlay objects into a scene (Depth map of the previous scene is cleared before drawing on top of it)
|
|
|
+ */
|
|
|
+ static get DefaultUtilityLayer(): UtilityLayerRenderer;
|
|
|
+ /**
|
|
|
+ * A shared utility layer that can be used to embed objects into a scene (Depth map of the previous scene is not cleared before drawing on top of it)
|
|
|
+ */
|
|
|
+ static get DefaultKeepDepthUtilityLayer(): UtilityLayerRenderer;
|
|
|
+ /**
|
|
|
+ * The scene that is rendered on top of the original scene
|
|
|
+ */
|
|
|
+ utilityLayerScene: Scene;
|
|
|
+ /**
|
|
|
+ * If the utility layer should automatically be rendered on top of existing scene
|
|
|
+ */
|
|
|
+ shouldRender: boolean;
|
|
|
+ /**
|
|
|
+ * If set to true, only pointer down onPointerObservable events will be blocked when picking is occluded by original scene
|
|
|
+ */
|
|
|
+ onlyCheckPointerDownEvents: boolean;
|
|
|
+ /**
|
|
|
+ * If set to false, only pointerUp, pointerDown and pointerMove will be sent to the utilityLayerScene (false by default)
|
|
|
+ */
|
|
|
+ processAllEvents: boolean;
|
|
|
+ /**
|
|
|
+ * Observable raised when the pointer move from the utility layer scene to the main scene
|
|
|
+ */
|
|
|
+ onPointerOutObservable: Observable<number>;
|
|
|
+ /** Gets or sets a predicate that will be used to indicate utility meshes present in the main scene */
|
|
|
+ mainSceneTrackerPredicate: (mesh: Nullable<AbstractMesh>) => boolean;
|
|
|
+ private _afterRenderObserver;
|
|
|
+ private _sceneDisposeObserver;
|
|
|
+ private _originalPointerObserver;
|
|
|
+ /**
|
|
|
+ * Instantiates a UtilityLayerRenderer
|
|
|
+ * @param originalScene the original scene that will be rendered on top of
|
|
|
+ * @param handleEvents boolean indicating if the utility layer should handle events
|
|
|
+ */
|
|
|
+ constructor(
|
|
|
+ /** the original scene that will be rendered on top of */
|
|
|
+ originalScene: Scene, handleEvents?: boolean);
|
|
|
+ private _notifyObservers;
|
|
|
+ /**
|
|
|
+ * Renders the utility layers scene on top of the original scene
|
|
|
+ */
|
|
|
+ render(): void;
|
|
|
+ /**
|
|
|
+ * Disposes of the renderer
|
|
|
+ */
|
|
|
+ dispose(): void;
|
|
|
+ private _updateCamera;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs/XR/features/WebXRControllerPointerSelection" {
|
|
|
import { WebXRSessionManager } from "babylonjs/XR/webXRSessionManager";
|
|
|
import { WebXRInput } from "babylonjs/XR/webXRInput";
|
|
|
import { WebXRInputSource } from "babylonjs/XR/webXRInputSource";
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
import { Nullable } from "babylonjs/types";
|
|
|
import { Color3 } from "babylonjs/Maths/math.color";
|
|
|
import { WebXRAbstractFeature } from "babylonjs/XR/features/WebXRAbstractFeature";
|
|
@@ -45944,6 +46036,14 @@ declare module "babylonjs/XR/features/WebXRControllerPointerSelection" {
|
|
|
* Defaults to 1.
|
|
|
*/
|
|
|
gazeModePointerMovedFactor?: number;
|
|
|
+ /**
|
|
|
+ * Should meshes created here be added to a utility layer or the main scene
|
|
|
+ */
|
|
|
+ useUtilityLayer?: boolean;
|
|
|
+ /**
|
|
|
+ * if provided, this scene will be used to render meshes.
|
|
|
+ */
|
|
|
+ customUtilityLayerScene?: Scene;
|
|
|
}
|
|
|
/**
|
|
|
* A module that will enable pointer selection for motion controllers of XR Input Sources
|
|
@@ -46226,6 +46326,7 @@ declare module "babylonjs/XR/features/WebXRControllerTeleportation" {
|
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
|
import { Material } from "babylonjs/Materials/material";
|
|
|
import { WebXRAbstractFeature } from "babylonjs/XR/features/WebXRAbstractFeature";
|
|
|
+ import { Scene } from "babylonjs/scene";
|
|
|
/**
|
|
|
* The options container for the teleportation module
|
|
|
*/
|
|
@@ -46282,6 +46383,14 @@ declare module "babylonjs/XR/features/WebXRControllerTeleportation" {
|
|
|
* If main component is used (no thumbstick), how long should the "long press" take before teleporting
|
|
|
*/
|
|
|
timeToTeleport?: number;
|
|
|
+ /**
|
|
|
+ * Should meshes created here be added to a utility layer or the main scene
|
|
|
+ */
|
|
|
+ useUtilityLayer?: boolean;
|
|
|
+ /**
|
|
|
+ * if provided, this scene will be used to render meshes.
|
|
|
+ */
|
|
|
+ customUtilityLayerScene?: Scene;
|
|
|
}
|
|
|
/**
|
|
|
* This is a teleportation feature to be used with webxr-enabled motion controllers.
|
|
@@ -47267,97 +47376,6 @@ declare module "babylonjs/Culling/index" {
|
|
|
export * from "babylonjs/Culling/Octrees/index";
|
|
|
export * from "babylonjs/Culling/ray";
|
|
|
}
|
|
|
-declare module "babylonjs/Rendering/utilityLayerRenderer" {
|
|
|
- import { IDisposable, Scene } from "babylonjs/scene";
|
|
|
- import { Nullable } from "babylonjs/types";
|
|
|
- import { Observable } from "babylonjs/Misc/observable";
|
|
|
- import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
|
- import { HemisphericLight } from "babylonjs/Lights/hemisphericLight";
|
|
|
- import { Camera } from "babylonjs/Cameras/camera";
|
|
|
- /**
|
|
|
- * Renders a layer on top of an existing scene
|
|
|
- */
|
|
|
- export class UtilityLayerRenderer implements IDisposable {
|
|
|
- /** the original scene that will be rendered on top of */
|
|
|
- originalScene: Scene;
|
|
|
- private _pointerCaptures;
|
|
|
- private _lastPointerEvents;
|
|
|
- private static _DefaultUtilityLayer;
|
|
|
- private static _DefaultKeepDepthUtilityLayer;
|
|
|
- private _sharedGizmoLight;
|
|
|
- private _renderCamera;
|
|
|
- /**
|
|
|
- * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
|
|
|
- * @returns the camera that is used when rendering the utility layer
|
|
|
- */
|
|
|
- getRenderCamera(): Camera;
|
|
|
- /**
|
|
|
- * Sets the camera that should be used when rendering the utility layer (If set to null the last active camera will be used)
|
|
|
- * @param cam the camera that should be used when rendering the utility layer
|
|
|
- */
|
|
|
- setRenderCamera(cam: Nullable<Camera>): void;
|
|
|
- /**
|
|
|
- * @hidden
|
|
|
- * Light which used by gizmos to get light shading
|
|
|
- */
|
|
|
- _getSharedGizmoLight(): HemisphericLight;
|
|
|
- /**
|
|
|
- * If the picking should be done on the utility layer prior to the actual scene (Default: true)
|
|
|
- */
|
|
|
- pickUtilitySceneFirst: boolean;
|
|
|
- /**
|
|
|
- * A shared utility layer that can be used to overlay objects into a scene (Depth map of the previous scene is cleared before drawing on top of it)
|
|
|
- */
|
|
|
- static get DefaultUtilityLayer(): UtilityLayerRenderer;
|
|
|
- /**
|
|
|
- * A shared utility layer that can be used to embed objects into a scene (Depth map of the previous scene is not cleared before drawing on top of it)
|
|
|
- */
|
|
|
- static get DefaultKeepDepthUtilityLayer(): UtilityLayerRenderer;
|
|
|
- /**
|
|
|
- * The scene that is rendered on top of the original scene
|
|
|
- */
|
|
|
- utilityLayerScene: Scene;
|
|
|
- /**
|
|
|
- * If the utility layer should automatically be rendered on top of existing scene
|
|
|
- */
|
|
|
- shouldRender: boolean;
|
|
|
- /**
|
|
|
- * If set to true, only pointer down onPointerObservable events will be blocked when picking is occluded by original scene
|
|
|
- */
|
|
|
- onlyCheckPointerDownEvents: boolean;
|
|
|
- /**
|
|
|
- * If set to false, only pointerUp, pointerDown and pointerMove will be sent to the utilityLayerScene (false by default)
|
|
|
- */
|
|
|
- processAllEvents: boolean;
|
|
|
- /**
|
|
|
- * Observable raised when the pointer move from the utility layer scene to the main scene
|
|
|
- */
|
|
|
- onPointerOutObservable: Observable<number>;
|
|
|
- /** Gets or sets a predicate that will be used to indicate utility meshes present in the main scene */
|
|
|
- mainSceneTrackerPredicate: (mesh: Nullable<AbstractMesh>) => boolean;
|
|
|
- private _afterRenderObserver;
|
|
|
- private _sceneDisposeObserver;
|
|
|
- private _originalPointerObserver;
|
|
|
- /**
|
|
|
- * Instantiates a UtilityLayerRenderer
|
|
|
- * @param originalScene the original scene that will be rendered on top of
|
|
|
- * @param handleEvents boolean indicating if the utility layer should handle events
|
|
|
- */
|
|
|
- constructor(
|
|
|
- /** the original scene that will be rendered on top of */
|
|
|
- originalScene: Scene, handleEvents?: boolean);
|
|
|
- private _notifyObservers;
|
|
|
- /**
|
|
|
- * Renders the utility layers scene on top of the original scene
|
|
|
- */
|
|
|
- render(): void;
|
|
|
- /**
|
|
|
- * Disposes of the renderer
|
|
|
- */
|
|
|
- dispose(): void;
|
|
|
- private _updateCamera;
|
|
|
- }
|
|
|
-}
|
|
|
declare module "babylonjs/Gizmos/gizmo" {
|
|
|
import { Nullable } from "babylonjs/types";
|
|
|
import { IDisposable } from "babylonjs/scene";
|
|
@@ -117310,6 +117328,91 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
+ * Renders a layer on top of an existing scene
|
|
|
+ */
|
|
|
+ export class UtilityLayerRenderer implements IDisposable {
|
|
|
+ /** the original scene that will be rendered on top of */
|
|
|
+ originalScene: Scene;
|
|
|
+ private _pointerCaptures;
|
|
|
+ private _lastPointerEvents;
|
|
|
+ private static _DefaultUtilityLayer;
|
|
|
+ private static _DefaultKeepDepthUtilityLayer;
|
|
|
+ private _sharedGizmoLight;
|
|
|
+ private _renderCamera;
|
|
|
+ /**
|
|
|
+ * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
|
|
|
+ * @returns the camera that is used when rendering the utility layer
|
|
|
+ */
|
|
|
+ getRenderCamera(): Camera;
|
|
|
+ /**
|
|
|
+ * Sets the camera that should be used when rendering the utility layer (If set to null the last active camera will be used)
|
|
|
+ * @param cam the camera that should be used when rendering the utility layer
|
|
|
+ */
|
|
|
+ setRenderCamera(cam: Nullable<Camera>): void;
|
|
|
+ /**
|
|
|
+ * @hidden
|
|
|
+ * Light which used by gizmos to get light shading
|
|
|
+ */
|
|
|
+ _getSharedGizmoLight(): HemisphericLight;
|
|
|
+ /**
|
|
|
+ * If the picking should be done on the utility layer prior to the actual scene (Default: true)
|
|
|
+ */
|
|
|
+ pickUtilitySceneFirst: boolean;
|
|
|
+ /**
|
|
|
+ * A shared utility layer that can be used to overlay objects into a scene (Depth map of the previous scene is cleared before drawing on top of it)
|
|
|
+ */
|
|
|
+ static get DefaultUtilityLayer(): UtilityLayerRenderer;
|
|
|
+ /**
|
|
|
+ * A shared utility layer that can be used to embed objects into a scene (Depth map of the previous scene is not cleared before drawing on top of it)
|
|
|
+ */
|
|
|
+ static get DefaultKeepDepthUtilityLayer(): UtilityLayerRenderer;
|
|
|
+ /**
|
|
|
+ * The scene that is rendered on top of the original scene
|
|
|
+ */
|
|
|
+ utilityLayerScene: Scene;
|
|
|
+ /**
|
|
|
+ * If the utility layer should automatically be rendered on top of existing scene
|
|
|
+ */
|
|
|
+ shouldRender: boolean;
|
|
|
+ /**
|
|
|
+ * If set to true, only pointer down onPointerObservable events will be blocked when picking is occluded by original scene
|
|
|
+ */
|
|
|
+ onlyCheckPointerDownEvents: boolean;
|
|
|
+ /**
|
|
|
+ * If set to false, only pointerUp, pointerDown and pointerMove will be sent to the utilityLayerScene (false by default)
|
|
|
+ */
|
|
|
+ processAllEvents: boolean;
|
|
|
+ /**
|
|
|
+ * Observable raised when the pointer move from the utility layer scene to the main scene
|
|
|
+ */
|
|
|
+ onPointerOutObservable: Observable<number>;
|
|
|
+ /** Gets or sets a predicate that will be used to indicate utility meshes present in the main scene */
|
|
|
+ mainSceneTrackerPredicate: (mesh: Nullable<AbstractMesh>) => boolean;
|
|
|
+ private _afterRenderObserver;
|
|
|
+ private _sceneDisposeObserver;
|
|
|
+ private _originalPointerObserver;
|
|
|
+ /**
|
|
|
+ * Instantiates a UtilityLayerRenderer
|
|
|
+ * @param originalScene the original scene that will be rendered on top of
|
|
|
+ * @param handleEvents boolean indicating if the utility layer should handle events
|
|
|
+ */
|
|
|
+ constructor(
|
|
|
+ /** the original scene that will be rendered on top of */
|
|
|
+ originalScene: Scene, handleEvents?: boolean);
|
|
|
+ private _notifyObservers;
|
|
|
+ /**
|
|
|
+ * Renders the utility layers scene on top of the original scene
|
|
|
+ */
|
|
|
+ render(): void;
|
|
|
+ /**
|
|
|
+ * Disposes of the renderer
|
|
|
+ */
|
|
|
+ dispose(): void;
|
|
|
+ private _updateCamera;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
* Options interface for the pointer selection module
|
|
|
*/
|
|
|
export interface IWebXRControllerPointerSelectionOptions {
|
|
@@ -117344,6 +117447,14 @@ declare module BABYLON {
|
|
|
* Defaults to 1.
|
|
|
*/
|
|
|
gazeModePointerMovedFactor?: number;
|
|
|
+ /**
|
|
|
+ * Should meshes created here be added to a utility layer or the main scene
|
|
|
+ */
|
|
|
+ useUtilityLayer?: boolean;
|
|
|
+ /**
|
|
|
+ * if provided, this scene will be used to render meshes.
|
|
|
+ */
|
|
|
+ customUtilityLayerScene?: Scene;
|
|
|
}
|
|
|
/**
|
|
|
* A module that will enable pointer selection for motion controllers of XR Input Sources
|
|
@@ -117666,6 +117777,14 @@ declare module BABYLON {
|
|
|
* If main component is used (no thumbstick), how long should the "long press" take before teleporting
|
|
|
*/
|
|
|
timeToTeleport?: number;
|
|
|
+ /**
|
|
|
+ * Should meshes created here be added to a utility layer or the main scene
|
|
|
+ */
|
|
|
+ useUtilityLayer?: boolean;
|
|
|
+ /**
|
|
|
+ * if provided, this scene will be used to render meshes.
|
|
|
+ */
|
|
|
+ customUtilityLayerScene?: Scene;
|
|
|
}
|
|
|
/**
|
|
|
* This is a teleportation feature to be used with webxr-enabled motion controllers.
|
|
@@ -118546,91 +118665,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
- * Renders a layer on top of an existing scene
|
|
|
- */
|
|
|
- export class UtilityLayerRenderer implements IDisposable {
|
|
|
- /** the original scene that will be rendered on top of */
|
|
|
- originalScene: Scene;
|
|
|
- private _pointerCaptures;
|
|
|
- private _lastPointerEvents;
|
|
|
- private static _DefaultUtilityLayer;
|
|
|
- private static _DefaultKeepDepthUtilityLayer;
|
|
|
- private _sharedGizmoLight;
|
|
|
- private _renderCamera;
|
|
|
- /**
|
|
|
- * Gets the camera that is used to render the utility layer (when not set, this will be the last active camera)
|
|
|
- * @returns the camera that is used when rendering the utility layer
|
|
|
- */
|
|
|
- getRenderCamera(): Camera;
|
|
|
- /**
|
|
|
- * Sets the camera that should be used when rendering the utility layer (If set to null the last active camera will be used)
|
|
|
- * @param cam the camera that should be used when rendering the utility layer
|
|
|
- */
|
|
|
- setRenderCamera(cam: Nullable<Camera>): void;
|
|
|
- /**
|
|
|
- * @hidden
|
|
|
- * Light which used by gizmos to get light shading
|
|
|
- */
|
|
|
- _getSharedGizmoLight(): HemisphericLight;
|
|
|
- /**
|
|
|
- * If the picking should be done on the utility layer prior to the actual scene (Default: true)
|
|
|
- */
|
|
|
- pickUtilitySceneFirst: boolean;
|
|
|
- /**
|
|
|
- * A shared utility layer that can be used to overlay objects into a scene (Depth map of the previous scene is cleared before drawing on top of it)
|
|
|
- */
|
|
|
- static get DefaultUtilityLayer(): UtilityLayerRenderer;
|
|
|
- /**
|
|
|
- * A shared utility layer that can be used to embed objects into a scene (Depth map of the previous scene is not cleared before drawing on top of it)
|
|
|
- */
|
|
|
- static get DefaultKeepDepthUtilityLayer(): UtilityLayerRenderer;
|
|
|
- /**
|
|
|
- * The scene that is rendered on top of the original scene
|
|
|
- */
|
|
|
- utilityLayerScene: Scene;
|
|
|
- /**
|
|
|
- * If the utility layer should automatically be rendered on top of existing scene
|
|
|
- */
|
|
|
- shouldRender: boolean;
|
|
|
- /**
|
|
|
- * If set to true, only pointer down onPointerObservable events will be blocked when picking is occluded by original scene
|
|
|
- */
|
|
|
- onlyCheckPointerDownEvents: boolean;
|
|
|
- /**
|
|
|
- * If set to false, only pointerUp, pointerDown and pointerMove will be sent to the utilityLayerScene (false by default)
|
|
|
- */
|
|
|
- processAllEvents: boolean;
|
|
|
- /**
|
|
|
- * Observable raised when the pointer move from the utility layer scene to the main scene
|
|
|
- */
|
|
|
- onPointerOutObservable: Observable<number>;
|
|
|
- /** Gets or sets a predicate that will be used to indicate utility meshes present in the main scene */
|
|
|
- mainSceneTrackerPredicate: (mesh: Nullable<AbstractMesh>) => boolean;
|
|
|
- private _afterRenderObserver;
|
|
|
- private _sceneDisposeObserver;
|
|
|
- private _originalPointerObserver;
|
|
|
- /**
|
|
|
- * Instantiates a UtilityLayerRenderer
|
|
|
- * @param originalScene the original scene that will be rendered on top of
|
|
|
- * @param handleEvents boolean indicating if the utility layer should handle events
|
|
|
- */
|
|
|
- constructor(
|
|
|
- /** the original scene that will be rendered on top of */
|
|
|
- originalScene: Scene, handleEvents?: boolean);
|
|
|
- private _notifyObservers;
|
|
|
- /**
|
|
|
- * Renders the utility layers scene on top of the original scene
|
|
|
- */
|
|
|
- render(): void;
|
|
|
- /**
|
|
|
- * Disposes of the renderer
|
|
|
- */
|
|
|
- dispose(): void;
|
|
|
- private _updateCamera;
|
|
|
- }
|
|
|
-}
|
|
|
-declare module BABYLON {
|
|
|
- /**
|
|
|
* Renders gizmos on top of an existing scene which provide controls for position, rotation, etc.
|
|
|
*/
|
|
|
export class Gizmo implements IDisposable {
|