| User Manual | Blog | Forum |
This is the official viewer for SuperSplat.
The web app compiles to a simple, self-contained static website.
The app supports a few useful URL parameters (though please note these are subject to change):
&settings=url- specify the URL of thesettings.jsonfile (default is./settings.json)&content=url- specify the URL of thescene.compressed.plyfile (default is./scene.compressed.ply)
Additional options:
&noui- hide UI&noanim- start with animation paused&poster=url- show an image while loading the scene content&ministats- show the runtime CPU (and on desktop, GPU) performance graphs&skybox=url- specify an equirectangular skybox image for the skybox
The web app source files are available as strings for templating when you import the package from npm:
import { html, css, js } from '@playcanvas/supersplat-viewer';
// logs the source of index.html
console.log(html);
// logs the source of index.css
console.log(css);
// logs the source of index.js
console.log(js);To initialize a local development environment for SuperSplat Viewer, ensure you have Node.js 18 or later installed. Follow these steps:
-
Clone the repository:
git clone https://github.com/playcanvas/supersplat-viewer.git cd supersplat-viewer -
Install dependencies:
npm install
-
Start the development build and local web server:
npm run develop
-
Open your browser at http://localhost:3000.
The settings.json file has the following schema (defined in TypeScript and taken from the SuperSplat editor):
type AnimTrack = {
name: string,
duration: number,
frameRate: number,
target: 'camera',
loopMode: 'none' | 'repeat' | 'pingpong',
interpolation: 'step' | 'spline',
smoothness: number,
keyframes: {
times: number[],
values: {
position: number[],
target: number[],
}
}
};
type ExperienceSettings = {
camera: {
fov?: number,
position?: number[],
target?: number[],
startAnim: 'none' | 'orbit' | 'animTrack',
animTrack: string
},
background: {
color?: number[]
},
animTracks: AnimTrack[]
};{
"background": {"color": [0,0,0,0]},
"camera": {
"fov": 1.0,
"position": [0,1,-1],
"target": [0,0,0],
"startAnim": "orbit"
}
}