@omnidotdev/rdk 0.2.2 → 0.4.0

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.
Files changed (78) hide show
  1. package/build/emulate-0AL7_Hsz.cjs +1174 -0
  2. package/build/emulate-DLppRBG1.js +15348 -0
  3. package/build/engine/XR.d.ts +6 -10
  4. package/build/engine/XR.d.ts.map +1 -1
  5. package/build/engine/index.d.ts +2 -0
  6. package/build/engine/index.d.ts.map +1 -1
  7. package/build/engine/useXRStore.d.ts +54 -0
  8. package/build/engine/useXRStore.d.ts.map +1 -0
  9. package/build/fiducial/FiducialAnchor.d.ts.map +1 -1
  10. package/build/fiducial/FiducialSession.d.ts +2 -2
  11. package/build/fiducial/FiducialSession.d.ts.map +1 -1
  12. package/build/fiducial/fiducialBackend.d.ts +2 -2
  13. package/build/fiducial/fiducialBackend.d.ts.map +1 -1
  14. package/build/fiducial/index.d.ts +1 -1
  15. package/build/fiducial/index.d.ts.map +1 -1
  16. package/build/geolocation/GeolocationAnchor.d.ts.map +1 -1
  17. package/build/geolocation/GeolocationSession.d.ts +2 -2
  18. package/build/geolocation/GeolocationSession.d.ts.map +1 -1
  19. package/build/geolocation/geolocationBackend.d.ts +2 -2
  20. package/build/geolocation/geolocationBackend.d.ts.map +1 -1
  21. package/build/geolocation/index.d.ts +1 -1
  22. package/build/geolocation/index.d.ts.map +1 -1
  23. package/build/immersive/ImmersiveSession.d.ts +7 -0
  24. package/build/immersive/ImmersiveSession.d.ts.map +1 -0
  25. package/build/immersive/index.d.ts +2 -0
  26. package/build/immersive/index.d.ts.map +1 -0
  27. package/build/index-BvYiLx_T.js +38559 -0
  28. package/build/index-K8CWZyT2.cjs +378 -0
  29. package/build/index.cjs +1 -35
  30. package/build/index.d.ts +5 -1
  31. package/build/index.d.ts.map +1 -1
  32. package/build/index.js +13 -5985
  33. package/build/lib/types/{xr/XRBackend.interface.d.ts → engine/backend/Backend.interface.d.ts} +8 -8
  34. package/build/lib/types/engine/backend/Backend.interface.d.ts.map +1 -0
  35. package/build/lib/types/engine/backend/BackendInitArgs.interface.d.ts +14 -0
  36. package/build/lib/types/engine/backend/BackendInitArgs.interface.d.ts.map +1 -0
  37. package/build/lib/types/engine/backend/index.d.ts +3 -0
  38. package/build/lib/types/engine/backend/index.d.ts.map +1 -0
  39. package/build/lib/types/engine/context/ContextValue.interface.d.ts +16 -0
  40. package/build/lib/types/engine/context/ContextValue.interface.d.ts.map +1 -0
  41. package/build/lib/types/engine/context/index.d.ts +2 -0
  42. package/build/lib/types/engine/context/index.d.ts.map +1 -0
  43. package/build/lib/types/engine/index.d.ts +3 -0
  44. package/build/lib/types/engine/index.d.ts.map +1 -0
  45. package/build/lib/types/immersive/ImmersiveMode.type.d.ts +7 -0
  46. package/build/lib/types/immersive/ImmersiveMode.type.d.ts.map +1 -0
  47. package/build/lib/types/immersive/index.d.ts +2 -0
  48. package/build/lib/types/immersive/index.d.ts.map +1 -0
  49. package/build/lib/types/index.d.ts +3 -0
  50. package/build/lib/types/index.d.ts.map +1 -0
  51. package/build/lib/util/immersive/fromWebXRSessionMode.d.ts +7 -0
  52. package/build/lib/util/immersive/fromWebXRSessionMode.d.ts.map +1 -0
  53. package/build/lib/util/immersive/index.d.ts +4 -0
  54. package/build/lib/util/immersive/index.d.ts.map +1 -0
  55. package/build/lib/util/immersive/isImmersiveModeSupported.d.ts +7 -0
  56. package/build/lib/util/immersive/isImmersiveModeSupported.d.ts.map +1 -0
  57. package/build/lib/util/immersive/toWebXRSessionMode.d.ts +7 -0
  58. package/build/lib/util/immersive/toWebXRSessionMode.d.ts.map +1 -0
  59. package/build/living_room-BExcgHe_.cjs +1 -0
  60. package/build/living_room-uy_CEYZC.js +11 -0
  61. package/build/meeting_room-BjXC3fLc.js +11 -0
  62. package/build/meeting_room-QG1J4owl.cjs +1 -0
  63. package/build/music_room-AFchga9Y.js +11 -0
  64. package/build/music_room-KhUm0m6-.cjs +1 -0
  65. package/build/office_large-Cy_oZxjZ.cjs +1 -0
  66. package/build/office_large-qDeoZNBo.js +11 -0
  67. package/build/office_small-B_PLvrYC.js +11 -0
  68. package/build/office_small-DfBVh7jy.cjs +1 -0
  69. package/package.json +16 -11
  70. package/build/engine/XRSessionProvider.d.ts +0 -18
  71. package/build/engine/XRSessionProvider.d.ts.map +0 -1
  72. package/build/lib/types/xr/XRBackend.interface.d.ts.map +0 -1
  73. package/build/lib/types/xr/XRBackendInitArgs.interface.d.ts +0 -14
  74. package/build/lib/types/xr/XRBackendInitArgs.interface.d.ts.map +0 -1
  75. package/build/lib/types/xr/XRContextValue.interface.d.ts +0 -20
  76. package/build/lib/types/xr/XRContextValue.interface.d.ts.map +0 -1
  77. package/build/lib/types/xr/index.d.ts +0 -4
  78. package/build/lib/types/xr/index.d.ts.map +0 -1
