Builder

actual class Builder(type: LightManager.Type)

Builder for creating and configuring light components. All builder methods return this Builder for method chaining.

Parameters

type

Type of light to create

expect class Builder(type: LightManager.Type)

Builder for creating and configuring light components. All builder methods return this Builder for method chaining.

Parameters

type

Type of light to create

actual class Builder(type: LightManager.Type)

Builder for creating and configuring light components. All builder methods return this Builder for method chaining.

Parameters

type

Type of light to create

actual class Builder(type: LightManager.Type)

Builder for creating and configuring light components. All builder methods return this Builder for method chaining.

Parameters

type

Type of light to create

actual class Builder(type: LightManager.Type)

Builder for creating and configuring light components. All builder methods return this Builder for method chaining.

Parameters

type

Type of light to create

Constructors

Link copied to clipboard
actual constructor(type: LightManager.Type)
expect constructor(type: LightManager.Type)
actual constructor(type: LightManager.Type)
actual constructor(type: LightManager.Type)
actual constructor(type: LightManager.Type)

Functions

Link copied to clipboard
actual fun build(engine: Engine, entity: Entity)

Build and attach the light component to an entity. If the entity already has a light, it is destroyed first. Supports up to 2048 lights per Engine.

expect fun build(engine: Engine, entity: Entity)

Build and attach the light component to an entity. If the entity already has a light, it is destroyed first. Supports up to 2048 lights per Engine.

actual fun build(engine: Engine, entity: Entity)

Build and attach the light component to an entity. If the entity already has a light, it is destroyed first. Supports up to 2048 lights per Engine.

actual fun build(engine: Engine, entity: Entity)

Build and attach the light component to an entity. If the entity already has a light, it is destroyed first. Supports up to 2048 lights per Engine.

actual fun build(engine: Engine, entity: Entity)

Build and attach the light component to an entity. If the entity already has a light, it is destroyed first. Supports up to 2048 lights per Engine.

Link copied to clipboard
actual fun castLight(enabled: Boolean): LightManager.Builder

Whether this light casts light (enabled by default). Useful for lights that cast shadows without illuminating the scene.

expect fun castLight(enabled: Boolean): LightManager.Builder

Whether this light casts light (enabled by default). Useful for lights that cast shadows without illuminating the scene.

actual fun castLight(enabled: Boolean): LightManager.Builder

Whether this light casts light (enabled by default). Useful for lights that cast shadows without illuminating the scene.

actual fun castLight(enabled: Boolean): LightManager.Builder

Whether this light casts light (enabled by default). Useful for lights that cast shadows without illuminating the scene.

actual fun castLight(enabled: Boolean): LightManager.Builder

Whether this light casts light (enabled by default). Useful for lights that cast shadows without illuminating the scene.

Link copied to clipboard

Enable shadows for this light (disabled by default). Only directional and spot lights can cast shadows.

Enable shadows for this light (disabled by default). Only directional and spot lights can cast shadows.

Enable shadows for this light (disabled by default). Only directional and spot lights can cast shadows.

Enable shadows for this light (disabled by default). Only directional and spot lights can cast shadows.

Enable shadows for this light (disabled by default). Only directional and spot lights can cast shadows.

Link copied to clipboard
actual fun color(linearR: Float, linearG: Float, linearB: Float): LightManager.Builder

Set the light's color in linear sRGB. Default: white (1, 1, 1).

expect fun color(linearR: Float, linearG: Float, linearB: Float): LightManager.Builder

Set the light's color in linear sRGB. Default: white (1, 1, 1).

actual fun color(linearR: Float, linearG: Float, linearB: Float): LightManager.Builder

Set the light's color in linear sRGB. Default: white (1, 1, 1).

actual fun color(linearR: Float, linearG: Float, linearB: Float): LightManager.Builder

Set the light's color in linear sRGB. Default: white (1, 1, 1).

actual fun color(linearR: Float, linearG: Float, linearB: Float): LightManager.Builder

Set the light's color in linear sRGB. Default: white (1, 1, 1).

Link copied to clipboard

Set the light's initial direction in world space (should be a unit vector). Ignored for point lights. Default: (0, -1, 0) (downward).

Set the light's initial direction in world space (should be a unit vector). Ignored for point lights. Default: (0, -1, 0) (downward).

Set the light's initial direction in world space (should be a unit vector). Ignored for point lights. Default: (0, -1, 0) (downward).

Set the light's initial direction in world space (should be a unit vector). Ignored for point lights. Default: (0, -1, 0) (downward).

Set the light's initial direction in world space (should be a unit vector). Ignored for point lights. Default: (0, -1, 0) (downward).

Link copied to clipboard
actual fun falloff(radius: Float): LightManager.Builder

Set the falloff distance for point and spot lights (ignored for directional lights). Beyond this distance, the light has no effect. Defines the light's sphere of influence, impacting performance. Minimize overlapping spheres of influence for best performance. Default: 1 meter.

expect fun falloff(radius: Float): LightManager.Builder

Set the falloff distance for point and spot lights (ignored for directional lights). Beyond this distance, the light has no effect. Defines the light's sphere of influence, impacting performance. Minimize overlapping spheres of influence for best performance. Default: 1 meter.

actual fun falloff(radius: Float): LightManager.Builder

Set the falloff distance for point and spot lights (ignored for directional lights). Beyond this distance, the light has no effect. Defines the light's sphere of influence, impacting performance. Minimize overlapping spheres of influence for best performance. Default: 1 meter.

actual fun falloff(radius: Float): LightManager.Builder

Set the falloff distance for point and spot lights (ignored for directional lights). Beyond this distance, the light has no effect. Defines the light's sphere of influence, impacting performance. Minimize overlapping spheres of influence for best performance. Default: 1 meter.

actual fun falloff(radius: Float): LightManager.Builder

Set the falloff distance for point and spot lights (ignored for directional lights). Beyond this distance, the light has no effect. Defines the light's sphere of influence, impacting performance. Minimize overlapping spheres of influence for best performance. Default: 1 meter.

Link copied to clipboard
actual fun intensity(intensity: Float): LightManager.Builder

Set the light's intensity. Meaning depends on light type:

actual fun intensity(watts: Float, efficiency: Float): LightManager.Builder

Set the light's intensity from electrical watts and efficiency. Commercial lightbulbs often list wattage; efficiency depends on bulb type:

expect fun intensity(intensity: Float): LightManager.Builder

Set the light's intensity. Meaning depends on light type:

expect fun intensity(watts: Float, efficiency: Float): LightManager.Builder

Set the light's intensity from electrical watts and efficiency. Commercial lightbulbs often list wattage; efficiency depends on bulb type:

actual fun intensity(intensity: Float): LightManager.Builder

Set the light's intensity. Meaning depends on light type:

actual fun intensity(watts: Float, efficiency: Float): LightManager.Builder

Set the light's intensity from electrical watts and efficiency. Commercial lightbulbs often list wattage; efficiency depends on bulb type:

actual fun intensity(intensity: Float): LightManager.Builder

Set the light's intensity. Meaning depends on light type:

actual fun intensity(watts: Float, efficiency: Float): LightManager.Builder

Set the light's intensity from electrical watts and efficiency. Commercial lightbulbs often list wattage; efficiency depends on bulb type:

actual fun intensity(intensity: Float): LightManager.Builder

Set the light's intensity. Meaning depends on light type:

actual fun intensity(watts: Float, efficiency: Float): LightManager.Builder

Set the light's intensity from electrical watts and efficiency. Commercial lightbulbs often list wattage; efficiency depends on bulb type:

Link copied to clipboard

Set the light's intensity in candela (luminous intensity). For directional lights, equivalent to intensity. Overrides prior intensity or intensityCandela calls.

