TimelyParabolicSimulation class

a no-nonsense sim that takes a fixed duration to transpire Fixed-duration ease from startValue to endValue that can be retargeted with target without velocity jumps. duration and the time argument to x, dx, and isDone share the same units (for example 1.0 for a normalized 0→1 progress curve, or microseconds as in the original easer).

Inheritance

Constructors

TimelyParabolicSimulation(double current, double target, double velocity, {double duration = kTimelyParabolicDefaultDurationSeconds})
From current toward target with initial velocity, in seconds for duration and for x / dx / isDone time — same shape as SpringSimulation and SimulationFactory.
TimelyParabolicSimulation.constant(double value, {required double duration})
At value with zero velocity; call target to animate. For the SimulationFactory shape (current, target, velocity) use the unnamed constructor instead.
TimelyParabolicSimulation.fromState({required double position, required double velocity, required double target, required double duration})
TimelyParabolicSimulation.unset({required double duration})
First sample reaches the target immediately (no transition until retarget).

Properties

duration double
getter/setter pair
endValue double
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startValue double
getter/setter pair
startVelocity double
getter/setter pair
tolerance Tolerance
How close to the actual end of the simulation a value at a particular time must be before isDone considers the simulation to be "done".
getter/setter pairinherited

Methods

dx(double time) double
The velocity of the object in the simulation at the given time.
override
isDone(double time) bool
Whether the simulation is "done" at the given time.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
target(double v, {required double time}) → void
toString() String
A string representation of this object.
inherited
x(double time) double
The position of the object in the simulation at the given time.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited