doc: Sync classref with current source

This commit is contained in:
Rémi Verschelde 2019-07-22 12:24:14 +02:00
parent 7b7c459106
commit 07e289963c
6 changed files with 38 additions and 39 deletions

View file

@ -21,7 +21,7 @@
<member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange" default="0"> <member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange" default="0">
Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange]. Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange].
</member> </member>
<member name="directional_shadow_max_distance" type="float" setter="set_param" getter="get_param" default="200.0"> <member name="directional_shadow_max_distance" type="float" setter="set_param" getter="get_param" default="100.0">
The maximum distance for shadow splits. The maximum distance for shadow splits.
</member> </member>
<member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="DirectionalLight.ShadowMode" default="2"> <member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="DirectionalLight.ShadowMode" default="2">

View file

@ -229,7 +229,6 @@
forward = true forward = true
return forward return forward
[/codeblock] [/codeblock]
</description> </description>
</method> </method>
<method name="forward_spatial_gui_input" qualifiers="virtual"> <method name="forward_spatial_gui_input" qualifiers="virtual">
@ -261,7 +260,6 @@
forward = true forward = true
return forward return forward
[/codeblock] [/codeblock]
</description> </description>
</method> </method>
<method name="get_breakpoints" qualifiers="virtual"> <method name="get_breakpoints" qualifiers="virtual">

View file

@ -192,7 +192,7 @@
</member> </member>
<member name="metallic_texture" type="Texture" setter="set_texture" getter="get_texture"> <member name="metallic_texture" type="Texture" setter="set_texture" getter="get_texture">
</member> </member>
<member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel" default="2"> <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel" default="0">
</member> </member>
<member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], normal mapping is enabled. If [code]true[/code], normal mapping is enabled.
@ -277,7 +277,7 @@
</member> </member>
<member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture"> <member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture">
</member> </member>
<member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel" default="1"> <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel" default="0">
</member> </member>
<member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.

View file

@ -389,37 +389,6 @@
[/codeblock] [/codeblock]
</description> </description>
</method> </method>
<method name="posmod">
<return type="int">
</return>
<argument index="0" name="a" type="int">
</argument>
<argument index="1" name="b" type="int">
</argument>
<description>
Returns the integer modulus of [code]a/b[/code] that wraps equally in positive and negative.
[codeblock]
var i = -6
while i &lt; 5:
prints(i, posmod(i, 3))
i += 1
[/codeblock]
Produces:
[codeblock]
-6 0
-5 1
-4 2
-3 0
-2 1
-1 2
0 0
1 1
2 2
3 0
4 1
[/codeblock]
</description>
</method>
<method name="funcref"> <method name="funcref">
<return type="FuncRef"> <return type="FuncRef">
</return> </return>
@ -753,12 +722,43 @@
Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis). Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis).
</description> </description>
</method> </method>
<method name="posmod">
<return type="int">
</return>
<argument index="0" name="a" type="int">
</argument>
<argument index="1" name="b" type="int">
</argument>
<description>
Returns the integer modulus of [code]a/b[/code] that wraps equally in positive and negative.
[codeblock]
var i = -6
while i &lt; 5:
prints(i, posmod(i, 3))
i += 1
[/codeblock]
Produces:
[codeblock]
-6 0
-5 1
-4 2
-3 0
-2 1
-1 2
0 0
1 1
2 2
3 0
4 1
[/codeblock]
</description>
</method>
<method name="pow"> <method name="pow">
<return type="float"> <return type="float">
</return> </return>
<argument index="0" name="x" type="float"> <argument index="0" name="base" type="float">
</argument> </argument>
<argument index="1" name="y" type="float"> <argument index="1" name="exp" type="float">
</argument> </argument>
<description> <description>
Returns the result of [code]x[/code] raised to the power of [code]y[/code]. Returns the result of [code]x[/code] raised to the power of [code]y[/code].

View file

@ -212,6 +212,7 @@
var t = clamp((weight - from) / (to - from), 0.0, 1.0) var t = clamp((weight - from) / (to - from), 0.0, 1.0)
return t * t * (3.0 - 2.0 * t) return t * t * (3.0 - 2.0 * t)
[/codeblock] [/codeblock]
</constant>
<constant name="MATH_POSMOD" value="65" enum="BuiltinFunc"> <constant name="MATH_POSMOD" value="65" enum="BuiltinFunc">
</constant> </constant>
<constant name="MATH_LERP_ANGLE" value="66" enum="BuiltinFunc"> <constant name="MATH_LERP_ANGLE" value="66" enum="BuiltinFunc">

View file

@ -1320,7 +1320,6 @@ void VisualScriptBuiltinFunc::_bind_methods() {
BIND_ENUM_CONSTANT(MATH_SQRT); BIND_ENUM_CONSTANT(MATH_SQRT);
BIND_ENUM_CONSTANT(MATH_FMOD); BIND_ENUM_CONSTANT(MATH_FMOD);
BIND_ENUM_CONSTANT(MATH_FPOSMOD); BIND_ENUM_CONSTANT(MATH_FPOSMOD);
BIND_ENUM_CONSTANT(MATH_POSMOD);
BIND_ENUM_CONSTANT(MATH_FLOOR); BIND_ENUM_CONSTANT(MATH_FLOOR);
BIND_ENUM_CONSTANT(MATH_CEIL); BIND_ENUM_CONSTANT(MATH_CEIL);
BIND_ENUM_CONSTANT(MATH_ROUND); BIND_ENUM_CONSTANT(MATH_ROUND);
@ -1373,6 +1372,7 @@ void VisualScriptBuiltinFunc::_bind_methods() {
BIND_ENUM_CONSTANT(BYTES_TO_VAR); BIND_ENUM_CONSTANT(BYTES_TO_VAR);
BIND_ENUM_CONSTANT(COLORN); BIND_ENUM_CONSTANT(COLORN);
BIND_ENUM_CONSTANT(MATH_SMOOTHSTEP); BIND_ENUM_CONSTANT(MATH_SMOOTHSTEP);
BIND_ENUM_CONSTANT(MATH_POSMOD);
BIND_ENUM_CONSTANT(MATH_LERP_ANGLE); BIND_ENUM_CONSTANT(MATH_LERP_ANGLE);
BIND_ENUM_CONSTANT(FUNC_MAX); BIND_ENUM_CONSTANT(FUNC_MAX);
} }