Set the light's intensity in candela (luminous intensity). For directional lights, equivalent to intensity. Overrides prior intensity or intensityCandela calls.

Set the light's intensity in candela (luminous intensity). For directional lights, equivalent to intensity. Overrides prior intensity or intensityCandela calls.

Set the light's intensity in candela (luminous intensity). For directional lights, equivalent to intensity. Overrides prior intensity or intensityCandela calls.

Set the light's intensity in candela (luminous intensity). For directional lights, equivalent to intensity. Overrides prior intensity or intensityCandela calls.

Link copied to clipboard
actual fun lightChannel(channel: Int, enable: Boolean): LightManager.Builder

Enable or disable a light channel (0-7). Channel 0 enabled by default. Use channels to selectively control which lights affect which objects.

expect fun lightChannel(channel: Int, enable: Boolean): LightManager.Builder

Enable or disable a light channel (0-7). Channel 0 enabled by default. Use channels to selectively control which lights affect which objects.

actual fun lightChannel(channel: Int, enable: Boolean): LightManager.Builder

Enable or disable a light channel (0-7). Channel 0 enabled by default. Use channels to selectively control which lights affect which objects.

actual fun lightChannel(channel: Int, enable: Boolean): LightManager.Builder

Enable or disable a light channel (0-7). Channel 0 enabled by default. Use channels to selectively control which lights affect which objects.

actual fun lightChannel(channel: Int, enable: Boolean): LightManager.Builder

Enable or disable a light channel (0-7). Channel 0 enabled by default. Use channels to selectively control which lights affect which objects.

Link copied to clipboard

Set the light's initial position in world space (ignored for directional lights). Default: origin (0, 0, 0).

Set the light's initial position in world space (ignored for directional lights). Default: origin (0, 0, 0).

Set the light's initial position in world space (ignored for directional lights). Default: origin (0, 0, 0).

Set the light's initial position in world space (ignored for directional lights). Default: origin (0, 0, 0).

Set the light's initial position in world space (ignored for directional lights). Default: origin (0, 0, 0).

Link copied to clipboard

Set shadow map quality and performance parameters.

Set shadow map quality and performance parameters.

Set shadow map quality and performance parameters.

Set shadow map quality and performance parameters.

Set shadow map quality and performance parameters.

Link copied to clipboard
actual fun spotLightCone(inner: Float, outer: Float): LightManager.Builder

Define a spot light's angular falloff via inner and outer cones (half-angles in radians). Both angles are clamped to 0.00873, π/2 to avoid precision issues. Ignored for directional and point lights. For Type.FOCUSED_SPOT (physically correct), outer cone angle affects total illumination. For Type.SPOT, outer cone and illumination are decoupled (easier to tweak).

expect fun spotLightCone(inner: Float, outer: Float): LightManager.Builder

Define a spot light's angular falloff via inner and outer cones (half-angles in radians). Both angles are clamped to 0.00873, π/2 to avoid precision issues. Ignored for directional and point lights. For Type.FOCUSED_SPOT (physically correct), outer cone angle affects total illumination. For Type.SPOT, outer cone and illumination are decoupled (easier to tweak).

actual fun spotLightCone(inner: Float, outer: Float): LightManager.Builder

Define a spot light's angular falloff via inner and outer cones (half-angles in radians). Both angles are clamped to 0.00873, π/2 to avoid precision issues. Ignored for directional and point lights. For Type.FOCUSED_SPOT (physically correct), outer cone angle affects total illumination. For Type.SPOT, outer cone and illumination are decoupled (easier to tweak).

actual fun spotLightCone(inner: Float, outer: Float): LightManager.Builder

Define a spot light's angular falloff via inner and outer cones (half-angles in radians). Both angles are clamped to 0.00873, π/2 to avoid precision issues. Ignored for directional and point lights. For Type.FOCUSED_SPOT (physically correct), outer cone angle affects total illumination. For Type.SPOT, outer cone and illumination are decoupled (easier to tweak).

