Skip to content

Instantly share code, notes, and snippets.

@AEnMe
Created October 14, 2020 10:24
Show Gist options
  • Save AEnMe/414de92bc7f220142ead2afbdb73bb63 to your computer and use it in GitHub Desktop.
Save AEnMe/414de92bc7f220142ead2afbdb73bb63 to your computer and use it in GitHub Desktop.
Dashes counter offset on trim path start animation
anim = value + time * -30; // regular offset animation
st = thisProperty.propertyGroup(4).content("Trim Paths 1").start/100; // Trim Path animation
p = thisProperty.propertyGroup(4).content("Path 1").path.points(); // Vector Path (no tangent)
n=0;
for(i=0;i<p.length-1;i++){
n += length( p[i],p[i+1]);
}
smartStart = n*st;
anim + smartStart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment