I'm working to animate an explosion on SVG but got stuck with it. I would like each element of SVG going in random direction from center.
Does anyone know a solution ?
See the Pen wzOxwO by anon (@anon) on CodePen
var newPoint = (point - center) * scalar;
Vectors are like points, but they have a definite direction and length, so the ratio between the x and y values is constant. This means you don't have to figure out the angle for a position. If you know the length o