Javascript – requestAnimationFrame() animation of multiple objects sync problem
The task is to animate number of falling rectangles simulating rain, when rectangle – jet touches ground -draw star. To impelemnt it there are 3 classes: GitHub repository. // Shapes: class WaterJet { // falling rectangles class RandomStar { // stars…