I made a game with p5.js
I made a game while learning about p5.js
You can play it here.
(for experimental / immature mode, press ‘d’)
A site for the projects of me, Ryan G.
I made a game while learning about p5.js
You can play it here.
(for experimental / immature mode, press ‘d’)
… and in that spirit, here’s a work in progress demo…
Just came across these. Why didn’t I find them sooner?
Keyframe Overshoot Expression:
freq = 3;
decay = 5;
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
t = time - key(n).time;
amp = velocityAtTime(key(n).time - .001);
w = freq*Math.PI*2;
value + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
}else {
value
}
Add a little bounceback…
Came across this simple function that works nice in After Effects:
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
Now you can have rolling counters by just adding a custom slider control and keyframing the start and end values.