GestureMomentum class final
How a gesture keeps moving the camera after the user lets go.
A part moves only when its velocity is set, and each part slows on its own.
Every part defaults to MomentumDecayModel.friction with a half-life of 140
ms, and these other defaults:
- Pan stops at 10 logical pixels per second, needs a release of at least 200, and counts a release faster than 10000 as 10000.
- Zoom stops at 0.01 levels per second and moves at most 2.5 levels. Its snap settles on the nearest whole level.
- Bearing stops at 1 degree per second and needs a release of at least 60. Its snap settles on north within 7 degrees.
- Pitch stops at 1 degree per second and needs a release of at least 5. Its snap settles flat within 7 degrees.
See mln_gesture_momentum in the
C API reference.
Constructors
- GestureMomentum({PanMomentum pan = const PanMomentum(), AnchoredMomentum zoom = const AnchoredMomentum(), AnchoredMomentum bearing = const AnchoredMomentum(), AnchoredMomentum pitch = const AnchoredMomentum()})
-
const
Properties
- bearing → AnchoredMomentum
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- pan → PanMomentum
-
final
- pitch → AnchoredMomentum
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- zoom → AnchoredMomentum
-
final
Methods
-
copyWith(
{PanMomentum? pan, AnchoredMomentum? zoom, AnchoredMomentum? bearing, AnchoredMomentum? pitch}) → GestureMomentum - A copy of this value with the given members replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited