Last active
June 29, 2020 17:17
-
-
Save animoplex/912145ac481b41d16f283cb9dce4f88b to your computer and use it in GitHub Desktop.
Fixed Dashes Around Circle Stroke - After Effects Expression by Animoplex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fixed Dashes Around Circle Stroke - Created by Animoplex: www.animoplex.com | |
// Apply this to a Ellipse shape layer's Stroke Dash property. | |
// Full Tutorial: https://www.youtube.com/watch?v=I-Acdl_l9G0&t=562s | |
src = effect("Slider Control")("Slider"); | |
rad = content("Ellipse").content("Ellipse Path").size[0] / 2; | |
gap = content("Ellipse").content("Stroke").dash.gap; | |
seg = src <= 0 ? 1 : src; | |
2 * Math.PI * rad / seg - gap | |
// Offset Property Expression | |
// Apply this to the Stroke's Offset property | |
content("Ellipse").content("Stroke").dash.dash / 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment