Class: AnimationTrajectory
Some attacks follow a predictable path. This class is helpful to predict a character's position in future frames. Instances of this class act as iterators, you can iterate all predictable positions like this:
for (let position of player.trajectory) {
console.log(position);
}To convert a trajectory into a plain array of Point instances you can do: points = [ ...trajectory ].
Properties
positionUnclipped{Point}Starting position
flipX{boolean}Is this animation flipped (player facing right)
frames{Object}Reference to animation's frames. Example:
player.animations[player.animationName].framesframeIndex{number}Current frame number.