@liveroom-tech/react-immersive 6.0.2 → 6.1.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 (67) hide show
  1. package/README.md +24 -0
  2. package/dist/AnimationsTab-NUJTEMZ5.mjs +1 -0
  3. package/dist/AnnotationsTab-OHRVWRKI.mjs +1 -0
  4. package/dist/CinematicTab-IJAY2BS6.mjs +1 -0
  5. package/dist/ConfigureTab-UQRRATCY.mjs +6 -0
  6. package/dist/RulesTab-YVBZGJZX.mjs +1 -0
  7. package/dist/SequencesTab-IC5LWQ6N.css +1 -0
  8. package/dist/SequencesTab-RPJAG26Z.mjs +1 -0
  9. package/dist/binding-builder.css +1 -1
  10. package/dist/binding-builder.d.mts +3 -3
  11. package/dist/binding-builder.d.ts +3 -3
  12. package/dist/binding-builder.js +76 -23
  13. package/dist/binding-builder.mjs +1 -1
  14. package/dist/chunk-2DV2UCQH.mjs +1 -0
  15. package/dist/chunk-37YITTIK.mjs +1 -0
  16. package/dist/chunk-5FLX45O5.mjs +2 -0
  17. package/dist/chunk-6CTCV2Q5.mjs +1 -0
  18. package/dist/chunk-7JCFNZJM.mjs +1 -0
  19. package/dist/chunk-7OWHW66D.mjs +1 -0
  20. package/dist/chunk-AL6UIGWP.mjs +1 -0
  21. package/dist/chunk-BNKTI3CY.mjs +1 -0
  22. package/dist/chunk-CCBFMNAU.mjs +1 -0
  23. package/dist/chunk-E24EFHB5.mjs +1 -0
  24. package/dist/chunk-EV6THDXD.mjs +1 -0
  25. package/dist/chunk-F5QSXMME.mjs +1 -0
  26. package/dist/chunk-FGAJ2UT7.mjs +1 -0
  27. package/dist/chunk-FXV4CLAK.mjs +1 -0
  28. package/dist/chunk-GV4ZRXL6.mjs +1 -0
  29. package/dist/chunk-KHN55ZM7.mjs +3 -0
  30. package/dist/chunk-LX3GXQNU.mjs +1 -0
  31. package/dist/chunk-OPZJDP7T.mjs +1 -0
  32. package/dist/chunk-OREKYGO3.mjs +83 -0
  33. package/dist/chunk-PBVBZYOG.mjs +47 -0
  34. package/dist/chunk-T6AYLPCC.mjs +1 -0
  35. package/dist/hosted.css +1 -1
  36. package/dist/hosted.d.mts +22 -6
  37. package/dist/hosted.d.ts +22 -6
  38. package/dist/hosted.js +75 -22
  39. package/dist/hosted.mjs +1 -1
  40. package/dist/index.css +1 -1
  41. package/dist/index.d.mts +66 -6
  42. package/dist/index.d.ts +66 -6
  43. package/dist/index.js +69 -21
  44. package/dist/index.mjs +1 -1
  45. package/dist/{modelFileResolver-Co7j1tdQ.d.mts → modelFileResolver-BEW_95id.d.mts} +52 -7
  46. package/dist/{modelFileResolver-Co7j1tdQ.d.ts → modelFileResolver-BEW_95id.d.ts} +52 -7
  47. package/dist/{modelViewerProps-BibuMND7.d.ts → modelViewerProps-C7saa0i2.d.mts} +173 -3
  48. package/dist/{modelViewerProps-Ce4-wb57.d.mts → modelViewerProps-CbK_4uZj.d.ts} +173 -3
  49. package/dist/{publicProps-BaJHCDa_.d.mts → publicProps-NKTiohZO.d.mts} +1 -1
  50. package/dist/{publicProps-CP18d_mt.d.ts → publicProps-z7cJhUH8.d.ts} +1 -1
  51. package/dist/simple-model-viewer.css +1 -1
  52. package/dist/simple-model-viewer.d.mts +25 -3
  53. package/dist/simple-model-viewer.d.ts +25 -3
  54. package/dist/simple-model-viewer.js +49 -3
  55. package/dist/simple-model-viewer.mjs +1 -1
  56. package/dist/utils.d.mts +47 -4
  57. package/dist/utils.d.ts +47 -4
  58. package/dist/utils.js +2 -2
  59. package/dist/utils.mjs +1 -1
  60. package/package.json +5 -1
  61. package/dist/chunk-33SUWPXC.mjs +0 -3
  62. package/dist/chunk-4JMJALRO.mjs +0 -2
  63. package/dist/chunk-EIBW7ZJE.mjs +0 -81
  64. package/dist/chunk-KFTJMFYF.mjs +0 -1
  65. package/dist/chunk-OTSCPJWF.mjs +0 -1
  66. package/dist/chunk-P2JZ5Z7I.mjs +0 -1
  67. package/dist/chunk-V7WZUWJ5.mjs +0 -1
