Re:Rain simulator for pluviophiles
by hughes on Saturday May 16, 2015 @10:10AM
(#9556130)
Looks good, but why do you limit the Night version to 10fps? The JS profiler shows you're explicitly doing nothing on 5 out of 6 frames.
[ Parent
| on HN ]
You mean to make the motion more smooth?
I mean in `animateDrops` you check if `timestamp - lastExecutionTime < speed`. You set `speed` to 100ms when you call `engine.rain`.
Because of this the motion is jittery, updating at about 1/3 the rate of smooth video and 1/6th the rate our eyes can perceive.