@liveroom-tech/react-immersive 4.3.0 → 5.0.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.
- package/README.md +697 -83
- package/dist/ModelViewer-CbbJT85n.d.mts +448 -0
- package/dist/ModelViewer-DOexHkJC.d.ts +448 -0
- package/dist/binding-builder.css +1 -0
- package/dist/binding-builder.d.mts +6 -0
- package/dist/binding-builder.d.ts +6 -0
- package/dist/binding-builder.js +3694 -0
- package/dist/binding-builder.mjs +1 -0
- package/dist/chunk-7EW6JZ46.mjs +27 -0
- package/dist/chunk-BGYK4Y2Y.mjs +1 -0
- package/dist/chunk-MMO7KCYU.mjs +3 -0
- package/dist/chunk-NVY7N7CU.mjs +3 -0
- package/dist/chunk-SEESCGUS.mjs +1 -0
- package/dist/chunk-WFEYRUZC.mjs +1 -0
- package/dist/chunk-XTLSAYAQ.mjs +1 -0
- package/dist/hosted.css +1 -1
- package/dist/hosted.d.mts +33 -13
- package/dist/hosted.d.ts +33 -13
- package/dist/hosted.js +11 -8
- package/dist/hosted.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.mts +107 -83
- package/dist/index.d.ts +107 -83
- package/dist/index.js +11 -8
- package/dist/index.mjs +1 -1
- package/dist/modelInfo-CEmmvVCH.d.mts +17 -0
- package/dist/modelInfo-CEmmvVCH.d.ts +17 -0
- package/dist/{objectBinding-CBRYMYk6.d.ts → objectCatalog-5W8n5xNQ.d.mts} +55 -3
- package/dist/{objectBinding-CBRYMYk6.d.mts → objectCatalog-5W8n5xNQ.d.ts} +55 -3
- package/dist/publicProps-tJuWZgT3.d.mts +12 -0
- package/dist/publicProps-tJuWZgT3.d.ts +12 -0
- package/dist/simple-model-viewer.css +1 -0
- package/dist/simple-model-viewer.d.mts +38 -0
- package/dist/simple-model-viewer.d.ts +38 -0
- package/dist/simple-model-viewer.js +3666 -0
- package/dist/simple-model-viewer.mjs +1 -0
- package/dist/utils.d.mts +49 -3
- package/dist/utils.d.ts +49 -3
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +28 -18
- package/dist/chunk-7X37KAPE.mjs +0 -1
- package/dist/chunk-GYB4BOVW.mjs +0 -26
- package/dist/chunk-K7DMBJBJ.mjs +0 -1
- package/dist/publicProps-BST1E8an.d.mts +0 -349
- package/dist/publicProps-Bv3_PCP0.d.ts +0 -349
package/dist/hosted.d.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { g as
|
|
4
|
-
import '
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { RefObject } from 'react';
|
|
3
|
+
import { g as ObjectBinding, J as SceneConfig } from './objectCatalog-5W8n5xNQ.js';
|
|
4
|
+
import { B as BindingBuilderProps } from './publicProps-tJuWZgT3.js';
|
|
5
|
+
import { n as ModelViewerProps } from './ModelViewer-DOexHkJC.js';
|
|
6
|
+
import { Object3D } from 'three';
|
|
7
|
+
import './modelInfo-CEmmvVCH.js';
|
|
5
8
|
import '@react-three/drei';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
declare const TEXTURE_KEYS: readonly ["texture", "metalnessMap", "roughnessMap", "emissiveMap", "alphaMap", "normalMap", "bumpMap", "aoMap", "displacementMap", "clearcoatMap", "clearcoatRoughnessMap", "clearcoatNormalMap", "anisotropyMap", "transmissionMap", "thicknessMap", "sheenColorMap", "sheenRoughnessMap", "specularIntensityMap", "specularColorMap"];
|
|
11
|
+
type MaterialTextureKey = (typeof TEXTURE_KEYS)[number];
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
14
|
* The full viewer's props: the public ones plus those only Liveroom's project
|
|
12
15
|
* editor passes, through the "/hosted" entry. The published ModelViewer
|
|
13
16
|
* (PublicModelViewer.tsx) drops the rest; publicProps.ts lists them.
|
|
14
17
|
*/
|
|
15
|
-
type
|
|
18
|
+
type ProjectModelViewerProps = ModelViewerProps & {
|
|
16
19
|
/**
|
|
17
20
|
* Validates the licence against this deployment's own API rather than the
|
|
18
21
|
* licence service. The response must carry a grant signed by the licence
|
|
@@ -21,8 +24,24 @@ type HostedModelViewerProps = ModelViewerProps & {
|
|
|
21
24
|
licenseValidationUrl?: string;
|
|
22
25
|
/** Reports transform-gizmo edit leases for collaborative hosts. */
|
|
23
26
|
onObjectEditLeaseChange?: (binding: ObjectBinding, editing: boolean) => void;
|
|
27
|
+
/** The loaded three.js scene, which the editor builds bindings from. */
|
|
28
|
+
onSceneLoaded?: (scene: Object3D) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Reports the object and texture slot being repositioned in Move/Zoom mode
|
|
31
|
+
* (double-click a textured object), or null once it ends, so the editor's
|
|
32
|
+
* texture fields know positioning is live.
|
|
33
|
+
*/
|
|
34
|
+
onTexturePositioningChange?: (target: {
|
|
35
|
+
objectKey: string;
|
|
36
|
+
textureKey: MaterialTextureKey;
|
|
37
|
+
} | null) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Receives a function that ends Move/Zoom mode the way a plain canvas click
|
|
40
|
+
* does, for the editor's own "Done positioning" button.
|
|
41
|
+
*/
|
|
42
|
+
endTexturePositioningRef?: RefObject<(() => void) | null>;
|
|
24
43
|
};
|
|
25
|
-
declare function
|
|
44
|
+
declare function ProjectModelViewer(props: ProjectModelViewerProps): react.JSX.Element;
|
|
26
45
|
|
|
27
46
|
type BindingBuilderProjectModel = {
|
|
28
47
|
url: string;
|
|
@@ -55,9 +74,9 @@ type BindingBuilderProjectChangeOrigin = "local" | "remote";
|
|
|
55
74
|
/**
|
|
56
75
|
* The full editor's props: the public ones plus those only Liveroom's project
|
|
57
76
|
* editor passes, through the "/hosted" entry. The published BindingBuilder
|
|
58
|
-
* (
|
|
77
|
+
* (BindingBuilder.tsx) neither declares nor forwards the rest.
|
|
59
78
|
*/
|
|
60
|
-
type
|
|
79
|
+
type ProjectBindingBuilderProps = BindingBuilderProps & {
|
|
61
80
|
/**
|
|
62
81
|
* Validates the licence against this deployment's own API rather than the
|
|
63
82
|
* licence service, so the public demo licence works on local and preview
|
|
@@ -82,6 +101,7 @@ type HostedBindingBuilderProps = BindingBuilderProps & {
|
|
|
82
101
|
* the durable model URL/version that should be saved with the project.
|
|
83
102
|
*/
|
|
84
103
|
onModelUpload?: (file: File) => Promise<BindingBuilderProject["model"]>;
|
|
104
|
+
onTextureUpload?: (file: File, objectId: string) => Promise<string>;
|
|
85
105
|
/** Requests/releases a short collaborative lease around gizmo edits. */
|
|
86
106
|
onEditLeaseChange?: (featureId: string, editing: boolean) => void;
|
|
87
107
|
/**
|
|
@@ -92,6 +112,6 @@ type HostedBindingBuilderProps = BindingBuilderProps & {
|
|
|
92
112
|
*/
|
|
93
113
|
allowModelChange?: boolean;
|
|
94
114
|
};
|
|
95
|
-
declare function
|
|
115
|
+
declare function ProjectBindingBuilder({ licenseKey, licenseValidationUrl, dracoDecoderPath, ktx2TranscoderPath, meshopt, project, onProjectChange, projectChangeDebounceMs, onModelUpload, onTextureUpload, onEditLeaseChange, allowModelChange, }: ProjectBindingBuilderProps): react.JSX.Element;
|
|
96
116
|
|
|
97
|
-
export { type BindingBuilderProject, type BindingBuilderProjectChangeOrigin, type BindingBuilderProjectModel, type BindingBuilderProjectSnapshot,
|
|
117
|
+
export { type BindingBuilderProject, type BindingBuilderProjectChangeOrigin, type BindingBuilderProjectModel, type BindingBuilderProjectSnapshot, ProjectBindingBuilder, type ProjectBindingBuilderProps, ProjectModelViewer, type ProjectModelViewerProps };
|