let url = "https://coolors.co/app/f7e6e1-ad9ba6-9a95a0-e4e2e1-616572";
createCanvas(windowWidth, windowHeight, WEBGL);
sh = createShader(vert,frag);
sh.setUniform("u_resolution", [width,height]);
sh.setUniform("u_lightDir", [0,1,-0.5]);
graphics = createGraphics(width, height);
graphics.colorMode(HSB, 360, 100, 100, 100);
drawNoiseBackground(15, graphics);
setCol(sh,"u_col",cols[0]);
for(let x = -width/2; x < width/2; x += step)
let angle = x/step/10 + frameCount/50;
translate(x,sin(angle)*100,0);
function setCol(shader,uniformName,colStr)
let colArray = col._array;
shader.setUniform(uniformName,colArray);
function createCols(_url) {
let slash_index = _url.lastIndexOf('/');
let pallate_str = _url.slice(slash_index + 1);
let arr = pallate_str.split('-');
for (let i = 0; i < arr.length; i++) {
function drawNoiseBackground(_n, _graphics) {
let c = color(0, 0, 100, 5);
for (let i = 0; i < width * height * _n/100; i++) {
let x = random(1) * width;
let y = random(1) * height;
_graphics.ellipse(x, y, w, h);