Here’s one way of how to do it:
s = effect("A to B")("Slider");
startP = effect("Callout Start")("Point");
endP = effect("Callout End")("Point");
midP = effect("Callout Middle")("Point");
linear(s, 0, 0.5, startP,midP)
+
linear(s, 0.5, 1, midP,endP)
-midP;
or like this:
s = effect("A to B")("Slider");
startP = effect("Callout Start")("Point");
endP = effect("Callout End")("Point");
midP = effect("Callout Middle")("Point");
if (s<0.5) {
linear(s, 0, 0.5, startP,midP)
} else {
linear(s, 0.5, 1, midP,endP)
}
You may want to “balance” the timting midpoint, because if it is not located equally distant from start and end, then the animation would speed up/slow down before and after 0.5.
This is a possible way to do that:
s = effect("A to B")("Slider");
startP = effect("Callout Start")("Point");
endP = effect("Callout End")("Point");
midP = effect("Callout Middle")("Point");
midWay = length(startP, midP) / (length(startP, midP) + length(midP, endP));
if (s<midWay) {
linear(s, 0, midWay, startP,midP)
} else {
linear(s, midWay, 1, midP,endP)
}