DirectionalLight class

A light that has a direction and is located at infinite, so its rays are parallel. Simulates the sun light and it can cast shadows

Constructors

DirectionalLight({required String id, bool? castShadows, int? color, TransitionOptions? colorTransition, List<double?>? direction, TransitionOptions? directionTransition, double? intensity, TransitionOptions? intensityTransition, double? shadowIntensity, TransitionOptions? shadowIntensityTransition})

Properties

castShadows bool?
Enable/Disable shadow casting for this light
getter/setter pair
color int?
Color of the directional light.
getter/setter pair
colorTransition TransitionOptions?
Transition property for color
getter/setter pair
direction List<double?>?
Direction of the light source specified as a azimuthal angle, p polar angle where a indicates the azimuthal angle of the light relative to north (in degrees and proceeding clockwise), and p indicates polar angle of the light (from 0 degree, directly above, to 180 degree, directly below).
getter/setter pair
directionTransition TransitionOptions?
Transition property for direction
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
Unique light name
getter/setter pair
intensity double?
A multiplier for the color of the directional light.
getter/setter pair
intensityTransition TransitionOptions?
Transition property for intensity
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowIntensity double?
Determines the shadow strength, affecting the shadow receiver surfaces final color. Values near 0.0 reduce the shadow contribution to the final color. Values near to 1.0 make occluded surfaces receive almost no directional light. Designed to be used mostly for transitioning between values 0 and 1.
getter/setter pair
shadowIntensityTransition TransitionOptions?
Transition property for shadowIntensity
getter/setter pair

Methods

encode() Object
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

Static Methods

decode(Object result) DirectionalLight