LightManager
LightManager allows you to create light sources in the scene.
At least one light must be added to a scene to see anything (unless using Material.Shading.UNLIT).
Light types (directional, point, spot):
Directional lights: parallel rays from infinitely far (e.g., sun); cast shadows
Point lights: emit from a position in all directions; intensity diminishes with inverse square law
Spot lights: emit from a position within a cone; two cone angles control falloff
Performance tips:
Prefer spot lights over point lights; use smallest outer cone angle possible
Use smallest falloff distance to minimize sphere-of-influence overlap
Non-overlapping lights have negligible overhead (hundreds are fine)
Shadow support:
Only directional and spot lights can cast shadows
Configure shadows via Builder.shadowOptions and ShadowOptions
LightManager allows you to create light sources in the scene.
At least one light must be added to a scene to see anything (unless using Material.Shading.UNLIT).
Light types (directional, point, spot):
Directional lights: parallel rays from infinitely far (e.g., sun); cast shadows
Point lights: emit from a position in all directions; intensity diminishes with inverse square law
Spot lights: emit from a position within a cone; two cone angles control falloff
Performance tips:
Prefer spot lights over point lights; use smallest outer cone angle possible
Use smallest falloff distance to minimize sphere-of-influence overlap
Non-overlapping lights have negligible overhead (hundreds are fine)
Shadow support:
Only directional and spot lights can cast shadows
Configure shadows via Builder.shadowOptions and ShadowOptions
LightManager allows you to create light sources in the scene.
At least one light must be added to a scene to see anything (unless using Material.Shading.UNLIT).
Light types (directional, point, spot):
Directional lights: parallel rays from infinitely far (e.g., sun); cast shadows
Point lights: emit from a position in all directions; intensity diminishes with inverse square law
Spot lights: emit from a position within a cone; two cone angles control falloff
Performance tips:
Prefer spot lights over point lights; use smallest outer cone angle possible
Use smallest falloff distance to minimize sphere-of-influence overlap
Non-overlapping lights have negligible overhead (hundreds are fine)
Shadow support:
Only directional and spot lights can cast shadows
Configure shadows via Builder.shadowOptions and ShadowOptions
LightManager allows you to create light sources in the scene.
At least one light must be added to a scene to see anything (unless using Material.Shading.UNLIT).
Light types (directional, point, spot):
Directional lights: parallel rays from infinitely far (e.g., sun); cast shadows
Point lights: emit from a position in all directions; intensity diminishes with inverse square law
Spot lights: emit from a position within a cone; two cone angles control falloff
Performance tips:
Prefer spot lights over point lights; use smallest outer cone angle possible
Use smallest falloff distance to minimize sphere-of-influence overlap
Non-overlapping lights have negligible overhead (hundreds are fine)
Shadow support:
Only directional and spot lights can cast shadows
Configure shadows via Builder.shadowOptions and ShadowOptions
LightManager allows you to create light sources in the scene.
At least one light must be added to a scene to see anything (unless using Material.Shading.UNLIT).
Light types (directional, point, spot):
Directional lights: parallel rays from infinitely far (e.g., sun); cast shadows
Point lights: emit from a position in all directions; intensity diminishes with inverse square law
Spot lights: emit from a position within a cone; two cone angles control falloff
Performance tips:
Prefer spot lights over point lights; use smallest outer cone angle possible
Use smallest falloff distance to minimize sphere-of-influence overlap
Non-overlapping lights have negligible overhead (hundreds are fine)
Shadow support:
Only directional and spot lights can cast shadows
Configure shadows via Builder.shadowOptions and ShadowOptions
Types
Builder for creating and configuring light components. All builder methods return this Builder for method chaining.
Builder for creating and configuring light components. All builder methods return this Builder for method chaining.
Builder for creating and configuring light components. All builder methods return this Builder for method chaining.
Builder for creating and configuring light components. All builder methods return this Builder for method chaining.
Builder for creating and configuring light components. All builder methods return this Builder for method chaining.
Utility methods for computing cascaded shadow map split positions. Use these to populate ShadowOptions.cascadeSplitPositions.
Utility methods for computing cascaded shadow map split positions. Use these to populate ShadowOptions.cascadeSplitPositions.
Utility methods for computing cascaded shadow map split positions. Use these to populate ShadowOptions.cascadeSplitPositions.
Utility methods for computing cascaded shadow map split positions. Use these to populate ShadowOptions.cascadeSplitPositions.
Utility methods for computing cascaded shadow map split positions. Use these to populate ShadowOptions.cascadeSplitPositions.
Shadow map quality and performance parameters. Controls resolution, stability, bias, cascading, and filtering techniques.
Shadow map quality and performance parameters. Controls resolution, stability, bias, cascading, and filtering techniques.
Shadow map quality and performance parameters. Controls resolution, stability, bias, cascading, and filtering techniques.
Shadow map quality and performance parameters. Controls resolution, stability, bias, cascading, and filtering techniques.
Shadow map quality and performance parameters. Controls resolution, stability, bias, cascading, and filtering techniques.
Light type determines behavior and allowed parameters.
Light type determines behavior and allowed parameters.
Light type determines behavior and allowed parameters.
Light type determines behavior and allowed parameters.
Light type determines behavior and allowed parameters.
Functions
Get the light's color in linear sRGB.
Get the light's color in linear sRGB.
Get the light's color in linear sRGB.
Get the light's color in linear sRGB.
Get the light's color in linear sRGB.
Returns the number of light components (may include inactive/destroyed lights). Check with EntityManager.isAlive() before use if needed.
Returns the number of light components (may include inactive/destroyed lights). Check with EntityManager.isAlive() before use if needed.
Returns the number of light components (may include inactive/destroyed lights). Check with EntityManager.isAlive() before use if needed.
Returns the number of light components (may include inactive/destroyed lights). Check with EntityManager.isAlive() before use if needed.
Returns the number of light components (may include inactive/destroyed lights). Check with EntityManager.isAlive() before use if needed.
Get the light's direction in world space.
Get the light's direction in world space.
Get the light's direction in world space.
Get the light's direction in world space.
Get the light's direction in world space.
Get the light's falloff distance.
Get the light's falloff distance.
Get the light's falloff distance.
Get the light's falloff distance.
Get the light's falloff distance.
Get the spot light's inner cone angle in radians. The value may differ slightly from what was set due to recomputation.
Get the spot light's inner cone angle in radians. The value may differ slightly from what was set due to recomputation.
Get the spot light's inner cone angle in radians. The value may differ slightly from what was set due to recomputation.
Get the spot light's inner cone angle in radians. The value may differ slightly from what was set due to recomputation.
Get the spot light's inner cone angle in radians. The value may differ slightly from what was set due to recomputation.
Get the light component instance for an entity.
Get the light component instance for an entity.
Get the light component instance for an entity.
Get the light component instance for an entity.
Get the light component instance for an entity.
Get the light's luminous intensity in candela.
Get the light's luminous intensity in candela.
Get the light's luminous intensity in candela.
Get the light's luminous intensity in candela.
Get the light's luminous intensity in candela.
Check if a light channel is enabled on this light.
Check if a light channel is enabled on this light.
Check if a light channel is enabled on this light.
Check if a light channel is enabled on this light.
Check if a light channel is enabled on this light.
Get the spot light's outer cone angle in radians.
Get the spot light's outer cone angle in radians.
Get the spot light's outer cone angle in radians.
Get the spot light's outer cone angle in radians.
Get the spot light's outer cone angle in radians.
Get the light's position in world space.
Get the light's position in world space.
Get the light's position in world space.
Get the light's position in world space.
Get the light's position in world space.
Get the sun's angular radius in degrees.
Get the sun's angular radius in degrees.
Get the sun's angular radius in degrees.
Get the sun's angular radius in degrees.
Get the sun's angular radius in degrees.
Get the sun's halo falloff exponent.
Get the sun's halo falloff exponent.
Get the sun's halo falloff exponent.
Get the sun's halo falloff exponent.
Get the sun's halo falloff exponent.
Get the sun's halo size multiplier.
Get the sun's halo size multiplier.
Get the sun's halo size multiplier.
Get the sun's halo size multiplier.
Get the sun's halo size multiplier.
Get the type of a light.
Get the type of a light.
Get the type of a light.
Get the type of a light.
Get the type of a light.
Returns whether a particular entity has a light component.
Returns whether a particular entity has a light component.
Returns whether a particular entity has a light component.
Returns whether a particular entity has a light component.
Returns whether a particular entity has a light component.
Check whether this light casts shadows.
Check whether this light casts shadows.
Check whether this light casts shadows.
Check whether this light casts shadows.
Check whether this light casts shadows.
Dynamically update the light's color in linear sRGB.
Dynamically update the light's color in linear sRGB.
Dynamically update the light's color in linear sRGB.
Dynamically update the light's color in linear sRGB.
Dynamically update the light's color in linear sRGB.
Dynamically update the light's direction in world space. Ignored for point lights. Should be a unit vector.
Dynamically update the light's direction in world space. Ignored for point lights. Should be a unit vector.
Dynamically update the light's direction in world space. Ignored for point lights. Should be a unit vector.
Dynamically update the light's direction in world space. Ignored for point lights. Should be a unit vector.
Dynamically update the light's direction in world space. Ignored for point lights. Should be a unit vector.
Dynamically update the light's falloff distance for point/spot lights. Ignored for directional lights.
Dynamically update the light's falloff distance for point/spot lights. Ignored for directional lights.
Dynamically update the light's falloff distance for point/spot lights. Ignored for directional lights.
Dynamically update the light's falloff distance for point/spot lights. Ignored for directional lights.
Dynamically update the light's falloff distance for point/spot lights. Ignored for directional lights.
Dynamically update the light's intensity. Meaning depends on light type:
Dynamically update the light's intensity from watts and efficiency. Equivalent to setIntensity(watts * 683.0 * efficiency).
Dynamically update the light's intensity. Meaning depends on light type:
Dynamically update the light's intensity from watts and efficiency. Equivalent to setIntensity(watts * 683.0 * efficiency).
Dynamically update the light's intensity. Meaning depends on light type:
Dynamically update the light's intensity from watts and efficiency. Equivalent to setIntensity(watts * 683.0 * efficiency).
Dynamically update the light's intensity. Meaning depends on light type:
Dynamically update the light's intensity from watts and efficiency. Equivalent to setIntensity(watts * 683.0 * efficiency).
Dynamically update the light's intensity. Meaning depends on light type:
Dynamically update the light's intensity from watts and efficiency. Equivalent to setIntensity(watts * 683.0 * efficiency).
Dynamically update the light's intensity in candela. For directional lights, equivalent to setIntensity. For Type.FOCUSED_SPOT, the returned value depends on outer cone angle.
Dynamically update the light's intensity in candela. For directional lights, equivalent to setIntensity. For Type.FOCUSED_SPOT, the returned value depends on outer cone angle.
Dynamically update the light's intensity in candela. For directional lights, equivalent to setIntensity. For Type.FOCUSED_SPOT, the returned value depends on outer cone angle.
Dynamically update the light's intensity in candela. For directional lights, equivalent to setIntensity. For Type.FOCUSED_SPOT, the returned value depends on outer cone angle.
Dynamically update the light's intensity in candela. For directional lights, equivalent to setIntensity. For Type.FOCUSED_SPOT, the returned value depends on outer cone angle.
Enable or disable a light channel (0-7) on this light. Channel 0 is enabled by default.
Enable or disable a light channel (0-7) on this light. Channel 0 is enabled by default.
Enable or disable a light channel (0-7) on this light. Channel 0 is enabled by default.
Enable or disable a light channel (0-7) on this light. Channel 0 is enabled by default.
Enable or disable a light channel (0-7) on this light. Channel 0 is enabled by default.
Dynamically update the light's position in world space. Ignored for directional lights.
Dynamically update the light's position in world space. Ignored for directional lights.
Dynamically update the light's position in world space. Ignored for directional lights.
Dynamically update the light's position in world space. Ignored for directional lights.
Dynamically update the light's position in world space. Ignored for directional lights.
Dynamically enable or disable shadow casting for this light. Only directional and spot lights can cast shadows.
Dynamically enable or disable shadow casting for this light. Only directional and spot lights can cast shadows.
Dynamically enable or disable shadow casting for this light. Only directional and spot lights can cast shadows.
Dynamically enable or disable shadow casting for this light. Only directional and spot lights can cast shadows.
Dynamically enable or disable shadow casting for this light. Only directional and spot lights can cast shadows.
Dynamically update a spot light's cone angles (half-angles in radians). Ignored for directional and point lights.
Dynamically update a spot light's cone angles (half-angles in radians). Ignored for directional and point lights.
Dynamically update a spot light's cone angles (half-angles in radians). Ignored for directional and point lights.
Dynamically update a spot light's cone angles (half-angles in radians). Ignored for directional and point lights.
Dynamically update a spot light's cone angles (half-angles in radians). Ignored for directional and point lights.
Dynamically update the sun's angular radius in degrees. Only applicable to Type.SUN lights.
Dynamically update the sun's angular radius in degrees. Only applicable to Type.SUN lights.
Dynamically update the sun's angular radius in degrees. Only applicable to Type.SUN lights.
Dynamically update the sun's angular radius in degrees. Only applicable to Type.SUN lights.
Dynamically update the sun's angular radius in degrees. Only applicable to Type.SUN lights.
Dynamically update the sun's halo falloff exponent. Only applicable to Type.SUN lights.
Dynamically update the sun's halo falloff exponent. Only applicable to Type.SUN lights.
Dynamically update the sun's halo falloff exponent. Only applicable to Type.SUN lights.
Dynamically update the sun's halo falloff exponent. Only applicable to Type.SUN lights.
Dynamically update the sun's halo falloff exponent. Only applicable to Type.SUN lights.
Dynamically update the sun's halo radius as a multiplier of angular radius. Only applicable to Type.SUN lights.
Dynamically update the sun's halo radius as a multiplier of angular radius. Only applicable to Type.SUN lights.
Dynamically update the sun's halo radius as a multiplier of angular radius. Only applicable to Type.SUN lights.
Dynamically update the sun's halo radius as a multiplier of angular radius. Only applicable to Type.SUN lights.
Dynamically update the sun's halo radius as a multiplier of angular radius. Only applicable to Type.SUN lights.