.. _stdlib_direction_light_component: ============== DirectionLight ============== +++++++ Classes +++++++ .. _struct-direction_light_component-DirectionLight: .. das:attribute:: DirectionLight : NativeComponent This component adds directional light to the node. It enables shadow casting and shading scene with given color. Supported shadow casting and shading only for one directional light, Another lights will be ignored. To add this module to your project, add the following line to your project file:: require engine.core_components.direction_light_component // or require engine.core Usage example:: var node = create_node(NodeData()) // directional light with color (1f, 1f, 1f), intencity 0.5f and no shadow casting add_component(node, new DirectionLight( color = float3(1), intensity = 0.5f, castShadows = false )) :Properties: .. _function-direction_light_component__dot__rq_color_DirectionLight: .. das:operator:: DirectionLight.color() : float3 .. _function-direction_light_component__dot__rq_color_rq_clone_DirectionLight_float3: .. das:operator:: DirectionLight.color =(value: float3) Color of the light source. Default is (1f, 0.96f, 0.92) :Arguments: * **value** : float3 .. _function-direction_light_component__dot__rq_intensity_DirectionLight: .. das:operator:: DirectionLight.intensity() : float .. _function-direction_light_component__dot__rq_intensity_rq_clone_DirectionLight_float: .. das:operator:: DirectionLight.intensity =(value: float) Intencity of the light source. Default is 1f :Arguments: * **value** : float .. _function-direction_light_component__dot__rq_castShadows_DirectionLight: .. das:operator:: DirectionLight.castShadows() : bool .. _function-direction_light_component__dot__rq_castShadows_rq_clone_DirectionLight_bool: .. das:operator:: DirectionLight.castShadows =(value: bool) Enable or disable shadow casting. Default is true :Arguments: * **value** : bool