LightingConfig class
Class used to configure lighting
Constructors
- LightingConfig({required double radius, required Color color, bool withPulse = false, bool useComponentAngle = false, Curve pulseCurve = Curves.decelerate, double pulseVariation = 0.1, double pulseSpeed = 0.1, double? blurBorder, LightingType type = LightingType.circle, Vector2? align, LightingMode mode = LightingMode.cutout, LightFalloff falloff = LightFalloff.blur, double innerRadius = 0.35, double intensity = 1, BlendMode additiveBlendMode = BlendMode.plus, LightFlicker? flicker, bool castShadows = false})
Properties
- additiveBlendMode → BlendMode
-
Blend mode used by LightingMode.additive lights.
final
- align → Vector2
-
Offset applied to the light, relative to the component center.
final
- blurBorder → double
-
Configure blur in lighting. When
0, the light has a crisp edge.final - castShadows → bool
-
Whether this light is blocked by LightingOccluders.
final
- color → Color
-
Color of the lighting
final
- effectiveColor → Color
-
color with intensity applied to its alpha.
no setter
- falloff → LightFalloff
-
How the light fades to its edge.
final
- flicker → LightFlicker?
-
Optional candle-like flicker.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- innerRadius → double
-
Fraction of radius (0..1) where a gradient falloff still has full
intensity. Only used by LightFalloff.linear and LightFalloff.smooth.
final
- intensity → double
-
Light intensity in the
0..1range. Multiplies the alpha of color.final - maskFilter → MaskFilter?
-
Blur applied to the light edge.
nullmeans a crisp edge.no setter - mode → LightingMode
-
How the light interacts with the scene.
final
- pulseCurve → Curve
-
Configure curve in pulse effect
final
- pulseSpeed → double
-
Configure speed in pulse effect
final
- pulseVariation → double
-
Configure variation in pulse effect
final
- radius → double
-
Radius of the lighting
final
- radiusWithEffects → double
-
Radius after the pulse and flicker are applied.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → LightingType
-
Configure type of the lighting
final
- useComponentAngle → bool
-
Light follow component angle
final
- valueFlicker → double
-
Current flicker variation in
[-amplitude, amplitude].0when there is no flicker.no setter - valuePulse → double
-
no setter
- withPulse → bool
-
Enable pulse effect in lighting
final
Methods
-
copyWith(
{double? radius, Color? color, bool? withPulse, bool? useComponentAngle, double? pulseVariation, double? pulseSpeed, Curve? pulseCurve, double? blurBorder, LightingType? type, Vector2? align, LightingMode? mode, LightFalloff? falloff, double? innerRadius, double? intensity, BlendMode? additiveBlendMode, LightFlicker? flicker, bool? castShadows}) → LightingConfig - Returns a copy with the given fields replaced.
-
lerpTo(
LightingConfig other, double t) → LightingConfig -
Interpolates between this config and
other. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
double dt) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited