tiramisu/light
Light extension attributes and runtime integration.
Lights are regular scene nodes. That means they can be positioned under groups, animated with transforms, and updated through normal Lustre view changes.
Values
pub fn ambient() -> attribute.Attribute(msg)
Create an ambient light.
Ambient lights contribute uniformly from all directions.
pub fn angle(value: Float) -> attribute.Attribute(msg)
Set the spot light angle in radians.
pub fn cast_shadow(bool: Bool) -> attribute.Attribute(msg)
Enable or disable shadow casting on the light.
pub fn color(hex hex: Int) -> attribute.Attribute(msg)
Set the light color as a hex integer.
pub fn directional() -> attribute.Attribute(msg)
Create a directional light.
Directional lights behave like sunlight and are affected by node transforms.
pub fn distance(value: Float) -> attribute.Attribute(msg)
Set the distance for point and spot lights.
pub fn ext() -> extension.Extension
Build the internal extension used to reconcile light nodes.
Most applications should not call this directly; use
tiramisu.builtin_extensions() instead.
pub fn ground(color: Int) -> attribute.Attribute(msg)
Set the ground color for hemisphere lights.
pub fn hemisphere() -> attribute.Attribute(msg)
Create a hemisphere light.
Hemisphere lights blend a sky and ground color for broad environmental lighting.
pub fn point() -> attribute.Attribute(msg)
Create a point light.
Point lights emit in all directions from their position.
pub fn spot() -> attribute.Attribute(msg)
Create a spot light.
Spot lights emit a cone of light and can be shaped with angle and
penumbra.