|
@@ -41406,6 +41406,10 @@ declare module "babylonjs/Engines/thinEngine" {
|
|
|
* Will prevent the system from falling back to software implementation if a hardware device cannot be created
|
|
|
*/
|
|
|
failIfMajorPerformanceCaveat?: boolean;
|
|
|
+ /**
|
|
|
+ * Defines whether to adapt to the device's viewport characteristics (default: false)
|
|
|
+ */
|
|
|
+ adaptToDeviceRatio?: boolean;
|
|
|
}
|
|
|
/**
|
|
|
* The base engine class (root of all engines)
|
|
@@ -46396,6 +46400,10 @@ declare module "babylonjs/Engines/webgpuEngine" {
|
|
|
* Defines wether we should generate debug markers in the gpu command lists (can be seen with PIX for eg)
|
|
|
*/
|
|
|
enableGPUDebugMarkers?: boolean;
|
|
|
+ /**
|
|
|
+ * Options to load the associated Glslang library
|
|
|
+ */
|
|
|
+ glslangOptions?: GlslangOptions;
|
|
|
}
|
|
|
/**
|
|
|
* The web GPU engine class provides support for WebGPU version of babylon.js.
|
|
@@ -46461,6 +46469,11 @@ declare module "babylonjs/Engines/webgpuEngine" {
|
|
|
/** @hidden */
|
|
|
dbgShowWarningsNotImplemented: boolean;
|
|
|
/**
|
|
|
+ * Gets a boolean indicating if the engine can be instanciated (ie. if a WebGPU context can be found)
|
|
|
+ * @returns true if the engine can be created
|
|
|
+ */
|
|
|
+ static get IsSupported(): boolean;
|
|
|
+ /**
|
|
|
* Gets a boolean indicating that the engine supports uniform buffers
|
|
|
*/
|
|
|
get supportsUniformBuffers(): boolean;
|
|
@@ -46481,6 +46494,13 @@ declare module "babylonjs/Engines/webgpuEngine" {
|
|
|
*/
|
|
|
get version(): number;
|
|
|
/**
|
|
|
+ * Create a new instance of the gpu engine asynchronously
|
|
|
+ * @param canvas Defines the canvas to use to display the result
|
|
|
+ * @param options Defines the options passed to the engine to create the GPU context dependencies
|
|
|
+ * @returns a promise that resolves with the created engine
|
|
|
+ */
|
|
|
+ static CreateAsync(canvas: HTMLCanvasElement, options?: WebGPUEngineOptions): Promise<WebGPUEngine>;
|
|
|
+ /**
|
|
|
* Create a new instance of the gpu engine.
|
|
|
* @param canvas Defines the canvas to use to display the result
|
|
|
* @param options Defines the options passed to the engine to create the GPU context dependencies
|
|
@@ -55600,6 +55620,10 @@ declare module "babylonjs/XR/webXRFeaturesManager" {
|
|
|
* A list of (Babylon WebXR) features this feature depends on
|
|
|
*/
|
|
|
dependsOn?: string[];
|
|
|
+ /**
|
|
|
+ * If this feature requires to extend the XRSessionInit object, this function will return the partial XR session init object
|
|
|
+ */
|
|
|
+ getXRSessionInitExtension?: () => Promise<Partial<XRSessionInit>>;
|
|
|
}
|
|
|
/**
|
|
|
* A list of the currently available features without referencing them
|
|
@@ -55645,6 +55669,10 @@ declare module "babylonjs/XR/webXRFeaturesManager" {
|
|
|
* The name of the hand tracking feature.
|
|
|
*/
|
|
|
static readonly HAND_TRACKING: string;
|
|
|
+ /**
|
|
|
+ * The name of the image tracking feature
|
|
|
+ */
|
|
|
+ static readonly IMAGE_TRACKING: string;
|
|
|
}
|
|
|
/**
|
|
|
* Defining the constructor of a feature. Used to register the modules.
|
|
@@ -55760,14 +55788,14 @@ declare module "babylonjs/XR/webXRFeaturesManager" {
|
|
|
*/
|
|
|
getEnabledFeatures(): string[];
|
|
|
/**
|
|
|
- * This function will exten the session creation configuration object with enabled features.
|
|
|
+ * This function will extend the session creation configuration object with enabled features.
|
|
|
* If, for example, the anchors feature is enabled, it will be automatically added to the optional or required features list,
|
|
|
* according to the defined "required" variable, provided during enableFeature call
|
|
|
* @param xrSessionInit the xr Session init object to extend
|
|
|
*
|
|
|
* @returns an extended XRSessionInit object
|
|
|
*/
|
|
|
- extendXRSessionInitObject(xrSessionInit: XRSessionInit): XRSessionInit;
|
|
|
+ _extendXRSessionInitObject(xrSessionInit: XRSessionInit): Promise<XRSessionInit>;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/XR/webXRExperienceHelper" {
|
|
@@ -62464,6 +62492,21 @@ declare module "babylonjs/Engines/nativeEngine" {
|
|
|
private _getNativeAttribType;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/Engines/engineFactory" {
|
|
|
+ import { ThinEngine } from "babylonjs/Engines/thinEngine";
|
|
|
+ /**
|
|
|
+ * Helper class to create the best engine depending on the current hardware
|
|
|
+ */
|
|
|
+ export class EngineFactory {
|
|
|
+ /**
|
|
|
+ * Creates an engine based on the capabilities of the underlying hardware
|
|
|
+ * @param canvas Defines the canvas to use to display the result
|
|
|
+ * @param options Defines the options passed to the engine to create the context dependencies
|
|
|
+ * @returns a promise that resolves with the created engine
|
|
|
+ */
|
|
|
+ static CreateAsync(canvas: HTMLCanvasElement, options: any): Promise<ThinEngine>;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs/Engines/index" {
|
|
|
export * from "babylonjs/Engines/constants";
|
|
|
export * from "babylonjs/Engines/engineCapabilities";
|
|
@@ -62482,6 +62525,7 @@ declare module "babylonjs/Engines/index" {
|
|
|
export * from "babylonjs/Engines/Processors/shaderCodeInliner";
|
|
|
export * from "babylonjs/Engines/performanceConfigurator";
|
|
|
export * from "babylonjs/Engines/engineFeatures";
|
|
|
+ export * from "babylonjs/Engines/engineFactory";
|
|
|
}
|
|
|
declare module "babylonjs/Events/clipboardEvents" {
|
|
|
/**
|
|
@@ -84140,6 +84184,146 @@ declare module "babylonjs/XR/features/WebXRMeshDetector" {
|
|
|
private _updateVertexDataWithXRMesh;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/XR/features/WebXRImageTracking" {
|
|
|
+ import { WebXRSessionManager } from "babylonjs/XR/webXRSessionManager";
|
|
|
+ import { Observable } from "babylonjs/Misc/observable";
|
|
|
+ import { WebXRAbstractFeature } from "babylonjs/XR/features/WebXRAbstractFeature";
|
|
|
+ import { Matrix } from "babylonjs/Maths/math.vector";
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
|
+ /**
|
|
|
+ * Options interface for the background remover plugin
|
|
|
+ */
|
|
|
+ export interface IWebXRImageTrackingOptions {
|
|
|
+ /**
|
|
|
+ * A required array with images to track
|
|
|
+ */
|
|
|
+ images: {
|
|
|
+ /**
|
|
|
+ * The source of the image. can be a URL or an image bitmap
|
|
|
+ */
|
|
|
+ src: string | ImageBitmap;
|
|
|
+ /**
|
|
|
+ * The estimated width in the real world (in meters)
|
|
|
+ */
|
|
|
+ estimatedRealWorldWidth: number;
|
|
|
+ }[];
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * An object representing an image tracked by the system
|
|
|
+ */
|
|
|
+ export interface IWebXRTrackedImage {
|
|
|
+ /**
|
|
|
+ * The ID of this image (which is the same as the position in the array that was used to initialize the feature)
|
|
|
+ */
|
|
|
+ id: number;
|
|
|
+ /**
|
|
|
+ * Is the transformation provided emulated. If it is, the system "guesses" its real position. Otherwise it can be considered as exact position.
|
|
|
+ */
|
|
|
+ emulated?: boolean;
|
|
|
+ /**
|
|
|
+ * Just in case it is needed - the image bitmap that is being tracked
|
|
|
+ */
|
|
|
+ originalBitmap: ImageBitmap;
|
|
|
+ /**
|
|
|
+ * The native XR result image tracking result, untouched
|
|
|
+ */
|
|
|
+ xrTrackingResult?: XRImageTrackingResult;
|
|
|
+ /**
|
|
|
+ * Width in real world (meters)
|
|
|
+ */
|
|
|
+ realWorldWidth?: number;
|
|
|
+ /**
|
|
|
+ * A transformation matrix of this current image in the current reference space.
|
|
|
+ */
|
|
|
+ transformationMatrix: Matrix;
|
|
|
+ /**
|
|
|
+ * The width/height ratio of this image. can be used to calculate the size of the detected object/image
|
|
|
+ */
|
|
|
+ ratio?: number;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Image tracking for immersive AR sessions.
|
|
|
+ * Providing a list of images and their estimated widths will enable tracking those images in the real world.
|
|
|
+ */
|
|
|
+ export class WebXRImageTracking extends WebXRAbstractFeature {
|
|
|
+ /**
|
|
|
+ * read-only options to be used in this module
|
|
|
+ */
|
|
|
+ readonly options: IWebXRImageTrackingOptions;
|
|
|
+ /**
|
|
|
+ * 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 will be triggered if the underlying system deems an image untrackable.
|
|
|
+ * The index is the index of the image from the array used to initialize the feature.
|
|
|
+ */
|
|
|
+ onUntrackableImageFoundObservable: Observable<number>;
|
|
|
+ /**
|
|
|
+ * An image was deemed trackable, and the system will start tracking it.
|
|
|
+ */
|
|
|
+ onTrackableImageFoundObservable: Observable<IWebXRTrackedImage>;
|
|
|
+ /**
|
|
|
+ * The image was found and its state was updated.
|
|
|
+ */
|
|
|
+ onTrackedImageUpdatedObservable: Observable<IWebXRTrackedImage>;
|
|
|
+ private _trackedImages;
|
|
|
+ private _originalTrackingRequest;
|
|
|
+ /**
|
|
|
+ * constructs the image tracking feature
|
|
|
+ * @param _xrSessionManager the session manager for this module
|
|
|
+ * @param options read-only options to be used in this module
|
|
|
+ */
|
|
|
+ constructor(_xrSessionManager: WebXRSessionManager,
|
|
|
+ /**
|
|
|
+ * read-only options to be used in this module
|
|
|
+ */
|
|
|
+ options: IWebXRImageTrackingOptions);
|
|
|
+ /**
|
|
|
+ * 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;
|
|
|
+ /**
|
|
|
+ * Check if the needed objects are defined.
|
|
|
+ * This does not mean that the feature is enabled, but that the objects needed are well defined.
|
|
|
+ */
|
|
|
+ isCompatible(): boolean;
|
|
|
+ /**
|
|
|
+ * Get a tracked image by its ID.
|
|
|
+ *
|
|
|
+ * @param id the id of the image to load (position in the init array)
|
|
|
+ * @returns a trackable image, if exists in this location
|
|
|
+ */
|
|
|
+ getTrackedImageById(id: number): Nullable<IWebXRTrackedImage>;
|
|
|
+ /**
|
|
|
+ * Dispose this feature and all of the resources attached
|
|
|
+ */
|
|
|
+ dispose(): void;
|
|
|
+ /**
|
|
|
+ * Extends the session init object if needed
|
|
|
+ * @returns augmentation object fo the xr session init object.
|
|
|
+ */
|
|
|
+ getXRSessionInitExtension(): Promise<Partial<XRSessionInit>>;
|
|
|
+ protected _onXRFrame(_xrFrame: XRFrame): void;
|
|
|
+ private _init;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs/XR/features/index" {
|
|
|
export * from "babylonjs/XR/features/WebXRAbstractFeature";
|
|
|
export * from "babylonjs/XR/features/WebXRHitTestLegacy";
|
|
@@ -84153,6 +84337,7 @@ declare module "babylonjs/XR/features/index" {
|
|
|
export * from "babylonjs/XR/features/WebXRFeaturePointSystem";
|
|
|
export * from "babylonjs/XR/features/WebXRHandTracking";
|
|
|
export * from "babylonjs/XR/features/WebXRMeshDetector";
|
|
|
+ export * from "babylonjs/XR/features/WebXRImageTracking";
|
|
|
}
|
|
|
declare module "babylonjs/XR/motionController/webXRMicrosoftMixedRealityController" {
|
|
|
import { WebXRAbstractMotionController, IMinimalMotionControllerObject, MotionControllerHandedness } from "babylonjs/XR/motionController/webXRAbstractMotionController";
|
|
@@ -124381,6 +124566,10 @@ declare module BABYLON {
|
|
|
* Will prevent the system from falling back to software implementation if a hardware device cannot be created
|
|
|
*/
|
|
|
failIfMajorPerformanceCaveat?: boolean;
|
|
|
+ /**
|
|
|
+ * Defines whether to adapt to the device's viewport characteristics (default: false)
|
|
|
+ */
|
|
|
+ adaptToDeviceRatio?: boolean;
|
|
|
}
|
|
|
/**
|
|
|
* The base engine class (root of all engines)
|
|
@@ -129257,6 +129446,10 @@ declare module BABYLON {
|
|
|
* Defines wether we should generate debug markers in the gpu command lists (can be seen with PIX for eg)
|
|
|
*/
|
|
|
enableGPUDebugMarkers?: boolean;
|
|
|
+ /**
|
|
|
+ * Options to load the associated Glslang library
|
|
|
+ */
|
|
|
+ glslangOptions?: GlslangOptions;
|
|
|
}
|
|
|
/**
|
|
|
* The web GPU engine class provides support for WebGPU version of babylon.js.
|
|
@@ -129322,6 +129515,11 @@ declare module BABYLON {
|
|
|
/** @hidden */
|
|
|
dbgShowWarningsNotImplemented: boolean;
|
|
|
/**
|
|
|
+ * Gets a boolean indicating if the engine can be instanciated (ie. if a WebGPU context can be found)
|
|
|
+ * @returns true if the engine can be created
|
|
|
+ */
|
|
|
+ static get IsSupported(): boolean;
|
|
|
+ /**
|
|
|
* Gets a boolean indicating that the engine supports uniform buffers
|
|
|
*/
|
|
|
get supportsUniformBuffers(): boolean;
|
|
@@ -129342,6 +129540,13 @@ declare module BABYLON {
|
|
|
*/
|
|
|
get version(): number;
|
|
|
/**
|
|
|
+ * Create a new instance of the gpu engine asynchronously
|
|
|
+ * @param canvas Defines the canvas to use to display the result
|
|
|
+ * @param options Defines the options passed to the engine to create the GPU context dependencies
|
|
|
+ * @returns a promise that resolves with the created engine
|
|
|
+ */
|
|
|
+ static CreateAsync(canvas: HTMLCanvasElement, options?: WebGPUEngineOptions): Promise<WebGPUEngine>;
|
|
|
+ /**
|
|
|
* Create a new instance of the gpu engine.
|
|
|
* @param canvas Defines the canvas to use to display the result
|
|
|
* @param options Defines the options passed to the engine to create the GPU context dependencies
|
|
@@ -138014,6 +138219,10 @@ declare module BABYLON {
|
|
|
* A list of (Babylon WebXR) features this feature depends on
|
|
|
*/
|
|
|
dependsOn?: string[];
|
|
|
+ /**
|
|
|
+ * If this feature requires to extend the XRSessionInit object, this function will return the partial XR session init object
|
|
|
+ */
|
|
|
+ getXRSessionInitExtension?: () => Promise<Partial<XRSessionInit>>;
|
|
|
}
|
|
|
/**
|
|
|
* A list of the currently available features without referencing them
|
|
@@ -138059,6 +138268,10 @@ declare module BABYLON {
|
|
|
* The name of the hand tracking feature.
|
|
|
*/
|
|
|
static readonly HAND_TRACKING: string;
|
|
|
+ /**
|
|
|
+ * The name of the image tracking feature
|
|
|
+ */
|
|
|
+ static readonly IMAGE_TRACKING: string;
|
|
|
}
|
|
|
/**
|
|
|
* Defining the constructor of a feature. Used to register the modules.
|
|
@@ -138174,14 +138387,14 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getEnabledFeatures(): string[];
|
|
|
/**
|
|
|
- * This function will exten the session creation configuration object with enabled features.
|
|
|
+ * This function will extend the session creation configuration object with enabled features.
|
|
|
* If, for example, the anchors feature is enabled, it will be automatically added to the optional or required features list,
|
|
|
* according to the defined "required" variable, provided during enableFeature call
|
|
|
* @param xrSessionInit the xr Session init object to extend
|
|
|
*
|
|
|
* @returns an extended XRSessionInit object
|
|
|
*/
|
|
|
- extendXRSessionInitObject(xrSessionInit: XRSessionInit): XRSessionInit;
|
|
|
+ _extendXRSessionInitObject(xrSessionInit: XRSessionInit): Promise<XRSessionInit>;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -144425,6 +144638,20 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
+ * Helper class to create the best engine depending on the current hardware
|
|
|
+ */
|
|
|
+ export class EngineFactory {
|
|
|
+ /**
|
|
|
+ * Creates an engine based on the capabilities of the underlying hardware
|
|
|
+ * @param canvas Defines the canvas to use to display the result
|
|
|
+ * @param options Defines the options passed to the engine to create the context dependencies
|
|
|
+ * @returns a promise that resolves with the created engine
|
|
|
+ */
|
|
|
+ static CreateAsync(canvas: HTMLCanvasElement, options: any): Promise<ThinEngine>;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
* Gather the list of clipboard event types as constants.
|
|
|
*/
|
|
|
export class ClipboardEventTypes {
|
|
@@ -164281,6 +164508,141 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
+ * Options interface for the background remover plugin
|
|
|
+ */
|
|
|
+ export interface IWebXRImageTrackingOptions {
|
|
|
+ /**
|
|
|
+ * A required array with images to track
|
|
|
+ */
|
|
|
+ images: {
|
|
|
+ /**
|
|
|
+ * The source of the image. can be a URL or an image bitmap
|
|
|
+ */
|
|
|
+ src: string | ImageBitmap;
|
|
|
+ /**
|
|
|
+ * The estimated width in the real world (in meters)
|
|
|
+ */
|
|
|
+ estimatedRealWorldWidth: number;
|
|
|
+ }[];
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * An object representing an image tracked by the system
|
|
|
+ */
|
|
|
+ export interface IWebXRTrackedImage {
|
|
|
+ /**
|
|
|
+ * The ID of this image (which is the same as the position in the array that was used to initialize the feature)
|
|
|
+ */
|
|
|
+ id: number;
|
|
|
+ /**
|
|
|
+ * Is the transformation provided emulated. If it is, the system "guesses" its real position. Otherwise it can be considered as exact position.
|
|
|
+ */
|
|
|
+ emulated?: boolean;
|
|
|
+ /**
|
|
|
+ * Just in case it is needed - the image bitmap that is being tracked
|
|
|
+ */
|
|
|
+ originalBitmap: ImageBitmap;
|
|
|
+ /**
|
|
|
+ * The native XR result image tracking result, untouched
|
|
|
+ */
|
|
|
+ xrTrackingResult?: XRImageTrackingResult;
|
|
|
+ /**
|
|
|
+ * Width in real world (meters)
|
|
|
+ */
|
|
|
+ realWorldWidth?: number;
|
|
|
+ /**
|
|
|
+ * A transformation matrix of this current image in the current reference space.
|
|
|
+ */
|
|
|
+ transformationMatrix: Matrix;
|
|
|
+ /**
|
|
|
+ * The width/height ratio of this image. can be used to calculate the size of the detected object/image
|
|
|
+ */
|
|
|
+ ratio?: number;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Image tracking for immersive AR sessions.
|
|
|
+ * Providing a list of images and their estimated widths will enable tracking those images in the real world.
|
|
|
+ */
|
|
|
+ export class WebXRImageTracking extends WebXRAbstractFeature {
|
|
|
+ /**
|
|
|
+ * read-only options to be used in this module
|
|
|
+ */
|
|
|
+ readonly options: IWebXRImageTrackingOptions;
|
|
|
+ /**
|
|
|
+ * 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 will be triggered if the underlying system deems an image untrackable.
|
|
|
+ * The index is the index of the image from the array used to initialize the feature.
|
|
|
+ */
|
|
|
+ onUntrackableImageFoundObservable: Observable<number>;
|
|
|
+ /**
|
|
|
+ * An image was deemed trackable, and the system will start tracking it.
|
|
|
+ */
|
|
|
+ onTrackableImageFoundObservable: Observable<IWebXRTrackedImage>;
|
|
|
+ /**
|
|
|
+ * The image was found and its state was updated.
|
|
|
+ */
|
|
|
+ onTrackedImageUpdatedObservable: Observable<IWebXRTrackedImage>;
|
|
|
+ private _trackedImages;
|
|
|
+ private _originalTrackingRequest;
|
|
|
+ /**
|
|
|
+ * constructs the image tracking feature
|
|
|
+ * @param _xrSessionManager the session manager for this module
|
|
|
+ * @param options read-only options to be used in this module
|
|
|
+ */
|
|
|
+ constructor(_xrSessionManager: WebXRSessionManager,
|
|
|
+ /**
|
|
|
+ * read-only options to be used in this module
|
|
|
+ */
|
|
|
+ options: IWebXRImageTrackingOptions);
|
|
|
+ /**
|
|
|
+ * 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;
|
|
|
+ /**
|
|
|
+ * Check if the needed objects are defined.
|
|
|
+ * This does not mean that the feature is enabled, but that the objects needed are well defined.
|
|
|
+ */
|
|
|
+ isCompatible(): boolean;
|
|
|
+ /**
|
|
|
+ * Get a tracked image by its ID.
|
|
|
+ *
|
|
|
+ * @param id the id of the image to load (position in the init array)
|
|
|
+ * @returns a trackable image, if exists in this location
|
|
|
+ */
|
|
|
+ getTrackedImageById(id: number): Nullable<IWebXRTrackedImage>;
|
|
|
+ /**
|
|
|
+ * Dispose this feature and all of the resources attached
|
|
|
+ */
|
|
|
+ dispose(): void;
|
|
|
+ /**
|
|
|
+ * Extends the session init object if needed
|
|
|
+ * @returns augmentation object fo the xr session init object.
|
|
|
+ */
|
|
|
+ getXRSessionInitExtension(): Promise<Partial<XRSessionInit>>;
|
|
|
+ protected _onXRFrame(_xrFrame: XRFrame): void;
|
|
|
+ private _init;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
* The motion controller class for all microsoft mixed reality controllers
|
|
|
*/
|
|
|
export class WebXRMicrosoftMixedRealityController extends WebXRAbstractMotionController {
|
|
@@ -166036,6 +166398,7 @@ interface XRLayer extends EventTarget {}
|
|
|
interface XRSessionInit {
|
|
|
optionalFeatures?: string[];
|
|
|
requiredFeatures?: string[];
|
|
|
+ trackedImages?: XRTrackedImageInit[];
|
|
|
}
|
|
|
|
|
|
interface XRSessionEvent extends Event {
|
|
@@ -166135,6 +166498,8 @@ interface XRFrame {
|
|
|
worldInformation?: XRWorldInformation;
|
|
|
// Hand tracking
|
|
|
getJointPose?(joint: XRJointSpace, baseSpace: XRSpace): XRJointPose;
|
|
|
+ // Image tracking
|
|
|
+ getImageTrackingResults?(): Array<XRImageTrackingResult>;
|
|
|
}
|
|
|
|
|
|
interface XRInputSourceEvent extends Event {
|
|
@@ -166206,6 +166571,9 @@ interface XRSession {
|
|
|
|
|
|
// legacy plane detection
|
|
|
updateWorldTrackingState?(options: { planeDetectionState?: { enabled: boolean } }): void;
|
|
|
+
|
|
|
+ // image tracking
|
|
|
+ getTrackedImageScores?(): XRImageTrackingScore[];
|
|
|
}
|
|
|
|
|
|
interface XRViewerPose extends XRPose {
|
|
@@ -166337,6 +166705,21 @@ interface XRHand extends Iterable<XRJointSpace> {
|
|
|
readonly LITTLE_PHALANX_DISTAL: number;
|
|
|
readonly LITTLE_PHALANX_TIP: number;
|
|
|
}
|
|
|
+
|
|
|
+type XRImageTrackingState = "tracked" | "emulated";
|
|
|
+type XRImageTrackingScore = "untrackable" | "trackable";
|
|
|
+
|
|
|
+interface XRTrackedImageInit {
|
|
|
+ image: ImageBitmap;
|
|
|
+ widthInMeters: number;
|
|
|
+}
|
|
|
+
|
|
|
+interface XRImageTrackingResult {
|
|
|
+ readonly imageSpace: XRSpace;
|
|
|
+ readonly index: number;
|
|
|
+ readonly trackingState: XRImageTrackingState;
|
|
|
+ readonly measuredWidthInMeters: number;
|
|
|
+}
|
|
|
|
|
|
// This file contains native only extensions for WebXR. These APIs are not supported in the browser yet.
|
|
|
// They are intended for use with either Babylon Native https://github.com/BabylonJS/BabylonNative or
|