Builder
Builder for creating and configuring light components. All builder methods return this Builder for method chaining.
Parameters
Type of light to create
Builder for creating and configuring light components. All builder methods return this Builder for method chaining.
Parameters
Type of light to create
Builder for creating and configuring light components. All builder methods return this Builder for method chaining.
Parameters
Type of light to create
Builder for creating and configuring light components. All builder methods return this Builder for method chaining.
Parameters
Type of light to create
Builder for creating and configuring light components. All builder methods return this Builder for method chaining.
Parameters
Type of light to create
Functions
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.
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.
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.
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.
Whether this light casts light (enabled by default). Useful for lights that cast shadows without illuminating the scene.
Whether this light casts light (enabled by default). Useful for lights that cast shadows without illuminating the scene.
Whether this light casts light (enabled by default). Useful for lights that cast shadows without illuminating the scene.
Whether this light casts light (enabled by default). Useful for lights that cast shadows without illuminating the scene.
Whether this light casts light (enabled by default). Useful for lights that cast shadows without illuminating the scene.
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.
Set the light's color in linear sRGB. Default: white (1, 1, 1).
Set the light's color in linear sRGB. Default: white (1, 1, 1).
Set the light's color in linear sRGB. Default: white (1, 1, 1).
Set the light's color in linear sRGB. Default: white (1, 1, 1).
Set the light's color in linear sRGB. Default: white (1, 1, 1).
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).
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.
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.
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.
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.
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.
Set the light's intensity. Meaning depends on light type:
Set the light's intensity from electrical watts and efficiency. Commercial lightbulbs often list wattage; efficiency depends on bulb type:
Set the light's intensity. Meaning depends on light type:
Set the light's intensity from electrical watts and efficiency. Commercial lightbulbs often list wattage; efficiency depends on bulb type:
Set the light's intensity. Meaning depends on light type:
Set the light's intensity from electrical watts and efficiency. Commercial lightbulbs often list wattage; efficiency depends on bulb type:
Set the light's intensity. Meaning depends on light type:
Set the light's intensity from electrical watts and efficiency. Commercial lightbulbs often list wattage; efficiency depends on bulb type:
Set the light's intensity. Meaning depends on light type:
Set the light's intensity from electrical watts and efficiency. Commercial lightbulbs often list wattage; efficiency depends on bulb type:
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.
Enable or disable a light channel (0-7). Channel 0 enabled by default. Use channels to selectively control which lights affect which objects.
Enable or disable a light channel (0-7). Channel 0 enabled by default. Use channels to selectively control which lights affect which objects.
Enable or disable a light channel (0-7). Channel 0 enabled by default. Use channels to selectively control which lights affect which objects.
Enable or disable a light channel (0-7). Channel 0 enabled by default. Use channels to selectively control which lights affect which objects.
Enable or disable a light channel (0-7). Channel 0 enabled by default. Use channels to selectively control which lights affect which objects.
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).
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.
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).
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).
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).
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).
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).
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°.
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°.
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°.
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°.
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°.
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.
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.
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.
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.
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.
Set the sun's halo radius as a multiplier of sunAngularRadius. Must be at least 1.0. Default: 10.0.
Set the sun's halo radius as a multiplier of sunAngularRadius. Must be at least 1.0. Default: 10.0.
Set the sun's halo radius as a multiplier of sunAngularRadius. Must be at least 1.0. Default: 10.0.
Set the sun's halo radius as a multiplier of sunAngularRadius. Must be at least 1.0. Default: 10.0.
Set the sun's halo radius as a multiplier of sunAngularRadius. Must be at least 1.0. Default: 10.0.