Merge pull request #21514 from cbscribe/kcc_docs_fixes2

[DOCS] Classref corrections and clarifications
This commit is contained in:
Rémi Verschelde 2018-08-28 08:13:13 +02:00 committed by GitHub
commit 6671096dd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 7 deletions

View file

@ -115,6 +115,8 @@
<argument index="6" name="floor_max_angle" type="float" default="0.785398">
</argument>
<description>
Moves the body while keeping it attached to slopes. Similar to [method move_and_slide].
As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting[code]snap[/code] to[code](0, 0, 0)[/code] or by using [method move_and_slide] instead.
</description>
</method>
<method name="test_move">

View file

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsMaterial" inherits="Resource" category="Core" version="3.1">
<brief_description>
A material for physics properties.
</brief_description>
<description>
Provides a means of modifying the collision properties of a [PhysicsBody].
</description>
<tutorials>
</tutorials>
@ -14,8 +16,10 @@
<member name="absorbent" type="bool" setter="set_absorbent" getter="is_absorbent">
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
The body's bounciness. Default value: [code]0[/code].
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction">
The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). Default value: [code]1[/code].
</member>
<member name="rough" type="bool" setter="set_rough" getter="is_rough">
</member>

View file

@ -109,7 +109,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
Cubicly interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], or a percentage of how far along the interpolation is.
Cubicly interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
</description>
</method>
<method name="distance_squared_to">
@ -175,7 +175,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], a percentage of how far along the interpolation is.
Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
</description>
</method>
<method name="normalized">
@ -227,7 +227,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
Returns the result of SLERP between this vector and "b", by amount "t". "t" should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
Returns the result of SLERP between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
Both vectors need to be normalized.
</description>
</method>
@ -267,16 +267,22 @@
</members>
<constants>
<constant name="ZERO" value="Vector2( 0, 0 )">
Null vector.
</constant>
<constant name="INF" value="Vector2( inf, inf )">
Infinite vector.
</constant>
<constant name="LEFT" value="Vector2( -1, 0 )">
Left unit vector.
</constant>
<constant name="RIGHT" value="Vector2( 1, 0 )">
Right unit vector.
</constant>
<constant name="UP" value="Vector2( 0, -1 )">
Up unit vector.
</constant>
<constant name="DOWN" value="Vector2( 0, 1 )">
Down unit vector.
</constant>
</constants>
</class>

View file

@ -78,7 +78,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount (t). (t) should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
</description>
</method>
<method name="distance_squared_to">
@ -151,7 +151,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], a percentage of how far along the interpolation is.
Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation..
</description>
</method>
<method name="max_axis">
@ -228,7 +228,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
Returns the result of SLERP between this vector and "b", by amount "t". "t" should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
Returns the result of SLERP between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation.
Both vectors need to be normalized.
</description>
</method>
@ -280,20 +280,28 @@
Enumerated value for the Z axis.
</constant>
<constant name="ZERO" value="Vector3( 0, 0, 0 )">
Null vector.
</constant>
<constant name="INF" value="Vector3( inf, inf, inf )">
Infinite vector.
</constant>
<constant name="LEFT" value="Vector3( -1, 0, 0 )">
Left unit vector.
</constant>
<constant name="RIGHT" value="Vector3( 1, 0, 0 )">
Right unit vector.
</constant>
<constant name="UP" value="Vector3( 0, 1, 0 )">
Up unit vector.
</constant>
<constant name="DOWN" value="Vector3( 0, -1, 0 )">
Down unit vector.
</constant>
<constant name="FORWARD" value="Vector3( 0, 0, -1 )">
Forward unit vector.
</constant>
<constant name="BACK" value="Vector3( 0, 0, 1 )">
Back unit vector.
</constant>
</constants>
</class>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VideoStream" inherits="Resource" category="Core" version="3.1">
<brief_description>
Base resource for video streams.
</brief_description>
<description>
</description>

View file

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ViewportContainer" inherits="Container" category="Core" version="3.1">
<brief_description>
Control for holding [Viewport]s.
</brief_description>
<description>
A [Container] node that holds a [Viewport], automatically setting its size.
</description>
<tutorials>
</tutorials>
@ -12,6 +14,7 @@
</methods>
<members>
<member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled">
If [code]true[/code] the viewport will be scaled to the control's size. Default value:[code]false[/code].
</member>
<member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink">
</member>

View file

@ -24,7 +24,7 @@
If [code]true[/code] the user can resize the window. Default value: [code]false[/code].
</member>
<member name="window_title" type="String" setter="set_title" getter="get_title">
The text displayed in the window's title bar. Default value: "Save a File".
The text displayed in the window's title bar.
</member>
</members>
<constants>