i need an expression to keep the number of dashes constant while animating one point of a path, so that the “growth” is noticeable. The distance between the individual dashes need to move with the path. Hope you get what i mean..
Assuming you are using a shape layer and a straight path with two points, you could try this on the ‘dash’ property:
n = 10 ; // number of dashes
shp = content("Shape 1").content("Path 1").path ;
p1 = shp.points(time) ;
p2 = shp.points(time) ;
d = length( p1, p2 )
d / n / 2
If its curved, the math would be much more difficult.
If you are OK with dots on a line versus dashes, you can use the Audio Waveform effect on a layer… Set the Display Options to ‘Digital’, the Audio Samples to the number of dots you want, the Thickness and colors as needed. The create a mask on that layer (curved or straight) and, in the Audio Waveform settings, set the Path property to that mask. Then you can animate the mask as needed and the line of dots will follow it and maintain a consistent number of dots.