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

ConvertOptions interface

Options of `convert`.

View as Markdown
import type { ConvertOptions } from '@dioramajs/glsl/convert'
interface ConvertOptions

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 filename?string

For messages and #include resolution. Default 'shader.glsl'.

readonly include?IncludeReader

Default reads files relative to from and resolves bare specifiers like Node.

readonly name?string

Default: kebab-case file stem.

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/convert/index.ts.