@webspatial/react-sdk 1.2.1 → 1.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.
@@ -1,7 +1,8 @@
1
- import { SpatialSceneCreationOptions, SpatialSceneType, SpatialTapEvent as SpatialTapEvent$1, SpatialDragStartEvent as SpatialDragStartEvent$1, SpatialDragEvent as SpatialDragEvent$1, SpatialDragEndEvent as SpatialDragEndEvent$1, SpatialRotateEvent as SpatialRotateEvent$1, SpatialRotateEndEvent as SpatialRotateEndEvent$1, SpatialMagnifyEvent as SpatialMagnifyEvent$1, SpatialMagnifyEndEvent as SpatialMagnifyEndEvent$1, SpatializedElement, Point3D, SpatialObject, SpatialSession, SpatializedDynamic3DElement, Vec3, SpatialEntity, SpatialBoxGeometryOptions, SpatialUnlitMaterialOptions, SpatialSphereGeometryOptions, SpatialConeGeometryOptions, SpatialCylinderGeometryOptions, SpatialPlaneGeometryOptions } from '@webspatial/core-sdk';
1
+ import * as _webspatial_core_sdk from '@webspatial/core-sdk';
2
+ import { SpatialSceneCreationOptions, SpatialSceneType, SpatialTapEvent as SpatialTapEvent$1, SpatialDragStartEvent as SpatialDragStartEvent$1, SpatialDragEvent as SpatialDragEvent$1, SpatialDragEndEvent as SpatialDragEndEvent$1, SpatialRotateEvent as SpatialRotateEvent$1, SpatialRotateEndEvent as SpatialRotateEndEvent$1, SpatialMagnifyEvent as SpatialMagnifyEvent$1, SpatialMagnifyEndEvent as SpatialMagnifyEndEvent$1, SpatializedElement, Vec3, SpatialObject, SpatialSession, SpatializedDynamic3DElement, SpatialEntity, Quaternion, SpatialBoxGeometryOptions, SpatialUnlitMaterialOptions, SpatialSphereGeometryOptions, SpatialConeGeometryOptions, SpatialCylinderGeometryOptions, SpatialPlaneGeometryOptions, PhysicalMetrics } from '@webspatial/core-sdk';
2
3
  export { Point3D, Vec3 } from '@webspatial/core-sdk';
3
4
  import * as React$1 from 'react';
4
- import React__default, { ElementType, ForwardedRef } from 'react';
5
+ import React__default, { ElementType, ForwardedRef, createElement as createElement$1 } from 'react';
5
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
7
 
7
8
  declare function enableDebugTool(): void;
