@liveroom-tech/react-immersive 1.1.0 → 1.1.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 +7 -7
- package/dist/index.js +226 -129
- package/dist/index.mjs +331 -232
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -431,7 +431,7 @@ runAction("car-body", "toggle-visibility");
|
|
|
431
431
|
Current note:
|
|
432
432
|
|
|
433
433
|
- visibility-style actions (`toggle-visibility`) update binding data through `onObjectBindingsChange`
|
|
434
|
-
- color/material actions still rely on `ModelViewer`'s built-in UI
|
|
434
|
+
- color/material actions still rely on `ModelViewer`'s built-in UI, so `runAction` dispatches those events but does not open the built-in color picker or texture upload panel by itself
|
|
435
435
|
|
|
436
436
|
## `BindingBuilder`
|
|
437
437
|
|
|
@@ -1727,7 +1727,7 @@ Notes:
|
|
|
1727
1727
|
- each `style.material` group also accepts a texture-map slot (`metalnessMap`, `roughnessMap`, `normalMap`, `aoMap`, `clearcoatMap`, etc.); color maps are decoded as sRGB and data maps as linear automatically
|
|
1728
1728
|
- `BindingBuilder` intentionally omits exact Sketchfab glossiness, cavity, and subsurface-scattering workflows; those require preprocessing or a different material pipeline
|
|
1729
1729
|
- `cameraState` stores a saved camera view for the object; when both `position` and `target` are set, the viewer uses that view when the object is focused or selected instead of falling back to `fitToBox`
|
|
1730
|
-
- `metrics` and `metadata` are displayed in the side panel
|
|
1730
|
+
- `metrics` and `metadata` are displayed in the side panel as nested key/value fields (objects expand into indented child labels)
|
|
1731
1731
|
- `ObjectBindingType` is a large union covering vehicles, rooms, furniture, characters, weapons, environment, and more
|
|
1732
1732
|
|
|
1733
1733
|
## Supported Built-In Actions
|
|
@@ -1739,9 +1739,9 @@ Action handling is currently hardcoded in `ModelViewer`.
|
|
|
1739
1739
|
- `toggle-visibility`
|
|
1740
1740
|
Hides or shows the selected mesh by setting `binding.visible` and calling `onObjectBindingsChange`
|
|
1741
1741
|
- `change-color`
|
|
1742
|
-
Opens the color picker; the chosen hex is applied as a live preview while dragging and committed into `binding.style.material.baseColor` via `onObjectBindingsChange` when the picker closes
|
|
1742
|
+
Opens the color picker inline beneath the action; the chosen hex is applied as a live preview while dragging and committed into `binding.style.material.baseColor` via `onObjectBindingsChange` when the picker closes
|
|
1743
1743
|
- `change-material`
|
|
1744
|
-
Opens the texture upload
|
|
1744
|
+
Opens the texture upload panel inline beneath the action for JPG, PNG, and WebP files; if `onTextureUpload` is provided, the file is passed to it and the returned URL is stored in `binding.style.material.texture.path`; otherwise a session-scoped blob URL is used as the fallback
|
|
1745
1745
|
|
|
1746
1746
|
## How Rendering Works
|
|
1747
1747
|
|
|
@@ -1774,10 +1774,10 @@ Pass `shadows={false}` to disable shadow rendering entirely, or pass a custom `l
|
|
|
1774
1774
|
The current component includes its own UI shell:
|
|
1775
1775
|
|
|
1776
1776
|
- a viewer layout that fills its parent container
|
|
1777
|
-
- a sliding left side panel about `280px` wide
|
|
1777
|
+
- a sliding left side panel about `280px` wide (collapses to half-width on narrow screens so the canvas keeps its other half)
|
|
1778
1778
|
- a canvas area that fills the remaining width
|
|
1779
|
-
- a
|
|
1780
|
-
- a
|
|
1779
|
+
- a color picker that expands inline beneath the **Change Color** action
|
|
1780
|
+
- a texture upload panel that expands inline beneath the **Change Material** action
|
|
1781
1781
|
- a right scene objects panel with search and per-object visibility toggles
|
|
1782
1782
|
|
|
1783
1783
|
Because of that, it works best when mounted in a container with an explicit height.
|