A good start.
- 1 shape layer with 3 sliders (Radius, Num of Points, Anime 1 Duration)
path property expression
radius = effect("Radius")(1);
nop = effect("Num of Points")(1);
angle = 360 / nop;
content("Path 1").path;
// line length = half the perimeter of the circle
points = [
[-radius * Math.PI, -radius],
[0, -radius]
];
for (var i = 0; i < 360; i += angle) {
x = Math.cos(degreesToRadians(i - 90)) * radius;
y = Math.sin(degreesToRadians(i - 90)) * radius;
points.push([x, y])
}
createPath(points, [], [], false)
Create your shapes/objects and parent them to the PATH layer
enable transform -> auto-orient -> orient along path
Position expression
s = inPoint;
d = parent.effect("Anime 1 Duration")(1);
e = s + d;
time < e ?
parent.content("Path 1").path.pointOnPath(linear(time, s, e, 0, 1)) :
parent.content("Path 1").path.pointOnPath(linear((time - s + d) % (d / 3 * 2), 0, d / 3 * 2, 1 / 3, 1))