@@ -12,6 +13,13 @@ declare function initScene(name: string, callback: (pre: SpatialSceneCreationOpt
12
13
 
13
14
  declare const SpatialID = "data-spatial-id";
14
15
 
16
+ /** Options for spatial pointer/gesture behavior (not DOM attributes). */
17
+ type SpatialEventOptions = {
18
+ /**
19
+ * Direction vector for rotate gesture constraint. `[0, 0, 0]` or omit = unconstrained.
20
+ */
21
+ constrainedToAxis?: Vec3 | readonly [number, number, number];
22
+ };
15
23
  type SpatialEventProps<T extends SpatializedElementRef> = {
16
24
  onSpatialTap?: (event: SpatialTapEvent<T>) => void;
17
25
  onSpatialDragStart?: (event: SpatialDragStartEvent<T>) => void;
@@ -27,22 +35,12 @@ interface StandardSpatializedContainerProps extends React__default.ComponentProp
27
35
  inStandardSpatializedContainer?: boolean;
28
36
  [SpatialID]: string;
29
37
  }
30
- type RealityForbiddenSpatialEventProps = {
31
- onSpatialTap?: never;
32
- onSpatialDragStart?: never;
33
- onSpatialDrag?: never;
34
- onSpatialDragEnd?: never;
35
- onSpatialRotate?: never;
36
- onSpatialRotateEnd?: never;
37
- onSpatialMagnify?: never;
38
- onSpatialMagnifyEnd?: never;
39
- };
40
- type RealityProps = React__default.ComponentPropsWithRef<'div'> & RealityForbiddenSpatialEventProps;
41
38
  type PortalSpatializedContainerProps<T extends SpatializedElementRef> = SpatialEventProps<T> & React__default.ComponentPropsWithoutRef<'div'> & {
42
39
  component: ElementType;
43
40
  spatializedContent: ElementType;
44
41
  createSpatializedElement: () => Promise<SpatializedElement>;
45
42
  getExtraSpatializedElementProperties?: (computedStyle: CSSStyleDeclaration) => Record<string, any>;
43
+ spatialEventOptions?: SpatialEventOptions;
46
44
  [SpatialID]: string;
47
45
  };
48
46
  type SpatializedContainerProps<T extends SpatializedElementRef> = Omit<StandardSpatializedContainerProps & PortalSpatializedContainerProps<T>, typeof SpatialID | 'onLoad' | 'onError'> & {
@@ -50,11 +48,13 @@ type SpatializedContainerProps<T extends SpatializedElementRef> = Omit<StandardS
50
48
  };
51
49
  type Spatialized2DElementContainerProps<P extends ElementType> = SpatialEventProps<SpatializedElementRef> & React__default.ComponentPropsWithRef<'div'> & {
52
50
  component: P;
51
+ spatialEventOptions?: SpatialEventOptions;
53
52
  };
54
53
  type SpatializedStatic3DContainerProps = SpatialEventProps<SpatializedStatic3DElementRef> & Omit<React__default.ComponentPropsWithoutRef<'div'>, 'onLoad' | 'onError'> & {
55
54
  src?: string;
56
55
  onLoad?: (event: ModelLoadEvent) => void;
57
56
  onError?: (event: ModelLoadEvent) => void;
57
+ spatialEventOptions?: SpatialEventOptions;
58
58
  };
59
59
  type SpatializedElementRef<T extends HTMLElement = HTMLElement> = T;
60
60
  type SpatializedDivElementRef = SpatializedElementRef<HTMLDivElement>;
@@ -70,17 +70,31 @@ type SpatialTapEvent<T extends SpatializedElementRef = SpatializedElementRef> =
70
70
  readonly offsetX: number;
71
71
  readonly offsetY: number;
72
72
  readonly offsetZ: number;
73
+ readonly clientX: number;
74
+ readonly clientY: number;
75
+ readonly clientZ: number;
73
76
  };
74
77
  type SpatialDragStartEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialDragStartEvent$1 & CurrentTarget<T> & {
75
78
  readonly offsetX: number;
76
79
  readonly offsetY: number;
77
80
  readonly offsetZ: number;
81
+ readonly clientX: number;
82
+ readonly clientY: number;
83
+ readonly clientZ: number;
84
+ };
85
+ type SpatialDragEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialDragEvent$1 & CurrentTarget<T> & {
86
+ readonly translationX: number;
87
+ readonly translationY: number;
88
+ readonly translationZ: number;
78
89
  };
79
- type SpatialDragEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialDragEvent$1 & CurrentTarget<T>;
80
90
  type SpatialDragEndEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialDragEndEvent$1 & CurrentTarget<T>;
81
- type SpatialRotateEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialRotateEvent$1 & CurrentTarget<T>;
91
+ type SpatialRotateEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialRotateEvent$1 & CurrentTarget<T> & {
92
+ readonly quaternion: _webspatial_core_sdk.Quaternion;
93
+ };
82
94
  type SpatialRotateEndEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialRotateEndEvent$1 & CurrentTarget<T>;
83
- type SpatialMagnifyEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialMagnifyEvent$1 & CurrentTarget<T>;
95
+ type SpatialMagnifyEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialMagnifyEvent$1 & CurrentTarget<T> & {
96
+ readonly magnification: number;
97
+ };
84
98
  type SpatialMagnifyEndEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialMagnifyEndEvent$1 & CurrentTarget<T>;
85
99
  type ModelSpatialTapEvent = SpatialTapEvent<SpatializedStatic3DElementRef>;
86
100
  type ModelSpatialDragStartEvent = SpatialDragStartEvent<SpatializedStatic3DElementRef>;
@@ -115,13 +129,11 @@ declare const SpatializedStatic3DElementContainer: React$1.ForwardRefExoticCompo
115
129
  src?: string;
116
130
  onLoad?: (event: ModelLoadEvent) => void;
117
131
  onError?: (event: ModelLoadEvent) => void;
132
+ spatialEventOptions?: SpatialEventOptions;
118
133
  } & React$1.RefAttributes<SpatializedStatic3DElementRef>>;
