LavaUI docs GitHub

struct DirectionalLight3D

Swift

struct DirectionalLight3D

Light arriving from one direction, like the sun: faces turned toward it are brighter.

Sources/LavaUI/Spatial.swift:580

Constructors

init(direction: Vector3 = [-0.4, -0.7, -1], color: Color = Color(r: 1, g: 1, b: 1), intensity: Float = 0.9)

Creates a directional light.

  • direction: The way the light travels, from the light toward the scene.
  • color: The light's colour.
  • intensity: The light's strength; below zero is treated as zero.

Sources/LavaUI/Spatial.swift:587

Methods

func spatialElements() -> [SpatialElement]

Not documented.

Sources/LavaUI/Spatial.swift:597