feuille_dor.js 627 Bytes
s0.initImage("file:///home/pln/Work/Hydra/Neige/img/mer.jpg")
s1.initImage("file:///home/pln/Work/Hydra/Neige/img/fonds.jpg")

a.show()
a.setCutoff(0.1)
a.setBins(4)

src(s0)
  .scale(() => 1.5 + 0.5 * Math.sin(a.fft[0] + time/10))
  // .scale(() => 1.05 + 0.05 * Math.sin(time/5))
  .out(o0)
//
src(o0)
  .diff(src(s1)
    .rotate(() => 180 + 0.01 * Math.cos(time))
    .scale(() => 0.1 + 0.001 * + Math.sin(time))
    ,0.5)
  .out(o1)
//
src(o1)
  .modulate(
    osc(0.001,1)
  )
  .brightness(() => -0.05 * Math.sin(time/100)).contrast(1.35)
  .out(o2)

src(o2)
  .scroll(-0.05,0.0)
  .scale(1.5,0.7)
  .out(o3)

render(o3)