actual fun spotLightCone(inner: Float, outer: Float): LightManager.Builder

Define a spot light's angular falloff via inner and outer cones (half-angles in radians). Both angles are clamped to 0.00873, π/2 to avoid precision issues. Ignored for directional and point lights. For Type.FOCUSED_SPOT (physically correct), outer cone angle affects total illumination. For Type.SPOT, outer cone and illumination are decoupled (easier to tweak).

Link copied to clipboard
actual fun sunAngularRadius(angularRadius: Float): LightManager.Builder

Set the sun's angular radius in degrees (only for Type.SUN lights). Earth's sun appears 0.526°-0.545°; range 0.25°, 20.0°. Default: 0.545°.

expect fun sunAngularRadius(angularRadius: Float): LightManager.Builder

Set the sun's angular radius in degrees (only for Type.SUN lights). Earth's sun appears 0.526°-0.545°; range 0.25°, 20.0°. Default: 0.545°.

actual fun sunAngularRadius(angularRadius: Float): LightManager.Builder

Set the sun's angular radius in degrees (only for Type.SUN lights). Earth's sun appears 0.526°-0.545°; range 0.25°, 20.0°. Default: 0.545°.

actual fun sunAngularRadius(angularRadius: Float): LightManager.Builder

Set the sun's angular radius in degrees (only for Type.SUN lights). Earth's sun appears 0.526°-0.545°; range 0.25°, 20.0°. Default: 0.545°.

actual fun sunAngularRadius(angularRadius: Float): LightManager.Builder

Set the sun's angular radius in degrees (only for Type.SUN lights). Earth's sun appears 0.526°-0.545°; range 0.25°, 20.0°. Default: 0.545°.

Link copied to clipboard
actual fun sunHaloFalloff(haloFalloff: Float): LightManager.Builder

Set the sun's halo falloff exponent. Must be at least 1.0. Default: 80.0. Controls how quickly the halo dims away from the sun's edge.

expect fun sunHaloFalloff(haloFalloff: Float): LightManager.Builder

Set the sun's halo falloff exponent. Must be at least 1.0. Default: 80.0. Controls how quickly the halo dims away from the sun's edge.

actual fun sunHaloFalloff(haloFalloff: Float): LightManager.Builder

Set the sun's halo falloff exponent. Must be at least 1.0. Default: 80.0. Controls how quickly the halo dims away from the sun's edge.

actual fun sunHaloFalloff(haloFalloff: Float): LightManager.Builder

Set the sun's halo falloff exponent. Must be at least 1.0. Default: 80.0. Controls how quickly the halo dims away from the sun's edge.

actual fun sunHaloFalloff(haloFalloff: Float): LightManager.Builder

Set the sun's halo falloff exponent. Must be at least 1.0. Default: 80.0. Controls how quickly the halo dims away from the sun's edge.

Link copied to clipboard
actual fun sunHaloSize(haloSize: Float): LightManager.Builder

Set the sun's halo radius as a multiplier of sunAngularRadius. Must be at least 1.0. Default: 10.0.

expect fun sunHaloSize(haloSize: Float): LightManager.Builder

Set the sun's halo radius as a multiplier of sunAngularRadius. Must be at least 1.0. Default: 10.0.

actual fun sunHaloSize(haloSize: Float): LightManager.Builder

Set the sun's halo radius as a multiplier of sunAngularRadius. Must be at least 1.0. Default: 10.0.

actual fun sunHaloSize(haloSize: Float): LightManager.Builder

Set the sun's halo radius as a multiplier of sunAngularRadius. Must be at least 1.0. Default: 10.0.

actual fun sunHaloSize(haloSize: Float): LightManager.Builder

Set the sun's halo radius as a multiplier of sunAngularRadius. Must be at least 1.0. Default: 10.0.