Compatibility and upgrading
Install the latest published version of @liveroom-tech/react-immersive. The
machine-readable manifest
records the peer dependencies and documentation URLs.
| Peer | Supported range |
|---|---|
react | ^19.0.0 |
react-dom | ^19.0.0 |
three | ^0.184.0 |
@react-three/fiber | ^9.6.1 |
The Vite examples require Node ^20.19.0 || >=22.12.0; the Next.js starter
uses Node 22.12+. These are starter tooling requirements, separate from the
React package’s runtime peers.
Upgrade an existing project
From the project’s directory:
npm install --save-exact @liveroom-tech/react-immersive@latest
npm run typecheck
npm run buildKeep its lockfile with the updated manifest. Use React 19 and the peer ranges
above. Import SimpleModelViewer from
@liveroom-tech/react-immersive/simple-model-viewer, BindingBuilder from
@liveroom-tech/react-immersive/binding-builder, and the corresponding CSS
entry for each component. Pure data helpers can be imported from /utils,
including in server code.
If defineObjectBindings preserves literal keys in your initial data, widen
editable React state to Record<string, ObjectBinding>. Follow
Getting Started for
the complete pattern. Then verify a browser render and your intended
interactions. Back up authored bindings/scene data before changing an
existing integration.
Changes in 6.2.1
New:
SimpleModelViewer:fitPadding,zoomandpageScroll, for embedding a viewer in a page. See the landing-page embed example.ModelViewerandCompareViewer:controls.pageScroll(flat proppageScroll). The mouse wheel scrolls the page unless Ctrl or ⌘ is held, and on touch screens a vertical swipe scrolls while a sideways drag rotates.- A built-in
"neutral"lighting preset, generated in the browser, so the default lighting downloads nothing from any host. - Smaller downloads: about 445 KiB of gzipped JavaScript for a page with
SimpleModelViewer(from 518) and 785 KiB withModelViewer(from 952). WebXR, streaming 3D Tiles, KTX2 decoding, HDR lighting loaders, the STL and PLY loaders, the GLB exporter, the AR QR code and the colour picker now load only when used. See JavaScript download size .
Fixes:
SimpleModelViewer: the loading overlay no longer stays up after the model loads for visitors with reduced motion turned on. The first framing now jumps straight into place behind the overlay instead of animating.SimpleModelViewerandModelViewerredraw once the environment lighting arrives, so a model that loaded first is no longer left under-lit until someone touches the viewer.useViewerCamera().focusObjectmoves to the binding’scameraStatewhen it has a position and target, as selecting the object in the viewer does.- Animated
useViewerCamera()commands always settle once the camera arrives. A move that finished within a single frame, such as the first command after the viewer had been idle, could leave its promise pending. - A binding on a group node now hides and shows everything under it, and hovering it outlines all of its meshes.
- Off local hosts, a license denial now logs its reason to the console (for example, a plan that doesn’t allow production domains). Visitors still see only a generic message.
Behavior changes to check in an existing integration:
ModelViewer’scontrols.zoom: false(disableZoom) now also turns off wheel, pinch and middle-drag zoom. Before, it only stopped zooming to a selected object.- The default lighting is now
"neutral"in both viewers (it was"city"inSimpleModelViewerand"apartment"inModelViewer, both downloaded fromraw.githack.com). It’s a soft studio light, about as bright as before. PassenvPresetorsceneConfig.environment.presetto keep the old look; saved projects that name a preset keep it. - With
xr.enabled, the viewer loads its WebXR code before creating the 3D view, so the model appears a moment later than without XR. - The loading overlay takes the viewer’s background colour instead of a dark
panel, shows a light card on light backgrounds, and leaves a
postervisible underneath. SimpleModelViewerframes the model with space scaled to its size (a tenth of its largest dimension) instead of a fixed half scene unit on each side. Small products now fill the view, and a spinning model stays fully in view. SetfitPaddingto adjust.- Switching
CompareViewer’slayoutkeeps both viewers mounted and keeps the camera view.CompareViewernow defaultsrefitOnResizetofalse, so a resize no longer reframes the model; passrefitOnResizeto restore that.
Changes in 6.2.0
New:
SimpleModelViewer:environmentUrl(self-hosted HDR),environmentEnabled,cameraLimits,showResetButtonandshowLoadError.useViewerCamera():setCameraPresetsandisRenderPaused.useViewerAnimations():isRenderPaused.onLicenseStatusChangeonModelViewer,CompareViewerandBindingBuilder, with exportedLicenseResultandLicenseStatustypes.
Behavior changes to check in an existing integration:
- Hidden objects, and objects under a hidden parent, no longer receive clicks,
hover or the context menu, so objects behind them can be picked. Streamed
models also honour
selectableandhoverable. - Camera commands from
useViewerCamera()now always settle while the viewer is offscreen: they jump to their end instead of waiting for it to scroll back. They returnfalseonly when the camera is disconnected from the viewer. SimpleModelViewershows a reset button in the bottom-right corner and a load error with a retry button by default. PassshowResetButton={false}orshowLoadError={false}to keep your own interface.showObjectBindingDataPanel={false}, and theminimalandshowcasepresets, no longer render the object panel at all. A closed panel is nowinert.- In
CompareViewer, a camera command from either pane’s hook makes that pane lead both cameras. - OBJ, MTL, FBX and USDZ loaders load on demand, so apps that only show glTF download less JavaScript.
Dependency warnings during evaluation
The validation environment uses the stable React Three Fiber 9.8.2 and XR 6.6.32 releases. Two transitive warnings remain in these stable versions:
- Fiber constructs
THREE.Clock, which Three.js 0.184 deprecates. See the upstream tracking issue . - XR’s
@pmndrs/xrdependency loads the emulator UI@iwer/devui@1.1.2, which pins@fortawesome/react-fontawesome@0.2.2. Updating XR alone does not remove it.
These warnings are not suppressed. Replacing the emulator’s pinned dependency or upgrading to a renderer prerelease solely to silence them has not been validated. The supported React 19 peer range is unchanged; React 19 compatibility is an existing requirement, rather than an unimplemented feature.