mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-24 13:59:07 -04:00
f0ddb2d595
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'})
```
39 lines
847 B
JSON
39 lines
847 B
JSON
{
|
|
"name": "@strudel/draw",
|
|
"version": "1.1.0",
|
|
"description": "Helpers for drawing with Strudel",
|
|
"main": "index.mjs",
|
|
"type": "module",
|
|
"publishConfig": {
|
|
"main": "dist/index.mjs"
|
|
},
|
|
"scripts": {
|
|
"build": "vite build",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/tidalcycles/strudel.git"
|
|
},
|
|
"keywords": [
|
|
"titdalcycles",
|
|
"strudel",
|
|
"pattern",
|
|
"livecoding",
|
|
"algorave"
|
|
],
|
|
"author": "Felix Roos <flix91@gmail.com>",
|
|
"license": "AGPL-3.0-or-later",
|
|
"bugs": {
|
|
"url": "https://github.com/tidalcycles/strudel/issues"
|
|
},
|
|
"homepage": "https://github.com/tidalcycles/strudel#readme",
|
|
"dependencies": {
|
|
"@strudel/core": "workspace:*",
|
|
"picogl": "^0.17.9"
|
|
},
|
|
"devDependencies": {
|
|
"vite": "^5.0.10"
|
|
}
|
|
}
|