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

LoaderOptions interface

Options of the webpack and Turbopack loader.

View as Markdown
import type { LoaderOptions } from '@dioramajs/glsl/loader'
interface LoaderOptions extends Omit<ConvertOptions, 'filename' | 'name' | 'include'>

Members

NameTypeDescription
readonly bindings?{ [uniform: string]: Binding }

Binding overrides by GLSL uniform name.

readonly colorSpace?'srgb' | 'linear'

Colour space of the output.

readonly defaults?{ [uniform: string]: ParamDefault }

Default values of params by GLSL uniform name.

readonly dialect?'auto' | 'three' | 'glsl3' | 'shadertoy'

GLSL flavour. auto infers it from the code.

readonly mode?LoaderMode

Defaults to the import query, else 'shader'. entry needs webpack's resourceQuery.

readonly outDir?string

Folder of the generated module, for relative @texture URLs. Default: the shader's.

readonly stage?'auto' | 'uv' | 'color' | 'position'

What the shader changes. auto infers it from the code.

Defined in packages/glsl/src/loader.ts.