DirectionalLightState

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

See also

Constructors

Link copied to clipboard
fun DirectionalLightState(id: String = generateRandomLightId("directional"))

Types

Link copied to clipboard
object Companion

Public companion object.

Link copied to clipboard
data class Holder(val savedProperties: Map<String, Value>) : Parcelable

DirectionalLightState Holder class to be used within Saver.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Overwrite the equals for DirectionalLightState.

Link copied to clipboard
open override fun hashCode(): Int

Overwrite the hashcode for DirectionalLightState.

Link copied to clipboard
open override fun toString(): String

Overwrite the toString for DirectionalLightState.

Properties

Link copied to clipboard

Enable/Disable shadow casting for this light Default value: false.

Link copied to clipboard

Color of the directional light. Default value: "#ffffff".

Link copied to clipboard

Defines the transition of color. Default value: "#ffffff".

Link copied to clipboard

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). Default value: 210,30. Minimum value: 0,0. Maximum value: 360,90.

Link copied to clipboard

Defines the transition of direction. Default value: 210,30. Minimum value: 0,0. Maximum value: 360,90.

Link copied to clipboard
val id: String

The id of the DirectionalLightState.

Link copied to clipboard

A multiplier for the color of the directional light. Default value: 0.5. Value range: 0, 1

Link copied to clipboard

Defines the transition of intensity. Default value: 0.5. Value range: 0, 1

Link copied to clipboard

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. Default value: 1. Value range: 0, 1

Link copied to clipboard

Defines the transition of shadowIntensity. Default value: 1. Value range: 0, 1