4 ms·
Very nice. Interesting that on Safari on my (admittedly old) laptop, random3 runs at about ~17ms per frame (60 fps), whereas random4 takes ~34ms (30fps). Re-dra
by perilunar 5y ago
Very nice. Interesting that on Safari on my (admittedly old) laptop, random3 runs at about ~17ms per frame (60 fps), whereas random4 takes ~34ms (30fps). Re-drawing the sun and its gradient & blur each time is enough to cause requestAnimationFrame to miss frames.
Btw, I think the sun should to be scaled to the canvas size also - on small windows if take up the whole thing!