Fog class

This class contains the parameters that define linear fog, i.e., that grows linearly denser with the distance.

final scene = Scene();
scene.fog = Fog(Color.fromHex32(0xcccccc), 10, 15 );
Inheritance

Constructors

Fog(int color, [double? near, double? far])
The color parameter is passed to the Color constructor to set the color property.
Fog.fromJson(Map<String, dynamic> json)

Properties

color ↔ Color
getter/setter pairinherited
density ↔ double
getter/setter pairinherited
far ↔ double
getter/setter pairinherited
hashCode → int
The hash code for this object.
no setterinherited
isFog ↔ bool
getter/setter pairinherited
isFogExp2 ↔ bool
getter/setter pairinherited
name ↔ String
getter/setter pairinherited
near ↔ double
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clone() → Fog
Returns a new fog instance with the same parameters as this one.
override
getProperty(String propertyName, [int? offset]) → dynamic
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setProperty(String propertyName, dynamic value, [int? offset]) → FogBase
inherited
toJson() → Map<String, dynamic>
Return fog data in JSON format.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](dynamic key) → dynamic
inherited
operator []=(String key, dynamic value) → void
inherited