Currently, I am utilizing the most recent edition of Snap.svg to sketch and animate a path
within an SVG:
var s = Snap('#svg');
var getPath = s.path('M15 15L115 115');
var pathLength = getPath.getTotalLength();
getPath.attr({
stroke: '#000',
strokeWidth: 5,
strokeDasharray: pathLength + ' ' + pathLength,
strokeDashoffset: pathLength,
strokeLinecap: 'round'
}).animate({
strokeDashoffset: 0
}, 1500);
Although it is functioning correctly (as evident in this demonstration), my objective is to transform it into a dotted line with each dot animated sequentially.
To illustrate the desired appearance, I created a simple prototype using circles (available for viewing here), but ideally, I would like to implement this effect using a custom path
.
In essence, I am seeking a method to animate a complex dotted path; achieving a similar effect as dots along a path or custom attributes on a path.