Skip to content

Instantly share code, notes, and snippets.

@micuat
Last active March 1, 2021 15:18
Show Gist options
  • Save micuat/4d37362891d14afbbddbe29d9e6eba02 to your computer and use it in GitHub Desktop.
Save micuat/4d37362891d14afbbddbe29d9e6eba02 to your computer and use it in GitHub Desktop.
if(i<2){
s0.initCam(i)
s1.initCam((i+1)%3)
src(s0).mask(src(s0).hue(-.1).chroma().a().thresh(.3,.1)).scale(1,.7).out(o1)
src(s1).mask(src(s0).hue(-.1).chroma().a().thresh(.3,.1)).out(o2)
}else{
osc(20,0.1).modulate(noise(3),0.03).out(o1)
shape().rotate(0,1).out(o2)
}
src(o0).layer(
osc(6+i,0,2).modulate(src(o1).sub(gradient()),1)
.blend(
src(o2)
,()=>cc[16]))
.out()
setResolution(1280,720)
f=0
lerp=(a,b,p)=>a*(1-p)+b*p
update=()=>{
cc[1]=Math.max(0.01,cc[1])-0.01
f+=cc[17]*0.1
xoff=50;yoff=5
x0=600*i;y0=0
x1=600*(2-i);y1=500
x2=Math.sin(th=f+i*3.14/3)*200+300
y2=Math.cos(th)*200+300
moveTo(lerp(lerp(x0,x1,cc[0]),x2,cc[1])+xoff,lerp(lerp(y0,y1,cc[0]),y2,cc[1])+yoff)
resizeTo(lerp(600,1450,cc[2]),lerp(500,810,cc[2]))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment