+ 12
How to move multiple objects at once using js?đ€đ€
I want some Circles go down at the same time.
4 Answers
+ 3
You cannot move multiple objects really at once, as all instructions in JS are executed in a mono-thread, so you need to sequentially ( iterate over an array ) to update properties of objects, and that will be do so quick that you see objects moving as at once...
+ 12
Okk visph but is there a way to move objects down using svg animate tag only.??
+ 3
have a look at p5js for simple js animation on canvas and much more. http://p5js.org
Easy, comprehensive tutorials on the matter by Daniel Shiffman on his youtube channel The coding Train
https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
+ 3
You don't have previously specify Svg...
In theory ( I don't have a lot practice of Svg, and don't have time now to study this particularity ), you can define an animation object with an ID that you can next apply to how many elements as you want ^^ ( search for <def> svg element )