Interactive piece made in collaboration with the artist @SkyGoodman4 Move the mouse to interact with the image.
Hydra is a toolkit for live coding of network visuals created by Olivia Jack (ojack.xyz)
/*
Novocaine
Collab by @SkyGoodman4 and @Ferdoropeza
5 Nov 2021
*/
s0.initImage("https://i.ibb.co/qsq922K/Novocane.jpg")
d = 0.001
B =.12; C=-.25; D=.34; E=.19; F=-.41; EASE= 'easeInOutCubic'; FST= .55; G =-.2; H=-.5; I=.14; J=.9; K=-.11; L= 0;
var click = 0;
document.body.addEventListener('mousedown', function(){ click = 1; }, true);
document.body.addEventListener('mouseup', function(){ click = 0 }, true);
src(o0)
.repeat(1, 0.999)
.colorama(-0.005)
.blend(o0, 0.1)
.scale(1.001)
.layer(src(o0)
.layer(
src(s0)
.scale(1, 0.95)
.saturate(3)
.contrast(2)
)
.diff(
src(s0).modulate(
osc(6, 0, 1.5)
.brightness(-0.5)
.modulate(noise(1, 0.03).sub(gradient()), 1),
0.01
)
).mult(o1).modulateRotate(noise(2,0.5).scrollX(()=>time*0.55),0.01)
.add(src(s0).shift(),0.3)
.modulateScrollX(s0,()=>mouse.x/1000)
.scale(()=>0.5-click/0.4)
.scrollX([G,D,J,G].ease(EASE).fast(FST/3))
.scrollY([C,L,D].ease(EASE).fast(FST/3))
.modulateScale(osc(10, 0).thresh(), 0.5)
.luma(0.3)
.modulate(noise(3, 0.3).pixelate(20, 10), 0.01)
.modulate(src(o0).scale(1.5), -0.01)
)
.add(src(o0))
.color(0.4, 0.5, -1)
.contrast(2)
.layer(shape(2, () => (time < 3 ? 0.01 : 0), 0.0).r())
.blend(o0, 0.6)
.out();
src(s0)
.thresh([0, 0.7].smooth())
.diff(src(s0).thresh([0.3, 1].smooth()).invert())
.color(10)
.out(o1);