Skip to content

Commit

Permalink
heartbeat animation
Browse files Browse the repository at this point in the history
  • Loading branch information
g-ar committed Nov 14, 2017
1 parent 790a866 commit 6c6707d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions v3/heartbeats.cfdg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
startshape init

CF::Background = [b -1]
CF::Time = [time 0 3600]

path heart {
cpx = -1 // control points
cpy = 2.5
cpx2 = 1
cpy2 = 2
MOVETO(0,0)
CURVETO(2,0, cpx,cpy, cpx2,cpy2)
MOVETO(0,0)
CURVETO(2,0, cpx,-cpy, cpx2, -cpy2)
STROKE(0.03)[]
}

shape hearts {
heart[hue 0 sat 1 b 0.5 r -90]
hearts[s 0.99 b 0.1]
}

shape init {
hearts[s (abs(sin(ftime()))+10) time 0 3600]
}

0 comments on commit 6c6707d

Please sign in to comment.