Motion class

Motions are used to animate properties of nodes or any other type of objects. The motions are powered by an MotionController, typically associated with a Node. The most commonly used motion is the MotionTween which interpolates a property between two values over time.

Motions can be nested in different ways; played in sequence using the MotionSequence, or looped using the MotionRepeat.

You should typically not override this class directly, instead override MotionInterval or MotionInstant if you need to create a new action class.





duration double
The total time it will take to complete the motion, in seconds.
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
step(double dt) → void
Moves to the next time step in an motion, dt is the delta time since the last time step in seconds. Typically this method is called from the MotionController.
toString() String
Returns a string representation of this object.
update(double t) → void
Sets the motion to a specific point in time. The t value that is passed in is a normalized value 0.0 to 1.0 of the duration of the motion. Every motion will always recieve a callback with the end time point (1.0), unless it is cancelled.


operator ==(dynamic other) bool
The equality operator. [...]