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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Immersive Web Emulation Runtime
|
|
2
|
+
|
|
3
|
+
The Immersive Web Emulation Runtime (IWER) is a TypeScript-based tool designed to enable the running of WebXR applications in modern browsers without requiring native WebXR support. By emulating the WebXR Device API, IWER provides developers with the ability to test and run WebXR projects across a wide range of devices, ensuring compatibility and enhancing the development process.
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
For detailed information about using IWER, including concepts, guides, and API references, please visit our documentation site:
|
|
8
|
+
|
|
9
|
+
- [IWER Documentation](https://meta-quest.github.io/immersive-web-emulation-runtime)
|
|
10
|
+
|
|
11
|
+
## License
|
|
12
|
+
|
|
13
|
+
IWER is licensed under the MIT License. For more details, see the [LICENSE](https://github.com/meta-quest/immersive-web-emulation-runtime/blob/main/LICENSE) file in this repository.
|
|
14
|
+
|
|
15
|
+
## Contributing
|
|
16
|
+
|
|
17
|
+
Your contributions are welcome! Please feel free to submit issues and pull requests. Before contributing, make sure to review our [Contributing Guidelines](https://github.com/meta-quest/immersive-web-emulation-runtime/blob/main/CONTRIBUTING.md) and [Code of Conduct](https://github.com/meta-quest/immersive-web-emulation-runtime/blob/main/CODE_OF_CONDUCT.md).
|
package/build/iwer.js
CHANGED
|
@@ -1281,6 +1281,12 @@
|
|
|
1281
1281
|
};
|
|
1282
1282
|
})();
|
|
1283
1283
|
|
|
1284
|
+
/**
|
|
1285
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1286
|
+
*
|
|
1287
|
+
* This source code is licensed under the MIT license found in the
|
|
1288
|
+
* LICENSE file in the root directory of this source tree.
|
|
1289
|
+
*/
|
|
1284
1290
|
const PRIVATE$k = Symbol('@immersive-web-emulation-runtime/xr-space');
|
|
1285
1291
|
class XRSpace extends EventTarget {
|
|
1286
1292
|
constructor(parentSpace, offsetMatrix) {
|
|
@@ -1325,6 +1331,12 @@
|
|
|
1325
1331
|
}
|
|
1326
1332
|
}
|
|
1327
1333
|
|
|
1334
|
+
/**
|
|
1335
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1336
|
+
*
|
|
1337
|
+
* This source code is licensed under the MIT license found in the
|
|
1338
|
+
* LICENSE file in the root directory of this source tree.
|
|
1339
|
+
*/
|
|
1328
1340
|
/**
|
|
1329
1341
|
* Wrapper class for gl-matrix vec3
|
|
1330
1342
|
* Minimal interoperable interface to Vector3 in Three.js and Babylon.js
|
|
@@ -1452,6 +1464,12 @@
|
|
|
1452
1464
|
}
|
|
1453
1465
|
}
|
|
1454
1466
|
|
|
1467
|
+
/**
|
|
1468
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1469
|
+
*
|
|
1470
|
+
* This source code is licensed under the MIT license found in the
|
|
1471
|
+
* LICENSE file in the root directory of this source tree.
|
|
1472
|
+
*/
|
|
1455
1473
|
const PRIVATE$j = Symbol('@immersive-web-emulation-runtime/gamepad');
|
|
1456
1474
|
var GamepadMappingType;
|
|
1457
1475
|
(function (GamepadMappingType) {
|
|
@@ -1578,6 +1596,12 @@
|
|
|
1578
1596
|
}
|
|
1579
1597
|
}
|
|
1580
1598
|
|
|
1599
|
+
/**
|
|
1600
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1601
|
+
*
|
|
1602
|
+
* This source code is licensed under the MIT license found in the
|
|
1603
|
+
* LICENSE file in the root directory of this source tree.
|
|
1604
|
+
*/
|
|
1581
1605
|
var XRHandedness;
|
|
1582
1606
|
(function (XRHandedness) {
|
|
1583
1607
|
XRHandedness["None"] = "none";
|
|
@@ -1629,6 +1653,12 @@
|
|
|
1629
1653
|
}
|
|
1630
1654
|
}
|
|
1631
1655
|
|
|
1656
|
+
/**
|
|
1657
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1658
|
+
*
|
|
1659
|
+
* This source code is licensed under the MIT license found in the
|
|
1660
|
+
* LICENSE file in the root directory of this source tree.
|
|
1661
|
+
*/
|
|
1632
1662
|
class XRInputSourceEvent extends Event {
|
|
1633
1663
|
constructor(type, eventInitDict) {
|
|
1634
1664
|
super(type, eventInitDict);
|
|
@@ -1643,6 +1673,12 @@
|
|
|
1643
1673
|
}
|
|
1644
1674
|
}
|
|
1645
1675
|
|
|
1676
|
+
/**
|
|
1677
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1678
|
+
*
|
|
1679
|
+
* This source code is licensed under the MIT license found in the
|
|
1680
|
+
* LICENSE file in the root directory of this source tree.
|
|
1681
|
+
*/
|
|
1646
1682
|
const PRIVATE$h = Symbol('@immersive-web-emulation-runtime/xr-tracked-input');
|
|
1647
1683
|
const DEFAULT_TRANSFORM = {
|
|
1648
1684
|
[XRHandedness.Left]: {
|
|
@@ -1726,6 +1762,12 @@
|
|
|
1726
1762
|
}
|
|
1727
1763
|
}
|
|
1728
1764
|
|
|
1765
|
+
/**
|
|
1766
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1767
|
+
*
|
|
1768
|
+
* This source code is licensed under the MIT license found in the
|
|
1769
|
+
* LICENSE file in the root directory of this source tree.
|
|
1770
|
+
*/
|
|
1729
1771
|
class XRController extends XRTrackedInput {
|
|
1730
1772
|
constructor(controllerConfig, handedness, globalSpace) {
|
|
1731
1773
|
if (!controllerConfig.layout[handedness]) {
|
|
@@ -1804,6 +1846,12 @@
|
|
|
1804
1846
|
}
|
|
1805
1847
|
}
|
|
1806
1848
|
|
|
1849
|
+
/**
|
|
1850
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1851
|
+
*
|
|
1852
|
+
* This source code is licensed under the MIT license found in the
|
|
1853
|
+
* LICENSE file in the root directory of this source tree.
|
|
1854
|
+
*/
|
|
1807
1855
|
const PRIVATE$g = Symbol('@immersive-web-emulation-runtime/xr-view');
|
|
1808
1856
|
var XREye;
|
|
1809
1857
|
(function (XREye) {
|
|
@@ -1843,6 +1891,12 @@
|
|
|
1843
1891
|
}
|
|
1844
1892
|
}
|
|
1845
1893
|
|
|
1894
|
+
/**
|
|
1895
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1896
|
+
*
|
|
1897
|
+
* This source code is licensed under the MIT license found in the
|
|
1898
|
+
* LICENSE file in the root directory of this source tree.
|
|
1899
|
+
*/
|
|
1846
1900
|
var XRHandJoint;
|
|
1847
1901
|
(function (XRHandJoint) {
|
|
1848
1902
|
XRHandJoint["Wrist"] = "wrist";
|
|
@@ -1874,6 +1928,12 @@
|
|
|
1874
1928
|
class XRHand extends Map {
|
|
1875
1929
|
}
|
|
1876
1930
|
|
|
1931
|
+
/**
|
|
1932
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1933
|
+
*
|
|
1934
|
+
* This source code is licensed under the MIT license found in the
|
|
1935
|
+
* LICENSE file in the root directory of this source tree.
|
|
1936
|
+
*/
|
|
1877
1937
|
const PRIVATE$f = Symbol('@immersive-web-emulation-runtime/xr-joint-space');
|
|
1878
1938
|
class XRJointSpace extends XRSpace {
|
|
1879
1939
|
constructor(jointName, parentSpace, offsetMatrix) {
|
|
@@ -1885,6 +1945,12 @@
|
|
|
1885
1945
|
}
|
|
1886
1946
|
}
|
|
1887
1947
|
|
|
1948
|
+
/**
|
|
1949
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1950
|
+
*
|
|
1951
|
+
* This source code is licensed under the MIT license found in the
|
|
1952
|
+
* LICENSE file in the root directory of this source tree.
|
|
1953
|
+
*/
|
|
1888
1954
|
const pinchHandPose = {
|
|
1889
1955
|
jointTransforms: {
|
|
1890
1956
|
wrist: {
|
|
@@ -2122,6 +2188,12 @@
|
|
|
2122
2188
|
],
|
|
2123
2189
|
};
|
|
2124
2190
|
|
|
2191
|
+
/**
|
|
2192
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2193
|
+
*
|
|
2194
|
+
* This source code is licensed under the MIT license found in the
|
|
2195
|
+
* LICENSE file in the root directory of this source tree.
|
|
2196
|
+
*/
|
|
2125
2197
|
const pointHandPose = {
|
|
2126
2198
|
jointTransforms: {
|
|
2127
2199
|
wrist: {
|
|
@@ -2358,6 +2430,12 @@
|
|
|
2358
2430
|
],
|
|
2359
2431
|
};
|
|
2360
2432
|
|
|
2433
|
+
/**
|
|
2434
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2435
|
+
*
|
|
2436
|
+
* This source code is licensed under the MIT license found in the
|
|
2437
|
+
* LICENSE file in the root directory of this source tree.
|
|
2438
|
+
*/
|
|
2361
2439
|
const relaxedHandPose = {
|
|
2362
2440
|
jointTransforms: {
|
|
2363
2441
|
wrist: {
|
|
@@ -2594,6 +2672,12 @@
|
|
|
2594
2672
|
],
|
|
2595
2673
|
};
|
|
2596
2674
|
|
|
2675
|
+
/**
|
|
2676
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2677
|
+
*
|
|
2678
|
+
* This source code is licensed under the MIT license found in the
|
|
2679
|
+
* LICENSE file in the root directory of this source tree.
|
|
2680
|
+
*/
|
|
2597
2681
|
const oculusHandConfig = {
|
|
2598
2682
|
profileId: 'oculus-hand',
|
|
2599
2683
|
fallbackProfileIds: [
|
|
@@ -2717,6 +2801,12 @@
|
|
|
2717
2801
|
}
|
|
2718
2802
|
}
|
|
2719
2803
|
|
|
2804
|
+
/**
|
|
2805
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2806
|
+
*
|
|
2807
|
+
* This source code is licensed under the MIT license found in the
|
|
2808
|
+
* LICENSE file in the root directory of this source tree.
|
|
2809
|
+
*/
|
|
2720
2810
|
const PRIVATE$d = Symbol('@immersive-web-emulation-runtime/xr-pose');
|
|
2721
2811
|
class XRPose {
|
|
2722
2812
|
constructor(transform, emulatedPosition = false, linearVelocity = undefined, angularVelocity = undefined) {
|
|
@@ -2741,6 +2831,12 @@
|
|
|
2741
2831
|
}
|
|
2742
2832
|
}
|
|
2743
2833
|
|
|
2834
|
+
/**
|
|
2835
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2836
|
+
*
|
|
2837
|
+
* This source code is licensed under the MIT license found in the
|
|
2838
|
+
* LICENSE file in the root directory of this source tree.
|
|
2839
|
+
*/
|
|
2744
2840
|
const PRIVATE$c = Symbol('@immersive-web-emulation-runtime/xr-joint-pose');
|
|
2745
2841
|
class XRJointPose extends XRPose {
|
|
2746
2842
|
constructor(transform, radius, emulatedPosition = false, linearVelocity = undefined, angularVelocity = undefined) {
|
|
@@ -2752,6 +2848,12 @@
|
|
|
2752
2848
|
}
|
|
2753
2849
|
}
|
|
2754
2850
|
|
|
2851
|
+
/**
|
|
2852
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2853
|
+
*
|
|
2854
|
+
* This source code is licensed under the MIT license found in the
|
|
2855
|
+
* LICENSE file in the root directory of this source tree.
|
|
2856
|
+
*/
|
|
2755
2857
|
class PolyfillDOMPointReadOnly {
|
|
2756
2858
|
constructor(x = 0, y = 0, z = 0, w = 1) {
|
|
2757
2859
|
this.x = x;
|
|
@@ -2778,6 +2880,12 @@
|
|
|
2778
2880
|
? globalThis.DOMPointReadOnly
|
|
2779
2881
|
: PolyfillDOMPointReadOnly;
|
|
2780
2882
|
|
|
2883
|
+
/**
|
|
2884
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2885
|
+
*
|
|
2886
|
+
* This source code is licensed under the MIT license found in the
|
|
2887
|
+
* LICENSE file in the root directory of this source tree.
|
|
2888
|
+
*/
|
|
2781
2889
|
const PRIVATE$b = Symbol('@immersive-web-emulation-runtime/xr-rigid-transform');
|
|
2782
2890
|
class XRRigidTransform {
|
|
2783
2891
|
constructor(position, orientation) {
|
|
@@ -2830,6 +2938,12 @@
|
|
|
2830
2938
|
}
|
|
2831
2939
|
}
|
|
2832
2940
|
|
|
2941
|
+
/**
|
|
2942
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2943
|
+
*
|
|
2944
|
+
* This source code is licensed under the MIT license found in the
|
|
2945
|
+
* LICENSE file in the root directory of this source tree.
|
|
2946
|
+
*/
|
|
2833
2947
|
const PRIVATE$a = Symbol('@immersive-web-emulation-runtime/xr-viewer-pose');
|
|
2834
2948
|
class XRViewerPose extends XRPose {
|
|
2835
2949
|
constructor(transform, views, emulatedPosition = false, linearVelocity = undefined, angularVelocity = undefined) {
|
|
@@ -2843,6 +2957,12 @@
|
|
|
2843
2957
|
}
|
|
2844
2958
|
}
|
|
2845
2959
|
|
|
2960
|
+
/**
|
|
2961
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2962
|
+
*
|
|
2963
|
+
* This source code is licensed under the MIT license found in the
|
|
2964
|
+
* LICENSE file in the root directory of this source tree.
|
|
2965
|
+
*/
|
|
2846
2966
|
const PRIVATE$9 = Symbol('@immersive-web-emulation-runtime/xr-frame');
|
|
2847
2967
|
const spaceGlobalMatrix = create$3();
|
|
2848
2968
|
const baseSpaceGlobalMatrix = create$3();
|
|
@@ -2951,6 +3071,12 @@
|
|
|
2951
3071
|
}
|
|
2952
3072
|
}
|
|
2953
3073
|
|
|
3074
|
+
/**
|
|
3075
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3076
|
+
*
|
|
3077
|
+
* This source code is licensed under the MIT license found in the
|
|
3078
|
+
* LICENSE file in the root directory of this source tree.
|
|
3079
|
+
*/
|
|
2954
3080
|
class XRInputSourcesChangeEvent extends Event {
|
|
2955
3081
|
constructor(type, eventInitDict) {
|
|
2956
3082
|
super(type, eventInitDict);
|
|
@@ -2969,6 +3095,12 @@
|
|
|
2969
3095
|
}
|
|
2970
3096
|
}
|
|
2971
3097
|
|
|
3098
|
+
/**
|
|
3099
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3100
|
+
*
|
|
3101
|
+
* This source code is licensed under the MIT license found in the
|
|
3102
|
+
* LICENSE file in the root directory of this source tree.
|
|
3103
|
+
*/
|
|
2972
3104
|
var _a;
|
|
2973
3105
|
const PRIVATE$8 = Symbol('@immersive-web-emulation-runtime/xr-reference-space');
|
|
2974
3106
|
var XRReferenceSpaceType;
|
|
@@ -3010,6 +3142,12 @@
|
|
|
3010
3142
|
}
|
|
3011
3143
|
_a = PRIVATE$8;
|
|
3012
3144
|
|
|
3145
|
+
/**
|
|
3146
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3147
|
+
*
|
|
3148
|
+
* This source code is licensed under the MIT license found in the
|
|
3149
|
+
* LICENSE file in the root directory of this source tree.
|
|
3150
|
+
*/
|
|
3013
3151
|
const PRIVATE$7 = Symbol('@immersive-web-emulation-runtime/xr-render-state');
|
|
3014
3152
|
class XRRenderState {
|
|
3015
3153
|
constructor(init = {}, oldState) {
|
|
@@ -3036,6 +3174,12 @@
|
|
|
3036
3174
|
}
|
|
3037
3175
|
}
|
|
3038
3176
|
|
|
3177
|
+
/**
|
|
3178
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3179
|
+
*
|
|
3180
|
+
* This source code is licensed under the MIT license found in the
|
|
3181
|
+
* LICENSE file in the root directory of this source tree.
|
|
3182
|
+
*/
|
|
3039
3183
|
class XRSessionEvent extends Event {
|
|
3040
3184
|
constructor(type, eventInitDict) {
|
|
3041
3185
|
super(type, eventInitDict);
|
|
@@ -3046,6 +3190,12 @@
|
|
|
3046
3190
|
}
|
|
3047
3191
|
}
|
|
3048
3192
|
|
|
3193
|
+
/**
|
|
3194
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3195
|
+
*
|
|
3196
|
+
* This source code is licensed under the MIT license found in the
|
|
3197
|
+
* LICENSE file in the root directory of this source tree.
|
|
3198
|
+
*/
|
|
3049
3199
|
var XRVisibilityState;
|
|
3050
3200
|
(function (XRVisibilityState) {
|
|
3051
3201
|
XRVisibilityState["Visible"] = "visible";
|
|
@@ -3255,6 +3405,7 @@
|
|
|
3255
3405
|
return this[PRIVATE$6].isSystemKeyboardSupported;
|
|
3256
3406
|
}
|
|
3257
3407
|
updateRenderState(state = {}) {
|
|
3408
|
+
var _a, _b, _c, _d;
|
|
3258
3409
|
if (this[PRIVATE$6].ended) {
|
|
3259
3410
|
throw new DOMException('XRSession has already ended.', 'InvalidStateError');
|
|
3260
3411
|
}
|
|
@@ -3266,7 +3417,21 @@
|
|
|
3266
3417
|
this[PRIVATE$6].mode !== XRSessionMode.Inline) {
|
|
3267
3418
|
throw new DOMException('InlineVerticalFieldOfView must not be set for an immersive session', 'InvalidStateError');
|
|
3268
3419
|
}
|
|
3269
|
-
|
|
3420
|
+
const compoundStateInit = {
|
|
3421
|
+
baseLayer: state.baseLayer ||
|
|
3422
|
+
((_a = this[PRIVATE$6].pendingRenderState) === null || _a === void 0 ? void 0 : _a.baseLayer) ||
|
|
3423
|
+
undefined,
|
|
3424
|
+
depthFar: state.depthFar ||
|
|
3425
|
+
((_b = this[PRIVATE$6].pendingRenderState) === null || _b === void 0 ? void 0 : _b.depthFar) ||
|
|
3426
|
+
undefined,
|
|
3427
|
+
depthNear: state.depthNear ||
|
|
3428
|
+
((_c = this[PRIVATE$6].pendingRenderState) === null || _c === void 0 ? void 0 : _c.depthNear) ||
|
|
3429
|
+
undefined,
|
|
3430
|
+
inlineVerticalFieldOfView: state.inlineVerticalFieldOfView ||
|
|
3431
|
+
((_d = this[PRIVATE$6].pendingRenderState) === null || _d === void 0 ? void 0 : _d.inlineVerticalFieldOfView) ||
|
|
3432
|
+
undefined,
|
|
3433
|
+
};
|
|
3434
|
+
this[PRIVATE$6].pendingRenderState = new XRRenderState(compoundStateInit, this[PRIVATE$6].renderState);
|
|
3270
3435
|
}
|
|
3271
3436
|
// the nominal frame rate updates are emulated, no actual update to the
|
|
3272
3437
|
// display frame rate of the device will be executed
|
|
@@ -3495,6 +3660,12 @@
|
|
|
3495
3660
|
}
|
|
3496
3661
|
}
|
|
3497
3662
|
|
|
3663
|
+
/**
|
|
3664
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3665
|
+
*
|
|
3666
|
+
* This source code is licensed under the MIT license found in the
|
|
3667
|
+
* LICENSE file in the root directory of this source tree.
|
|
3668
|
+
*/
|
|
3498
3669
|
class XRLayer extends EventTarget {
|
|
3499
3670
|
}
|
|
3500
3671
|
const PRIVATE$5 = Symbol('@immersive-web-emulation-runtime/XRWebGLLayer');
|
|
@@ -3559,6 +3730,12 @@
|
|
|
3559
3730
|
}
|
|
3560
3731
|
}
|
|
3561
3732
|
|
|
3733
|
+
/**
|
|
3734
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3735
|
+
*
|
|
3736
|
+
* This source code is licensed under the MIT license found in the
|
|
3737
|
+
* LICENSE file in the root directory of this source tree.
|
|
3738
|
+
*/
|
|
3562
3739
|
const PRIVATE$4 = Symbol('@immersive-web-emulation-runtime/action-player');
|
|
3563
3740
|
class ActionPlayer {
|
|
3564
3741
|
constructor(refSpace, recording, ipd) {
|
|
@@ -3749,8 +3926,14 @@
|
|
|
3749
3926
|
}
|
|
3750
3927
|
}
|
|
3751
3928
|
|
|
3752
|
-
const VERSION = "
|
|
3929
|
+
const VERSION = "1.0.1";
|
|
3753
3930
|
|
|
3931
|
+
/**
|
|
3932
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3933
|
+
*
|
|
3934
|
+
* This source code is licensed under the MIT license found in the
|
|
3935
|
+
* LICENSE file in the root directory of this source tree.
|
|
3936
|
+
*/
|
|
3754
3937
|
class XRReferenceSpaceEvent extends Event {
|
|
3755
3938
|
constructor(type, eventInitDict) {
|
|
3756
3939
|
super(type, eventInitDict);
|
|
@@ -3762,6 +3945,12 @@
|
|
|
3762
3945
|
}
|
|
3763
3946
|
}
|
|
3764
3947
|
|
|
3948
|
+
/**
|
|
3949
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3950
|
+
*
|
|
3951
|
+
* This source code is licensed under the MIT license found in the
|
|
3952
|
+
* LICENSE file in the root directory of this source tree.
|
|
3953
|
+
*/
|
|
3765
3954
|
const PRIVATE$3 = Symbol('@immersive-web-emulation-runtime/xr-system');
|
|
3766
3955
|
class XRSystem extends EventTarget {
|
|
3767
3956
|
constructor(device) {
|
|
@@ -3825,6 +4014,12 @@
|
|
|
3825
4014
|
}
|
|
3826
4015
|
}
|
|
3827
4016
|
|
|
4017
|
+
/**
|
|
4018
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4019
|
+
*
|
|
4020
|
+
* This source code is licensed under the MIT license found in the
|
|
4021
|
+
* LICENSE file in the root directory of this source tree.
|
|
4022
|
+
*/
|
|
3828
4023
|
const PRIVATE$2 = Symbol('@immersive-web-emulation-runtime/xr-viewport');
|
|
3829
4024
|
class XRViewport {
|
|
3830
4025
|
constructor(x, y, width, height) {
|
|
@@ -3844,6 +4039,12 @@
|
|
|
3844
4039
|
}
|
|
3845
4040
|
}
|
|
3846
4041
|
|
|
4042
|
+
/**
|
|
4043
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4044
|
+
*
|
|
4045
|
+
* This source code is licensed under the MIT license found in the
|
|
4046
|
+
* LICENSE file in the root directory of this source tree.
|
|
4047
|
+
*/
|
|
3847
4048
|
var WebXRFeatures;
|
|
3848
4049
|
(function (WebXRFeatures) {
|
|
3849
4050
|
WebXRFeatures["Viewer"] = "viewer";
|
|
@@ -3913,6 +4114,7 @@
|
|
|
3913
4114
|
supportedFrameRates: deviceConfig.supportedFrameRates,
|
|
3914
4115
|
isSystemKeyboardSupported: deviceConfig.isSystemKeyboardSupported,
|
|
3915
4116
|
internalNominalFrameRate: deviceConfig.internalNominalFrameRate,
|
|
4117
|
+
userAgent: deviceConfig.userAgent,
|
|
3916
4118
|
position: (_b = deviceOptions.headsetPosition) !== null && _b !== void 0 ? _b : DEFAULTS.headsetPosition.clone(),
|
|
3917
4119
|
quaternion: (_c = deviceOptions.headsetQuaternion) !== null && _c !== void 0 ? _c : DEFAULTS.headsetQuaternion.clone(),
|
|
3918
4120
|
stereoEnabled: (_d = deviceOptions.stereoEnabled) !== null && _d !== void 0 ? _d : DEFAULTS.stereoEnabled,
|
|
@@ -4033,6 +4235,12 @@
|
|
|
4033
4235
|
value: new XRSystem(this),
|
|
4034
4236
|
configurable: true,
|
|
4035
4237
|
});
|
|
4238
|
+
Object.defineProperty(navigator, 'userAgent', {
|
|
4239
|
+
value: this[PRIVATE$1].userAgent,
|
|
4240
|
+
writable: false,
|
|
4241
|
+
configurable: false,
|
|
4242
|
+
enumerable: true,
|
|
4243
|
+
});
|
|
4036
4244
|
globalObject['XRSystem'] = XRSystem;
|
|
4037
4245
|
globalObject['XRSession'] = XRSession;
|
|
4038
4246
|
globalObject['XRRenderState'] = XRRenderState;
|
|
@@ -4187,7 +4395,12 @@
|
|
|
4187
4395
|
}
|
|
4188
4396
|
}
|
|
4189
4397
|
|
|
4190
|
-
|
|
4398
|
+
/**
|
|
4399
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4400
|
+
*
|
|
4401
|
+
* This source code is licensed under the MIT license found in the
|
|
4402
|
+
* LICENSE file in the root directory of this source tree.
|
|
4403
|
+
*/
|
|
4191
4404
|
const gamepadConfigLeft = {
|
|
4192
4405
|
mapping: GamepadMappingType.XRStandard,
|
|
4193
4406
|
buttons: [
|
|
@@ -4337,6 +4550,12 @@
|
|
|
4337
4550
|
},
|
|
4338
4551
|
};
|
|
4339
4552
|
|
|
4553
|
+
/**
|
|
4554
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4555
|
+
*
|
|
4556
|
+
* This source code is licensed under the MIT license found in the
|
|
4557
|
+
* LICENSE file in the root directory of this source tree.
|
|
4558
|
+
*/
|
|
4340
4559
|
const oculusQuest1 = {
|
|
4341
4560
|
name: 'Oculus Quest 1',
|
|
4342
4561
|
controllerConfig: oculusTouchV2,
|
|
@@ -4358,6 +4577,7 @@
|
|
|
4358
4577
|
supportedFrameRates: [72, 80, 90],
|
|
4359
4578
|
isSystemKeyboardSupported: true,
|
|
4360
4579
|
internalNominalFrameRate: 72,
|
|
4580
|
+
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',
|
|
4361
4581
|
};
|
|
4362
4582
|
const metaQuest2 = {
|
|
4363
4583
|
name: 'Meta Quest 2',
|
|
@@ -4382,6 +4602,7 @@
|
|
|
4382
4602
|
supportedFrameRates: [72, 80, 90, 120],
|
|
4383
4603
|
isSystemKeyboardSupported: true,
|
|
4384
4604
|
internalNominalFrameRate: 72,
|
|
4605
|
+
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',
|
|
4385
4606
|
};
|
|
4386
4607
|
const metaQuestPro = {
|
|
4387
4608
|
name: 'Meta Quest Pro',
|
|
@@ -4406,6 +4627,7 @@
|
|
|
4406
4627
|
supportedFrameRates: [72, 80, 90, 120],
|
|
4407
4628
|
isSystemKeyboardSupported: true,
|
|
4408
4629
|
internalNominalFrameRate: 90,
|
|
4630
|
+
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',
|
|
4409
4631
|
};
|
|
4410
4632
|
const metaQuest3 = {
|
|
4411
4633
|
name: 'Meta Quest 3',
|
|
@@ -4431,8 +4653,15 @@
|
|
|
4431
4653
|
supportedFrameRates: [72, 80, 90, 120],
|
|
4432
4654
|
isSystemKeyboardSupported: true,
|
|
4433
4655
|
internalNominalFrameRate: 90,
|
|
4656
|
+
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',
|
|
4434
4657
|
};
|
|
4435
4658
|
|
|
4659
|
+
/**
|
|
4660
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4661
|
+
*
|
|
4662
|
+
* This source code is licensed under the MIT license found in the
|
|
4663
|
+
* LICENSE file in the root directory of this source tree.
|
|
4664
|
+
*/
|
|
4436
4665
|
const PRIVATE = Symbol('@immersive-web-emulation-runtime/action-recorder');
|
|
4437
4666
|
const compress = (arr) => {
|
|
4438
4667
|
const out = [];
|