@liveroom-tech/react-immersive 6.0.2 → 6.1.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.
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-LWGOVQ6Y.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-37YITTIK.mjs +1 -0
  15. package/dist/chunk-5FLX45O5.mjs +2 -0
  16. package/dist/chunk-5PJ5MLKE.mjs +1 -0
  17. package/dist/chunk-644OGSQJ.mjs +83 -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-DEFZEXTA.mjs +1 -0
  24. package/dist/chunk-E24EFHB5.mjs +1 -0
  25. package/dist/chunk-EV6THDXD.mjs +1 -0
  26. package/dist/chunk-F5QSXMME.mjs +1 -0
  27. package/dist/chunk-FGAJ2UT7.mjs +1 -0
  28. package/dist/chunk-FXV4CLAK.mjs +1 -0
  29. package/dist/chunk-GV4ZRXL6.mjs +1 -0
  30. package/dist/chunk-KNCABWVN.mjs +47 -0
  31. package/dist/chunk-LX3GXQNU.mjs +1 -0
  32. package/dist/chunk-MLT4JQAY.mjs +1 -0
  33. package/dist/chunk-OPDRK3GS.mjs +1 -0
  34. package/dist/chunk-Z2VQGUC2.mjs +3 -0
  35. package/dist/hosted.css +1 -1
  36. package/dist/hosted.d.mts +24 -6
  37. package/dist/hosted.d.ts +24 -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-B8ADn9Nl.d.mts} +57 -7
  46. package/dist/{modelFileResolver-Co7j1tdQ.d.ts → modelFileResolver-B8ADn9Nl.d.ts} +57 -7
  47. package/dist/{modelViewerProps-BibuMND7.d.ts → modelViewerProps-BE4D56Ti.d.ts} +173 -3
  48. package/dist/{modelViewerProps-Ce4-wb57.d.mts → modelViewerProps-DBwh-fmu.d.mts} +173 -3
  49. package/dist/{publicProps-CP18d_mt.d.ts → publicProps-3LNTAskZ.d.ts} +1 -1
  50. package/dist/{publicProps-BaJHCDa_.d.mts → publicProps-Clr1nSE6.d.mts} +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-DBwh-fmu.mjs';
4
+ import { B as BindingBuilderProps } from './publicProps-Clr1nSE6.mjs';
5
5
  import { Object3D } from 'three';
