MotionPathPlugin.getPositionOnPath( rawPath:Array, progress:Number, includeAngle:Boolean ) : Object
Calculates the x/y position (and optionally the angle) corresponding to a particular progress value along the RawPath
The RawPath Array on which you'd like to plot a position
A number between 0 and 1 representing the progress along the path where 0.5 would be halfway into the path
true, the angle (in degrees) will also be calculated and attached to the return object as an "angle" property.
Returns : Object
An object containing
y properties (coordinates) and if the
includeAngle parameter was
angle property as well (in degrees)
Calculates the x/y position (and optionally the angle) corresponding to a particular progress value (0-1 where 0.5 is the middle) along the RawPath. Note that the RawPath must have had its measurements cached FIRST, using the cacheRawPathMeasurements() method.
// Get the RawPath associated with the`<path>`with an ID of "path"
let rawPath = MotionPathPlugin.getRawPath("#path"),
// cache the measurements first (only necessary once, unless the path data changes)
// find the coordinates and angle of the middle of the path
point = MotionPathPlugin.getPositionOnPath(rawPath, 0.5, true);
// move a #dot element there...