@liveroom-tech/react-immersive 4.0.0 → 4.0.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.
- package/README.md +27 -0
- package/dist/{bvhWorkerCode-YSVLRTCI.mjs → bvhWorkerCode-6366A3UC.mjs} +1 -1
- package/dist/chunk-JR557W27.mjs +1 -0
- package/dist/index.d.mts +63 -4
- package/dist/index.d.ts +63 -4
- package/dist/index.js +7 -7
- package/dist/index.mjs +6 -6
- package/dist/utils.mjs +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ It also exports types for `ObjectBinding`, `ObjectBindingMaterial`, `ObjectBindi
|
|
|
38
38
|
`ModelViewer` provides:
|
|
39
39
|
|
|
40
40
|
- GLB/GLTF, OBJ/MTL, FBX, and USDZ model rendering through `@react-three/fiber`
|
|
41
|
+
- camera-driven 3D Tiles streaming through `tilesetUrl`, with configurable screen-space error and bounded tile cache
|
|
41
42
|
- orbit/pan/zoom camera controls via `CameraControls`
|
|
42
43
|
- auto-fits the model on load, and re-fits when the canvas is resized (window resize, device rotation, or a panel opening/closing), toggleable through `refitOnResize` to instead preserve the user's orbit/zoom
|
|
43
44
|
- optional custom scene lighting through a `lights` prop
|
|
@@ -648,12 +649,38 @@ configuration as the viewers:
|
|
|
648
649
|
```ts
|
|
649
650
|
type BindingBuilderProps = {
|
|
650
651
|
licenseKey: string;
|
|
652
|
+
licenseValidationUrl?: string;
|
|
651
653
|
dracoDecoderPath?: string | false;
|
|
652
654
|
ktx2TranscoderPath?: string | false;
|
|
653
655
|
meshopt?: boolean;
|
|
656
|
+
project?: BindingBuilderProject | null;
|
|
657
|
+
onProjectChange?: (snapshot: BindingBuilderProjectSnapshot, origin: "local" | "remote") => void;
|
|
658
|
+
projectChangeDebounceMs?: number;
|
|
659
|
+
onModelUpload?: (file: File) => Promise<BindingBuilderProjectModel>;
|
|
660
|
+
onEditLeaseChange?: (featureId: string, editing: boolean) => void;
|
|
654
661
|
};
|
|
655
662
|
```
|
|
656
663
|
|
|
664
|
+
Pass `tilesetUrl` to `ModelViewer` for a processed 3D Tiles asset. The original
|
|
665
|
+
`modelUrl` remains the durable source/fallback URL, but is not downloaded by the
|
|
666
|
+
viewer while a tileset is present:
|
|
667
|
+
|
|
668
|
+
```tsx
|
|
669
|
+
<ModelViewer
|
|
670
|
+
modelUrl="https://assets.example.com/source/building.glb"
|
|
671
|
+
tilesetUrl="https://assets.example.com/tiles/building/tileset.json"
|
|
672
|
+
tilesErrorTarget={8}
|
|
673
|
+
tilesCacheSize={800}
|
|
674
|
+
licenseKey="your-license-key"
|
|
675
|
+
objectBindings={{}}
|
|
676
|
+
/>
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
Tiles are a dynamic level-of-detail scene, so automatic mesh binding generation
|
|
680
|
+
is intentionally disabled in streamed `BindingBuilder` projects. Scene settings
|
|
681
|
+
remain editable. Per-part editing requires the conversion pipeline to provide a
|
|
682
|
+
stable CAD/object catalog that can be mapped to tile feature metadata.
|
|
683
|
+
|
|
657
684
|
`licenseKey` is validated the same way as `ModelViewer`'s (see [`licenseKey`](#licensekey) below). While the key is being checked, `BindingBuilder` renders a "Verifying license…" placeholder; if it's invalid, it renders an error message instead of the editor.
|
|
658
685
|
|
|
659
686
|
Current behavior, Object tab:
|