119
134
 
120
135
  declare function withSpatialized2DElementContainer<P extends ElementType>(Component: P): P | React$1.ForwardRefExoticComponent<Omit<Spatialized2DElementContainerProps<P>, "ref"> & React$1.RefAttributes<HTMLElement>>;
121
136
 
122
- declare function toSceneSpatial(point: Point3D, spatializedElement: SpatializedElementRef): DOMPoint;
123
- declare function toLocalSpace(point: Point3D, spatializedElement: SpatializedElementRef): DOMPoint;
124
-
125
137
  declare function initPolyfill(): void;
126
138
 
127
139
  declare function withSpatialMonitor(El: React__default.ElementType): any;
@@ -140,10 +152,27 @@ declare class ResourceRegistry {
140
152
  destroy(): void;
141
153
  }
142
154
 
155
+ type ContainerEntry = {
156
+ instanceId: string;
157
+ container: HTMLElement;
158
+ };
159
+ type ContainersChangeCallback = (containers: ContainerEntry[]) => void;
160
+ declare class AttachmentRegistry {
161
+ private containers;
162
+ private listeners;
163
+ addContainer(name: string, instanceId: string, container: HTMLElement): void;
164
+ removeContainer(name: string, instanceId: string): void;
165
+ getContainers(name: string): ContainerEntry[];
166
+ onContainersChange(name: string, cb: ContainersChangeCallback): () => void;
167
+ private notifyListeners;
168
+ destroy(): void;
169
+ }
170
+
143
171
  type RealityContextValue = {
144
172
  session: SpatialSession;
145
173
  reality: SpatializedDynamic3DElement;
146
174
  resourceRegistry: ResourceRegistry;
175
+ attachmentRegistry: AttachmentRegistry;
147
176
  } | null;
148
177
 
