N
N
Nikita-Fast2018-10-15 14:10:08
Animation
Nikita-Fast, 2018-10-15 14:10:08

A couple of questions about snap.svg.js, how are animations done?

I study snap.svg.js for an example, I decided to animate a simple path , drew a path in Corel and took coordinates from there

<svg id="svg"></svg>
   
   <script src="https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js"></script>
  <script>
    var s = Snap("#svg").attr({
    width: 400,
    height: 400
  });
  var p = s.path("m211.11 29.443c-7.8773 42.532-81.838 36.114-75.778 65.304 33.47 161.2-55.536 118.87-89.008 59.191").attr({
    fill:"none",
    stroke: "#000",
    strokeWidth: 3
  });
  </script>

Everything was perfectly rendered in the browser, but the question is how now or what should I write?
In the docks, I did not understand anything!
"m211.11 29.443c-7.8773 42.532-29.974 91.538-23.913 120.73 6.1614 29.676-118.95-77.715-119.98-60.673-4.5613 75.534 6.4136 113.13-20.897 64.44"

this is what the final path looks like, how can I change it animatedly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-10-15
@Nikita-Fast

animate method like

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question