iwer 0.0.2 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +17 -0
- package/build/iwer.js +232 -3
- package/build/iwer.min.js +1 -1
- package/build/iwer.module.js +232 -3
- package/build/iwer.module.min.js +1 -1
- package/lib/action/ActionPlayer.d.ts +6 -0
- package/lib/action/ActionPlayer.d.ts.map +1 -1
- package/lib/action/ActionPlayer.js +6 -0
- package/lib/action/ActionPlayer.js.map +1 -1
- package/lib/action/ActionRecorder.d.ts +6 -0
- package/lib/action/ActionRecorder.d.ts.map +1 -1
- package/lib/action/ActionRecorder.js +6 -0
- package/lib/action/ActionRecorder.js.map +1 -1
- package/lib/device/XRController.d.ts +6 -0
- package/lib/device/XRController.d.ts.map +1 -1
- package/lib/device/XRController.js +6 -0
- package/lib/device/XRController.js.map +1 -1
- package/lib/device/XRDevice.d.ts +8 -0
- package/lib/device/XRDevice.d.ts.map +1 -1
- package/lib/device/XRDevice.js +13 -0
- package/lib/device/XRDevice.js.map +1 -1
- package/lib/device/XRHandInput.d.ts +6 -0
- package/lib/device/XRHandInput.d.ts.map +1 -1
- package/lib/device/XRHandInput.js +6 -0
- package/lib/device/XRHandInput.js.map +1 -1
- package/lib/device/XRTrackedInput.d.ts +6 -0
- package/lib/device/XRTrackedInput.d.ts.map +1 -1
- package/lib/device/XRTrackedInput.js +6 -0
- package/lib/device/XRTrackedInput.js.map +1 -1
- package/lib/device/configs/controller/meta.d.ts +6 -0
- package/lib/device/configs/controller/meta.d.ts.map +1 -1
- package/lib/device/configs/controller/meta.js +6 -0
- package/lib/device/configs/controller/meta.js.map +1 -1
- package/lib/device/configs/hand/pinch.d.ts +6 -0
- package/lib/device/configs/hand/pinch.d.ts.map +1 -1
- package/lib/device/configs/hand/pinch.js +6 -0
- package/lib/device/configs/hand/pinch.js.map +1 -1
- package/lib/device/configs/hand/point.d.ts +6 -0
- package/lib/device/configs/hand/point.d.ts.map +1 -1
- package/lib/device/configs/hand/point.js +6 -0
- package/lib/device/configs/hand/point.js.map +1 -1
- package/lib/device/configs/hand/relaxed.d.ts +6 -0
- package/lib/device/configs/hand/relaxed.d.ts.map +1 -1
- package/lib/device/configs/hand/relaxed.js +6 -0
- package/lib/device/configs/hand/relaxed.js.map +1 -1
- package/lib/device/configs/headset/meta.d.ts +6 -0
- package/lib/device/configs/headset/meta.d.ts.map +1 -1
- package/lib/device/configs/headset/meta.js +10 -0
- package/lib/device/configs/headset/meta.js.map +1 -1
- package/lib/events/XRInputSourceEvent.d.ts +6 -0
- package/lib/events/XRInputSourceEvent.d.ts.map +1 -1
- package/lib/events/XRInputSourceEvent.js +6 -0
- package/lib/events/XRInputSourceEvent.js.map +1 -1
- package/lib/events/XRInputSourcesChangeEvent.d.ts +6 -0
- package/lib/events/XRInputSourcesChangeEvent.d.ts.map +1 -1
- package/lib/events/XRInputSourcesChangeEvent.js +6 -0
- package/lib/events/XRInputSourcesChangeEvent.js.map +1 -1
- package/lib/events/XRReferenceSpaceEvent.d.ts +6 -0
- package/lib/events/XRReferenceSpaceEvent.d.ts.map +1 -1
- package/lib/events/XRReferenceSpaceEvent.js +6 -0
- package/lib/events/XRReferenceSpaceEvent.js.map +1 -1
- package/lib/events/XRSessionEvent.d.ts +6 -0
- package/lib/events/XRSessionEvent.d.ts.map +1 -1
- package/lib/events/XRSessionEvent.js +6 -0
- package/lib/events/XRSessionEvent.js.map +1 -1
- package/lib/frameloop/XRFrame.d.ts +6 -0
- package/lib/frameloop/XRFrame.d.ts.map +1 -1
- package/lib/frameloop/XRFrame.js +6 -0
- package/lib/frameloop/XRFrame.js.map +1 -1
- package/lib/gamepad/Gamepad.d.ts +6 -0
- package/lib/gamepad/Gamepad.d.ts.map +1 -1
- package/lib/gamepad/Gamepad.js +6 -0
- package/lib/gamepad/Gamepad.js.map +1 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/lib/initialization/XRSystem.d.ts +6 -0
- package/lib/initialization/XRSystem.d.ts.map +1 -1
- package/lib/initialization/XRSystem.js +6 -0
- package/lib/initialization/XRSystem.js.map +1 -1
- package/lib/input/XRHand.d.ts +6 -0
- package/lib/input/XRHand.d.ts.map +1 -1
- package/lib/input/XRHand.js +6 -0
- package/lib/input/XRHand.js.map +1 -1
- package/lib/input/XRInputSource.d.ts +6 -0
- package/lib/input/XRInputSource.d.ts.map +1 -1
- package/lib/input/XRInputSource.js +6 -0
- package/lib/input/XRInputSource.js.map +1 -1
- package/lib/layers/XRWebGLLayer.d.ts +6 -0
- package/lib/layers/XRWebGLLayer.d.ts.map +1 -1
- package/lib/layers/XRWebGLLayer.js +6 -0
- package/lib/layers/XRWebGLLayer.js.map +1 -1
- package/lib/pose/XRJointPose.d.ts +6 -0
- package/lib/pose/XRJointPose.d.ts.map +1 -1
- package/lib/pose/XRJointPose.js +6 -0
- package/lib/pose/XRJointPose.js.map +1 -1
- package/lib/pose/XRPose.d.ts +6 -0
- package/lib/pose/XRPose.d.ts.map +1 -1
- package/lib/pose/XRPose.js +6 -0
- package/lib/pose/XRPose.js.map +1 -1
- package/lib/pose/XRViewerPose.d.ts +6 -0
- package/lib/pose/XRViewerPose.d.ts.map +1 -1
- package/lib/pose/XRViewerPose.js +6 -0
- package/lib/pose/XRViewerPose.js.map +1 -1
- package/lib/primitives/XRRigidTransform.d.ts +6 -0
- package/lib/primitives/XRRigidTransform.d.ts.map +1 -1
- package/lib/primitives/XRRigidTransform.js +6 -0
- package/lib/primitives/XRRigidTransform.js.map +1 -1
- package/lib/session/XRRenderState.d.ts +6 -0
- package/lib/session/XRRenderState.d.ts.map +1 -1
- package/lib/session/XRRenderState.js +6 -0
- package/lib/session/XRRenderState.js.map +1 -1
- package/lib/session/XRSession.d.ts +6 -0
- package/lib/session/XRSession.d.ts.map +1 -1
- package/lib/session/XRSession.js +22 -1
- package/lib/session/XRSession.js.map +1 -1
- package/lib/spaces/XRJointSpace.d.ts +6 -0
- package/lib/spaces/XRJointSpace.d.ts.map +1 -1
- package/lib/spaces/XRJointSpace.js +6 -0
- package/lib/spaces/XRJointSpace.js.map +1 -1
- package/lib/spaces/XRReferenceSpace.d.ts +6 -0
- package/lib/spaces/XRReferenceSpace.d.ts.map +1 -1
- package/lib/spaces/XRReferenceSpace.js +6 -0
- package/lib/spaces/XRReferenceSpace.js.map +1 -1
- package/lib/spaces/XRSpace.d.ts +6 -0
- package/lib/spaces/XRSpace.d.ts.map +1 -1
- package/lib/spaces/XRSpace.js +6 -0
- package/lib/spaces/XRSpace.js.map +1 -1
- package/lib/utils/DOMPointReadOnly.d.ts +6 -0
- package/lib/utils/DOMPointReadOnly.d.ts.map +1 -1
- package/lib/utils/DOMPointReadOnly.js +6 -0
- package/lib/utils/DOMPointReadOnly.js.map +1 -1
- package/lib/utils/Math.d.ts +6 -0
- package/lib/utils/Math.d.ts.map +1 -1
- package/lib/utils/Math.js +6 -0
- package/lib/utils/Math.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/views/XRView.d.ts +6 -0
- package/lib/views/XRView.d.ts.map +1 -1
- package/lib/views/XRView.js +6 -0
- package/lib/views/XRView.js.map +1 -1
- package/lib/views/XRViewport.d.ts +6 -0
- package/lib/views/XRViewport.d.ts.map +1 -1
- package/lib/views/XRViewport.js +6 -0
- package/lib/views/XRViewport.js.map +1 -1
- package/package.json +1 -2
package/build/iwer.module.js
CHANGED
|
@@ -1275,6 +1275,12 @@ var normalize = normalize$1;
|
|
|
1275
1275
|
};
|
|
1276
1276
|
})();
|
|
1277
1277
|
|
|
1278
|
+
/**
|
|
1279
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1280
|
+
*
|
|
1281
|
+
* This source code is licensed under the MIT license found in the
|
|
1282
|
+
* LICENSE file in the root directory of this source tree.
|
|
1283
|
+
*/
|
|
1278
1284
|
const PRIVATE$k = Symbol('@immersive-web-emulation-runtime/xr-space');
|
|
1279
1285
|
class XRSpace extends EventTarget {
|
|
1280
1286
|
constructor(parentSpace, offsetMatrix) {
|
|
@@ -1319,6 +1325,12 @@ class XRSpaceUtils {
|
|
|
1319
1325
|
}
|
|
1320
1326
|
}
|
|
1321
1327
|
|
|
1328
|
+
/**
|
|
1329
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1330
|
+
*
|
|
1331
|
+
* This source code is licensed under the MIT license found in the
|
|
1332
|
+
* LICENSE file in the root directory of this source tree.
|
|
1333
|
+
*/
|
|
1322
1334
|
/**
|
|
1323
1335
|
* Wrapper class for gl-matrix vec3
|
|
1324
1336
|
* Minimal interoperable interface to Vector3 in Three.js and Babylon.js
|
|
@@ -1446,6 +1458,12 @@ class Quaternion {
|
|
|
1446
1458
|
}
|
|
1447
1459
|
}
|
|
1448
1460
|
|
|
1461
|
+
/**
|
|
1462
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1463
|
+
*
|
|
1464
|
+
* This source code is licensed under the MIT license found in the
|
|
1465
|
+
* LICENSE file in the root directory of this source tree.
|
|
1466
|
+
*/
|
|
1449
1467
|
const PRIVATE$j = Symbol('@immersive-web-emulation-runtime/gamepad');
|
|
1450
1468
|
var GamepadMappingType;
|
|
1451
1469
|
(function (GamepadMappingType) {
|
|
@@ -1572,6 +1590,12 @@ class Gamepad {
|
|
|
1572
1590
|
}
|
|
1573
1591
|
}
|
|
1574
1592
|
|
|
1593
|
+
/**
|
|
1594
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1595
|
+
*
|
|
1596
|
+
* This source code is licensed under the MIT license found in the
|
|
1597
|
+
* LICENSE file in the root directory of this source tree.
|
|
1598
|
+
*/
|
|
1575
1599
|
var XRHandedness;
|
|
1576
1600
|
(function (XRHandedness) {
|
|
1577
1601
|
XRHandedness["None"] = "none";
|
|
@@ -1623,6 +1647,12 @@ class XRInputSource {
|
|
|
1623
1647
|
}
|
|
1624
1648
|
}
|
|
1625
1649
|
|
|
1650
|
+
/**
|
|
1651
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1652
|
+
*
|
|
1653
|
+
* This source code is licensed under the MIT license found in the
|
|
1654
|
+
* LICENSE file in the root directory of this source tree.
|
|
1655
|
+
*/
|
|
1626
1656
|
class XRInputSourceEvent extends Event {
|
|
1627
1657
|
constructor(type, eventInitDict) {
|
|
1628
1658
|
super(type, eventInitDict);
|
|
@@ -1637,6 +1667,12 @@ class XRInputSourceEvent extends Event {
|
|
|
1637
1667
|
}
|
|
1638
1668
|
}
|
|
1639
1669
|
|
|
1670
|
+
/**
|
|
1671
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1672
|
+
*
|
|
1673
|
+
* This source code is licensed under the MIT license found in the
|
|
1674
|
+
* LICENSE file in the root directory of this source tree.
|
|
1675
|
+
*/
|
|
1640
1676
|
const PRIVATE$h = Symbol('@immersive-web-emulation-runtime/xr-tracked-input');
|
|
1641
1677
|
const DEFAULT_TRANSFORM = {
|
|
1642
1678
|
[XRHandedness.Left]: {
|
|
@@ -1720,6 +1756,12 @@ class XRTrackedInput {
|
|
|
1720
1756
|
}
|
|
1721
1757
|
}
|
|
1722
1758
|
|
|
1759
|
+
/**
|
|
1760
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1761
|
+
*
|
|
1762
|
+
* This source code is licensed under the MIT license found in the
|
|
1763
|
+
* LICENSE file in the root directory of this source tree.
|
|
1764
|
+
*/
|
|
1723
1765
|
class XRController extends XRTrackedInput {
|
|
1724
1766
|
constructor(controllerConfig, handedness, globalSpace) {
|
|
1725
1767
|
if (!controllerConfig.layout[handedness]) {
|
|
@@ -1798,6 +1840,12 @@ class XRController extends XRTrackedInput {
|
|
|
1798
1840
|
}
|
|
1799
1841
|
}
|
|
1800
1842
|
|
|
1843
|
+
/**
|
|
1844
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1845
|
+
*
|
|
1846
|
+
* This source code is licensed under the MIT license found in the
|
|
1847
|
+
* LICENSE file in the root directory of this source tree.
|
|
1848
|
+
*/
|
|
1801
1849
|
const PRIVATE$g = Symbol('@immersive-web-emulation-runtime/xr-view');
|
|
1802
1850
|
var XREye;
|
|
1803
1851
|
(function (XREye) {
|
|
@@ -1837,6 +1885,12 @@ class XRView {
|
|
|
1837
1885
|
}
|
|
1838
1886
|
}
|
|
1839
1887
|
|
|
1888
|
+
/**
|
|
1889
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1890
|
+
*
|
|
1891
|
+
* This source code is licensed under the MIT license found in the
|
|
1892
|
+
* LICENSE file in the root directory of this source tree.
|
|
1893
|
+
*/
|
|
1840
1894
|
var XRHandJoint;
|
|
1841
1895
|
(function (XRHandJoint) {
|
|
1842
1896
|
XRHandJoint["Wrist"] = "wrist";
|
|
@@ -1868,6 +1922,12 @@ var XRHandJoint;
|
|
|
1868
1922
|
class XRHand extends Map {
|
|
1869
1923
|
}
|
|
1870
1924
|
|
|
1925
|
+
/**
|
|
1926
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1927
|
+
*
|
|
1928
|
+
* This source code is licensed under the MIT license found in the
|
|
1929
|
+
* LICENSE file in the root directory of this source tree.
|
|
1930
|
+
*/
|
|
1871
1931
|
const PRIVATE$f = Symbol('@immersive-web-emulation-runtime/xr-joint-space');
|
|
1872
1932
|
class XRJointSpace extends XRSpace {
|
|
1873
1933
|
constructor(jointName, parentSpace, offsetMatrix) {
|
|
@@ -1879,6 +1939,12 @@ class XRJointSpace extends XRSpace {
|
|
|
1879
1939
|
}
|
|
1880
1940
|
}
|
|
1881
1941
|
|
|
1942
|
+
/**
|
|
1943
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1944
|
+
*
|
|
1945
|
+
* This source code is licensed under the MIT license found in the
|
|
1946
|
+
* LICENSE file in the root directory of this source tree.
|
|
1947
|
+
*/
|
|
1882
1948
|
const pinchHandPose = {
|
|
1883
1949
|
jointTransforms: {
|
|
1884
1950
|
wrist: {
|
|
@@ -2116,6 +2182,12 @@ const pinchHandPose = {
|
|
|
2116
2182
|
],
|
|
2117
2183
|
};
|
|
2118
2184
|
|
|
2185
|
+
/**
|
|
2186
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2187
|
+
*
|
|
2188
|
+
* This source code is licensed under the MIT license found in the
|
|
2189
|
+
* LICENSE file in the root directory of this source tree.
|
|
2190
|
+
*/
|
|
2119
2191
|
const pointHandPose = {
|
|
2120
2192
|
jointTransforms: {
|
|
2121
2193
|
wrist: {
|
|
@@ -2352,6 +2424,12 @@ const pointHandPose = {
|
|
|
2352
2424
|
],
|
|
2353
2425
|
};
|
|
2354
2426
|
|
|
2427
|
+
/**
|
|
2428
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2429
|
+
*
|
|
2430
|
+
* This source code is licensed under the MIT license found in the
|
|
2431
|
+
* LICENSE file in the root directory of this source tree.
|
|
2432
|
+
*/
|
|
2355
2433
|
const relaxedHandPose = {
|
|
2356
2434
|
jointTransforms: {
|
|
2357
2435
|
wrist: {
|
|
@@ -2588,6 +2666,12 @@ const relaxedHandPose = {
|
|
|
2588
2666
|
],
|
|
2589
2667
|
};
|
|
2590
2668
|
|
|
2669
|
+
/**
|
|
2670
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2671
|
+
*
|
|
2672
|
+
* This source code is licensed under the MIT license found in the
|
|
2673
|
+
* LICENSE file in the root directory of this source tree.
|
|
2674
|
+
*/
|
|
2591
2675
|
const oculusHandConfig = {
|
|
2592
2676
|
profileId: 'oculus-hand',
|
|
2593
2677
|
fallbackProfileIds: [
|
|
@@ -2711,6 +2795,12 @@ class XRHandInput extends XRTrackedInput {
|
|
|
2711
2795
|
}
|
|
2712
2796
|
}
|
|
2713
2797
|
|
|
2798
|
+
/**
|
|
2799
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2800
|
+
*
|
|
2801
|
+
* This source code is licensed under the MIT license found in the
|
|
2802
|
+
* LICENSE file in the root directory of this source tree.
|
|
2803
|
+
*/
|
|
2714
2804
|
const PRIVATE$d = Symbol('@immersive-web-emulation-runtime/xr-pose');
|
|
2715
2805
|
class XRPose {
|
|
2716
2806
|
constructor(transform, emulatedPosition = false, linearVelocity = undefined, angularVelocity = undefined) {
|
|
@@ -2735,6 +2825,12 @@ class XRPose {
|
|
|
2735
2825
|
}
|
|
2736
2826
|
}
|
|
2737
2827
|
|
|
2828
|
+
/**
|
|
2829
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2830
|
+
*
|
|
2831
|
+
* This source code is licensed under the MIT license found in the
|
|
2832
|
+
* LICENSE file in the root directory of this source tree.
|
|
2833
|
+
*/
|
|
2738
2834
|
const PRIVATE$c = Symbol('@immersive-web-emulation-runtime/xr-joint-pose');
|
|
2739
2835
|
class XRJointPose extends XRPose {
|
|
2740
2836
|
constructor(transform, radius, emulatedPosition = false, linearVelocity = undefined, angularVelocity = undefined) {
|
|
@@ -2746,6 +2842,12 @@ class XRJointPose extends XRPose {
|
|
|
2746
2842
|
}
|
|
2747
2843
|
}
|
|
2748
2844
|
|
|
2845
|
+
/**
|
|
2846
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2847
|
+
*
|
|
2848
|
+
* This source code is licensed under the MIT license found in the
|
|
2849
|
+
* LICENSE file in the root directory of this source tree.
|
|
2850
|
+
*/
|
|
2749
2851
|
class PolyfillDOMPointReadOnly {
|
|
2750
2852
|
constructor(x = 0, y = 0, z = 0, w = 1) {
|
|
2751
2853
|
this.x = x;
|
|
@@ -2772,6 +2874,12 @@ const DOMPointReadOnly = typeof globalThis.DOMPointReadOnly !== 'undefined'
|
|
|
2772
2874
|
? globalThis.DOMPointReadOnly
|
|
2773
2875
|
: PolyfillDOMPointReadOnly;
|
|
2774
2876
|
|
|
2877
|
+
/**
|
|
2878
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2879
|
+
*
|
|
2880
|
+
* This source code is licensed under the MIT license found in the
|
|
2881
|
+
* LICENSE file in the root directory of this source tree.
|
|
2882
|
+
*/
|
|
2775
2883
|
const PRIVATE$b = Symbol('@immersive-web-emulation-runtime/xr-rigid-transform');
|
|
2776
2884
|
class XRRigidTransform {
|
|
2777
2885
|
constructor(position, orientation) {
|
|
@@ -2824,6 +2932,12 @@ class XRRigidTransform {
|
|
|
2824
2932
|
}
|
|
2825
2933
|
}
|
|
2826
2934
|
|
|
2935
|
+
/**
|
|
2936
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2937
|
+
*
|
|
2938
|
+
* This source code is licensed under the MIT license found in the
|
|
2939
|
+
* LICENSE file in the root directory of this source tree.
|
|
2940
|
+
*/
|
|
2827
2941
|
const PRIVATE$a = Symbol('@immersive-web-emulation-runtime/xr-viewer-pose');
|
|
2828
2942
|
class XRViewerPose extends XRPose {
|
|
2829
2943
|
constructor(transform, views, emulatedPosition = false, linearVelocity = undefined, angularVelocity = undefined) {
|
|
@@ -2837,6 +2951,12 @@ class XRViewerPose extends XRPose {
|
|
|
2837
2951
|
}
|
|
2838
2952
|
}
|
|
2839
2953
|
|
|
2954
|
+
/**
|
|
2955
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2956
|
+
*
|
|
2957
|
+
* This source code is licensed under the MIT license found in the
|
|
2958
|
+
* LICENSE file in the root directory of this source tree.
|
|
2959
|
+
*/
|
|
2840
2960
|
const PRIVATE$9 = Symbol('@immersive-web-emulation-runtime/xr-frame');
|
|
2841
2961
|
const spaceGlobalMatrix = create$3();
|
|
2842
2962
|
const baseSpaceGlobalMatrix = create$3();
|
|
@@ -2945,6 +3065,12 @@ class XRFrame {
|
|
|
2945
3065
|
}
|
|
2946
3066
|
}
|
|
2947
3067
|
|
|
3068
|
+
/**
|
|
3069
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3070
|
+
*
|
|
3071
|
+
* This source code is licensed under the MIT license found in the
|
|
3072
|
+
* LICENSE file in the root directory of this source tree.
|
|
3073
|
+
*/
|
|
2948
3074
|
class XRInputSourcesChangeEvent extends Event {
|
|
2949
3075
|
constructor(type, eventInitDict) {
|
|
2950
3076
|
super(type, eventInitDict);
|
|
@@ -2963,6 +3089,12 @@ class XRInputSourcesChangeEvent extends Event {
|
|
|
2963
3089
|
}
|
|
2964
3090
|
}
|
|
2965
3091
|
|
|
3092
|
+
/**
|
|
3093
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3094
|
+
*
|
|
3095
|
+
* This source code is licensed under the MIT license found in the
|
|
3096
|
+
* LICENSE file in the root directory of this source tree.
|
|
3097
|
+
*/
|
|
2966
3098
|
var _a;
|
|
2967
3099
|
const PRIVATE$8 = Symbol('@immersive-web-emulation-runtime/xr-reference-space');
|
|
2968
3100
|
var XRReferenceSpaceType;
|
|
@@ -3004,6 +3136,12 @@ class XRReferenceSpace extends XRSpace {
|
|
|
3004
3136
|
}
|
|
3005
3137
|
_a = PRIVATE$8;
|
|
3006
3138
|
|
|
3139
|
+
/**
|
|
3140
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3141
|
+
*
|
|
3142
|
+
* This source code is licensed under the MIT license found in the
|
|
3143
|
+
* LICENSE file in the root directory of this source tree.
|
|
3144
|
+
*/
|
|
3007
3145
|
const PRIVATE$7 = Symbol('@immersive-web-emulation-runtime/xr-render-state');
|
|
3008
3146
|
class XRRenderState {
|
|
3009
3147
|
constructor(init = {}, oldState) {
|
|
@@ -3030,6 +3168,12 @@ class XRRenderState {
|
|
|
3030
3168
|
}
|
|
3031
3169
|
}
|
|
3032
3170
|
|
|
3171
|
+
/**
|
|
3172
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3173
|
+
*
|
|
3174
|
+
* This source code is licensed under the MIT license found in the
|
|
3175
|
+
* LICENSE file in the root directory of this source tree.
|
|
3176
|
+
*/
|
|
3033
3177
|
class XRSessionEvent extends Event {
|
|
3034
3178
|
constructor(type, eventInitDict) {
|
|
3035
3179
|
super(type, eventInitDict);
|
|
@@ -3040,6 +3184,12 @@ class XRSessionEvent extends Event {
|
|
|
3040
3184
|
}
|
|
3041
3185
|
}
|
|
3042
3186
|
|
|
3187
|
+
/**
|
|
3188
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3189
|
+
*
|
|
3190
|
+
* This source code is licensed under the MIT license found in the
|
|
3191
|
+
* LICENSE file in the root directory of this source tree.
|
|
3192
|
+
*/
|
|
3043
3193
|
var XRVisibilityState;
|
|
3044
3194
|
(function (XRVisibilityState) {
|
|
3045
3195
|
XRVisibilityState["Visible"] = "visible";
|
|
@@ -3249,6 +3399,7 @@ class XRSession extends EventTarget {
|
|
|
3249
3399
|
return this[PRIVATE$6].isSystemKeyboardSupported;
|
|
3250
3400
|
}
|
|
3251
3401
|
updateRenderState(state = {}) {
|
|
3402
|
+
var _a, _b, _c, _d;
|
|
3252
3403
|
if (this[PRIVATE$6].ended) {
|
|
3253
3404
|
throw new DOMException('XRSession has already ended.', 'InvalidStateError');
|
|
3254
3405
|
}
|
|
@@ -3260,7 +3411,21 @@ class XRSession extends EventTarget {
|
|
|
3260
3411
|
this[PRIVATE$6].mode !== XRSessionMode.Inline) {
|
|
3261
3412
|
throw new DOMException('InlineVerticalFieldOfView must not be set for an immersive session', 'InvalidStateError');
|
|
3262
3413
|
}
|
|
3263
|
-
|
|
3414
|
+
const compoundStateInit = {
|
|
3415
|
+
baseLayer: state.baseLayer ||
|
|
3416
|
+
((_a = this[PRIVATE$6].pendingRenderState) === null || _a === void 0 ? void 0 : _a.baseLayer) ||
|
|
3417
|
+
undefined,
|
|
3418
|
+
depthFar: state.depthFar ||
|
|
3419
|
+
((_b = this[PRIVATE$6].pendingRenderState) === null || _b === void 0 ? void 0 : _b.depthFar) ||
|
|
3420
|
+
undefined,
|
|
3421
|
+
depthNear: state.depthNear ||
|
|
3422
|
+
((_c = this[PRIVATE$6].pendingRenderState) === null || _c === void 0 ? void 0 : _c.depthNear) ||
|
|
3423
|
+
undefined,
|
|
3424
|
+
inlineVerticalFieldOfView: state.inlineVerticalFieldOfView ||
|
|
3425
|
+
((_d = this[PRIVATE$6].pendingRenderState) === null || _d === void 0 ? void 0 : _d.inlineVerticalFieldOfView) ||
|
|
3426
|
+
undefined,
|
|
3427
|
+
};
|
|
3428
|
+
this[PRIVATE$6].pendingRenderState = new XRRenderState(compoundStateInit, this[PRIVATE$6].renderState);
|
|
3264
3429
|
}
|
|
3265
3430
|
// the nominal frame rate updates are emulated, no actual update to the
|
|
3266
3431
|
// display frame rate of the device will be executed
|
|
@@ -3489,6 +3654,12 @@ class XRSession extends EventTarget {
|
|
|
3489
3654
|
}
|
|
3490
3655
|
}
|
|
3491
3656
|
|
|
3657
|
+
/**
|
|
3658
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3659
|
+
*
|
|
3660
|
+
* This source code is licensed under the MIT license found in the
|
|
3661
|
+
* LICENSE file in the root directory of this source tree.
|
|
3662
|
+
*/
|
|
3492
3663
|
class XRLayer extends EventTarget {
|
|
3493
3664
|
}
|
|
3494
3665
|
const PRIVATE$5 = Symbol('@immersive-web-emulation-runtime/XRWebGLLayer');
|
|
@@ -3553,6 +3724,12 @@ class XRWebGLLayer extends XRLayer {
|
|
|
3553
3724
|
}
|
|
3554
3725
|
}
|
|
3555
3726
|
|
|
3727
|
+
/**
|
|
3728
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3729
|
+
*
|
|
3730
|
+
* This source code is licensed under the MIT license found in the
|
|
3731
|
+
* LICENSE file in the root directory of this source tree.
|
|
3732
|
+
*/
|
|
3556
3733
|
const PRIVATE$4 = Symbol('@immersive-web-emulation-runtime/action-player');
|
|
3557
3734
|
class ActionPlayer {
|
|
3558
3735
|
constructor(refSpace, recording, ipd) {
|
|
@@ -3743,8 +3920,14 @@ class ActionPlayer {
|
|
|
3743
3920
|
}
|
|
3744
3921
|
}
|
|
3745
3922
|
|
|
3746
|
-
const VERSION = "
|
|
3923
|
+
const VERSION = "1.0.1";
|
|
3747
3924
|
|
|
3925
|
+
/**
|
|
3926
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3927
|
+
*
|
|
3928
|
+
* This source code is licensed under the MIT license found in the
|
|
3929
|
+
* LICENSE file in the root directory of this source tree.
|
|
3930
|
+
*/
|
|
3748
3931
|
class XRReferenceSpaceEvent extends Event {
|
|
3749
3932
|
constructor(type, eventInitDict) {
|
|
3750
3933
|
super(type, eventInitDict);
|
|
@@ -3756,6 +3939,12 @@ class XRReferenceSpaceEvent extends Event {
|
|
|
3756
3939
|
}
|
|
3757
3940
|
}
|
|
3758
3941
|
|
|
3942
|
+
/**
|
|
3943
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3944
|
+
*
|
|
3945
|
+
* This source code is licensed under the MIT license found in the
|
|
3946
|
+
* LICENSE file in the root directory of this source tree.
|
|
3947
|
+
*/
|
|
3759
3948
|
const PRIVATE$3 = Symbol('@immersive-web-emulation-runtime/xr-system');
|
|
3760
3949
|
class XRSystem extends EventTarget {
|
|
3761
3950
|
constructor(device) {
|
|
@@ -3819,6 +4008,12 @@ class XRSystem extends EventTarget {
|
|
|
3819
4008
|
}
|
|
3820
4009
|
}
|
|
3821
4010
|
|
|
4011
|
+
/**
|
|
4012
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4013
|
+
*
|
|
4014
|
+
* This source code is licensed under the MIT license found in the
|
|
4015
|
+
* LICENSE file in the root directory of this source tree.
|
|
4016
|
+
*/
|
|
3822
4017
|
const PRIVATE$2 = Symbol('@immersive-web-emulation-runtime/xr-viewport');
|
|
3823
4018
|
class XRViewport {
|
|
3824
4019
|
constructor(x, y, width, height) {
|
|
@@ -3838,6 +4033,12 @@ class XRViewport {
|
|
|
3838
4033
|
}
|
|
3839
4034
|
}
|
|
3840
4035
|
|
|
4036
|
+
/**
|
|
4037
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4038
|
+
*
|
|
4039
|
+
* This source code is licensed under the MIT license found in the
|
|
4040
|
+
* LICENSE file in the root directory of this source tree.
|
|
4041
|
+
*/
|
|
3841
4042
|
var WebXRFeatures;
|
|
3842
4043
|
(function (WebXRFeatures) {
|
|
3843
4044
|
WebXRFeatures["Viewer"] = "viewer";
|
|
@@ -3907,6 +4108,7 @@ class XRDevice {
|
|
|
3907
4108
|
supportedFrameRates: deviceConfig.supportedFrameRates,
|
|
3908
4109
|
isSystemKeyboardSupported: deviceConfig.isSystemKeyboardSupported,
|
|
3909
4110
|
internalNominalFrameRate: deviceConfig.internalNominalFrameRate,
|
|
4111
|
+
userAgent: deviceConfig.userAgent,
|
|
3910
4112
|
position: (_b = deviceOptions.headsetPosition) !== null && _b !== void 0 ? _b : DEFAULTS.headsetPosition.clone(),
|
|
3911
4113
|
quaternion: (_c = deviceOptions.headsetQuaternion) !== null && _c !== void 0 ? _c : DEFAULTS.headsetQuaternion.clone(),
|
|
3912
4114
|
stereoEnabled: (_d = deviceOptions.stereoEnabled) !== null && _d !== void 0 ? _d : DEFAULTS.stereoEnabled,
|
|
@@ -4027,6 +4229,12 @@ class XRDevice {
|
|
|
4027
4229
|
value: new XRSystem(this),
|
|
4028
4230
|
configurable: true,
|
|
4029
4231
|
});
|
|
4232
|
+
Object.defineProperty(navigator, 'userAgent', {
|
|
4233
|
+
value: this[PRIVATE$1].userAgent,
|
|
4234
|
+
writable: false,
|
|
4235
|
+
configurable: false,
|
|
4236
|
+
enumerable: true,
|
|
4237
|
+
});
|
|
4030
4238
|
globalObject['XRSystem'] = XRSystem;
|
|
4031
4239
|
globalObject['XRSession'] = XRSession;
|
|
4032
4240
|
globalObject['XRRenderState'] = XRRenderState;
|
|
@@ -4181,7 +4389,12 @@ class XRDevice {
|
|
|
4181
4389
|
}
|
|
4182
4390
|
}
|
|
4183
4391
|
|
|
4184
|
-
|
|
4392
|
+
/**
|
|
4393
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4394
|
+
*
|
|
4395
|
+
* This source code is licensed under the MIT license found in the
|
|
4396
|
+
* LICENSE file in the root directory of this source tree.
|
|
4397
|
+
*/
|
|
4185
4398
|
const gamepadConfigLeft = {
|
|
4186
4399
|
mapping: GamepadMappingType.XRStandard,
|
|
4187
4400
|
buttons: [
|
|
@@ -4331,6 +4544,12 @@ const metaQuestTouchPlus = {
|
|
|
4331
4544
|
},
|
|
4332
4545
|
};
|
|
4333
4546
|
|
|
4547
|
+
/**
|
|
4548
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4549
|
+
*
|
|
4550
|
+
* This source code is licensed under the MIT license found in the
|
|
4551
|
+
* LICENSE file in the root directory of this source tree.
|
|
4552
|
+
*/
|
|
4334
4553
|
const oculusQuest1 = {
|
|
4335
4554
|
name: 'Oculus Quest 1',
|
|
4336
4555
|
controllerConfig: oculusTouchV2,
|
|
@@ -4352,6 +4571,7 @@ const oculusQuest1 = {
|
|
|
4352
4571
|
supportedFrameRates: [72, 80, 90],
|
|
4353
4572
|
isSystemKeyboardSupported: true,
|
|
4354
4573
|
internalNominalFrameRate: 72,
|
|
4574
|
+
userAgent: 'Mozilla/5.0 (X11; Linux x86_64; Quest 1) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/33.0.0.x.x.x Chrome/126.0.6478.122 VR Safari/537.36',
|
|
4355
4575
|
};
|
|
4356
4576
|
const metaQuest2 = {
|
|
4357
4577
|
name: 'Meta Quest 2',
|
|
@@ -4376,6 +4596,7 @@ const metaQuest2 = {
|
|
|
4376
4596
|
supportedFrameRates: [72, 80, 90, 120],
|
|
4377
4597
|
isSystemKeyboardSupported: true,
|
|
4378
4598
|
internalNominalFrameRate: 72,
|
|
4599
|
+
userAgent: 'Mozilla/5.0 (X11; Linux x86_64; Quest 2) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/33.0.0.x.x.x Chrome/126.0.6478.122 VR Safari/537.36',
|
|
4379
4600
|
};
|
|
4380
4601
|
const metaQuestPro = {
|
|
4381
4602
|
name: 'Meta Quest Pro',
|
|
@@ -4400,6 +4621,7 @@ const metaQuestPro = {
|
|
|
4400
4621
|
supportedFrameRates: [72, 80, 90, 120],
|
|
4401
4622
|
isSystemKeyboardSupported: true,
|
|
4402
4623
|
internalNominalFrameRate: 90,
|
|
4624
|
+
userAgent: 'Mozilla/5.0 (X11; Linux x86_64; Quest Pro) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/33.0.0.x.x.x Chrome/126.0.6478.122 VR Safari/537.36',
|
|
4403
4625
|
};
|
|
4404
4626
|
const metaQuest3 = {
|
|
4405
4627
|
name: 'Meta Quest 3',
|
|
@@ -4425,8 +4647,15 @@ const metaQuest3 = {
|
|
|
4425
4647
|
supportedFrameRates: [72, 80, 90, 120],
|
|
4426
4648
|
isSystemKeyboardSupported: true,
|
|
4427
4649
|
internalNominalFrameRate: 90,
|
|
4650
|
+
userAgent: 'Mozilla/5.0 (X11; Linux x86_64; Quest 3) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/33.0.0.x.x.x Chrome/126.0.6478.122 VR Safari/537.36',
|
|
4428
4651
|
};
|
|
4429
4652
|
|
|
4653
|
+
/**
|
|
4654
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4655
|
+
*
|
|
4656
|
+
* This source code is licensed under the MIT license found in the
|
|
4657
|
+
* LICENSE file in the root directory of this source tree.
|
|
4658
|
+
*/
|
|
4430
4659
|
const PRIVATE = Symbol('@immersive-web-emulation-runtime/action-recorder');
|
|
4431
4660
|
const compress = (arr) => {
|
|
4432
4661
|
const out = [];
|