One Line 3D for the Web
The lightest way to add interactive 3D models to any website. One script tag. One function call. Powered by the same Filament engine as Android SceneView.
Live demo
The Khronos Toy Car rendered in real time with Filament.js WASM. Drag to orbit. Scroll to zoom.
Powered by the same Filament engine used in Android SceneView
Why SceneView Web?
Production-quality rendering at a fraction of the bundle size. The same Filament engine that powers Android SceneView.
| Feature | SceneView Web | Three.js | model-viewer |
|---|---|---|---|
| Library size | ~210 KB (~70 KB gzipped) | ~600 KB | ~200 KB |
| Rendering engine | Filament (WASM) | Custom WebGL | Three.js |
| PBR quality | Production (matches Android) | Good | Good |
| Setup complexity | 1 function call | ~50 lines boilerplate | 1 HTML tag |
| glTF / GLB | Native | Plugin (GLTFLoader) | Native |
| Auto-rotate / orbit | Built-in | Manual (OrbitControls) | Built-in |
| Programmatic API | Full JS API | Full JS API | Limited (attributes) |
| WebXR AR/VR | Planned | Yes | AR only |
Features
Filament.js WASM
Production-quality PBR rendering via Google Filament compiled to WebAssembly. The same engine powering Android SceneView, now in the browser.
Kotlin/JS
Written in Kotlin, compiled to JavaScript. Share types, models, and logic with your Android codebase. Full npm distribution.
One function call
No boilerplate. Call SceneView.modelViewer() and get
orbit camera, auto-rotation, IBL lighting, and glTF/GLB loading out of the box.
WebXR ready
Built-in support for WebXR AR and VR sessions. Immersive 3D experiences directly in the browser with compatible devices.
~70 KB gzipped
The sceneview-web.js bundle is ~210 KB minified, ~70 KB gzipped. Filament WASM loads on demand.
PBR materials
Full physically-based rendering with image-based lighting, environment maps, metallic-roughness workflow, and tone-mapped HDR output.
Install
Pick whatever fits your stack.
API reference
A compact surface that covers model loading, primitives, lights, animation and AR.
All-in-one: creates a viewer, loads Filament.js from CDN, loads your glTF/GLB model, sets up orbit camera and auto-rotation. Returns a viewer instance.
Creates an empty viewer without loading a model.
Call loadModel(url) later. Useful when the model URL is dynamic.
Options include transparent (alpha canvas over the page),
renderMode, autoRotate, fov,
backgroundColor (sRGB 0–1, as displayed) and iblUrl.
Loads a glTF or GLB model from any URL. Replaces the current model. Returns a promise that resolves when the model is ready.
Enables or disables automatic Y-axis rotation. Pauses on user interaction, resumes after idle.
Sets the orbit camera distance from the model center. Useful for controlling the initial zoom level.
Reads or moves the orbit camera: azimuth in radians, eye height, distance, look-at point and vertical FOV. Every field is optional. Chainable.
Re-centres the camera so the model covers at most a fraction of the view at any
orbit angle, for example { fill: 0.8 }. Without options, reuses the
on-load framing.
'onDemand' stops drawing once nothing moves and wakes on input,
camera calls, scene changes or requestRender(). Saves battery on
pages with several viewers.
Calls callback(canvas) after every drawn frame, while the image is
still readable: copy it with drawImage for reflections or thumbnails.
Loads a KTX IBL environment for physically-based lighting and reflections. Works with any KTX2 cubemap exported from cmgen or a baked HDR.
Adds a directional, point, or spot
light to the scene. Returns an entity handle you can pass to
removeLight().
Removes every light from the scene, including the default 3-point studio rig. Use this when you want a fully custom lighting setup.
Procedural primitives built as inline glTF — no external model file needed. Perfect for quick prototypes, physics placeholders, or ground planes.
Plays a glTF keyframe animation with full skinning and morph-target support.
Use stopAnimation() to return to the rest pose.
Toggles the bloom post-processing effect for cinematic highlights on emissive materials. Fine-tune strength and threshold for dramatic looks.
In-scene HUD elements: rich text billboards, 2D images, and looping videos rendered as world-space quads.
Removes all loaded models, primitives, and media nodes from the scene. Lights, IBL, and camera are preserved.
Cleans up all GPU resources, removes event listeners,
and stops the render loop. Call when removing the viewer.
Safe to call more than once; loads still in flight are cancelled
and their promises reject with an AbortError.
Browser compatibility
SceneView Web requires WebGL2 and WebAssembly support.