I have an SVG containing a path element:
<path d="M54.7,0.8 L111.8,73.4 L79.9,126.1 L27.9,128.7 L0.5,74.2 L54.7,0.8 Z" id="Shape"></path>
After exploring the meanings of SVG paths, I've learned that:
- M signifies moving to a point
- The Ls draw lines
- Z closes the path, producing a polygon
Despite understanding the basics, I'm facing challenges when attempting to manipulate the path using SnapSVG:
var graph = Snap(".graph");
var item = graph.select('#after #Shape');
While searching through the Snap documentation, I have been unable to find information on modifying existing paths. Although I have looked into the item's paper.path, I could not find any examples of path modifications, only instructions on creating new paths.
How can I alter an existing path in SnapSVG? My goal is to animate the transition from the old shape to the new one.