addDirectionalLight

fun addDirectionalLight(position: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, target: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, color: Color = Color.WHITE, intensity: Float = 1.0f)

Adds a directional light to the shader.

Directional lights simulate light coming from a specific direction, similar to sunlight, where the light rays are parallel and affect all objects in the scene uniformly.

Parameters

position

The position of the light in 3D space.

target

The target point the light is pointing to.

color

The color of the light. Defaults to white.

intensity

The intensity of the light. Defaults to 1.0.


fun addDirectionalLight(x: Float, y: Float, z: Float, targetX: Float = 0.0f, targetY: Float = 0.0f, targetZ: Float = 0.0f, color: Color = Color.WHITE, intensity: Float = 1.0f)

Adds a directional light to the shader using individual float parameters for position and target.

Directional lights simulate light coming from a specific direction, similar to sunlight, where the light rays are parallel and affect all objects in the scene uniformly.

Parameters

x

The x-coordinate of the light's position.

y

The y-coordinate of the light's position.

z

The z-coordinate of the light's position.

targetX

The x-coordinate of the light's target point.

targetY

The y-coordinate of the light's target point.

targetZ

The z-coordinate of the light's target point.

color

The color of the light. Defaults to white.

intensity

The intensity of the light. Defaults to 1.0.