Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

@dioramajs/assets/three

Loaders for glTF with Draco, Meshopt and KTX2.

View as Markdown
On this page
import { forget, gltf, join } from '@dioramajs/assets/three'

Functions

forgetDrops the KTX2Loader of a stopped renderer, since it read that renderer's formats.
joinOne per app that loads through this module. The last one out frees the decoders.

Constants

gltfglTF and GLB with the decoders their `extensionsUsed` name, loaded on demand.
ktx2A KTX2 (Basis) texture, transcoded for the formats of the app's renderer, so it waits for `render`. Origin top-left like glTF, and `flipY` can't be set.
textureA Texture over the pixels of the `image` entry with the same URL and CORS mode, which a preload or an effect may have decoded already. Origin bottom-left like effects textures. `options.colorSpace` is 'srgb' (default), 'linear' or 'none' for data maps.