Files
strudel/packages/draw/index.mjs
T
Tristan de Cacqueray f0ddb2d595 Add initial shader module
This change adds the `loadShader` and `shader` function, to be used like this:

```strudel
await loadShader`
  // The modulation targets
  uniform float iColor;

  void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
    vec2 uv = fragCoord / iResolution.xy;
    vec3 col = 0.5 + 0.5*cos(iColor+uv.xyx+vec3(0,2,4));
    fragColor = vec4(col, 0);
  }
`

$: s("bd").shader({uniform: 'iColor'})
```
2024-10-18 11:40:09 -04:00

8 lines
215 B
JavaScript

export * from './animate.mjs';
export * from './color.mjs';
export * from './draw.mjs';
export * from './pianoroll.mjs';
export * from './shader.mjs';
export * from './spiral.mjs';
export * from './pitchwheel.mjs';