@liveroom-tech/react-immersive 4.0.0 → 4.0.2

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 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:
@@ -955,6 +982,24 @@ ending in `.glb`, `.gltf`, `.obj`, `.fbx`, or `.usdz` are detected automatically
955
982
 
956
983
  License key for the library. Required.
957
984
 
985
+ ### `licenseValidationUrl`
986
+
987
+ Optional. Points license validation at a different endpoint, for first-party or
988
+ self-hosted consoles that proxy validation through their own origin instead of
989
+ calling `react-immersive.liveroom.dev` cross-origin.
990
+
991
+ This is not a way to self-approve a license. When this prop is set, a successful
992
+ response is only accepted if it carries an `offlineGrant` signed by the React
993
+ Immersive license service, verified against the ECDSA public key pinned in this
994
+ package — and the resulting `environment` and `tier` are read from that signed
995
+ grant, not from the surrounding JSON body. An endpoint that returns
996
+ `{"valid": true}` without a valid grant is treated as a broken license server:
997
+ the SDK falls back to a previously verified grant if one is cached, and
998
+ otherwise fails closed.
999
+
1000
+ In practice the endpoint must be a deployment of the official validation route
1001
+ configured with `LICENSE_GRANT_PRIVATE_KEY`.
1002
+
958
1003
  ### `objectBindings`
959
1004
 
960
1005
  A map keyed by the model node name. Each key should match a mesh name from the GLB/GLTF file.