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 -maxStretch and maxStretch.
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 x without 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 dt seconds to a drop at x, 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

apply(Size size, double stretch) → Size
A drop of size deformed by stretch along x: the area kept.

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.