FogEffect class

Distance-based fog effect.

Constructors

FogEffect({Color color = const Color(0xFF000000), double density = 0.02, double near = 10, double far = 100, bool enabled = false})

Properties

color Color
getter/setter pair
density double
getter/setter pair
enabled bool
getter/setter pair
far double
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
near double
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyOverlay(Canvas canvas, Size size) → void
Draws a full-screen fog overlay.
applyToColor(Color original, double distance) Color
Blends a color with fog based on distance.
fogFactor(double distance) double
Calculates fog factor for a given distance from camera. Returns 0 (no fog) to 1 (fully fogged).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited