addSpotLight

fun addSpotLight(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, radius: Float = 1.0f, cutoff: Float = 0.7853982f)

Adds a spot light to the shader.

Spot lights emit a cone of light from a specific point, similar to a flashlight, illuminating objects within the cone based on distance and angle.

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.

radius

The radius of the light's influence. Defaults to 1.0.

cutoff

The cutoff angle for the spotlight cone in radians. Defaults to 0.7853982 (45 degrees).


fun addSpotLight(x: Float, y: Float, z: Float, targetX: Float, targetY: Float, targetZ: Float, color: Color = Color.WHITE, intensity: Float = 1.0f, radius: Float = 1.0f, cutoff: Float = 0.7853982f)

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

Spot lights emit a cone of light from a specific point, similar to a flashlight, illuminating objects within the cone based on distance and angle.

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.

radius

The radius of the light's influence. Defaults to 1.0.

cutoff

The cutoff angle for the spotlight cone in radians. Defaults to 0.7853982 (45 degrees).