Skip to content

Commit 70f8cd3

Browse files
committed
update docs
1 parent b6e9188 commit 70f8cd3

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

doc/classes/AreaLight3D.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,13 @@
1717
[b]Note:[/b] Setting attenuation to [code]2.0[/code] or higher may result in distant objects receiving minimal light, even within range. For example, with a range of [code]4096[/code], an object at [code]100[/code] units is attenuated by a factor of [code]0.0001[/code]. With a default brightness of [code]1[/code], the light would not be visible at that distance.
1818
[b]Note:[/b] Using negative or values higher than [code]10.0[/code] may lead to unexpected results.
1919
</member>
20-
<member name="area_height" type="float" setter="set_param" getter="get_param" default="1.0">
21-
The height of the area in meters.
22-
</member>
2320
<member name="area_range" type="float" setter="set_param" getter="get_param" default="5.0">
24-
The range of the area in meters. This determines the maximum distance at which the area can still emit light relative to its surface, but also to its borders (which are positioned according to [member area_width] and [member area_width].
21+
The range of the area in meters. This determines the maximum distance at which the area can still emit light relative to its surface, but also to its borders (which are positioned according to [member area_size]).
2522
</member>
26-
<member name="area_width" type="float" setter="set_param" getter="get_param" default="1.0">
27-
The width of the area in meters.
23+
<member name="area_size" type="Vector2" setter="set_area_size" getter="get_area_size" default="Vector2(1, 1)">
24+
The extents (width and height) of the area in meters.
2825
</member>
2926
<member name="light_size" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.5" />
30-
<member name="light_specular" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.5" />
3127
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.03" />
3228
<member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="1.0" />
3329
</members>

doc/classes/Light3D.xml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
<link title="Third Person Shooter (TPS) Demo">https://godotengine.org/asset-library/asset/2710</link>
1313
</tutorials>
1414
<methods>
15+
<method name="get_area_size" qualifiers="const">
16+
<return type="Vector2" />
17+
<description>
18+
Returns the width and height of the area.
19+
</description>
20+
</method>
1521
<method name="get_correlated_color" qualifiers="const">
1622
<return type="Color" />
1723
<description>
@@ -25,6 +31,13 @@
2531
Returns the value of the specified [enum Light3D.Param] parameter.
2632
</description>
2733
</method>
34+
<method name="set_area_size">
35+
<return type="void" />
36+
<param index="0" name="area_size" type="Vector2" />
37+
<description>
38+
Sets the width and height of the area.
39+
</description>
40+
</method>
2841
<method name="set_param">
2942
<return type="void" />
3043
<param index="0" name="param" type="int" enum="Light3D.Param" />
@@ -197,7 +210,7 @@
197210
<constant name="PARAM_INTENSITY" value="20" enum="Param">
198211
Constant for accessing [member light_intensity_lumens] and [member light_intensity_lux]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code].
199212
</constant>
200-
<constant name="PARAM_MAX" value="23" enum="Param">
213+
<constant name="PARAM_MAX" value="21" enum="Param">
201214
Represents the size of the [enum Param] enum.
202215
</constant>
203216
<constant name="BAKE_DISABLED" value="0" enum="BakeMode">

doc/classes/RenderingServer.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2076,6 +2076,14 @@
20762076
Returns [code]true[/code] if our code is currently executing on the rendering thread.
20772077
</description>
20782078
</method>
2079+
<method name="light_area_set_size">
2080+
<return type="void" />
2081+
<param index="0" name="light" type="RID" />
2082+
<param index="1" name="enabled" type="Vector2" />
2083+
<description>
2084+
Sets the extents (width and height) in meters for this area light. Equivalent to [member AreaLight3D.area_size].
2085+
</description>
2086+
</method>
20792087
<method name="light_directional_set_blend_splits">
20802088
<return type="void" />
20812089
<param index="0" name="light" type="RID" />
@@ -4856,7 +4864,7 @@
48564864
<constant name="LIGHT_PARAM_INTENSITY" value="20" enum="LightParam">
48574865
Constant representing the intensity of the light, measured in Lumens when dealing with a [SpotLight3D] or [OmniLight3D], or measured in Lux with a [DirectionalLight3D]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code].
48584866
</constant>
4859-
<constant name="LIGHT_PARAM_MAX" value="23" enum="LightParam">
4867+
<constant name="LIGHT_PARAM_MAX" value="21" enum="LightParam">
48604868
Represents the size of the [enum LightParam] enum.
48614869
</constant>
48624870
<constant name="LIGHT_BAKE_DISABLED" value="0" enum="LightBakeMode">

0 commit comments

Comments
 (0)