MotionBlurEffect class
Directional motion blur driven by camera velocity.
Wraps the world render in a saveLayer with a directional
ui.ImageFilter.blur oriented along the camera's movement direction.
final blur = MotionBlurEffect(velocityFn: () => camera.velocity);
camera.effectManager.addEffect(blur);
The effect is permanent (never auto-removed). Call CameraEffectManager.removeEffect to stop it.
- Inheritance
-
- Object
- CameraEffect
- MotionBlurEffect
Constructors
- MotionBlurEffect({required Offset velocityFn(), double minSpeed = 150.0, double maxBlurSigma = 6.0, double maxSpeed = 800.0})
- Create a MotionBlurEffect.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isComplete → bool
-
When
truethe CameraEffectManager removes this effect automatically.no setteroverride - maxBlurSigma → double
-
Maximum blur sigma (pixels) achieved at maxSpeed.
final
- maxSpeed → double
-
Speed that maps to maxBlurSigma.
final
- minSpeed → double
-
Minimum speed (world px/s) before any blur is applied.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- velocityFn → Offset Function()
-
Returns the camera's current world-space velocity (pixels/s).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postRender(
Canvas canvas, Size size) → void -
Called after
canvas.restore(), in reverse order of preRender calls.override -
preRender(
Canvas canvas, Size size) → void -
Called before the world
canvas.save()+ camera transform.override -
render(
Canvas canvas, Size size) → void -
Called after all post-process passes for pure screen-space overlays
(e.g. fade-to-black, letterbox bars).
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
double dt) → void -
Update internal state once per frame.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited