PointLight

Classes

PointLight : NativeComponent

This component adds point light to the node. It enables shadow casting and shading scene with given color in sphere shape.

To use this component, add the following line to your project file:

require engine.core_components.point_light_component // or require engine.core

Usage example:

var node = create_node(NodeData())
add_component(node, new PointLight(
    color = float3(1),
    intensity = 0.5f,
    castShadows = false,
    radius = 10f
))
Properties:

PointLight.castShadows: bool
PointLight.castShadows =(value: bool)

Enable shadow casting from the light source. Default is true

Arguments:
  • value : bool

PointLight.castShadowsOnlyForStatic: bool
PointLight.castShadowsOnlyForStatic =(value: bool)

Enable shadow casting from the light source only for static objects. Default is false

Arguments:
  • value : bool

PointLight.intensity: float
PointLight.intensity =(value: float)

Intencity of the light source. Default is 1f

Arguments:
  • value : float

PointLight.color: float3
PointLight.color =(value: float3)

Color of the light source. Default is (1f, 1f, 1f)

Arguments:
  • value : float3

PointLight.radius: float
PointLight.radius =(value: float)

Radius of the point light. Default is 3f

Arguments:
  • value : float