package/dist/hosted.d.mts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
- import { MutableRefObject } from 'react';
3
- import { ag as ModelViewerProps, ao as ObjectBinding, aX as SceneConfig, aW as SceneComposition, ad as ModelViewerModelEntry } from './modelViewerProps-Ce4-wb57.mjs';
4
- import { B as BindingBuilderProps } from './publicProps-BaJHCDa_.mjs';
2
+ import { MutableRefObject, ReactNode } from 'react';
3
+ import { ag as ModelViewerProps, ao as ObjectBinding, bg as SceneConfig, bf as SceneComposition, ad as ModelViewerModelEntry } from './modelViewerProps-C7saa0i2.mjs';
4
+ import { B as BindingBuilderProps } from './publicProps-NKTiohZO.mjs';
5
5
  import { Object3D } from 'three';
6
- import './modelFileResolver-Co7j1tdQ.mjs';
6
+ import './modelFileResolver-BEW_95id.mjs';
7
7
  import '@react-three/drei';
8
8
 
9
9
  declare const TEXTURE_KEYS: readonly ["texture", "metalnessMap", "roughnessMap", "emissiveMap", "alphaMap", "normalMap", "bumpMap", "aoMap", "displacementMap", "clearcoatMap", "clearcoatRoughnessMap", "clearcoatNormalMap", "anisotropyMap", "transmissionMap", "thicknessMap", "sheenColorMap", "sheenRoughnessMap", "specularIntensityMap", "specularColorMap"];
