@liveroom-tech/react-immersive 1.4.0 → 2.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.
package/README.md CHANGED
@@ -9,11 +9,15 @@ The library currently exports:
9
9
  ```ts
10
10
  import {
11
11
  BindingBuilder,
12
+ material,
12
13
  ModelViewer,
14
+ patchBindings,
15
+ patchSceneConfig,
13
16
  SimpleModelViewer,
14
17
  useObjectBinding,
15
18
  useObjectBindingIds,
16
- useObjectVisibility,
19
+ useObjectBindings,
20
+ useSceneConfig,
17
21
  useViewerActions,
18
22
  useViewerAnimations,
19
23
  useViewerCamera,
@@ -25,13 +29,13 @@ import {
25
29
  } from "@liveroom-tech/react-immersive";
26
30
  ```
27
31
 
28
- It also exports types for `ObjectBinding`, `ObjectBindingMaterial`, `ObjectActionEvent`, `SceneConfig`, `AnimationControls`, `CinematicConfig` / `CinematicWaypoint`, and related shapes used throughout this document.
32
+ It also exports types for `ObjectBinding`, `ObjectBindingMaterial`, `ObjectBindingsController`, `ObjectActionEvent`, `SceneConfig`, `SceneConfigPatch`, `SceneConfigController`, `AnimationControls`, `CinematicConfig` / `CinematicWaypoint`, and related shapes used throughout this document.
29
33
 
30
34
  `ModelViewer` provides:
31
35
 
32
36
  - GLB/GLTF model rendering through `@react-three/fiber` and `@react-three/drei`
33
37
  - orbit/pan/zoom camera controls via `CameraControls`
34
- - 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
38
+ - 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
35
39
  - optional custom scene lighting through a `lights` prop
36
40
  - optional custom camera configuration through a `camera` prop
37
41
  - optional custom background color through a `backgroundColor` prop
@@ -44,7 +48,7 @@ It also exports types for `ObjectBinding`, `ObjectBindingMaterial`, `ObjectActio
44
48
  - an optional UV Checker toolbar button through `showUvCheckerButton`, for inspecting UV scale, stretching, seams, orientation, and missing UV0 coordinates directly in `ModelViewer`
45
49
  - click-to-measure distance tool and a bounding-box dimensions overlay through `showMeasureTools` and `measurementUnit`
46
50
  - an exploded-view slider that slides each bound part outward from the model center to reveal interior/assembly structure through `showExplodeControls`
47
- - a cinematic auto-camera that glides the camera along authored waypoints (or a zero-config showcase orbit), like a film, through `cinematic` — with a play/pause control that yields the moment you touch the camera
51
+ - a cinematic auto-camera that glides the camera along authored waypoints (or a zero-config showcase orbit), like a film, through `cinematic`, with a play/pause control that yields the moment you touch the camera
48
52
  - a guided-tour control cluster (Previous/Stop/Next) for stepping through annotations, toggleable via `showAnnotationNavigation`
49
53
  - optional annotation detail popups on marker hover via `showAnnotationOnHover`
50
54
  - PBR, Matcap, and UV Checker renderer modes, with the checker exposing UV stretching, seams, rotation, and missing UV0 data directly on the model
@@ -77,10 +81,10 @@ It also exports types for `ObjectBinding`, `ObjectBindingMaterial`, `ObjectActio
77
81
  - a one-click material preset gallery (wood, metal, chrome, glass, plastic, fabric, ceramic, concrete, etc.)
78
82
  - undo/redo for both the Object tab's bindings and the Scene tab's config, independently, with `Cmd/Ctrl+Z` / `Cmd/Ctrl+Shift+Z` shortcuts
79
83
  - a Scene tab for the same `sceneConfig` shape `ModelViewer` accepts (lighting, environment, background, post-processing, animations, annotations, and cinematic camera paths)
80
- - a Cinematic sub-tab for authoring a camera path visually — frame the model, capture the current view as a waypoint, reorder/preview/delete waypoints, and toggle loop/auto-play; stored on `sceneConfig.cinematic` and replayed by `ModelViewer`'s `cinematic` prop
84
+ - a Cinematic sub-tab for authoring a camera path visually, frame the model, capture the current view as a waypoint, reorder/preview/delete waypoints, and toggle loop/auto-play; stored on `sceneConfig.cinematic` and replayed by `ModelViewer`'s `cinematic` prop
81
85
  - import a previously exported `objectBindings.json` or `sceneConfig.json` and merge it back onto the current model/config
82
86
  - live preview using `ModelViewer`
83
- - export as JSON or TypeScript — bundled into a `.zip` with a `materials/` folder automatically when any texture field was filled by file upload, otherwise a plain file
87
+ - export as JSON or TypeScript, bundled into a `.zip` with a `materials/` folder automatically when any texture field was filled by file upload, otherwise a plain file
84
88
  - license-tier gating for some editor features (texture maps, environment lighting/backgrounds, wireframe preview, animation configuration, annotations, post-processing)
85
89
 
86
90
  `SimpleModelViewer` provides:
@@ -162,36 +166,36 @@ Peer dependencies:
162
166
  - `react >= 17`
163
167
  - `react-dom >= 17`
164
168
 
