GlassDropStretch class
The deformation of one drop, fed where the drop is once a frame.
Pure: no ticker, no widget. value is signed — positive stretched along the travel, negative squashed — and apply turns it into a size.
Constructors
- GlassDropStretch([GlassDropMotion motion = const GlassDropMotion()])
Properties
- acceleration → double
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSettled → bool
-
Round, still in shape and heading nowhere: nothing left to animate unless
the drop moves again.
no setter
- motion ↔ GlassDropMotion
-
The spec. Changing it keeps the state; GlassDropMotion.none makes the
next step return 0 and forget it.
getter/setter pair
- position → double
-
The position last fed to step or jump.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- target → double
-
What the spring is heading for.
no setter
- value → double
-
The deformation now, between
-maxStretchandmaxStretch.no setter - velocity → double
-
The smoothed velocity and acceleration along the travel, logical px/s
and px/s².
no setter
Methods
-
jump(
double x) → void -
The drop is at
xwithout having travelled there — a slider's knob placed under a tap. Its motion so far is forgotten; its shape is not. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Forgets everything: round, still, and the next step is a first sample.
-
step(
double dt, double x) → double -
Advances
dtseconds to a drop atx, logical px along its travel, and returns value. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
Constants
- kDirectionSpeed → const double
- Below this speed, logical px/s, the direction of travel fades out of the sign — so a drop at rest with a jitter of acceleration stays round, and a turnaround passes through round rather than flipping.