mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
1c1524a651
Can't stop, won't stop, they said, huh?
22 lines
1.7 KiB
XML
22 lines
1.7 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="DirectionalLight2D" inherits="Light2D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
Directional 2D light from a distance.
|
|
</brief_description>
|
|
<description>
|
|
A directional light is a type of [Light2D] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene (for example: to model sunlight or moonlight).
|
|
[b]Note:[/b] [DirectionalLight2D] does not support light cull masks (but it supports shadow cull masks). It will always light up 2D nodes, regardless of the 2D node's [member CanvasItem.light_mask].
|
|
</description>
|
|
<tutorials>
|
|
<link title="2D lights and shadows">$DOCS_URL/tutorials/2d/2d_lights_and_shadows.html</link>
|
|
</tutorials>
|
|
<members>
|
|
<member name="height" type="float" setter="set_height" getter="get_height" default="0.0">
|
|
The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to the plane) to 1 (perpendicular to the plane).
|
|
</member>
|
|
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="10000.0">
|
|
The maximum distance from the camera center objects can be before their shadows are culled (in pixels). Decreasing this value can prevent objects located outside the camera from casting shadows (while also improving performance). [member Camera2D.zoom] is not taken into account by [member max_distance], which means that at higher zoom values, shadows will appear to fade out sooner when zooming onto a given point.
|
|
</member>
|
|
</members>
|
|
</class>
|