doc: Improve distance_fade documentation

Changed the documentation of distance_fade_max_distance and min
to be consistent with the behavior of the code as well as the user
documentation. Also noted the behavior of swapping max_distance and
min_distance (where max_distance < min_distance).

Fixes #36051.

Co-authored-by: Clay John <claynjohn@gmail.com>
(cherry picked from commit 90d1eda90e)
This commit is contained in:
Justin Lee 2020-02-09 23:12:49 -08:00 committed by Rémi Verschelde
parent 5abc42c27e
commit 52b3324e58
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -158,10 +158,12 @@
Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options.
</member>
<member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance">
Distance at which the object fades fully and is no longer visible.
Distance at which the object appears fully opaque.
[b]Note:[/b] If [code]distance_fade_max_distance[/code] is less than [code]distance_fade_min_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code].
</member>
<member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance">
Distance at which the object starts to fade. If the object is less than this distance away it will appear normal.
Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.
[b]Note:[/b] If [code]distance_fade_min_distance[/code] is greater than [code]distance_fade_max_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code].
</member>
<member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="SpatialMaterial.DistanceFadeMode" default="0">
Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s.