// LE COSMOS
// Par PL,
// Pour Raphael <3
// s0.initImage("file:///home/pln/Work/Hydra/StarryNights/img/september-28-2019-galaxy-ngc-300.jpg")
s0.initImage("https://git.plnech.fr/pln/Hydra/raw/eecd6aaf74b4af18af9af22a4eed8d6b201d4824/StarryNights/img/september-28-2019-galaxy-ngc-300.jpg")
// s1.initImage("file:///home/pln/Work/Hydra/StarryNights/img/cosmos.jpg")
s1.initImage("https://git.plnech.fr/pln/Hydra/raw/eecd6aaf74b4af18af9af22a4eed8d6b201d4824/StarryNights/img/cosmos.jpg")
src(s0)
// .scale(2, 1)
.out(o0)
src(o0)
.blend(noise(100,0.6),0.06)
.out(o1)
// Phase 2
src(o1)
.mult(
src(o1)
.scale(() => 0.8 + 1.4 * Math.abs(Math.sin(time / 200)))
.luma(0.7)
.thresh(() => 0.84 + 0.1 * Math.sin(time / 20))
// , 0.7
)
.out(o2)
// Phase 3: Que les vents célestes te portent
src(o2)
.blend(src(o1).scale(0.9).mask(shape(4).scale(3.3))
.luma(() => 0.5 + 0.5 * Math.sin(time / (28 * 9)))
, () => 0.4 + 0.3 * Math.sin(time / 28))
.add(src(s1)
.scale(0.1)
.contrast(0.5)
// .mask(shape(4).scale(0.85))
.modulate(
noise(() => 11 - 5 * ((time/200) % 5), 0.01)
)
.invert()
.luma(0.5)
.scale(3.7)
.mask(shape(4).scale(() => 1,4 + 1.2 * Math.abs(Math.sin(time / 13))))
, () => 0.2 * ((time / 1.989) % 10)
)
.out(o3)
render(o3)
// render()