6
- import './modelFileResolver-Co7j1tdQ.mjs';
6
+ import './modelFileResolver-B8ADn9Nl.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"];
@@ -21,9 +21,15 @@ type ProjectModelViewerProps = ModelViewerProps & {
21
21
  * service, so this cannot approve a licence by itself.
22
22
  */
23
23
  licenseValidationUrl?: string;
24
+ /** A phone handoff page with one action to start AR. */
25
+ arLanding?: boolean;
24
26
  /** An explicit clear command, distinct from clicking empty canvas space. */
25
27
  onSelectionClear?: () => void;
26
28
  /** Reports transform-gizmo edit leases for collaborative hosts. */
29
+ /** In the editor: a reference floor under the model. */
30
+ showFloorGrid?: boolean;
31
+ /** In the editor: show only move or only rotate handles. */
32
+ gizmoTool?: "move" | "rotate";
27
33
  onObjectEditLeaseChange?: (binding: ObjectBinding, editing: boolean) => void;
28
34
  /** The loaded three.js scene, which the editor builds bindings from. */
29
35
  onSceneLoaded?: (scene: Object3D) => void;
@@ -45,7 +51,7 @@ type ProjectModelViewerProps = ModelViewerProps & {
45
51
  declare function ProjectModelViewer(props: ProjectModelViewerProps): react.JSX.Element;
46
52
 
47
53
  /** Settings whose names or positions belong to a particular model. */
48
- type ModelSettings = Pick<SceneConfig, "annotations" | "animations" | "measurements" | "selectionSets" | "sequences"> & {
54
+ type ModelSettings = Pick<SceneConfig, "annotations" | "animations" | "measurements" | "selectionSets" | "sequences" | "product"> & {
49
55
  activeVariants?: string[];
50
56
  };
51
57
 
@@ -99,6 +105,10 @@ type BindingBuilderProjectChangeOrigin = "local" | "remote";
99
105
  * (BindingBuilder.tsx) neither declares nor forwards the rest.
100
106
  */
101
107
  type ProjectBindingBuilderProps = BindingBuilderProps & {
108
+ /** The host's own status (collaboration, sharing), shown in the top bar. */
109
+ topBarStart?: ReactNode;
110
+ /** The host's own way to publish, such as its share dialog, in Configure's last step. */
111
+ configurePublish?: ReactNode;
102
112
  /**
103
113
  * Validates the licence against this deployment's own API rather than the
104
114
  * licence service, so the public demo licence works on local and preview
@@ -128,6 +138,14 @@ type ProjectBindingBuilderProps = BindingBuilderProps & {
128
138
  * `project`, every image goes through this before it is reported.
129
139
  */
130
140
  onTextureUpload?: (file: File, objectId: string) => Promise<string>;
141
+ /**
142
+ * Receives a 640x360 JPEG of the scene for a projects list: once the model
143
+ * has loaded if `hasThumbnail` is false, then after local edits, whenever the
144
+ * editor has gone quiet. Rejecting tries again later.
145
+ */
146
+ onThumbnailCapture?: (image: Blob) => Promise<void>;
147
+ /** Whether the project already has a picture. Defaults to false. */
148
+ hasThumbnail?: boolean;
131
149
  /** Requests/releases a short collaborative lease around gizmo edits. */
132
150
  onEditLeaseChange?: (featureId: string, editing: boolean) => void;
133
151
  /**
@@ -137,7 +155,7 @@ type ProjectBindingBuilderProps = BindingBuilderProps & {
137
155
  */
138
156
  allowModelChange?: boolean;
139
157
  };
140
- declare function ProjectBindingBuilder({ licenseKey, licenseValidationUrl, arHandoff, mobileHandoffUrl, dracoDecoderPath, ktx2TranscoderPath, meshopt, project, onProjectChange, projectChangeDebounceMs, onModelUpload, onTextureUpload, onEditLeaseChange, allowModelChange, hideLicenseCheckingOverlay, }: ProjectBindingBuilderProps): react.JSX.Element;
158
+ 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
159
 
142
160
  /** A model's view of the scene: the shared settings plus its own. */
143
161
  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-BE4D56Ti.js';
4
+ import { B as BindingBuilderProps } from './publicProps-3LNTAskZ.js';
5
5
  import { Object3D } from 'three';
6
- import './modelFileResolver-Co7j1tdQ.js';
6
+ import './modelFileResolver-B8ADn9Nl.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"];
@@ -21,9 +21,15 @@ type ProjectModelViewerProps = ModelViewerProps & {
21
21
  * service, so this cannot approve a licence by itself.
22
22
  */
23
23
  licenseValidationUrl?: string;
24
+ /** A phone handoff page with one action to start AR. */
25
+ arLanding?: boolean;
24
26
  /** An explicit clear command, distinct from clicking empty canvas space. */
25
27
  onSelectionClear?: () => void;
26
28
  /** Reports transform-gizmo edit leases for collaborative hosts. */
29
+ /** In the editor: a reference floor under the model. */
30
+ showFloorGrid?: boolean;
31
+ /** In the editor: show only move or only rotate handles. */
32
+ gizmoTool?: "move" | "rotate";
27
33
  onObjectEditLeaseChange?: (binding: ObjectBinding, editing: boolean) => void;
28
34
  /** The loaded three.js scene, which the editor builds bindings from. */
29
35
  onSceneLoaded?: (scene: Object3D) => void;
@@ -45,7 +51,7 @@ type ProjectModelViewerProps = ModelViewerProps & {
45
51
  declare function ProjectModelViewer(props: ProjectModelViewerProps): react.JSX.Element;
46
52
 
47
53
  /** Settings whose names or positions belong to a particular model. */
48
- type ModelSettings = Pick<SceneConfig, "annotations" | "animations" | "measurements" | "selectionSets" | "sequences"> & {
54
+ type ModelSettings = Pick<SceneConfig, "annotations" | "animations" | "measurements" | "selectionSets" | "sequences" | "product"> & {
49
55
  activeVariants?: string[];
50
56
  };
51
57
 
@@ -99,6 +105,10 @@ type BindingBuilderProjectChangeOrigin = "local" | "remote";
99
105
  * (BindingBuilder.tsx) neither declares nor forwards the rest.
100
106
  */
101
107
  type ProjectBindingBuilderProps = BindingBuilderProps & {
108
+ /** The host's own status (collaboration, sharing), shown in the top bar. */
109
+ topBarStart?: ReactNode;
110
+ /** The host's own way to publish, such as its share dialog, in Configure's last step. */
111
+ configurePublish?: ReactNode;
102
112
  /**
103
113
  * Validates the licence against this deployment's own API rather than the
104
114
  * licence service, so the public demo licence works on local and preview
@@ -128,6 +138,14 @@ type ProjectBindingBuilderProps = BindingBuilderProps & {
128
138
  * `project`, every image goes through this before it is reported.
129
139
  */
130
140
  onTextureUpload?: (file: File, objectId: string) => Promise<string>;
141
+ /**
142
+ * Receives a 640x360 JPEG of the scene for a projects list: once the model
143
+ * has loaded if `hasThumbnail` is false, then after local edits, whenever the
144
+ * editor has gone quiet. Rejecting tries again later.
145
+ */
146
+ onThumbnailCapture?: (image: Blob) => Promise<void>;
147
+ /** Whether the project already has a picture. Defaults to false. */
148
+ hasThumbnail?: boolean;
131
149
  /** Requests/releases a short collaborative lease around gizmo edits. */
132
150
  onEditLeaseChange?: (featureId: string, editing: boolean) => void;
133
151
  /**
@@ -137,7 +155,7 @@ type ProjectBindingBuilderProps = BindingBuilderProps & {
137
155
  */
138
156
  allowModelChange?: boolean;
139
157
  };
140
- declare function ProjectBindingBuilder({ licenseKey, licenseValidationUrl, arHandoff, mobileHandoffUrl, dracoDecoderPath, ktx2TranscoderPath, meshopt, project, onProjectChange, projectChangeDebounceMs, onModelUpload, onTextureUpload, onEditLeaseChange, allowModelChange, hideLicenseCheckingOverlay, }: ProjectBindingBuilderProps): react.JSX.Element;
158
+ 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
159
 
142
160
  /** A model's view of the scene: the shared settings plus its own. */
143
161
  declare function sceneConfigForModel(sceneConfig: SceneConfig, model: BindingBuilderProjectModel): SceneConfig;