Examples
SimpleModelViewer
The lightweight inspection experience for quick model review:
- Upload-first workflow
- Scene objects panel
- Environment and lighting controls
- Click-to-select focus flow
Live Demo · Starter App · Open in CodeSandbox
ModelViewer
The fuller ModelViewer experience used for the richer hosted demo:
- Object bindings and per-object actions
- Scene config wiring
- UV Checker toolbar
- Exploded-view controls
- Measurement tools
- Annotation navigation
- XR flags and performance tuning
Live Demo · Starter App · Open in CodeSandbox
Guided Tour
A gallery walkthrough that uses scene annotations as tour stops instead of per-object bindings:
- Each stop carries a title, description,
category,imagesandlinks - A saved
cameraViewper stop: the camera flies to stand in front of the artwork - Previous / next through every stop, or jump to any stop from the list
- Visitors bookmark their own camera views with
savePresetandgoToPresetfromuseViewerCamera - Camera limits through
cameraLimits: stay inside the room (insideModel) or move freely - Position-only markers, no object binding needed
Live Demo · Starter App · Open in CodeSandbox
Shareable View / Deep Link
Create a client-ready link to an exact walkthrough state:
- Pick an object to fly the camera to it
- Hide selected objects from the walkthrough
- Copy or open a link that restores camera, selection, and visibility state
- Built with
useShareableViewerState
Live Demo · Starter App · Open in CodeSandbox
AR Product Viewer
A standalone, mobile-first retail demo for placing a model in the customer’s space:
- WebXR via
enableXRon supported Android devices - iOS Quick Look using
usdzUrl - Real-world initial scale using
arScaleMode="real-world" - Desktop-to-phone QR handoff for opening the same experience in mobile AR
- Minimal viewer UI focused on the product and AR handoff
Live Demo · Starter App · Open in CodeSandbox
Switch Demo
A focused room-level example where two switches control four lights through app state:
- Start with exported
objectBindings. - Add declarative
effectsto the switch actions. - Target each light circuit as a binding group instead of listing every light.
- Pass the bindings into
ModelVieweras React state. - Pass
useViewerActions().handleActiontoModelViewerand callrunActionfrom the panel buttons. - Use the
useSceneConfiglight controller to synchronize ambient and key-light intensity. - Attach each point light to its bound bulb object without writing R3F light components.
Live Demo · Starter App · Open in CodeSandbox
Light Flicker
An atmospheric lighting example that turns nine static bulb meshes into an unstable electrical circuit:
useObjectBindingsapplies the BindingBuilder-exported model setupuseSceneConfigchanges the environment, bloom, and vignette by presetuseViewerEffectsdrives filament, glass, and point-light channels without Three.js accessuseViewerConnectionshares one viewer-ready callback across camera, effects, and light setup- Runtime point lights attach to their filament meshes and follow them automatically
- Failing-circuit mode dims every bulb together from one shared signal
- Possessed mode gives every bulb independent dim, flash, and blackout timing
- Lit-up, failing-circuit, and possessed presets change the power behavior
- BindingBuilder-exported bindings and scene configuration drive the model
Live Demo · Starter App · Open in CodeSandbox
Vehicle Configurator
A product-configurator example that shows how BindingBuilder-exported object bindings can drive grouped customization flows:
- Binding
groupselectors patch body paint, wheels, trim, and other multi-mesh sets without manual ID arrays - Built-in
change-color/change-material/toggle-visibilityactions are reinterpreted as real configurator controls - An aero-kit toggle hides or restores a whole package of parts
- Window tint and headlight state update the same binding map the viewer renders
- Clickable parts and side-panel controls stay in sync through React state
Live Demo · Starter App · Open in CodeSandbox
Engineering Tools
An inspection workbench that combines the viewer’s engineering tools:
- An exploded view with
showExplodeControls: every bound part slides outward from the model center along its own direction, and dragging back to zero reassembles it exactly (best for static product / CAD models) - Section cuts on
sceneConfig.section: one plane, up to sixplanes, or a sectionbox, kept in sync withshowSectionToolsthroughonSceneConfigChange - Angled cuts: any plane can face a custom
normalinstead of the X, Y or Z axis, set from tilt and turn angles - Isolation with x-ray via
useViewerIsolation: ghost the rest at a chosenghostOpacity, or hide it - An object navigator grouped by binding group, with fly-to (
focusObject) and isolate per part or group, plus the keyboardshowObjectNavigator - Distance, angle, area, point-to-plane and circumference measurements with
showMeasureTools, held as controlledmeasurements - Model and display units, and calibration against a known length with
calibrateMeasurements - CSV export with
measurementsToCsv
Live Demo · Starter App · Open in CodeSandbox
Media Export
Record the motorbike as a video or GIF, without a screen recorder:
captureVideofromonViewerReadyrecords only the canvas: no toolbar, panels or cursor- Turntable spins once around the model; Cinematic flies a hand-written
cinematicwaypoint path (withautoPlay: false, so the camera only moves while recording) - Export as WebM, MP4 or a looping GIF; formats this browser can’t write are disabled
- Short, medium or full-loop length through
duration; frame rate and GIF width throughfpsandgifWidth - A progress bar while recording, and cancel through an
AbortSignal - Preview the result, download it, and keep several recordings side by side
Live Demo · Starter App · Open in CodeSandbox
Asset QA
Inspect a bundled sample or drop a standalone GLB, glTF, OBJ, FBX, USDZ, STL, or PLY file. Check geometry and texture findings, focus affected objects, and download the diagnostics report with live renderer statistics.
Live Demo · Starter App · Open in CodeSandbox · Asset Diagnostics API
Multiple Models
Compose one scene from several GLB files, with the red room as the primary model:
modelsentries managed byuseViewerModels: add, duplicate, hide and remove floor lamps inside the room- Click a model to make it the active one (
activeModelId); parked models stay visible - Each new lamp gets an asset
transform:snapAssetToGridlines its spot up on a 0.5 m grid andgroundAssetstands it on the floor - Move and Scale modes (
moveModeEnabled,scaleModeEnabled) with multi-select (multiSelectedKeys) to transform several parts together - The view gizmo (
showViewGizmo) snaps the camera to an axis
Live Demo · Starter App · Open in CodeSandbox
Embedded on a Page
3D viewers placed in a long, scrolling product page instead of a full-screen app:
- Every viewer shows a
posterimage until its 3D view is drawn loading="lazy"(the default) starts a viewer only when it comes near the screen; the room further down starts as you scroll to it- A product range with
reveal="interaction": each card keeps its poster and a View in 3D button, so no model downloads until a visitor asks pageScrolllets the mouse wheel and vertical swipes scroll the page over the viewer; Ctrl or ⌘ + wheel zoomsreducedMotionswitch on the hero (follow the device, always or never), which stops its auto-rotatewebgpuswitch, with the renderer in use shown fromrendererBackendinonViewerReady- A fullscreen button through
showFullscreenButton
Live Demo · Starter App · Open in CodeSandbox
Analytics & Localisation
Track what visitors do in the viewer, and show its built-in text in their language:
onEngagementhands the page a typedViewerEngagementEventfor each action; the viewer sends nothing anywhere itself- A live event log with counts per type, the session ID, time since load and Copy JSON;
debugEngagementalso logs to the console - Car scene:
part-viewedfrom the canvas, the Scene Objects panel and the keyboard, andar-launch-requestedfrom Open on phone - Art gallery scene:
tour-started,tour-completedandtour-stoppedfrom the built-in guided tour - Switching scenes loads a new model, which starts a new analytics session
- One language switch (English, French, Spanish, German) changes everything without reloading the model:
labelstranslates the viewer’s buttons, tooltips and messages, and the app swaps in its own translated text for the panel, the car’s part names (bindinglabel) and the tour stops (annotation titles, descriptions and links)
Live Demo · Starter App · Open in CodeSandbox
Mouse Controller
An on-screen navigation control for touchscreen, kiosk, and guided viewing experiences:
- Enable the built-in controller with
showMouseController - Tune movement with
moveSensitivity - Adjust its visibility with
mouseControllerOpacity - Move it to a safe part of the interface with
mouseControllerPosition
Live Demo · Starter App · Open in CodeSandbox
Cinematic Tour
An automatic camera that glides through a space on its own, like a film:
- The
cinematicprop takes a list ofwaypoints(camera position + look-at keyframes) - The camera follows a smooth Catmull-Rom spline through them at a constant on-screen speed, looping seamlessly
autoPlaystarts the glide once the model has loaded and framed- A play / pause control appears in the viewer; grabbing the camera pauses it
- Waypoints are authored visually in BindingBuilder’s Cinematic tab and carried
on
sceneConfig.cinematic
Live Demo · Starter App · Open in CodeSandbox
Animation Studio
A playback studio for a rigged, animated GLB, driven entirely by
useViewerAnimations:
- Clip picker for every animation baked into the model
- Play, pause, and stop transport controls
- A scrubbable timeline bound to the live playback position
- Playback speed presets
- A loop-mode toggle (repeat vs. play once) driven through
sceneConfig.animations
Live Demo · Starter App · Open in CodeSandbox
Keyframe Sequences
Keyframed object and camera tracks authored as data on sceneConfig.sequences
and driven by useViewerSequences. Animation Studio plays clips baked into the
GLB; sequences are authored separately and need no animation in the model:
- An exploded-view reveal that autoplays on load (
autoPlay: trueon the sequence) - Position, colour and emissive tracks on individual parts, plus a camera track
linear,ease-in,ease-out,ease-in-outandstepeasings side by side- A looping showroom orbit (
loop: true) - A custom picker, play / pause, scrubbable timeline and Stop & restore, with the
built-in player hidden via
showSequenceControls={false}
Live Demo · Starter App · Open in CodeSandbox
Texture Upload / Custom Print
A custom-apparel demo where shoppers upload artwork, add text and logo decals, and pick a fabric:
- The built-in Upload Artwork action hands the file to
onTextureUpload - A real app uploads it to storage and returns a durable URL (here a data URL)
- The returned URL is committed to
style.material.texture.path texturePositioninglets shoppers drag, scale, and rotate the print; the result lands instyle.material.textureclearTextureremoves the print from theshirtbinding group- Add text or a logo in one click; it lands on the front and is selected for editing
- Ready-made spots (front chest, bottom, pocket, back) put a decal on the shirt without clicking the model
- Decals live on
binding.decalsin the shirt’s own space: text with colour, font and weight, or an image (a sample logo or your own upload), edited live decalMovedrags a decal across the fabric and returns the new surface point throughonCommit; double-clicking a decal (onDecalDoubleClick) picks it up- Size and rotation per decal
- Fabric colours are glTF material variants (
KHR_materials_variants) onsceneConfig.model.activeVariants, switched from the page’s own swatches - The shirt is one mesh node, so a print or decal covers the whole garment
- The viewer download menu exports the shirt’s editable UV layout as SVG
Live Demo · Starter App · Open in CodeSandbox
Retail Configurator
A Next.js App Router product page for a sofa, built on useProductConfigurator:
- Accessible swatches that recolour every part in a binding group
- Price and SKU update with the selected finishes
- Share links that reopen the same configuration
- Configured USDZ export and phone handoff with animated seat cushions
Live Demo · Starter App · Open in CodeSandbox
Venue Tour
A tour of an event hall whose stops are content, not code:
- Your own Overview, Stage, Bar and Entrance buttons, plus clickable hotspots
- Stops loaded from a JSON file at runtime, ready to point at a CMS
- An editor mode for stop text and camera views, with a publish step
setCameraPresetsto load edited views
Starter App · Open in CodeSandbox
Before/After Comparison
A kitchen before and after a renovation in CompareViewer:
- Slider and side-by-side layouts
- One camera for both panes, with hook commands that move both
- Keyboard-operable divider
- View-only rooms, with no inspection panels
The hosted demo compares a bedroom before and after a redesign:
- The “after” room is a BindingBuilder export: new colours, a wood floor, printed bedding and curtains, moved furniture and removed lights
semanticComparisonbuilds a change report withcompareViewerConfigurations, delivered throughonComparisonChange- The report lists every recolored, retextured, moved or removed part
- Comparison highlights outline changed parts, toggled with
showComparisonOutlines(off by default) - Extra changes can be tried on the “after” room live, and the report updates
Live Demo · Starter App · Open in CodeSandbox
BindingBuilder
The hosted BindingBuilder surface for authoring bindings in the browser:
- Desktop-first editor shell
- License-key based access
- Full-height authoring workspace
Live Demo · Starter App · Open in CodeSandbox
Public Code Examples
If you want starter code, see the public community examples in the GitHub repo:
Running Examples
For local starter apps, clone the public examples and run the example you want from its own folder.
Some examples require a valid license key. Create a free key at react-immersive.liveroom.dev/console before running gated demos locally. In CodeSandbox, set the starter’s license key environment variable to a production-enabled key registered for the preview domain.