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

LoadOptions interface

Options of `assets.load`.

View as Markdown
import type { LoadOptions } from '@dioramajs/diorama/assets'
interface LoadOptions<K extends string = string>

Members

NameTypeDescription
readonly crossOrigin?CrossOrigin

Part of the key, as the browser keys its image cache by CORS mode. A texture of another origin is always asked in CORS mode: '' becomes 'anonymous', since the GPU refuses pixels fetched without it.

readonly options?Readonly<Record<string, string | number | boolean>>

Loader options, part of the key. For example { colorSpace: 'linear' }.

readonly priority?Priority

Default 'normal'. An entry runs at the highest priority among its leases.

readonly signal?AbortSignal

Aborting it releases the lease.

readonly type?K

Guessed from the extension when omitted: gltf for .glb and .gltf, ktx2 for .ktx2, texture for images.

Also exported from @dioramajs/assets.

Defined in packages/assets/src/types.ts.