165
- `ModelViewer` and `BindingBuilder` require a `licenseKey` at runtime (see [`licenseKey`](#licensekey)). Get one from the Developer Portal — see [Resources](#resources) below.
169
+ `ModelViewer` and `BindingBuilder` require a `licenseKey` at runtime (see [`licenseKey`](#licensekey)). Get one from the Developer Portal, see [Resources](#resources) below.
166
170
 
167
171
  ## Resources
168
172
 
169
- - [Developer Portal](https://react-immersive.liveroom.dev) — sign in, pick a plan, and generate a `licenseKey`
170
- - [Docs](https://react-immersive.liveroom.dev/docs) — full reference for every component, hook, and prop
171
- - [Examples & community repo](https://github.com/liveroom-technologies/react-immersive) — public docs source, starter examples, and community resources
172
- - [Report a bug / request a feature](https://github.com/liveroom-technologies/react-immersive-docs/issues) — for public bug reports, docs issues, and feature requests
173
- - [Discussions & Q&A](https://github.com/liveroom-technologies/react-immersive-docs/discussions) — ask questions, share ideas, and compare approaches
174
- - [Private support / security](mailto:developers@liveroom.xyz?subject=React%20Immersive%20Support) — for license, account, confidential customer, or security-sensitive issues
175
- - [Live editor](https://react-immersive.liveroom.dev/editor) — try `BindingBuilder` in the browser without installing anything
173
+ - [Developer Portal](https://react-immersive.liveroom.dev), sign in, pick a plan, and generate a `licenseKey`
174
+ - [Docs](https://react-immersive.liveroom.dev/docs), full reference for every component, hook, and prop
175
+ - [Examples & community repo](https://github.com/liveroom-technologies/react-immersive), public docs source, starter examples, and community resources
176
+ - [Report a bug / request a feature](https://github.com/liveroom-technologies/react-immersive-docs/issues), for public bug reports, docs issues, and feature requests
177
+ - [Discussions & Q&A](https://github.com/liveroom-technologies/react-immersive-docs/discussions), ask questions, share ideas, and compare approaches
178
+ - [Private support / security](mailto:developers@liveroom.xyz?subject=React%20Immersive%20Support), for license, account, confidential customer, or security-sensitive issues
179
+ - [Live editor](https://react-immersive.liveroom.dev/editor), try `BindingBuilder` in the browser without installing anything
176
180
  - [npm package](https://www.npmjs.com/package/@liveroom-tech/react-immersive)
177
181
 
178
182
  ## Quick Start
179
183
 
180
184
  ```tsx
181
- import { useState } from "react";
182
185
  import {
183
186
  ModelViewer,
184
187
  useObjectBinding,
185
- useObjectVisibility,
188
+ useObjectBindings,
186
189
  useViewerActions,
187
190
  useViewerAnimations,
188
191
  useViewerCamera,
189
192
  useViewerHover,
190
193
  useViewerModel,
191
194
  useViewerSelection,
195
+ type ObjectBinding,
192
196
  } from "@liveroom-tech/react-immersive";
193
197
 
194
- const initialBindings = {
198
+ const initialBindings: Record<string, ObjectBinding> = {
195
199
  CarBody: {
196
200
  id: "car-body",
197
201
  modelObjectId: "CarBody",
@@ -220,7 +224,12 @@ const initialBindings = {
220
224
  };
221
225
 
222
226
  export default function Example() {
223
- const [objectBindings, setObjectBindings] = useState(initialBindings);
227
+ const {
228
+ objectBindings,
229
+ setObjectBindings,
230
+ hiddenObjects,
231
+ toggleObjectVisibility,
232
+ } = useObjectBindings(initialBindings);
224
233
  const { selectedObjectBinding, handleObjectSelect } = useViewerSelection();
225
234
  const { hoveredObjectBinding, handleHoveredObject } = useViewerHover();
226
235
  const {
@@ -241,10 +250,6 @@ export default function Example() {
241
250
  handleModelLoaded,
242
251
  handleLoadError,
243
252
  } = useViewerModel();
244
- const { hiddenObjects, toggleObjectVisibility } = useObjectVisibility(
245
- objectBindings,
246
- setObjectBindings,
247
- );
248
253
  const { getActionsForObject, runAction } = useViewerActions(objectBindings, {
249
254
  onAction: (event) => {},
250
255
  onObjectBindingsChange: setObjectBindings,
@@ -325,12 +330,17 @@ const ids = useObjectBindingIds(objectBindings);
325
330
  // → ["CarBody", "WheelFL", "WheelFR", ...]
326
331
  ```
327
332
 
328
- If you want to control object visibility outside the viewer, the library also exports:
333
+ If you want one state owner for binding patches, materials, and visibility, use `useObjectBindings`:
329
334
 
330
335
  ```tsx
331
- const [objectBindings, setObjectBindings] = useState(initialBindings);
332
-
333
336
  const {
337
+ objectBindings,
338
+ setObjectBindings,
339
+ updateObjectBindings,
340
+ setMaterial,
341
+ setBaseColor,
342
+ resetMaterial,
343
+ getMaterial,
334
344
  hiddenObjects,
335
345
  hiddenObjectIds,
336
346
  hideObject,
@@ -338,7 +348,7 @@ const {
338
348
  toggleObjectVisibility,
339
349
  isObjectHidden,
340
350
  clearHiddenObjects,
341
- } = useObjectVisibility(objectBindings, setObjectBindings);
351
+ } = useObjectBindings(initialBindings);
342
352
 
343
353
  <ModelViewer
344
354
  modelUrl="/model.glb"
@@ -348,22 +358,56 @@ const {
348
358
  />;
349
359
  ```
350
360
 
351
- `useObjectVisibility` is a stateless utility hook. It does not own its own copy of `objectBindings` — the consumer owns the state and passes both the current value and its setter. The hook's methods (`hideObject`, `showObject`, etc.) call the setter directly, so there is no risk of the hook and the viewer drifting out of sync.
361
+ `useObjectBindings` owns the state used by the viewer. Every setter uses a functional update, so consecutive material, visibility, and general binding updates in the same tick compose instead of overwriting each other.
352
362
 
353
- It accepts either:
363
+ Object identifiers accepted by its methods can be:
354
364
 
355
365
  - the object binding map key
356
366
  - `binding.id`
357
367
  - `binding.modelObjectId`
358
368
 
359
- and returns:
369
+ The hook returns:
360
370
 
371
+ - `objectBindings` and `setObjectBindings`
372
+ - `updateObjectBindings` for any binding field or atomic edit batch
373
+ - `setMaterial`, `setBaseColor`, `resetMaterial`, and `getMaterial`
361
374
  - `hiddenObjects`: a derived map of hidden binding keys
362
375
  - `hiddenObjectIds`: the currently hidden binding IDs
363
376
  - `hideObject`, `showObject`, `toggleObjectVisibility`
364
377
  - `isObjectHidden`
365
378
  - `clearHiddenObjects`
366
379
 
380
+ For scene-wide state, use `useSceneConfig`:
381
+
382
+ ```tsx
383
+ const {
384
+ sceneConfig,
385
+ setSceneConfig,
386
+ updateSceneConfig,
387
+ resetSceneConfig,
388
+ } = useSceneConfig(initialSceneConfig);
389
+
390
+ const enableUvChecker = () =>
391
+ updateSceneConfig({
392
+ model: { renderer: "uv-checker" },
393
+ lighting: { ambient: { intensity: 0.5 } },
394
+ });
395
+
396
+ <ModelViewer
397
+ modelUrl="/model.glb"
398
+ licenseKey="your-license-key"
399
+ objectBindings={objectBindings}
400
+ sceneConfig={sceneConfig}
401
+ />;
402
+
403
+ <button onClick={enableUvChecker}>Show UV checker</button>;
404
+ ```
405
+
406
+ Nested objects merge recursively, while arrays and tuples are replaced. Every
407
+ update uses a functional state updater, so consecutive calls compose. Use the
408
+ pure `patchSceneConfig(sceneConfig, patch)` utility when a store or parent owns
409
+ the scene state.
410
+
367
411
  If you want to keep hover state in sync with the viewer, the library also exports:
368
412
 
369
413
  ```tsx
@@ -460,7 +504,7 @@ type BindingBuilderProps = {
460
504
 
461
505
  `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.
462
506
 
463
- Current behavior — Object tab:
507
+ Current behavior, Object tab:
464
508
 
465
509
  - load the bundled demo model or upload a `.glb`, standalone/data-URI `.gltf`, or `.zip` containing a `.gltf` plus its referenced `.bin` and texture files
466
510
  - traverse renderable mesh nodes and generate starter bindings automatically
@@ -468,9 +512,9 @@ Current behavior — Object tab:
468
512
  - apply a one-click material preset (wood, metal, chrome, glass, plastic, fabric, ceramic, concrete, etc.) onto the selected object's material
469
513
  - undo/redo the current bindings (toolbar buttons or `Cmd/Ctrl+Z` / `Cmd/Ctrl+Shift+Z`); rapid edits coalesce into a single undo step
470
514
  - import a previously exported `objectBindings.json`, merged onto the current model by `modelObjectId`
471
- - export the current bindings as JSON or TypeScript — bundled into a `.zip` (with a `materials/` folder) when any texture field was filled by uploading a file, otherwise a plain file
515
+ - export the current bindings as JSON or TypeScript, bundled into a `.zip` (with a `materials/` folder) when any texture field was filled by uploading a file, otherwise a plain file
472
516
 
473
- Current behavior — Scene tab:
517
+ Current behavior, Scene tab:
474
518
 
475
519
  - configure the same `SceneConfig` shape `ModelViewer`'s `sceneConfig` prop accepts (lighting, environment, background, ground shadows, wireframe, post-processing, animations, annotations)
476
520
  - undo/redo the scene config independently of the Object tab's bindings history
@@ -511,7 +555,7 @@ export default function App() {
511
555
  }
512
556
  ```
513
557
 
514
- `SimpleModelViewer` does not take a `licenseKey` — licensing is enforced by `ModelViewer` and `BindingBuilder` only.
558
+ `SimpleModelViewer` does not take a `licenseKey`, licensing is enforced by `ModelViewer` and `BindingBuilder` only.
515
559
 
516
560
  Sizing note:
517
561
 
@@ -810,8 +854,8 @@ Optional callback fired when the viewer's built-in UI updates binding data.
810
854
  This fires for:
811
855
 
812
856
  - visibility toggles (`binding.visible`)
813
- - color picks (`binding.style.material.baseColor`) — committed when the color picker closes
814
- - texture uploads (`binding.style.material.texture.path`) — committed immediately (via `onTextureUpload` when provided, otherwise as a blob URL)
857
+ - color picks (`binding.style.material.baseColor`), committed when the color picker closes
858
+ - texture uploads (`binding.style.material.texture.path`), committed immediately (via `onTextureUpload` when provided, otherwise as a blob URL)
815
859
  - texture removal (`binding.style.material.texture` cleared)
816
860
 
817
861
  If you want the viewer and your app state to stay in sync, pass `objectBindings` from state and wire this callback back into that state setter.
@@ -894,7 +938,7 @@ onViewerReady={(viewer) => {
894
938
  }}
895
939
  ```
896
940
 
897
- Note: requesting a custom `width`/`height` briefly resizes the live canvas to render at that resolution before restoring it, which can cause a momentary flicker on screen — fine for an occasional snapshot, not for rapid/looped calls.
941
+ Note: requesting a custom `width`/`height` briefly resizes the live canvas to render at that resolution before restoring it, which can cause a momentary flicker on screen, fine for an occasional snapshot, not for rapid/looped calls.
898
942
 
899
943
  If you're also using `useViewerCamera`'s `handleViewerReady`, call both from your own `onViewerReady` to get camera helpers and `captureImage` together:
900
944
 
@@ -1011,7 +1055,7 @@ function CustomLights() {
1011
1055
 
1012
1056
  Optional custom camera configuration passed through to the underlying React Three Fiber `Canvas`.
1013
1057
 
1014
- `ModelViewer` only sets a default `fov: 50` — it does not set a default position, so an unset position falls back to React Three Fiber's own `Canvas` default (`[0, 0, 5]`). Pass an explicit `position` for predictable framing.
1058
+ `ModelViewer` only sets a default `fov: 50`, it does not set a default position, so an unset position falls back to React Three Fiber's own `Canvas` default (`[0, 0, 5]`). Pass an explicit `position` for predictable framing.
1015
1059
 
1016
1060
  Example:
1017
1061
 
@@ -1187,7 +1231,7 @@ true;
1187
1231
 
1188
1232
  ### `showMouseController`
1189
1233
 
1190
- Optional boolean that renders an on-screen joystick controller for moving the camera with a mouse or touch — useful on touch devices or kiosk layouts where drag-to-orbit is awkward.
1234
+ Optional boolean that renders an on-screen joystick controller for moving the camera with a mouse or touch, useful on touch devices or kiosk layouts where drag-to-orbit is awkward.
1191
1235
 
1192
1236
  Default:
1193
1237
 
@@ -1299,7 +1343,7 @@ true;
1299
1343
 
1300
1344
  ### `onAutoFit`
1301
1345
 
1302
- Optional async callback fired once the model has loaded and the scene is ready. When provided, the viewer calls it so consumers can run their own fit-to-scene behavior (e.g. an animated fit); if omitted, the viewer falls back to its internal `fitScene` — unless an explicit [`camera`](#camera) prop was given, in which case that position is treated as the chosen initial view and `fitScene` is skipped.
1346
+ Optional async callback fired once the model has loaded and the scene is ready. When provided, the viewer calls it so consumers can run their own fit-to-scene behavior (e.g. an animated fit); if omitted, the viewer falls back to its internal `fitScene`, unless an explicit [`camera`](#camera) prop was given, in which case that position is treated as the chosen initial view and `fitScene` is skipped.
1303
1347
 
1304
1348
  Current callback shape:
1305
1349
 
@@ -1309,7 +1353,7 @@ Current callback shape:
1309
1353
 
1310
1354
  ### `refitOnResize`
1311
1355
 
1312
- Optional boolean controlling whether the camera re-frames the model to fit whenever the canvas is resized — a browser window resize, a device rotation, or a side panel opening/closing (which changes how much width the canvas has). Set to `false` to preserve the user's current orbit/zoom across resizes; the camera aspect stays correct either way, so the model never distorts, it just isn't re-centered. This only affects re-fits _after_ the initial mount-time auto-fit.
1356
+ Optional boolean controlling whether the camera re-frames the model to fit whenever the canvas is resized, a browser window resize, a device rotation, or a side panel opening/closing (which changes how much width the canvas has). Set to `false` to preserve the user's current orbit/zoom across resizes; the camera aspect stays correct either way, so the model never distorts, it just isn't re-centered. This only affects re-fits _after_ the initial mount-time auto-fit.
1313
1357
 
1314
1358
  Default:
1315
1359
 
@@ -1372,9 +1416,9 @@ Optional control over how aggressively the viewer trades visual fidelity for a s
1372
1416
  performanceProfile?: "auto" | "high" | "low";
1373
1417
  ```
1374
1418
 
1375
- - `"auto"` (default) — applies a reduced profile on handheld/mobile browsers and other low-power touch devices: the postprocessing pipeline is skipped, soft shadows are disabled, and the device pixel ratio is capped. Desktop-class touch devices may still keep the higher-quality path when they advertise plenty of memory. This keeps mobile GPUs within their memory budget so the context isn't lost — which also keeps WebXR (`enableXR`) usable, since a lost context can't start a session.
1376
- - `"high"` — always render at full quality (postprocessing, soft shadows, full `maxDpr`), even on mobile. Use when you know the target devices can handle it.
1377
- - `"low"` — always apply the reduced profile, on any device.
1419
+ - `"auto"` (default), applies a reduced profile on handheld/mobile browsers and other low-power touch devices: the postprocessing pipeline is skipped, soft shadows are disabled, and the device pixel ratio is capped. Desktop-class touch devices may still keep the higher-quality path when they advertise plenty of memory. This keeps mobile GPUs within their memory budget so the context isn't lost, which also keeps WebXR (`enableXR`) usable, since a lost context can't start a session.
1420
+ - `"high"`, always render at full quality (postprocessing, soft shadows, full `maxDpr`), even on mobile. Use when you know the target devices can handle it.
1421
+ - `"low"`, always apply the reduced profile, on any device.
1378
1422
 
1379
1423
  Default:
1380
1424
 
@@ -1420,7 +1464,7 @@ false;
1420
1464
 
1421
1465
  ### `measurementUnit`
1422
1466
 
1423
- Optional unit suffix appended to measurement readouts. glTF models are authored in meters by spec, so values are not converted — this only changes the displayed label.
1467
+ Optional unit suffix appended to measurement readouts. glTF models are authored in meters by spec, so values are not converted, this only changes the displayed label.
1424
1468
 
1425
1469
  Default:
1426
1470
 
@@ -1430,7 +1474,7 @@ Default:
1430
1474
 
1431
1475
  ### `showExplodeControls`
1432
1476
 
1433
- Optional boolean that shows an exploded-view slider over the canvas. It slides each bound part outward from the model center to reveal interior/assembly structure, then back to reassemble. Best suited to static product/CAD models — the offset writes node positions each frame, so it conflicts with a playing skeletal animation.
1477
+ Optional boolean that shows an exploded-view slider over the canvas. It slides each bound part outward from the model center to reveal interior/assembly structure, then back to reassemble. Best suited to static product/CAD models, the offset writes node positions each frame, so it conflicts with a playing skeletal animation.
1434
1478
 
1435
1479
  Default:
1436
1480
 
@@ -1440,7 +1484,7 @@ false;
1440
1484
 
1441
1485
  ### `cinematic`
1442
1486
 
1443
- Optional cinematic auto-camera. The camera glides along a path on its own, like a film — ideal for showing off a gallery, apartment, or product with no user interaction. Renders a play/pause button over the canvas; grabbing the camera (or selecting a part) pauses it.
1487
+ Optional cinematic auto-camera. The camera glides along a path on its own, like a film, ideal for showing off a gallery, apartment, or product with no user interaction. Renders a play/pause button over the canvas; grabbing the camera (or selecting a part) pauses it.
1444
1488
 
1445
1489
  ```ts
1446
1490
  cinematic?: boolean | CinematicConfig;
@@ -1462,7 +1506,7 @@ type CinematicWaypoint = {
1462
1506
  - Two or more `waypoints` author a **walkthrough**: the camera follows a smooth Catmull-Rom spline through them at a constant on-screen speed, looping seamlessly.
1463
1507
  - Waypoints are easiest to capture visually in `BindingBuilder`'s **Cinematic** tab, which stores them on `sceneConfig.cinematic`.
1464
1508
 
1465
- A path can also come from `sceneConfig.cinematic`. The `cinematic` prop overrides it: a boolean toggles the feature (`true` keeps any authored waypoints, `false` forces it off), and an object overrides field-by-field — so you can keep the authored waypoints while overriding, say, `autoPlay` or `loop`.
1509
+ A path can also come from `sceneConfig.cinematic`. The `cinematic` prop overrides it: a boolean toggles the feature (`true` keeps any authored waypoints, `false` forces it off), and an object overrides field-by-field, so you can keep the authored waypoints while overriding, say, `autoPlay` or `loop`.
1466
1510
 
1467
1511
  ```tsx
1468
1512
  // Zero-config showcase orbit
@@ -1498,7 +1542,7 @@ arbitrary uploads and room scenes are framed safely. Set
1498
1542
  [`arScaleMode`](#arscalemode) to `"real-world"` for product AR, which preserves
1499
1543
  the GLB's authored metre scale.
1500
1544
 
1501
- **AR placement gestures** — inside an AR session the viewer now uses an explicit placement flow:
1545
+ **AR placement gestures**, inside an AR session the viewer now uses an explicit placement flow:
1502
1546
 
1503
1547
  - before placement, a bottom label says **"Move your device over a flat surface"** until a hit-testable surface is found
1504
1548
  - once a surface is found, a reticle appears on it and the label changes to **"Tap to place"**
@@ -1508,7 +1552,7 @@ the GLB's authored metre scale.
1508
1552
 
1509
1553
  VR sessions keep the initial framed placement (there are no real surfaces to hit-test against).
1510
1554
 
1511
- > Postprocessing is automatically disabled during an XR session (the effect composer isn't WebXR-aware). Note also that on low-power devices the default [`performanceProfile`](#performanceprofile) of `"auto"` already disables postprocessing and soft shadows — important for keeping the WebGL context alive so AR can start at all.
1555
+ > Postprocessing is automatically disabled during an XR session (the effect composer isn't WebXR-aware). Note also that on low-power devices the default [`performanceProfile`](#performanceprofile) of `"auto"` already disables postprocessing and soft shadows, important for keeping the WebGL context alive so AR can start at all.
1512
1556
 
1513
1557
  Default:
1514
1558
 
@@ -1619,7 +1663,7 @@ type SimpleModelViewerProps = {
1619
1663
  };
1620
1664
  ```
1621
1665
 
1622
- `SimpleModelViewer` does not take a `licenseKey` — licensing is enforced by `ModelViewer` and `BindingBuilder` only.
1666
+ `SimpleModelViewer` does not take a `licenseKey`, licensing is enforced by `ModelViewer` and `BindingBuilder` only.
1623
1667
 
1624
1668
  ### `modelUrl`
1625
1669
 
@@ -1657,7 +1701,7 @@ true;
1657
1701
 
1658
1702
  ### Scene settings defaults
1659
1703
 
1660
- The following optional props seed the initial values of the scene settings (environment) panel. Each maps to one control, and the panel stays interactive so the user can still adjust them at runtime. They are initial values (not controlled props): changing one after mount does not override a value the user has since changed in the panel — the exception is `backgroundColor`, which stays in sync live.
1704
+ The following optional props seed the initial values of the scene settings (environment) panel. Each maps to one control, and the panel stays interactive so the user can still adjust them at runtime. They are initial values (not controlled props): changing one after mount does not override a value the user has since changed in the panel, the exception is `backgroundColor`, which stays in sync live.
1661
1705
 
1662
1706
  | Prop | Type | Panel control | Default |
1663
1707
  | ---------------------- | ------------- | ----------------------- | ----------- |
@@ -1716,7 +1760,7 @@ true;
1716
1760
 
1717
1761
  ### `refitOnResize`
1718
1762
 
1719
- Optional boolean controlling whether the camera re-frames the model to fit whenever the canvas is resized — a browser window resize, a device rotation, or a side panel (scene settings / scene objects) opening or closing. Set to `false` to preserve the user's current orbit/zoom across resizes; the camera aspect stays correct either way, so the model never distorts, it just isn't re-centered.
1763
+ Optional boolean controlling whether the camera re-frames the model to fit whenever the canvas is resized, a browser window resize, a device rotation, or a side panel (scene settings / scene objects) opening or closing. Set to `false` to preserve the user's current orbit/zoom across resizes; the camera aspect stays correct either way, so the model never distorts, it just isn't re-centered.
1720
1764
 
1721
1765
  Default:
1722
1766
 
@@ -1821,7 +1865,7 @@ At a high level, the current viewer does the following:
1821
1865
  3. looks up meshes by the keys in `objectBindings` (resolving `modelObjectId` to find the actual model node)
1822
1866
  4. clones each referenced material so edits stay isolated per object (keyed on a structural signature of the binding-to-mesh mapping, not the `objectBindings` reference, so materials are not recreated on every binding update)
1823
1867
  5. applies runtime color, texture, and style overrides from `objectBindings` in a `useEffect` (not during render)
1824
- 6. manages a reference-counted texture cache so the same texture URL is decoded once and disposed when no longer referenced; each texture is decoded in the correct color space — color maps (base color/albedo, emissive, sheen color, specular color) as sRGB and data maps (normal, roughness, metalness, AO, displacement, etc.) as linear — and the cache is keyed by URL **and** color space, so the same image can be reused safely as both a color and a data map
1868
+ 6. manages a reference-counted texture cache so the same texture URL is decoded once and disposed when no longer referenced; each texture is decoded in the correct color space, color maps (base color/albedo, emissive, sheen color, specular color) as sRGB and data maps (normal, roughness, metalness, AO, displacement, etc.) as linear, and the cache is keyed by URL **and** color space, so the same image can be reused safely as both a color and a data map
1825
1869
  7. adds hover, selected, and panel-hover emissive highlighting
1826
1870
  8. creates an `AnimationMixer` for the loaded scene, ticked every frame via `useFrame`, and exposes playback controls through `onAnimationsReady`
1827
1871
  9. renders a side panel for the selected object and its configured actions
@@ -1833,7 +1877,7 @@ Only objects listed in `objectBindings` are rendered interactively by the curren
1833
1877
  When `shadows` is enabled (the default), the canvas renders soft shadow maps and the viewer applies:
1834
1878
 
1835
1879
  - a default light rig (`Lights`) with ambient + hemisphere fill and a directional key light that casts shadows, sized to the model
1836
- - per-mesh `castShadow`/`receiveShadow`, with one exception: the large enclosing "shell" mesh (walls/ceiling of an interior model) is detected by its bounding-box size and excluded from **casting** so a top-down light still reaches the interior — it continues to **receive** shadows, so furniture casts visible contact shadows onto the floor and walls
1880
+ - per-mesh `castShadow`/`receiveShadow`, with one exception: the large enclosing "shell" mesh (walls/ceiling of an interior model) is detected by its bounding-box size and excluded from **casting** so a top-down light still reaches the interior, it continues to **receive** shadows, so furniture casts visible contact shadows onto the floor and walls
1837
1881
  - a post-processing stack (`EffectComposer`) with SSAO ambient occlusion (normal pass enabled), bloom, vignette, and ACES filmic tone mapping
1838
1882
 
1839
1883
  Pass `shadows={false}` to disable shadow rendering entirely, or pass a custom `lights` rig to replace the default lighting.
@@ -1874,16 +1918,16 @@ instead of freezing:
1874
1918
  still works
1875
1919
  - a dismissible banner tells the user the model is very large, may render
1876
1920
  slowly on their device, and that selection is available through the panel
1877
- - the loading overlay calls out the extra work — uploading that much geometry
1921
+ - the loading overlay calls out the extra work, uploading that much geometry
1878
1922
  to the GPU is a single synchronous operation that can block the page for
1879
1923
  tens of seconds in any WebGL viewer
1880
1924
 
1881
1925
  Orbit, zoom, animations, annotations, and the panels keep working. There is no
1882
- viewer-side way to make models of this size feel fast — the per-frame cost is
1926
+ viewer-side way to make models of this size feel fast, the per-frame cost is
1883
1927
  inherent, and on mobile devices the decoded geometry alone can exceed the
1884
1928
  tab's memory budget. Decimate such assets at ingestion (to roughly 2–3M
1885
1929
  triangles) instead of shipping the raw export; note that very large
1886
- Draco-compressed files need Blender or native tooling to decimate — the WASM
1930
+ Draco-compressed files need Blender or native tooling to decimate, the WASM
1887
1931
  builds of `gltf-transform` and `gltfpack` cannot decode them within their 4GB
1888
1932
  address space.
1889
1933
 
@@ -1891,9 +1935,9 @@ Two related picking notes that apply to models of every size:
1891
1935
 
1892
1936
  - clicks resolve the front-most surface under the pointer; a mesh with
1893
1937
  `selectable: false` does not pass the click through to meshes behind it
1894
- - `SimpleModelViewer` renders on demand — an idle viewer draws no frames, so
1938
+ - `SimpleModelViewer` renders on demand, an idle viewer draws no frames, so
1895
1939
  it costs no GPU time or battery until something changes
1896
1940
 
1897
1941
  ## License
1898
1942
 
1899
- Proprietary — see [LICENSE](./LICENSE). Installing the package does not itself grant a right to use it in production; a valid `licenseKey` from the [Developer Portal](https://react-immersive.liveroom.dev) is required, and usage is bound to the terms of your license tier.
1943
+ Proprietary, see [LICENSE](./LICENSE). Installing the package does not itself grant a right to use it in production; a valid `licenseKey` from the [Developer Portal](https://react-immersive.liveroom.dev) is required, and usage is bound to the terms of your license tier.
package/dist/index.d.mts CHANGED
@@ -664,17 +664,76 @@ declare function useObjectBinding(objectBindings: Record<string, ObjectBinding>,
664
664
 
665
665
  declare function useObjectBindingIds(objectBindings: Record<string, ObjectBinding>): string[];
666
666
 
667
+ type DeepPartial<T> = T extends readonly unknown[] ? T : T extends object ? {
668
+ [K in keyof T]?: DeepPartial<T[K]>;
669
+ } : T;
670
+
671
+ type ObjectBindingPatch = DeepPartial<ObjectBinding>;
672
+ type BindingEdit = {
673
+ ids: string | string[];
674
+ patch: ObjectBindingPatch;
675
+ };
676
+ /**
677
+ * Applies field-level patches to object bindings and returns the updated
678
+ * record. Pure — nothing is mutated, and the original reference comes back
679
+ * untouched when no id matched, so React can skip the re-render.
680
+ *
681
+ * Ids resolve the same way everywhere else in the library: binding key first,
682
+ * then `binding.id`, then `binding.modelObjectId`.
683
+ */
684
+ declare function patchBindings(bindings: Record<string, ObjectBinding>, objectId: string | string[], patch: ObjectBindingPatch): Record<string, ObjectBinding>;
685
+ declare function patchBindings(bindings: Record<string, ObjectBinding>, edits: BindingEdit[]): Record<string, ObjectBinding>;
686
+ /** Shorthand for the common `{ style: { material: … } }` nesting. */
687
+ declare function material(value: ObjectBindingMaterial): ObjectBindingPatch;
688
+
667
689
  type HiddenObjectsState = Record<string, boolean>;
668
- type ObjectVisibilityProps = {
690
+ type ObjectBindingsController = {
691
+ objectBindings: Record<string, ObjectBinding>;
692
+ setObjectBindings: React.Dispatch<React.SetStateAction<Record<string, ObjectBinding>>>;
693
+ updateObjectBindings: {
694
+ (objectId: string | string[], patch: ObjectBindingPatch): void;
695
+ (edits: BindingEdit[]): void;
696
+ };
697
+ setMaterial: (objectId: string | string[], material: ObjectBindingMaterial) => void;
698
+ setBaseColor: (objectId: string | string[], color: string) => void;
699
+ resetMaterial: (objectId: string | string[]) => void;
700
+ getMaterial: (objectId: string) => ObjectBindingMaterial | null;
669
701
  hiddenObjects: HiddenObjectsState;
670
702
  hiddenObjectIds: string[];
671
- hideObject: (objectId: string) => void;
672
- showObject: (objectId: string) => void;
673
- toggleObjectVisibility: (objectId: string) => void;
703
+ hideObject: (objectId: string | string[]) => void;
704
+ showObject: (objectId: string | string[]) => void;
705
+ toggleObjectVisibility: (objectId: string | string[]) => void;
674
706
  isObjectHidden: (objectId: string) => boolean;
675
707
  clearHiddenObjects: () => void;
676
708
  };
677
- declare function useObjectVisibility(objectBindings: Record<string, ObjectBinding>, onObjectBindingsChange: (next: Record<string, ObjectBinding>) => void): ObjectVisibilityProps;
709
+ /**
710
+ * Owns object-binding state and exposes field-level, material, and visibility
711
+ * operations over the same functional state updater.
712
+ *
713
+ * Consecutive calls in the same tick compose instead of overwriting each other,
714
+ * including calls across material and visibility concerns.
715
+ */
716
+ declare function useObjectBindings(initialBindings: Record<string, ObjectBinding> | (() => Record<string, ObjectBinding>)): ObjectBindingsController;
717
+
718
+ type SceneConfigPatch = DeepPartial<SceneConfig>;
719
+ /**
720
+ * Applies a nested scene-config patch without mutating either input. Objects
721
+ * are merged recursively, while arrays and tuples are replaced wholesale.
722
+ */
723
+ declare function patchSceneConfig(sceneConfig: SceneConfig, patch: SceneConfigPatch): SceneConfig;
724
+
725
+ type SceneConfigUpdate = SceneConfigPatch | ((current: SceneConfig) => SceneConfigPatch);
726
+ type SceneConfigController = {
727
+ sceneConfig: SceneConfig;
728
+ setSceneConfig: React.Dispatch<React.SetStateAction<SceneConfig>>;
729
+ updateSceneConfig: (update: SceneConfigUpdate) => void;
730
+ resetSceneConfig: () => void;
731
+ };
732
+ /**
733
+ * Owns scene-config state and applies nested patches through functional React
734
+ * updates, so consecutive calls in the same tick compose safely.
735
+ */
736
+ declare function useSceneConfig(initialSceneConfig: SceneConfig | (() => SceneConfig)): SceneConfigController;
678
737
 
679
738
  type ViewerHoverProps = {
680
739
  hoveredObjectBinding: ObjectBinding | null;
@@ -728,4 +787,4 @@ type ShareableViewerStateProps = {
728
787
  };
729
788
  declare function useShareableViewerState({ cameraState, setCameraState, objectBindings, onObjectBindingsChange, selectedObjectBinding, setSelectedObjectBinding, paramKey, debounceMs, autoSync, }: UseShareableViewerStateOptions): ShareableViewerStateProps;
730
789
 
731
- export { type AnimationClipInfo, type AnimationControls, type AnimationLoopMode, type AnimationPlaybackState, BindingBuilder, type CaptureImageOptions, type CinematicConfig, type CinematicWaypoint, type CustomObjectBindingDataPanelProps, type CustomSceneObjectsPanelProps, type HiddenObjectsState, type HomeCameraState, MATERIAL_BLENDING_MODES, MATERIAL_SIDES, ModelViewer, type ModelViewerProps, type ObjectActionEvent, type ObjectBinding, type ObjectBindingAction, type ObjectBindingMaterial, type ObjectBindingMaterialBlendingMode, type ObjectBindingMaterialSide, type ObjectBindingTextureSlot, type ObjectVisibilityProps, type SceneAnimationClipConfig, type SceneAnimationConfig, type SceneCinematicConfig, type SceneCinematicWaypoint, type SceneConfig, type SceneModelRenderer, SimpleModelViewer, type SimpleModelViewerProps, type ViewerActionsOptions, type ViewerActionsProps, type ViewerAnimationsProps, type ViewerCameraProps, type ViewerCameraState, type ViewerModelBounds, type ViewerModelProps, type ViewerReadyState, type ViewerSelectionProps, type XRScaleMode, useObjectBinding, useObjectBindingIds, useObjectVisibility, useShareableViewerState, useViewerActions, useViewerAnimations, useViewerCamera, useViewerHover, useViewerModel, useViewerSelection };
790
+ export { type AnimationClipInfo, type AnimationControls, type AnimationLoopMode, type AnimationPlaybackState, BindingBuilder, type BindingEdit, type CaptureImageOptions, type CinematicConfig, type CinematicWaypoint, type CustomObjectBindingDataPanelProps, type CustomSceneObjectsPanelProps, type HiddenObjectsState, type HomeCameraState, MATERIAL_BLENDING_MODES, MATERIAL_SIDES, ModelViewer, type ModelViewerProps, type ObjectActionEvent, type ObjectBinding, type ObjectBindingAction, type ObjectBindingMaterial, type ObjectBindingMaterialBlendingMode, type ObjectBindingMaterialSide, type ObjectBindingPatch, type ObjectBindingTextureSlot, type ObjectBindingsController, type SceneAnimationClipConfig, type SceneAnimationConfig, type SceneCinematicConfig, type SceneCinematicWaypoint, type SceneConfig, type SceneConfigController, type SceneConfigPatch, type SceneConfigUpdate, type SceneModelRenderer, SimpleModelViewer, type SimpleModelViewerProps, type ViewerActionsOptions, type ViewerActionsProps, type ViewerAnimationsProps, type ViewerCameraProps, type ViewerCameraState, type ViewerModelBounds, type ViewerModelProps, type ViewerReadyState, type ViewerSelectionProps, type XRScaleMode, material, patchBindings, patchSceneConfig, useObjectBinding, useObjectBindingIds, useObjectBindings, useSceneConfig, useShareableViewerState, useViewerActions, useViewerAnimations, useViewerCamera, useViewerHover, useViewerModel, useViewerSelection };
package/dist/index.d.ts CHANGED
@@ -664,17 +664,76 @@ declare function useObjectBinding(objectBindings: Record<string, ObjectBinding>,
664
664
 
665
665
  declare function useObjectBindingIds(objectBindings: Record<string, ObjectBinding>): string[];
666
666
 
667
+ type DeepPartial<T> = T extends readonly unknown[] ? T : T extends object ? {
668
+ [K in keyof T]?: DeepPartial<T[K]>;
669
+ } : T;
670
+
671
+ type ObjectBindingPatch = DeepPartial<ObjectBinding>;
672
+ type BindingEdit = {
673
+ ids: string | string[];
674
+ patch: ObjectBindingPatch;
675
+ };
676
+ /**
677
+ * Applies field-level patches to object bindings and returns the updated
678
+ * record. Pure — nothing is mutated, and the original reference comes back
679
+ * untouched when no id matched, so React can skip the re-render.
680
+ *
681
+ * Ids resolve the same way everywhere else in the library: binding key first,
682
+ * then `binding.id`, then `binding.modelObjectId`.
683
+ */
684
+ declare function patchBindings(bindings: Record<string, ObjectBinding>, objectId: string | string[], patch: ObjectBindingPatch): Record<string, ObjectBinding>;
685
+ declare function patchBindings(bindings: Record<string, ObjectBinding>, edits: BindingEdit[]): Record<string, ObjectBinding>;
686
+ /** Shorthand for the common `{ style: { material: … } }` nesting. */
687
+ declare function material(value: ObjectBindingMaterial): ObjectBindingPatch;
688
+
667
689
  type HiddenObjectsState = Record<string, boolean>;
668
- type ObjectVisibilityProps = {
690
+ type ObjectBindingsController = {
691
+ objectBindings: Record<string, ObjectBinding>;
692
+ setObjectBindings: React.Dispatch<React.SetStateAction<Record<string, ObjectBinding>>>;
693
+ updateObjectBindings: {
694
+ (objectId: string | string[], patch: ObjectBindingPatch): void;
695
+ (edits: BindingEdit[]): void;
696
+ };
697
+ setMaterial: (objectId: string | string[], material: ObjectBindingMaterial) => void;
698
+ setBaseColor: (objectId: string | string[], color: string) => void;
699
+ resetMaterial: (objectId: string | string[]) => void;
700
+ getMaterial: (objectId: string) => ObjectBindingMaterial | null;
669
701
  hiddenObjects: HiddenObjectsState;
670
702
  hiddenObjectIds: string[];
671
- hideObject: (objectId: string) => void;
672
- showObject: (objectId: string) => void;
673
- toggleObjectVisibility: (objectId: string) => void;
703
+ hideObject: (objectId: string | string[]) => void;
704
+ showObject: (objectId: string | string[]) => void;
705
+ toggleObjectVisibility: (objectId: string | string[]) => void;
674
706
  isObjectHidden: (objectId: string) => boolean;
675
707
  clearHiddenObjects: () => void;
676
708
  };
677
- declare function useObjectVisibility(objectBindings: Record<string, ObjectBinding>, onObjectBindingsChange: (next: Record<string, ObjectBinding>) => void): ObjectVisibilityProps;
709
+ /**
710
+ * Owns object-binding state and exposes field-level, material, and visibility
711
+ * operations over the same functional state updater.
712
+ *
713
+ * Consecutive calls in the same tick compose instead of overwriting each other,
714
+ * including calls across material and visibility concerns.
715
+ */
716
+ declare function useObjectBindings(initialBindings: Record<string, ObjectBinding> | (() => Record<string, ObjectBinding>)): ObjectBindingsController;
717
+
718
+ type SceneConfigPatch = DeepPartial<SceneConfig>;
719
+ /**
720
+ * Applies a nested scene-config patch without mutating either input. Objects
721
+ * are merged recursively, while arrays and tuples are replaced wholesale.
722
+ */
723
+ declare function patchSceneConfig(sceneConfig: SceneConfig, patch: SceneConfigPatch): SceneConfig;
724
+
725
+ type SceneConfigUpdate = SceneConfigPatch | ((current: SceneConfig) => SceneConfigPatch);
726
+ type SceneConfigController = {
727
+ sceneConfig: SceneConfig;
728
+ setSceneConfig: React.Dispatch<React.SetStateAction<SceneConfig>>;
729
+ updateSceneConfig: (update: SceneConfigUpdate) => void;
730
+ resetSceneConfig: () => void;
731
+ };
732
+ /**
733
+ * Owns scene-config state and applies nested patches through functional React
734
+ * updates, so consecutive calls in the same tick compose safely.
735
+ */
736
+ declare function useSceneConfig(initialSceneConfig: SceneConfig | (() => SceneConfig)): SceneConfigController;
678
737
 
679
738
  type ViewerHoverProps = {
680
739
  hoveredObjectBinding: ObjectBinding | null;
@@ -728,4 +787,4 @@ type ShareableViewerStateProps = {
728
787
  };
729
788
  declare function useShareableViewerState({ cameraState, setCameraState, objectBindings, onObjectBindingsChange, selectedObjectBinding, setSelectedObjectBinding, paramKey, debounceMs, autoSync, }: UseShareableViewerStateOptions): ShareableViewerStateProps;
730
789
 
731
- export { type AnimationClipInfo, type AnimationControls, type AnimationLoopMode, type AnimationPlaybackState, BindingBuilder, type CaptureImageOptions, type CinematicConfig, type CinematicWaypoint, type CustomObjectBindingDataPanelProps, type CustomSceneObjectsPanelProps, type HiddenObjectsState, type HomeCameraState, MATERIAL_BLENDING_MODES, MATERIAL_SIDES, ModelViewer, type ModelViewerProps, type ObjectActionEvent, type ObjectBinding, type ObjectBindingAction, type ObjectBindingMaterial, type ObjectBindingMaterialBlendingMode, type ObjectBindingMaterialSide, type ObjectBindingTextureSlot, type ObjectVisibilityProps, type SceneAnimationClipConfig, type SceneAnimationConfig, type SceneCinematicConfig, type SceneCinematicWaypoint, type SceneConfig, type SceneModelRenderer, SimpleModelViewer, type SimpleModelViewerProps, type ViewerActionsOptions, type ViewerActionsProps, type ViewerAnimationsProps, type ViewerCameraProps, type ViewerCameraState, type ViewerModelBounds, type ViewerModelProps, type ViewerReadyState, type ViewerSelectionProps, type XRScaleMode, useObjectBinding, useObjectBindingIds, useObjectVisibility, useShareableViewerState, useViewerActions, useViewerAnimations, useViewerCamera, useViewerHover, useViewerModel, useViewerSelection };
790
+ export { type AnimationClipInfo, type AnimationControls, type AnimationLoopMode, type AnimationPlaybackState, BindingBuilder, type BindingEdit, type CaptureImageOptions, type CinematicConfig, type CinematicWaypoint, type CustomObjectBindingDataPanelProps, type CustomSceneObjectsPanelProps, type HiddenObjectsState, type HomeCameraState, MATERIAL_BLENDING_MODES, MATERIAL_SIDES, ModelViewer, type ModelViewerProps, type ObjectActionEvent, type ObjectBinding, type ObjectBindingAction, type ObjectBindingMaterial, type ObjectBindingMaterialBlendingMode, type ObjectBindingMaterialSide, type ObjectBindingPatch, type ObjectBindingTextureSlot, type ObjectBindingsController, type SceneAnimationClipConfig, type SceneAnimationConfig, type SceneCinematicConfig, type SceneCinematicWaypoint, type SceneConfig, type SceneConfigController, type SceneConfigPatch, type SceneConfigUpdate, type SceneModelRenderer, SimpleModelViewer, type SimpleModelViewerProps, type ViewerActionsOptions, type ViewerActionsProps, type ViewerAnimationsProps, type ViewerCameraProps, type ViewerCameraState, type ViewerModelBounds, type ViewerModelProps, type ViewerReadyState, type ViewerSelectionProps, type XRScaleMode, material, patchBindings, patchSceneConfig, useObjectBinding, useObjectBindingIds, useObjectBindings, useSceneConfig, useShareableViewerState, useViewerActions, useViewerAnimations, useViewerCamera, useViewerHover, useViewerModel, useViewerSelection };