Appearance
Deployment
Static assets
Deploy models, textures, decoder files, and preset JSON as immutable versioned assets. Keep relative GLTF folder paths intact.
Base paths
When an application is deployed under a subpath, ensure src, resourcePath, dracoDecoderPath, and replacement texture URLs include the deployment base.
Next.js and SSR
The viewer depends on browser WebGL APIs. Render it through a client component or a dynamic import with server rendering disabled. See the Next.js example.
Content security policy
Depending on your asset sources, configure connect-src, img-src, and worker directives appropriately. Blob URLs may be used by the editor for local files.
Caching
- Use long-lived cache headers for versioned GLB, texture, and decoder files.
- Avoid overwriting a URL with incompatible model contents.
- Version preset JSON together with the model it targets.
Deployment verification
Test the production origin, not only localhost. Confirm model dependencies, CORS, decoder paths, mobile memory, and fallback content.