@@ -24,6 +24,10 @@ type ProjectModelViewerProps = ModelViewerProps & {
24
24
  /** An explicit clear command, distinct from clicking empty canvas space. */
25
25
  onSelectionClear?: () => void;
26
26
  /** Reports transform-gizmo edit leases for collaborative hosts. */
27
+ /** In the editor: a reference floor under the model. */
28
+ showFloorGrid?: boolean;
29
+ /** In the editor: show only move or only rotate handles. */
30
+ gizmoTool?: "move" | "rotate";
27
31
  onObjectEditLeaseChange?: (binding: ObjectBinding, editing: boolean) => void;
28
32
  /** The loaded three.js scene, which the editor builds bindings from. */
29
33
  onSceneLoaded?: (scene: Object3D) => void;
@@ -45,7 +49,7 @@ type ProjectModelViewerProps = ModelViewerProps & {
45
49
  declare function ProjectModelViewer(props: ProjectModelViewerProps): react.JSX.Element;
46
50
 
47
51
  /** Settings whose names or positions belong to a particular model. */
48
- type ModelSettings = Pick<SceneConfig, "annotations" | "animations" | "measurements" | "selectionSets" | "sequences"> & {
52
+ type ModelSettings = Pick<SceneConfig, "annotations" | "animations" | "measurements" | "selectionSets" | "sequences" | "product"> & {
49
53
  activeVariants?: string[];
50
54
  };
51
55
 
@@ -99,6 +103,10 @@ type BindingBuilderProjectChangeOrigin = "local" | "remote";
99
103
  * (BindingBuilder.tsx) neither declares nor forwards the rest.
100
104
  */
101
105
  type ProjectBindingBuilderProps = BindingBuilderProps & {
106
+ /** The host's own status (collaboration, sharing), shown in the top bar. */
107
+ topBarStart?: ReactNode;
108
+ /** The host's own way to publish, such as its share dialog, in Configure's last step. */
109
+ configurePublish?: ReactNode;
102
110
  /**
103
111
  * Validates the licence against this deployment's own API rather than the
104
112
  * licence service, so the public demo licence works on local and preview
@@ -128,6 +136,14 @@ type ProjectBindingBuilderProps = BindingBuilderProps & {
128
136
  * `project`, every image goes through this before it is reported.
129
137
  */
130
138
  onTextureUpload?: (file: File, objectId: string) => Promise<string>;
139
+ /**
140
+ * Receives a 640x360 JPEG of the scene for a projects list: once the model
141
+ * has loaded if `hasThumbnail` is false, then after local edits, whenever the
142
+ * editor has gone quiet. Rejecting tries again later.
143
+ */
144
+ onThumbnailCapture?: (image: Blob) => Promise<void>;
145
+ /** Whether the project already has a picture. Defaults to false. */
146
+ hasThumbnail?: boolean;
131
147
  /** Requests/releases a short collaborative lease around gizmo edits. */
132
148
  onEditLeaseChange?: (featureId: string, editing: boolean) => void;
133
149
  /**
@@ -137,7 +153,7 @@ type ProjectBindingBuilderProps = BindingBuilderProps & {
137
153
  */
138
154
  allowModelChange?: boolean;
139
155
  };
140
- declare function ProjectBindingBuilder({ licenseKey, licenseValidationUrl, arHandoff, mobileHandoffUrl, dracoDecoderPath, ktx2TranscoderPath, meshopt, project, onProjectChange, projectChangeDebounceMs, onModelUpload, onTextureUpload, onEditLeaseChange, allowModelChange, hideLicenseCheckingOverlay, }: ProjectBindingBuilderProps): react.JSX.Element;
156
+ declare function ProjectBindingBuilder({ topBarStart, configurePublish, licenseKey, licenseValidationUrl, arHandoff, mobileHandoffUrl, dracoDecoderPath, ktx2TranscoderPath, meshopt, project, onProjectChange, projectChangeDebounceMs, onModelUpload, onTextureUpload, onThumbnailCapture, hasThumbnail, onEditLeaseChange, allowModelChange, hideLicenseCheckingOverlay, }: ProjectBindingBuilderProps): react.JSX.Element;
141
157
 
142
158
  /** A model's view of the scene: the shared settings plus its own. */
143
159
  declare function sceneConfigForModel(sceneConfig: SceneConfig, model: BindingBuilderProjectModel): SceneConfig;
package/dist/hosted.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
- import { MutableRefObject } from 'react';
3
- import { ag as ModelViewerProps, ao as ObjectBinding, aX as SceneConfig, aW as SceneComposition, ad as ModelViewerModelEntry } from './modelViewerProps-BibuMND7.js';
4
- import { B as BindingBuilderProps } from './publicProps-CP18d_mt.js';
2
+ import { MutableRefObject, ReactNode } from 'react';
3
+ import { ag as ModelViewerProps, ao as ObjectBinding, bg as SceneConfig, bf as SceneComposition, ad as ModelViewerModelEntry } from './modelViewerProps-CbK_4uZj.js';
4
+ import { B as BindingBuilderProps } from './publicProps-z7cJhUH8.js';
5
5
  import { Object3D } from 'three';
6
- import './modelFileResolver-Co7j1tdQ.js';
6
+ import './modelFileResolver-BEW_95id.js';
7
7
  import '@react-three/drei';
8
8
 
9
9
  declare const TEXTURE_KEYS: readonly ["texture", "metalnessMap", "roughnessMap", "emissiveMap", "alphaMap", "normalMap", "bumpMap", "aoMap", "displacementMap", "clearcoatMap", "clearcoatRoughnessMap", "clearcoatNormalMap", "anisotropyMap", "transmissionMap", "thicknessMap", "sheenColorMap", "sheenRoughnessMap", "specularIntensityMap", "specularColorMap"];
@@ -24,6 +24,10 @@ type ProjectModelViewerProps = ModelViewerProps & {
24
24
  /** An explicit clear command, distinct from clicking empty canvas space. */
25
25
  onSelectionClear?: () => void;
26
26
  /** Reports transform-gizmo edit leases for collaborative hosts. */
27
+ /** In the editor: a reference floor under the model. */
28
+ showFloorGrid?: boolean;
29
+ /** In the editor: show only move or only rotate handles. */
30
+ gizmoTool?: "move" | "rotate";
27
31
  onObjectEditLeaseChange?: (binding: ObjectBinding, editing: boolean) => void;
28
32
  /** The loaded three.js scene, which the editor builds bindings from. */
29
33
  onSceneLoaded?: (scene: Object3D) => void;
@@ -45,7 +49,7 @@ type ProjectModelViewerProps = ModelViewerProps & {
45
49
  declare function ProjectModelViewer(props: ProjectModelViewerProps): react.JSX.Element;
46
50
 
47
51
  /** Settings whose names or positions belong to a particular model. */
48
- type ModelSettings = Pick<SceneConfig, "annotations" | "animations" | "measurements" | "selectionSets" | "sequences"> & {
52
+ type ModelSettings = Pick<SceneConfig, "annotations" | "animations" | "measurements" | "selectionSets" | "sequences" | "product"> & {
49
53
  activeVariants?: string[];
50
54
  };
51
55
 
@@ -99,6 +103,10 @@ type BindingBuilderProjectChangeOrigin = "local" | "remote";
99
103
  * (BindingBuilder.tsx) neither declares nor forwards the rest.
100
104
  */
101
105
  type ProjectBindingBuilderProps = BindingBuilderProps & {
106
+ /** The host's own status (collaboration, sharing), shown in the top bar. */
107
+ topBarStart?: ReactNode;
108
+ /** The host's own way to publish, such as its share dialog, in Configure's last step. */
109
+ configurePublish?: ReactNode;
102
110
  /**
103
111
  * Validates the licence against this deployment's own API rather than the
104
112
  * licence service, so the public demo licence works on local and preview
@@ -128,6 +136,14 @@ type ProjectBindingBuilderProps = BindingBuilderProps & {
128
136
  * `project`, every image goes through this before it is reported.
129
137
  */
130
138
  onTextureUpload?: (file: File, objectId: string) => Promise<string>;
139
+ /**
140
+ * Receives a 640x360 JPEG of the scene for a projects list: once the model
141
+ * has loaded if `hasThumbnail` is false, then after local edits, whenever the
142
+ * editor has gone quiet. Rejecting tries again later.
143
+ */
144
+ onThumbnailCapture?: (image: Blob) => Promise<void>;
145
+ /** Whether the project already has a picture. Defaults to false. */
146
+ hasThumbnail?: boolean;
131
147
  /** Requests/releases a short collaborative lease around gizmo edits. */
132
148
  onEditLeaseChange?: (featureId: string, editing: boolean) => void;
133
149
  /**
@@ -137,7 +153,7 @@ type ProjectBindingBuilderProps = BindingBuilderProps & {
137
153
  */
138
154
  allowModelChange?: boolean;
139
155
  };
140
- declare function ProjectBindingBuilder({ licenseKey, licenseValidationUrl, arHandoff, mobileHandoffUrl, dracoDecoderPath, ktx2TranscoderPath, meshopt, project, onProjectChange, projectChangeDebounceMs, onModelUpload, onTextureUpload, onEditLeaseChange, allowModelChange, hideLicenseCheckingOverlay, }: ProjectBindingBuilderProps): react.JSX.Element;
156
+ declare function ProjectBindingBuilder({ topBarStart, configurePublish, licenseKey, licenseValidationUrl, arHandoff, mobileHandoffUrl, dracoDecoderPath, ktx2TranscoderPath, meshopt, project, onProjectChange, projectChangeDebounceMs, onModelUpload, onTextureUpload, onThumbnailCapture, hasThumbnail, onEditLeaseChange, allowModelChange, hideLicenseCheckingOverlay, }: ProjectBindingBuilderProps): react.JSX.Element;
141
157
 
142
158
  /** A model's view of the scene: the shared settings plus its own. */
143
159
  declare function sceneConfigForModel(sceneConfig: SceneConfig, model: BindingBuilderProjectModel): SceneConfig;