// if(p.x > .5 || p.y > .5) col.r = .8; if(max(p.x, p.y) > .5) col.r = .8; // col.r = step(.5, max(p.x, p.y));
float a = radians(45.); vec2 n = vec2(sin(a), cos(a)); float d = dot(uv, n); d = abs(d); col += smoothstep(fwidth(d), 0., d-.001);
function prepareOneFish() { let start = new Date().getTime(); while (new Date().getTime() < start + 1000) { // preparing fish } }
function setTimeoutPromise(delay) { return new Promise((resolve, reject) => { setTimeout(resolve, delay); }); } function setTimeoutPromise(delay) { return new Promise((resolve) => setTimeout(resolve, delay)); }