149
178
  interface EntityRefShape {
@@ -175,6 +204,7 @@ type EntityProps = {
175
204
  position?: Vec3;
176
205
  rotation?: Vec3;
177
206
  scale?: Vec3;
207
+ enableInput?: boolean;
178
208
  };
179
209
  type allTarget<T extends EntityRefShape> = {
180
210
  target: T;
@@ -184,23 +214,38 @@ type SpatialTapEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialT
184
214
  readonly offsetX: number;
185
215
  readonly offsetY: number;
186
216
  readonly offsetZ: number;
217
+ readonly clientX: number;
218
+ readonly clientY: number;
219
+ readonly clientZ: number;
187
220
  };
188
221
  type SpatialDragStartEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialDragStartEvent$1 & allTarget<T> & {
189
222
  readonly offsetX: number;
190
223
  readonly offsetY: number;
191
224
  readonly offsetZ: number;
225
+ readonly clientX: number;
226
+ readonly clientY: number;
227
+ readonly clientZ: number;
228
+ };
229
+ type SpatialDragEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialDragEvent$1 & allTarget<T> & {
230
+ readonly translationX: number;
231
+ readonly translationY: number;
232
+ readonly translationZ: number;
192
233
  };
193
- type SpatialDragEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialDragEvent$1 & allTarget<T>;
194
234
  type SpatialDragEndEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialDragEndEvent$1 & allTarget<T>;
195
- type SpatialRotateEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialRotateEvent$1 & allTarget<T>;
235
+ type SpatialRotateEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialRotateEvent$1 & allTarget<T> & {
236
+ readonly quaternion: Quaternion;
237
+ };
196
238
  type SpatialRotateEndEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialRotateEndEvent$1 & allTarget<T>;
197
- type SpatialMagnifyEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialMagnifyEvent$1 & allTarget<T>;
239
+ type SpatialMagnifyEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialMagnifyEvent$1 & allTarget<T> & {
240
+ readonly magnification: number;
241
+ };
198
242
  type SpatialMagnifyEndEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialMagnifyEndEvent$1 & allTarget<T>;
199
243
  type EntityEventHandler = {
200
244
  onSpatialTap?: (event: SpatialTapEntityEvent) => void;
201
245
  onSpatialDragStart?: (event: SpatialDragStartEntityEvent) => void;
202
246
  onSpatialDrag?: (event: SpatialDragEntityEvent) => void;
203
247
  onSpatialDragEnd?: (event: SpatialDragEndEntityEvent) => void;
248
+ spatialEventOptions?: SpatialEventOptions;
204
249
  onSpatialRotate?: (event: SpatialRotateEntityEvent) => void;
205
250
  onSpatialRotateEnd?: (event: SpatialRotateEndEntityEvent) => void;
206
251
  onSpatialMagnify?: (event: SpatialMagnifyEntityEvent) => void;
@@ -211,45 +256,43 @@ declare const eventMap: {
211
256
  readonly onSpatialDragStart: "spatialdragstart";
212
257
  readonly onSpatialDrag: "spatialdrag";
213
258
  readonly onSpatialDragEnd: "spatialdragend";
214
- readonly onSpatialRotateStart: "spatialrotatestart";
215
259
  readonly onSpatialRotate: "spatialrotate";
216
260
  readonly onSpatialRotateEnd: "spatialrotateend";
217
- readonly onSpatialMagnifyStart: "spatialmagnifystart";
218
261
  readonly onSpatialMagnify: "spatialmagnify";
219
262
  readonly onSpatialMagnifyEnd: "spatialmagnifyend";
220
263
  };
221
264
 
222
- declare const Entity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
265
+ declare const Entity: React__default.ForwardRefExoticComponent<EntityProps & {
223
266
  children?: React__default.ReactNode;
224
267
  } & React__default.RefAttributes<EntityRefShape>>;
225
268
 
226
- declare const BoxEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
269
+ declare const BoxEntity: React__default.ForwardRefExoticComponent<EntityProps & {
227
270
  children?: React__default.ReactNode;
228
271
  materials?: string[];
229
272
  } & SpatialBoxGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
230
273
 
231
- type Props$2 = {
274
+ type UnlitMaterialProps = {
232
275
  children?: React__default.ReactNode;
233
276
  id: string;
234
277
  } & SpatialUnlitMaterialOptions;
235
- declare const UnlitMaterial: React__default.FC<Props$2>;
278
+ declare const UnlitMaterial: React__default.FC<UnlitMaterialProps>;
236
279
 
237
- declare const SphereEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
280
+ declare const SphereEntity: React__default.ForwardRefExoticComponent<EntityProps & {
238
281
  children?: React__default.ReactNode;
239
282
  materials?: string[];
240
283
  } & SpatialSphereGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
241
284
 
242
- declare const ConeEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
285
+ declare const ConeEntity: React__default.ForwardRefExoticComponent<EntityProps & {
243
286
  children?: React__default.ReactNode;
244
287
  materials?: string[];
245
288
  } & SpatialConeGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
246
289
 
247
- declare const CylinderEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
290
+ declare const CylinderEntity: React__default.ForwardRefExoticComponent<EntityProps & {
248
291
  children?: React__default.ReactNode;
249
292
  materials?: string[];
250
293
  } & SpatialCylinderGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
251
294
 
252
- declare const PlaneEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
295
+ declare const PlaneEntity: React__default.ForwardRefExoticComponent<EntityProps & {
253
296
  children?: React__default.ReactNode;
254
297
  materials?: string[];
255
298
  } & SpatialPlaneGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
@@ -270,12 +313,34 @@ declare const ModelAsset: React__default.FC<Props>;
270
313
 
271
314
  declare const ModelEntity: React__default.ForwardRefExoticComponent<EntityProps & {
272
315
  model: string;
273
- } & EntityEventHandler & {
316
+ } & {
274
317
  children?: React__default.ReactNode;
275
318
  } & React__default.RefAttributes<EntityRefShape>>;
276
319
 
320
+ type RealityProps = React__default.ComponentPropsWithRef<'div'> & EntityEventHandler;
277
321
  declare const Reality: React__default.ForwardRefExoticComponent<Omit<RealityProps, "ref"> & React__default.RefAttributes<HTMLElement>>;
278
322
 
323
+ type AttachmentAssetProps = {
324
+ name: string;
325
+ children?: React__default.ReactNode;
326
+ };
327
+ declare const AttachmentAsset: React__default.FC<AttachmentAssetProps>;
328
+
329
+ type AttachmentEntityProps = {
330
+ attachment: string;
331
+ position?: [number, number, number];
332
+ size: {
333
+ width: number;
334
+ height: number;
335
+ };
336
+ };
337
+ declare const AttachmentEntity: React__default.FC<AttachmentEntityProps>;
338
+
339
+ type MaterialProps = {
340
+ type: 'unlit';
341
+ } & UnlitMaterialProps;
342
+ declare const Material: React__default.FC<MaterialProps>;
343
+
279
344
  type ModelProps = SpatializedStatic3DContainerProps & {
280
345
  'enable-xr'?: boolean;
281
346
  };
@@ -293,6 +358,7 @@ declare const Model: React$1.ForwardRefExoticComponent<Omit<{
293
358
  src?: string;
294
359
  onLoad?: (event: ModelLoadEvent) => void;
295
360
  onError?: (event: ModelLoadEvent) => void;
361
+ spatialEventOptions?: SpatialEventOptions;
296
362
  } & {
297
363
  'enable-xr'?: boolean;
298
364
  } & React$1.RefAttributes<SpatializedStatic3DElementRef>, "ref"> & React$1.RefAttributes<any>>;
@@ -302,6 +368,26 @@ declare const SSRProvider: ({ isSSR: initialIsSSR, children, }: {
302
368
  children: React__default.ReactNode;
303
369
  }) => react_jsx_runtime.JSX.Element;
304
370
 
371
+ declare function useMetrics(): {
372
+ pointToPhysical: typeof PhysicalMetrics.pointToPhysical;
373
+ physicalToPoint: typeof PhysicalMetrics.physicalToPoint;
374
+ };
375
+
376
+ declare function createElement(...args: Parameters<typeof createElement$1>): React$1.DetailedReactHTMLElement<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
377
+
378
+ /**
379
+ * const e2e = await convertCoordinate(position, { from: elementOrEntity, to: elementOrEntity })
380
+ const e2w = await convertCoordinate(position, { from: elementOrEntity, to: window })
381
+ const w2e = await convertCoordinate(position, { from: window, to: elementOrEntity })
382
+ *
383
+ */
384
+
385
+ type CoordinateConvertible = Window | SpatializedElementRef<any> | EntityRef | ModelRef;
386
+ declare function convertCoordinate(position: Vec3, { from, to }: {
387
+ from: CoordinateConvertible;
388
+ to: CoordinateConvertible;
389
+ }): Promise<Vec3>;
390
+
305
391
  declare const version: string;
306
392
 
307
- export { BoxEntity, ConeEntity, CylinderEntity, Entity, type EntityEventHandler, type EntityProps, EntityRef, Model, ModelAsset, ModelEntity, type ModelLoadEvent, type ModelProps, type ModelRef, type ModelSpatialDragEndEvent, type ModelSpatialDragEvent, type ModelSpatialDragStartEvent, type ModelSpatialMagnifyEndEvent, type ModelSpatialMagnifyEvent, type ModelSpatialRotateEndEvent, type ModelSpatialRotateEvent, type ModelSpatialTapEvent, PlaneEntity, Reality, SSRProvider, SceneGraph, type SpatialDragEndEntityEvent, type SpatialDragEndEvent, type SpatialDragEntityEvent, type SpatialDragEvent, type SpatialDragStartEntityEvent, type SpatialDragStartEvent, type SpatialMagnifyEndEntityEvent, type SpatialMagnifyEndEvent, type SpatialMagnifyEntityEvent, type SpatialMagnifyEvent, SpatialMonitor, type SpatialRotateEndEntityEvent, type SpatialRotateEndEvent, type SpatialRotateEntityEvent, type SpatialRotateEvent, type SpatialTapEntityEvent, type SpatialTapEvent, Spatialized2DElementContainer, type Spatialized2DElementContainerProps, SpatializedContainer, type SpatializedElementRef, type SpatializedStatic3DContainerProps, SpatializedStatic3DElementContainer, type SpatializedStatic3DElementRef, SphereEntity, UnlitMaterial, enableDebugTool, eventMap, initPolyfill, initScene, toLocalSpace, toSceneSpatial, version, withSpatialMonitor, withSpatialized2DElementContainer };
393
+ export { AttachmentAsset, AttachmentEntity, BoxEntity as Box, BoxEntity, ConeEntity as Cone, ConeEntity, CylinderEntity as Cylinder, CylinderEntity, Entity, type EntityEventHandler, type EntityProps, EntityRef, Material, type MaterialProps, Model, ModelAsset, ModelEntity, type ModelLoadEvent, type ModelProps, type ModelRef, type ModelSpatialDragEndEvent, type ModelSpatialDragEvent, type ModelSpatialDragStartEvent, type ModelSpatialMagnifyEndEvent, type ModelSpatialMagnifyEvent, type ModelSpatialRotateEndEvent, type ModelSpatialRotateEvent, type ModelSpatialTapEvent, PlaneEntity as Plane, PlaneEntity, Reality, type RealityProps, SSRProvider, SceneGraph, type SpatialDragEndEntityEvent, type SpatialDragEndEvent, type SpatialDragEntityEvent, type SpatialDragEvent, type SpatialDragStartEntityEvent, type SpatialDragStartEvent, type SpatialEventOptions, type SpatialMagnifyEndEntityEvent, type SpatialMagnifyEndEvent, type SpatialMagnifyEntityEvent, type SpatialMagnifyEvent, SpatialMonitor, type SpatialRotateEndEntityEvent, type SpatialRotateEndEvent, type SpatialRotateEntityEvent, type SpatialRotateEvent, type SpatialTapEntityEvent, type SpatialTapEvent, Spatialized2DElementContainer, type Spatialized2DElementContainerProps, SpatializedContainer, type SpatializedElementRef, type SpatializedStatic3DContainerProps, SpatializedStatic3DElementContainer, type SpatializedStatic3DElementRef, SphereEntity as Sphere, SphereEntity, UnlitMaterial, type UnlitMaterialProps, SceneGraph as World, convertCoordinate, createElement, enableDebugTool, eventMap, initPolyfill, initScene, useMetrics, version, withSpatialMonitor, withSpatialized2DElementContainer };