@dioramajs/diorama/vite
Vite plugin that turns the effects folder into a lazy registry with types.
On this page
import { braces, CODE, declarations } from '@dioramajs/diorama/vite'Functions
braces | Lines of a braced block. An empty one is `{}` on the opening line, as Biome and Prettier print it, so formatting a generated file for an empty folder leaves it as written. |
declarations | Types that check effect names in `attach('.x', 'name')` and `data-dio`. |
diorama | Vite plugin, `plugins: [diorama()]`. |
effectName | `HeroGlow` and `hero_glow` both become `hero-glow`. |
key | An object key, bare when possible. |
quote | A single-quoted string literal, in the generated files' style. |
registry | Lazy imports with what is known before load. Shaders through @dioramajs/glsl's `?effect`. |
scan | The folder's effects, one per code file (not `*.d.ts`, not `_private`) and per fragment shader without a code file of the same name. Sorted by name. Bad or repeated names are skipped. |
shaderType | A shader's effect type, from the params of its bindings. |
Constants
Interfaces
DioramaPluginOptions | Options of the build plugins. |
Found | An effect file found in the folder. |