@@ -47090,31 +47090,35 @@ declare module BABYLON {
47090
47090
/**
47091
47091
* The name of the anchor system feature
47092
47092
*/
47093
- static ANCHOR_SYSTEM: string;
47093
+ static readonly ANCHOR_SYSTEM: string;
47094
47094
/**
47095
47095
* The name of the background remover feature
47096
47096
*/
47097
- static BACKGROUND_REMOVER: string;
47097
+ static readonly BACKGROUND_REMOVER: string;
47098
47098
/**
47099
47099
* The name of the hit test feature
47100
47100
*/
47101
- static HIT_TEST: string;
47101
+ static readonly HIT_TEST: string;
47102
47102
/**
47103
47103
* physics impostors for xr controllers feature
47104
47104
*/
47105
- static PHYSICS_CONTROLLERS: string;
47105
+ static readonly PHYSICS_CONTROLLERS: string;
47106
47106
/**
47107
47107
* The name of the plane detection feature
47108
47108
*/
47109
- static PLANE_DETECTION: string;
47109
+ static readonly PLANE_DETECTION: string;
47110
47110
/**
47111
47111
* The name of the pointer selection feature
47112
47112
*/
47113
- static POINTER_SELECTION: string;
47113
+ static readonly POINTER_SELECTION: string;
47114
47114
/**
47115
47115
* The name of the teleportation feature
47116
47116
*/
47117
- static TELEPORTATION: string;
47117
+ static readonly TELEPORTATION: string;
47118
+ /**
47119
+ * The name of the feature points feature.
47120
+ */
47121
+ static readonly FEATURE_POINTS: string;
47118
47122
}
47119
47123
/**
47120
47124
* Defining the constructor of a feature. Used to register the modules.
@@ -48827,7 +48831,7 @@ declare module BABYLON {
48827
48831
/**
48828
48832
* The module's name
48829
48833
*/
48830
- static readonly Name: string;
48834
+ static readonly Name: string;
48831
48835
/**
48832
48836
* The (Babylon) version of this module.
48833
48837
* This is an integer representing the implementation version.
@@ -49354,7 +49358,7 @@ declare module BABYLON {
49354
49358
/**
49355
49359
* The module's name
49356
49360
*/
49357
- static readonly Name: string;
49361
+ static readonly Name: string;
49358
49362
/**
49359
49363
* The (Babylon) version of this module.
49360
49364
* This is an integer representing the implementation version.
@@ -74123,7 +74127,7 @@ declare module BABYLON {
74123
74127
/**
74124
74128
* The module's name
74125
74129
*/
74126
- static readonly Name: string;
74130
+ static readonly Name: string;
74127
74131
/**
74128
74132
* The (Babylon) version of this module.
74129
74133
* This is an integer representing the implementation version.
@@ -74265,7 +74269,7 @@ declare module BABYLON {
74265
74269
/**
74266
74270
* The module's name
74267
74271
*/
74268
- static readonly Name: string;
74272
+ static readonly Name: string;
74269
74273
/**
74270
74274
* The (Babylon) version of this module.
74271
74275
* This is an integer representing the implementation version.
@@ -74367,7 +74371,7 @@ declare module BABYLON {
74367
74371
/**
74368
74372
* The module's name
74369
74373
*/
74370
- static readonly Name: string;
74374
+ static readonly Name: string;
74371
74375
/**
74372
74376
* The (Babylon) version of this module.
74373
74377
* This is an integer representing the implementation version.
@@ -74498,7 +74502,7 @@ declare module BABYLON {
74498
74502
/**
74499
74503
* The module's name
74500
74504
*/
74501
- static readonly Name: string;
74505
+ static readonly Name: string;
74502
74506
/**
74503
74507
* The (Babylon) version of this module.
74504
74508
* This is an integer representing the implementation version.
@@ -74584,7 +74588,7 @@ declare module BABYLON {
74584
74588
/**
74585
74589
* The module's name
74586
74590
*/
74587
- static readonly Name: string;
74591
+ static readonly Name: string;
74588
74592
/**
74589
74593
* The (Babylon) version of this module.
74590
74594
* This is an integer representing the implementation version.
@@ -74714,7 +74718,7 @@ declare module BABYLON {
74714
74718
/**
74715
74719
* The module's name
74716
74720
*/
74717
- static readonly Name: string;
74721
+ static readonly Name: string;
74718
74722
/**
74719
74723
* The (Babylon) version of this module.
74720
74724
* This is an integer representing the implementation version.
@@ -74781,6 +74785,79 @@ declare module BABYLON {
74781
74785
private _detachController;
74782
74786
}
74783
74787
}
74788
+ declare module BABYLON {
74789
+ /**
74790
+ * A babylon interface for a "WebXR" feature point.
74791
+ * Represents the position and confidence value of a given feature point.
74792
+ */
74793
+ export interface IWebXRFeaturePoint {
74794
+ /**
74795
+ * Represents the position of the feature point in world space.
74796
+ */
74797
+ position: Vector3;
74798
+ /**
74799
+ * Represents the confidence value of the feature point in world space. 0 being least confident, and 1 being most confident.
74800
+ */
74801
+ confidenceValue: number;
74802
+ }
74803
+ /**
74804
+ * The feature point system is used to detect feature points from real world geometry.
74805
+ * This feature is currently experimental and only supported on BabylonNative, and should not be used in the browser.
74806
+ * The newly introduced API can be seen in webxr.nativeextensions.d.ts and described in FeaturePoints.md.
74807
+ */
74808
+ export class WebXRFeaturePointSystem extends WebXRAbstractFeature {
74809
+ private _enabled;
74810
+ private _featurePointCloud;
74811
+ /**
74812
+ * The module's name
74813
+ */
74814
+ static readonly Name: string;
74815
+ /**
74816
+ * The (Babylon) version of this module.
74817
+ * This is an integer representing the implementation version.
74818
+ * This number does not correspond to the WebXR specs version
74819
+ */
74820
+ static readonly Version: number;
74821
+ /**
74822
+ * Observers registered here will be executed whenever new feature points are added (on XRFrame while the session is tracking).
74823
+ * Will notify the observers about which feature points have been added.
74824
+ */
74825
+ readonly onFeaturePointsAddedObservable: Observable<number[]>;
74826
+ /**
74827
+ * Observers registered here will be executed whenever a feature point has been updated (on XRFrame while the session is tracking).
74828
+ * Will notify the observers about which feature points have been updated.
74829
+ */
74830
+ readonly onFeaturePointsUpdatedObservable: Observable<number[]>;
74831
+ /**
74832
+ * The current feature point cloud maintained across frames.
74833
+ */
74834
+ get featurePointCloud(): Array<IWebXRFeaturePoint>;
74835
+ /**
74836
+ * construct the feature point system
74837
+ * @param _xrSessionManager an instance of xr Session manager
74838
+ */
74839
+ constructor(_xrSessionManager: WebXRSessionManager);
74840
+ /**
74841
+ * Detach this feature.
74842
+ * Will usually be called by the features manager
74843
+ *
74844
+ * @returns true if successful.
74845
+ */
74846
+ detach(): boolean;
74847
+ /**
74848
+ * Dispose this feature and all of the resources attached
74849
+ */
74850
+ dispose(): void;
74851
+ /**
74852
+ * On receiving a new XR frame if this feature is attached notify observers new feature point data is available.
74853
+ */
74854
+ protected _onXRFrame(frame: XRFrame): void;
74855
+ /**
74856
+ * Initializes the feature. If the feature point feature is not available for this environment do not mark the feature as enabled.
74857
+ */
74858
+ private _init;
74859
+ }
74860
+ }
74784
74861
declare module BABYLON {
74785
74862
/**
74786
74863
* The motion controller class for all microsoft mixed reality controllers
@@ -75747,4 +75824,15 @@ interface XRPlane {
75747
75824
planeSpace: XRSpace;
75748
75825
polygon: Array<DOMPointReadOnly>;
75749
75826
lastChangedTime: number;
75827
+ }
75828
+ // This file contains native only extensions for WebXR These APIs are not supported in the browser yet.
75829
+ // They are intended for use with either Babylon Native https://github.com/BabylonJS/BabylonNative or
75830
+ // Babylon React Native: https://github.com/BabylonJS/BabylonReactNative
75831
+
75832
+ interface XRSession {
75833
+ trySetFeaturePointCloudEnabled(enabled: boolean): boolean;
75834
+ }
75835
+
75836
+ interface XRFrame {
75837
+ featurePointCloud? : Array<number>;
75750
75838
}
0 commit comments