Interactive piece created with code in Hydra (hydra.ojack.xyz). Move the mouse to change the color palette
Hydra is a toolkit for live coding of network visuals created by Olivia Jack (ojack.xyz)
/* Looping Leaf Box by Daniel Oropeza Tw: @Ferdoropeza */
p5 = new P5({ mode: "WEBGL" }); p5.hide(); s0.init({ src: p5.canvas });
img = p5.loadImage('https://images.pexels.com/photos/3571563/pexels-photo-3571563.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260');
p5.strokeWeight(5) p5.draw = () => { p5.background(0,0,0,0); p5.rotateZ(time * 0.3); p5.rotateX(time * 0.3); p5.rotateY(time * 0.3); p5.push(); p5.translate(100, 0, 100); p5.stroke(0); p5.push(); p5.texture(img); p5.box(innerHeight / 1.7, innerHeight / 1.7); p5.pop(); };
osc(30, 0.04, 1) .saturate(2) .hue(()=>mouse.x/100) .rotate() .pixelate() .scrollX(0.1,0.1) .luma() .color(1, 0.7, -1).hue() .modulate(osc(2), 0) .modulatePixelate(o0, 1, 10) .layer(src(s0).color(-1,1,-1).luma(0.3,0.0).hue(()=>mouse.x/1000).saturate(99) ) .out(o0);