Try your models in BelowJS to see how they look and analyze file size, polygon count, and performance using the drag & drop example.
Test your model now →The simplest approach - all examples here use CDN imports. If you copy the basic viewer example, this is how it works: you only need a single HTML file and your models, with no downloads or build steps required.
Both Three.js and BelowJS use ES modules. Add the import map and stylesheet:
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.179.1/+esm",
"belowjs": "https://cdn.jsdelivr.net/npm/belowjs@1.1.0/dist/belowjs.js"
}
}
</script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/belowjs@1.1.0/dist/belowjs.css">
Then import and use:
import { ModelViewer } from 'belowjs';
const viewer = new ModelViewer('body', {
models: { 'wreck': { url: 'shipwreck.glb' } }
});
Use npm when integrating BelowJS into an existing project with a build system (Webpack, Vite, etc.).
npm install belowjs three
import { ModelViewer } from 'belowjs';
import 'belowjs/dist/belowjs.css';
const config = {
models: {
'kxi': {
url: 'shipwreck.glb'
}
}
};
const viewer = new ModelViewer('#container', config);
If you prefer to download files directly, you can get them from GitHub or clone the repository and build them yourself:
git clone https://github.com/patrick-morrison/belowjs
cd belowjs
npm install
npm run build
This builds the necessary files into the /dist
directory:
belowjs.js
(~419 KB) — ES modules versionbelowjs.css
(~20 KB) — Complete stylesheetDeploy using CDN (no downloads needed):
shipwrecks-vr/
├── index.html # Uses CDN imports
└── models/
├── kxi.glb
└── kozvii.glb
VR requires HTTPS in production. For local development:
python -m http.server 8000
Quest: Chrome can forward localhost to Quest via USB debugging. Setup guide.
Feature | Chrome | Firefox | Safari | Edge |
---|---|---|---|---|
Basic viewing | ✅ | ✅ | ✅ | ✅ |
VR mode | ✅ | ✅ | ❌ | ✅ |
Don't know where to start?
Model not loading properly?
VR button not showing?
Performance issues?
Ready to get started? See the examples page for three production-ready viewers you can use.
Each example is designed to work by simply changing a few lines of HTML to point to your own models. Download the HTML file, add your GLB files to the same folder, and you're ready to go!
Three complete viewers ready to use: Basic full-featured viewer, dark-themed drag & drop interface, and lightweight embeddable viewer.
View Examples →