@webspatial/react-sdk 1.4.0 → 1.6.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.
@@ -52,6 +52,9 @@ type Spatialized2DElementContainerProps<P extends ElementType> = SpatialEventPro
52
52
  };
53
53
  type SpatializedStatic3DContainerProps = SpatialEventProps<SpatializedStatic3DElementRef> & Omit<React__default.ComponentPropsWithoutRef<'div'>, 'onLoad' | 'onError'> & {
54
54
  src?: string;
55
+ autoPlay?: boolean;
56
+ loop?: boolean;
57
+ children?: React__default.ReactNode;
55
58
  onLoad?: (event: ModelLoadEvent) => void;
56
59
  onError?: (event: ModelLoadEvent) => void;
57
60
  spatialEventOptions?: SpatialEventOptions;
@@ -62,6 +65,11 @@ type SpatializedStatic3DElementRef = SpatializedDivElementRef & {
62
65
  currentSrc: string;
63
66
  ready: Promise<ModelLoadEvent>;
64
67
  entityTransform: DOMMatrixReadOnly;
68
+ play(): Promise<void>;
69
+ pause(): Promise<void>;
70
+ readonly paused: boolean;
71
+ readonly duration: number;
72
+ playbackRate: number;
65
73
  };
66
74
  type CurrentTarget<T extends SpatializedElementRef> = {
67
75
  currentTarget: T;
@@ -127,6 +135,9 @@ declare const SpatializedStatic3DElementContainer: React$1.ForwardRefExoticCompo
127
135
  onSpatialMagnifyEnd?: ((event: SpatialMagnifyEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
128
136
  } & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onLoad" | "onError"> & {
129
137
  src?: string;
138
+ autoPlay?: boolean;
139
+ loop?: boolean;
140
+ children?: React.ReactNode;
130
141
  onLoad?: (event: ModelLoadEvent) => void;
131
142
  onError?: (event: ModelLoadEvent) => void;
132
143
  spatialEventOptions?: SpatialEventOptions;
@@ -313,7 +324,8 @@ declare const ModelAsset: React__default.FC<Props>;
313
324
 
314
325
  declare const ModelEntity: React__default.ForwardRefExoticComponent<EntityProps & {
315
326
  model: string;
316
- } & {
327
+ materials?: string[];
328
+ } & EntityEventHandler & {
317
329
  children?: React__default.ReactNode;
318
330
  } & React__default.RefAttributes<EntityRefShape>>;
319
331
 
@@ -356,6 +368,9 @@ declare const Model: React$1.ForwardRefExoticComponent<Omit<{
356
368
  onSpatialMagnifyEnd?: ((event: SpatialMagnifyEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
357
369
  } & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onLoad" | "onError"> & {
358
370
  src?: string;
371
+ autoPlay?: boolean;
372
+ loop?: boolean;
373
+ children?: React.ReactNode;
359
374
  onLoad?: (event: ModelLoadEvent) => void;
360
375
  onError?: (event: ModelLoadEvent) => void;
361
376
  spatialEventOptions?: SpatialEventOptions;