@@ -1,17 +1,17 @@
1
- import { XRBackendInitArgs } from './XRBackendInitArgs.interface';
1
+ import { BackendInitArgs } from './BackendInitArgs.interface';
2
2
  /**
3
- * Extended reality backend interface.
4
- * Defines the contract for XR backend implementations (fiducial, geolocation, WebXR, etc.).
3
+ * Backend interface.
4
+ * Defines the contract for backend implementations (fiducial, geolocation, WebXR, etc.).
5
5
  */
6
- export interface XRBackend {
6
+ export interface Backend {
7
7
  /**
8
- * Initialize the XR backend with the provided arguments.
8
+ * Initialize the backend with the provided arguments.
9
9
  * @param args initialization arguments containing scene, camera, and renderer
10
10
  * @returns promise that resolves when initialization is complete, or void for synchronous init
11
11
  */
12
- init(args: XRBackendInitArgs): Promise<void> | void;
12
+ init(args: BackendInitArgs): Promise<void> | void;
13
13
  /**
14
- * Update the XR backend on each frame.
14
+ * Update the backend on each frame.
15
15
  * @param dt delta time since last frame in seconds
16
16
  */
17
17
  update?(dt?: number): void;
@@ -25,4 +25,4 @@ export interface XRBackend {
25
25
  */
26
26
  getInternal?(): unknown;
27
27
  }
28
- //# sourceMappingURL=XRBackend.interface.d.ts.map
28
+ //# sourceMappingURL=Backend.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Backend.interface.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/engine/backend/Backend.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAClD;;;OAGG;IACH,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,IAAI,OAAO,CAAC;CACzB"}
@@ -0,0 +1,14 @@
1
+ import type * as THREE from "three";
2
+ /**
3
+ * Initialization arguments for backends.
4
+ * Contains the Three.js objects required to initialize any backend.
5
+ */
6
+ export interface BackendInitArgs {
7
+ /** The Three.js scene to render content into. */
8
+ scene: THREE.Scene;
9
+ /** The Three.js camera used for rendering. */
10
+ camera: THREE.Camera;
11
+ /** The WebGL renderer instance. */
12
+ renderer: THREE.WebGLRenderer;
13
+ }
14
+ //# sourceMappingURL=BackendInitArgs.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackendInitArgs.interface.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/engine/backend/BackendInitArgs.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;IACnB,8CAA8C;IAC9C,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;IACrB,mCAAmC;IACnC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC;CAC/B"}
@@ -0,0 +1,3 @@
1
+ export type { Backend } from './Backend.interface';
2
+ export type { BackendInitArgs } from './BackendInitArgs.interface';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/engine/backend/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Backend } from '../backend';
2
+ /**
3
+ * Context value provided by session providers.
4
+ * Supports session-based architecture with shared camera/video resources.
5
+ */
6
+ export interface ContextValue {
7
+ /** Shared video element. */
8
+ video?: HTMLVideoElement | null;
9
+ /** Active backends registered by sessions. */
10
+ backends: Backend[];
11
+ /** Register a backend (called by sessions). */
12
+ registerBackend: (backend: Backend, sessionType?: string) => void;
13
+ /** Unregister a backend (called by sessions). */
14
+ unregisterBackend: (backend: Backend, sessionType?: string) => void;
15
+ }
16
+ //# sourceMappingURL=ContextValue.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextValue.interface.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/engine/context/ContextValue.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,4BAA4B;IAC5B,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChC,8CAA8C;IAC9C,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,+CAA+C;IAC/C,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,iDAAiD;IACjD,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE"}
@@ -0,0 +1,2 @@
1
+ export type { ContextValue } from './ContextValue.interface';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/engine/context/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { Backend, BackendInitArgs } from './backend';
2
+ export type { ContextValue } from './context';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/engine/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC1D,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Simplified immersive session modes that map to official WebXR session modes.
3
+ * @see https://www.w3.org/TR/webxr/#xrsessionmode-enum
4
+ */
5
+ type ImmersiveMode = "ar" | "vr" | "inline";
6
+ export default ImmersiveMode;
7
+ //# sourceMappingURL=ImmersiveMode.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImmersiveMode.type.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/immersive/ImmersiveMode.type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,KAAK,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,QAAQ,CAAC;AAE5C,eAAe,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type { default as ImmersiveMode } from './ImmersiveMode.type';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/immersive/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './engine';
2
+ export * from './immersive';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ImmersiveMode } from 'lib/types';
2
+ /**
3
+ * Maps official WebXR session modes to simplified immersive modes.
4
+ */
5
+ declare const fromWebXRSessionMode: (mode: XRSessionMode) => ImmersiveMode;
6
+ export default fromWebXRSessionMode;
7
+ //# sourceMappingURL=fromWebXRSessionMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fromWebXRSessionMode.d.ts","sourceRoot":"","sources":["../../../../src/lib/util/immersive/fromWebXRSessionMode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,QAAA,MAAM,oBAAoB,GAAI,MAAM,aAAa,KAAG,aAKnC,CAAC;AAElB,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as fromWebXRSessionMode } from './fromWebXRSessionMode';
2
+ export { default as isImmersiveModeSupported } from './isImmersiveModeSupported';
3
+ export { default as toWebXRSessionMode } from './toWebXRSessionMode';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/util/immersive/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Check if a specific immersive mode is supported.
3
+ * Uses real WebXR API calls for accurate detection.
4
+ */
5
+ declare function isImmersiveModeSupported(mode: "ar" | "vr" | "inline"): Promise<boolean>;
6
+ export default isImmersiveModeSupported;
7
+ //# sourceMappingURL=isImmersiveModeSupported.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isImmersiveModeSupported.d.ts","sourceRoot":"","sources":["../../../../src/lib/util/immersive/isImmersiveModeSupported.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,iBAAe,wBAAwB,CACrC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,QAAQ,GAC3B,OAAO,CAAC,OAAO,CAAC,CAYlB;AAED,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ImmersiveMode } from 'lib/types';
2
+ /**
3
+ * Map simplified immersive modes to official WebXR session modes.
4
+ */
5
+ declare const toWebXRSessionMode: (mode: ImmersiveMode) => XRSessionMode;
6
+ export default toWebXRSessionMode;
7
+ //# sourceMappingURL=toWebXRSessionMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toWebXRSessionMode.d.ts","sourceRoot":"","sources":["../../../../src/lib/util/immersive/toWebXRSessionMode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,QAAA,MAAM,kBAAkB,GAAI,MAAM,aAAa,KAAG,aAKjC,CAAC;AAElB,eAAe,kBAAkB,CAAC"}