summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Array.xml4
-rw-r--r--doc/classes/AudioStreamSample.xml3
-rw-r--r--doc/classes/Curve2D.xml4
-rw-r--r--doc/classes/Curve3D.xml30
-rw-r--r--doc/classes/OrientedPathFollow.xml40
-rw-r--r--doc/classes/Plane.xml2
-rw-r--r--doc/classes/Shader.xml5
-rw-r--r--doc/classes/ShaderMaterial.xml5
-rw-r--r--doc/classes/String.xml14
-rw-r--r--doc/classes/TextureRect.xml8
-rw-r--r--doc/classes/VideoPlayer.xml25
11 files changed, 121 insertions, 19 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 5f85751c13..35c120cd6a 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -282,7 +282,7 @@
</method>
<method name="sort">
<description>
- Sort the array using natural order and return reference to the array.
+ Sort the array using natural order.
</description>
</method>
<method name="sort_custom">
@@ -291,7 +291,7 @@
<argument index="1" name="func" type="String">
</argument>
<description>
- Sort the array using a custom method and return reference to the array. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
+ Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblock]
class MyCustomSorter:
static func sort(a, b):
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
index 8b6651abe7..b6abda1a6f 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamSample.xml
@@ -13,6 +13,9 @@
<methods>
</methods>
<members>
+ <member name="data" type="PoolByteArray" setter="set_data" getter="get_data">
+ Contains the audio data in bytes.
+ </member>
<member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format">
Audio format. See FORMAT_* constants for values.
</member>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index 71bdaff688..26de8be42c 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -55,6 +55,8 @@
<argument index="0" name="to_point" type="Vector2">
</argument>
<description>
+ Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in [method interpolate_baked].
+ [code]to_point[/code] must be in this curve's local space.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
@@ -63,6 +65,8 @@
<argument index="0" name="to_point" type="Vector2">
</argument>
<description>
+ Returns the closest point (in curve's local space) to [code]to_point[/code].
+ [code]to_point[/code] must be in this curve's local space.
</description>
</method>
<method name="get_point_count" qualifiers="const">
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index c012e2794e..1355c74faf 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -56,12 +56,22 @@
Returns the cache of tilts as a [RealArray].
</description>
</method>
+ <method name="get_baked_up_vectors" qualifiers="const">
+ <return type="PoolVector3Array">
+ </return>
+ <description>
+ Returns the cache of up vectors as a [PoolVector3Array].
+ If [member up_vector_enabled] is [code]false[/code], the cache will be empty.
+ </description>
+ </method>
<method name="get_closest_offset" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
+ Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in one of the interpolate_baked* methods.
+ [code]to_point[/code] must be in this curve's local space.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
@@ -70,6 +80,8 @@
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
+ Returns the closest point (in curve's local space) to [code]to_point[/code].
+ [code]to_point[/code] must be in this curve's local space.
</description>
</method>
<method name="get_point_count" qualifiers="const">
@@ -140,6 +152,19 @@
Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
</description>
</method>
+ <method name="interpolate_baked_up_vector" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="offset" type="float">
+ </argument>
+ <argument index="1" name="apply_tilt" type="bool" default="false">
+ </argument>
+ <description>
+ Returns an up vector within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a distance in 3D units along the curve.
+ To do that, it finds the two cached up vectors where the [code]offset[/code] lies between, then interpolates the values. If [code]apply_tilt[/code] is [code]true[/code], an interpolated tilt is applied to the interpolated up vector.
+ If the curve has no up vectors, the function sends an error to the console, and returns (0, 1, 0).
+ </description>
+ </method>
<method name="interpolatef" qualifiers="const">
<return type="Vector3">
</return>
@@ -200,7 +225,7 @@
</argument>
<description>
Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console.
- The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow], this tilt is an offset over the natural tilt the PathFollow calculates.
+ The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow] or [OrientedPathFollow], this tilt is an offset over the natural tilt the [PathFollow] or [OrientedPathFollow] calculates.
</description>
</method>
<method name="tessellate" qualifiers="const">
@@ -222,6 +247,9 @@
<member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval">
The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care.
</member>
+ <member name="up_vector_enabled" type="bool" setter="set_up_vector_enabled" getter="is_up_vector_enabled">
+ If [code]true[/code], the curve will bake up vectors used for orientation. See [OrientedPathFollow]. Changing it forces the cache to be recomputed.
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/OrientedPathFollow.xml b/doc/classes/OrientedPathFollow.xml
new file mode 100644
index 0000000000..c32e545ff5
--- /dev/null
+++ b/doc/classes/OrientedPathFollow.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="OrientedPathFollow" inherits="Spatial" category="Core" version="3.1">
+ <brief_description>
+ Oriented point sampler for a [Path].
+ </brief_description>
+ <description>
+ This node behaves like [PathFollow], except it uses its parent [Path] up vector information to enforce orientation.
+ Make sure to check if the curve of this node's parent [Path] has up vectors enabled. See [PathFollow] and [Curve3D] for further information.
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <members>
+ <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation">
+ If [code]true[/code] the position between two cached points is interpolated cubically, and linearly otherwise.
+ The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
+ There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
+ </member>
+ <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset">
+ The node's offset along the curve.
+ </member>
+ <member name="loop" type="bool" setter="set_loop" getter="has_loop">
+ If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths.
+ </member>
+ <member name="offset" type="float" setter="set_offset" getter="get_offset">
+ The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path.
+ </member>
+ <member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset">
+ The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
+ </member>
+ <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset">
+ The node's offset perpendicular to the curve.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index 157bf42239..ca035ad383 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -24,7 +24,7 @@
<argument index="3" name="d" type="float">
</argument>
<description>
- Creates a plane from the three parameters "a", "b", "c" and "d".
+ Creates a plane from the four parameters "a", "b", "c" and "d".
</description>
</method>
<method name="Plane">
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index 732881c777..7c07778a05 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Shader" inherits="Resource" category="Core" version="3.1">
<brief_description>
- To be changed, ignore.
+ A custom shader program.
</brief_description>
<description>
- To be changed, ignore.
+ This class allows you to define a custom shader program that can be used for various materials to render objects.
</description>
<tutorials>
http://docs.godotengine.org/en/3.0/tutorials/shading/index.html
@@ -24,6 +24,7 @@
<return type="int" enum="Shader.Mode">
</return>
<description>
+ Returns the shader mode for the shader, eiter [code]MODE_CANVAS_ITEM[/code], [code]MODE_SPATIAL[/code] or [code]MODE_PARTICLES[/code]
</description>
</method>
<method name="has_param" qualifiers="const">
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index 4767686a8f..058e00e46c 100644
--- a/doc/classes/ShaderMaterial.xml
+++ b/doc/classes/ShaderMaterial.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ShaderMaterial" inherits="Material" category="Core" version="3.1">
<brief_description>
+ A material that uses a custom [Shader] program
</brief_description>
<description>
+ A material that uses a custom [Shader] program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader.
</description>
<tutorials>
</tutorials>
@@ -15,6 +17,7 @@
<argument index="0" name="param" type="String">
</argument>
<description>
+ Returns the current value set for this material of a uniform in the shader
</description>
</method>
<method name="set_shader_param">
@@ -25,11 +28,13 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
+ Changes the value set for this material of a uniform in the shader
</description>
</method>
</methods>
<members>
<member name="shader" type="Shader" setter="set_shader" getter="get_shader">
+ The [Shader] program used to render this material
</member>
</members>
<constants>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 83fb76f287..a55e184474 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -688,6 +688,20 @@
If [code]maxsplit[/code] is given, at most maxsplit number of splits occur, and the remainder of the string is returned as the final element of the list (thus, the list will have at most maxsplit+1 elements)
</description>
</method>
+ <method name="rsplit">
+ <return type="PoolStringArray">
+ </return>
+ <argument index="0" name="divisor" type="String">
+ </argument>
+ <argument index="1" name="allow_empty" type="bool" default="True">
+ </argument>
+ <argument index="2" name="maxsplit" type="int" default="0">
+ </argument>
+ <description>
+ Splits the string by a [code]divisor[/code] string and returns an array of the substrings, starting from right. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",".
+ If [code]maxsplit[/code] is specified, then it is number of splits to do, default is 0 which splits all the items.
+ </description>
+ </method>
<method name="split_floats">
<return type="PoolRealArray">
</return>
diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml
index 7a4208ccea..95afc5d281 100644
--- a/doc/classes/TextureRect.xml
+++ b/doc/classes/TextureRect.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureRect" inherits="Control" category="Core" version="3.1">
<brief_description>
- Draws a sprite or a texture inside a User Interface. The texture can tile or not.
+ Control for drawing textures.
</brief_description>
<description>
- Use TextureRect to draw icons and sprites in your User Interfaces. To create panels and menu boxes, take a look at [NinePatchFrame]. Its Stretch Mode property controls the texture's scale and placement. It can scale, tile and stay centered inside its bounding rectangle. TextureRect is one of the 5 most common nodes to create game UI.
+ Used to draw icons and sprites in a user interface. The texture's placement can be controlled with the [member stretch_mode] property. It can scale, tile, or stay centered inside its bounding rectangle.
</description>
<tutorials>
</tutorials>
@@ -14,10 +14,10 @@
</methods>
<members>
<member name="expand" type="bool" setter="set_expand" getter="has_expand">
- If [code]true[/code], the texture scales to fit its bounding rectangle. Default value: [code]false[/code].
+ If [code]true[/code] the texture scales to fit its bounding rectangle. Default value: [code]false[/code].
</member>
<member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureRect.StretchMode">
- Controls the texture's behavior when you resize the node's bounding rectangle. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more.
+ Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
The node's [Texture] resource.
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index d2639590a1..9ffa3aa52b 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VideoPlayer" inherits="Control" category="Core" version="3.1">
<brief_description>
- Control to play video files.
+ Control for playing video streams.
</brief_description>
<description>
- This control has the ability to play video streams. The only format accepted is the OGV Theora, so any other format must be converted before using in a project.
+ Control node for playing video streams. Supported formats are WebM and OGV Theora.
</description>
<tutorials>
</tutorials>
@@ -15,51 +15,56 @@
<return type="String">
</return>
<description>
- Get the name of the video stream.
+ Returns the video stream's name.
</description>
</method>
<method name="get_video_texture">
<return type="Texture">
</return>
<description>
- Get the current frame of the video as a [Texture].
+ Returns the current frame as a [Texture].
</description>
</method>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
<description>
- Get whether or not the video is playing.
+ Returns [code]true[/code] if the video is playing.
</description>
</method>
<method name="play">
<return type="void">
</return>
<description>
- Start the video playback.
+ Starts the video playback.
</description>
</method>
<method name="stop">
<return type="void">
</return>
<description>
- Stop the video playback.
+ Stops the video playback.
</description>
</method>
</methods>
<members>
<member name="audio_track" type="int" setter="set_audio_track" getter="get_audio_track">
+ The embedded audio track to play.
</member>
<member name="autoplay" type="bool" setter="set_autoplay" getter="has_autoplay">
+ If [code]true[/code] playback starts when the scene loads. Default value: [code]false[/code].
</member>
<member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec">
- The amount of milliseconds to store in buffer while playing.
+ Amount of time in milliseconds to store in buffer while playing.
</member>
<member name="bus" type="String" setter="set_bus" getter="get_bus">
+ Audio bus to use for sound playback.
</member>
<member name="expand" type="bool" setter="set_expand" getter="has_expand">
+ If [code]true[/code] the video scales to the control size. Default value: [code]true[/code].
</member>
<member name="paused" type="bool" setter="set_paused" getter="is_paused">
+ If [code]true[/code] the video is paused.
</member>
<member name="stream" type="VideoStream" setter="set_stream" getter="get_stream">
</member>
@@ -67,14 +72,16 @@
The current position of the stream, in seconds.
</member>
<member name="volume" type="float" setter="set_volume" getter="get_volume">
- The volume of the audio track as a linear value.
+ Audio volume as a linear value.
</member>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db">
+ Audio volume in dB.
</member>
</members>
<signals>
<signal name="finished">
<description>
+ Emitted when playback is finished.
</description>
</signal>
</signals>