dir_light ( target : Vec3 Vec3(0, 0, 0) , color : Int | Vec3 Int(16777215) , intensity : Numeric Float(5) , cast_shadow : Bool Bool(true) , shadow_map_size : Map | Int {"width": Int(4096), "height": Int(4096)} , shadow_map_radius : Numeric Float(4) , shadow_map_blur_samples : Int Int(16) , shadow_map_type : String String(vsm) , shadow_map_bias : Numeric Float(-0.0001) , shadow_camera : Map {"far": Float(300), "bottom": Float(-140), "left": Float(-300), "near": Float(8), "right": Float(380), "top": Float(94)} ) : Light
Creates a directional light.
Note: This will not do anything until it is added to the scene via `render`
Arguments:
target : Vec3 Vec3(0, 0, 0) - Target point that the light is pointing at. If the light as at the same position as the target, it will point down towards negative Y
color : Int | Vec3 Int(16777215) - Color of the light in hex format (like 0xffffff) or webgl format (like `vec3(1., 1., 1.)`)
intensity : Numeric Float(5)
cast_shadow : Bool Bool(true)
shadow_map_size : Map | Int {"width": Int(4096), "height": Int(4096)} - Size of the shadow map. Allowed keys: `width`, `height`. OR, a single integer value that will be used for both width and height.
shadow_map_radius : Numeric Float(4) - Radius for shadow map filtering
shadow_map_blur_samples : Int Int(16) - Number of samples for shadow map blur
shadow_map_type : String String(vsm) - Allowed values: `vsm`
shadow_map_bias : Numeric Float(-0.0001)
shadow_camera : Map {"far": Float(300), "bottom": Float(-140), "left": Float(-300), "near": Float(8), "right": Float(380), "top": Float(94)} - Camera parameters for the shadow map. Allowed keys: `near`, `far`, `left`, `right`, `top`, `bottom`