Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@quenty/acceltween) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
AccelTween
Provides a means to, with both a continuous position and velocity, accelerate from its current position to a target position in minimum time given a maximum acceleration.
Installation
npm install @quenty/acceltween --saveAPI
AccelTween = AccelTween.new(number maxaccel = 1)
maxaccel is the maximum acceleration applied to reach its target.
number AccelTween.p
Returns the current position.
number AccelTween.v
Returns the current velocity.
number AccelTween.a
Returns the maximum acceleration.
number AccelTween.t
Returns the target position.
number AccelTween.rtime
Returns the remaining time before the AccelTween attains the target.
AccelTween.p = number
Sets the current position.
AccelTween.v = number
Sets the current velocity.
AccelTween.a = number
Sets the maximum acceleration.
AccelTween.t = number
Sets the target position.
AccelTween.pt = number
Sets the current and target position, and sets the velocity to 0.