summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GDScript.xml263
-rw-r--r--doc/classes/AcceptDialog.xml12
-rw-r--r--doc/classes/AudioStreamPlayer.xml11
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml15
-rw-r--r--doc/classes/CanvasLayer.xml8
-rw-r--r--doc/classes/CollisionPolygon.xml5
-rw-r--r--doc/classes/CollisionPolygon2D.xml8
-rw-r--r--doc/classes/KinematicBody2D.xml3
-rw-r--r--doc/classes/KinematicCollision2D.xml14
-rw-r--r--doc/classes/Label.xml21
-rw-r--r--doc/classes/Light2D.xml21
-rw-r--r--doc/classes/NinePatchRect.xml15
-rw-r--r--doc/classes/Spatial.xml72
-rw-r--r--doc/classes/TextureProgress.xml16
-rw-r--r--doc/classes/TextureRect.xml18
-rw-r--r--doc/classes/Transform.xml22
-rw-r--r--doc/classes/Transform2D.xml18
-rw-r--r--doc/classes/VisibilityNotifier.xml9
-rw-r--r--doc/classes/VisibilityNotifier2D.xml9
19 files changed, 424 insertions, 136 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 52df939fc5..511109e615 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -82,7 +82,7 @@
Returns the arc sine of 's' in radians. Use to get the angle of sine 's'.
[codeblock]
# s is 0.523599 or 30 degrees if converted with rad2deg(s)
- s = asin(0.5)
+ s = asin(0.5)
[/codeblock]
</description>
</method>
@@ -92,6 +92,14 @@
<argument index="0" name="condition" type="bool">
</argument>
<description>
+ Assert that the condition is true. If the condition is false a fatal error is generated and the program is halted. Useful for debugging to make sure a value is always true.
+ [codeblock]
+ # Speed should always be between 0 and 20
+ speed = -10
+ assert(speed < 20) # Is true and program continues
+ assert(speed >= 0) # Is false and program stops
+ assert(speed >= 0 &amp;&amp; speed < 20) # Or combined
+ [/codeblock]
</description>
</method>
<method name="atan">
@@ -100,6 +108,11 @@
<argument index="0" name="s" type="float">
</argument>
<description>
+ Returns the arc tangent of 's' in radians. Use it to get the angle from an angle's tangent in trigonometry: [code]atan(tan(angle)) == angle[/code].
+ The method cannot know in which quadrant the angle should fall. See [method atan2] if you always want an exact angle.
+ [codeblock]
+ a = atan(0.5) # a is 0.463648
+ [/codeblock]
</description>
</method>
<method name="atan2">
@@ -110,10 +123,9 @@
<argument index="1" name="y" type="float">
</argument>
<description>
- Returns the arc tangent of y/x in radians. Use to get the angle of tangent y/x. To compute the value, the function takes into account the sign of both arguments in order to determine the quadrant.
+ Returns the arc tangent of y/x in radians. Use to get the angle of tangent y/x. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
[codeblock]
- # a is 3.141593
- a = atan(0,-1)
+ a = atan(0,-1) # a is 3.141593
[/codeblock]
</description>
</method>
@@ -134,10 +146,8 @@
<description>
Rounds 's' upward, returning the smallest integral value that is not less than 's'.
[codeblock]
- # i is 2
- i = ceil(1.45)
- # i is 2
- i = ceil(1.001)
+ i = ceil(1.45) # i is 2
+ i = ceil(1.001) # i is 2
[/codeblock]
</description>
</method>
@@ -303,7 +313,10 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns [b]e[/b] raised to the power of 's'. [b]e[/b] sometimes called "Euler's number" is a mathematical constant whose value is approximately 2.71828.
+ Raises the Euler's constant [b]e[/b] to the power of 's' and returns it. [b] has an approximate value of 2.71828.
+ [codeblock]
+ a = exp(2) # approximately 7.39
+ [/codeblock]
</description>
</method>
<method name="floor">
@@ -312,7 +325,13 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the largest integer value (rounded down) that is less than or equal to 's'.
+ Rounds 's' to the closest smaller integer and returns it.
+ [codeblock]
+ # a is 2
+ a = floor(2.99)
+ # a is -3
+ a = floor(-2.99)
+ [/codeblock]
</description>
</method>
<method name="fmod">
@@ -338,6 +357,26 @@
<argument index="1" name="y" type="float">
</argument>
<description>
+ Returns the floating-point remainder of x/y that wraps equally in positive and negative.
+ [codeblock]
+ var i = -10;
+ while i < 0:
+ prints(i, fposmod(i, 10))
+ i += 1
+ [/codeblock]
+ Produces:
+ [codeblock]
+ -10 10
+ -9 1
+ -8 2
+ -7 3
+ -6 4
+ -5 5
+ -4 6
+ -3 7
+ -2 8
+ -1 9
+ [/codeblock]
</description>
</method>
<method name="funcref">
@@ -348,6 +387,14 @@
<argument index="1" name="funcname" type="String">
</argument>
<description>
+ Returns a reference to the specified function 'funcname' in the 'instance' node. As functions aren't first-class objects in GDscript, use 'funcref' to store a function in a variable and call it later.
+ [codeblock]
+ func foo():
+ return("bar")
+
+ a = funcref(self, "foo")
+ print(a.call_func()) # prints bar
+ [/codeblock]
</description>
</method>
<method name="hash">
@@ -358,8 +405,7 @@
<description>
Returns the integer hash of the variable passed.
[codeblock]
- # print 177670
- print(hash("a"))
+ print(hash("a")) # prints 177670
[/codeblock]
</description>
</method>
@@ -396,9 +442,8 @@
func _ready():
var id = get_instance_id()
var inst = instance_from_id(id)
- print(inst.foo)
+ print(inst.foo) # prints bar
[/codeblock]
- Prints "bar"
</description>
</method>
<method name="inverse_lerp">
@@ -413,7 +458,7 @@
<description>
Returns a normalized value considering the given range.
[codeblock]
- inverse_lerp(3, 5, 4) # return 0.5
+ inverse_lerp(3, 5, 4) # returns 0.5
[/codeblock]
</description>
</method>
@@ -444,9 +489,8 @@
Returns length of Variant 'var'. Length is the character count of String, element count of Array, size of Dictionary, etc. Note: Generates a fatal error if Variant can not provide a length.
[codeblock]
a = [1, 2, 3, 4]
- print(len(a))
+ len(a) # returns 4
[/codeblock]
- Prints 4
</description>
</method>
<method name="lerp">
@@ -460,6 +504,9 @@
</argument>
<description>
Linear interpolates between two values by a normalized value.
+ [codeblock]
+ lerp(1, 3, 0.5) # returns 2
+ [/codeblock]
</description>
</method>
<method name="linear2db">
@@ -492,8 +539,7 @@
<description>
Natural logarithm. The amount of time needed to reach a certain level of continuous growth. Note: This is not the same as the log funcation on your calculator which is a base 10 logarithm.
[codeblock]
- # a is 2.302585
- a = log(10)
+ log(10) # returns 2.302585
[/codeblock]
</description>
</method>
@@ -507,10 +553,8 @@
<description>
Returns the maximum of two values.
[codeblock]
- # a is 2
- a = max(1,2)
- # a is -3.99
- a = max(-3.99, -4)
+ max(1,2) # returns 2
+ max(-3.99, -4) # returns -3.99
[/codeblock]
</description>
</method>
@@ -524,10 +568,8 @@
<description>
Returns the minimum of two values.
[codeblock]
- # a is 1
- a = min(1,2)
- # a is -4
- a = min(-3.99, -4)
+ min(1,2) # returns 1
+ min(-3.99, -4) # returns -4
[/codeblock]
</description>
</method>
@@ -537,14 +579,11 @@
<argument index="0" name="val" type="int">
</argument>
<description>
- Returns the nearest larger power of 2 for an integer.
+ Returns the nearest larger power of 2 for integer 'val'.
[codeblock]
- # a is 4
- a = nearest_po2(3)
- # a is 4
- a = nearest_po2(4)
- # a is 8
- a = nearest_po2(5)
+ nearest_po2(3) # returns 4
+ nearest_po2(4) # returns 4
+ nearest_po2(5) # returns 8
[/codeblock]
</description>
</method>
@@ -559,7 +598,7 @@
[codeblock]
p = parse_json('["a", "b", "c"]')
if typeof(p) == TYPE_ARRAY:
- print(p[0])
+ print(p[0]) # prints a
else:
print("unexpected results")
[/codeblock]
@@ -575,8 +614,7 @@
<description>
Returns the result of 'x' raised to the power of 'y'.
[codeblock]
- # a is 32
- a = pow(2,5)
+ pow(2,5) # returns 32
[/codeblock]
</description>
</method>
@@ -590,6 +628,7 @@
[codeblock]
# load a scene called main located in the root of the project directory
var main = preload("res://main.tscn")
+ [/codeblock]
</description>
</method>
<method name="print" qualifiers="vararg">
@@ -599,9 +638,8 @@
Converts one or more arguments to strings in the best way possible and prints them to the console.
[codeblock]
a = [1,2,3]
- print("a","b",a)
+ print("a","b",a) # prints ab[1, 2, 3]
[/codeblock]
- Prints ab[1, 2, 3]
</description>
</method>
<method name="print_stack">
@@ -609,6 +647,10 @@
</return>
<description>
Print a stack track at code location, only works when running with debugger turned on.
+ Output in the console would look something like this:
+ [codeblock]
+ Frame 0 - res://test.gd:16 in function '_process'
+ [/codeblock]
</description>
</method>
<method name="printerr" qualifiers="vararg">
@@ -616,6 +658,9 @@
</return>
<description>
Print one or more arguments to strings in the best way possible to standard error line.
+ [codeblock]
+ printerr("prints to stderr")
+ [/codeblock]
</description>
</method>
<method name="printraw" qualifiers="vararg">
@@ -623,6 +668,11 @@
</return>
<description>
Print one or more arguments to strings in the best way possible to console. No newline is added at the end.
+ [codeblock]
+ printraw("A")
+ printraw("B")
+ # prints AB
+ [/codeblock]
</description>
</method>
<method name="prints" qualifiers="vararg">
@@ -630,6 +680,9 @@
</return>
<description>
Print one or more arguments to the console with a space between each argument.
+ [codeblock]
+ prints("A", "B", "C") # prints A B C
+ [/codeblock]
</description>
</method>
<method name="printt" qualifiers="vararg">
@@ -637,6 +690,9 @@
</return>
<description>
Print one or more arguments to the console with a tab between each argument.
+ [codeblock]
+ printt("A", "B", "C") # prints A B C
+ [/codeblock]
</description>
</method>
<method name="rad2deg">
@@ -646,6 +702,9 @@
</argument>
<description>
Convert from radians to degrees.
+ [codeblock]
+ rad2deg(0.523599) # returns 30
+ [/codeblock]
</description>
</method>
<method name="rand_range">
@@ -657,6 +716,9 @@
</argument>
<description>
Random range, any floating point value between 'from' and 'to'.
+ [codeblock]
+ prints(rand_range(0, 1), rand_range(0, 1)) # prints 0.135591 0.405263
+ [/codeblock]
</description>
</method>
<method name="rand_seed">
@@ -673,13 +735,21 @@
</return>
<description>
Return a random floating point value between 0 and 1.
+ [codeblock]
+ randf() # returns 0.375671
+ [/codeblock]
</description>
</method>
<method name="randi">
<return type="int">
</return>
<description>
- Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use remainder. For example, to get a random integer between 0 and 19 inclusive, you can use randi() % 20.
+ Return a random 32 bit integer. Use remainder to obtain a random value between 0 and N (where N is smaller than 2^32 -1).
+ [codeblock]
+ randi() % 20 # returns random number between 0 and 19
+ randi() % 100 # returns random number between 0 and 99
+ randi() % 100 + 1 # returns random number between 1 and 100
+ [/codeblock]
</description>
</method>
<method name="randomize">
@@ -687,6 +757,10 @@
</return>
<description>
Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
+ [codeblock]
+ func _ready():
+ randomize()
+ [/codeblock]
</description>
</method>
<method name="range" qualifiers="vararg">
@@ -694,6 +768,29 @@
</return>
<description>
Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment).
+ [codeblock]
+ for i in range(4):
+ print(i)
+ for i in range(2, 5):
+ print(i)
+ for i in range(0, 6, 2):
+ print(i)
+ [/codeblock]
+ Output:
+ [codeblock]
+ 0
+ 1
+ 2
+ 3
+
+ 2
+ 3
+ 4
+
+ 0
+ 2
+ 4
+ [/codeblock]
</description>
</method>
<method name="range_lerp">
@@ -723,6 +820,9 @@
</argument>
<description>
Returns the integral value that is nearest to s, with halfway cases rounded away from zero.
+ [codeblock]
+ round(2.6) # returns 3
+ [/codeblock]
</description>
</method>
<method name="seed">
@@ -732,6 +832,10 @@
</argument>
<description>
Set seed for the random number generator.
+ [codeblock]
+ my_seed = "Godot Rocks"
+ seed(my_seed.hash())
+ [/codeblock]
</description>
</method>
<method name="sign">
@@ -740,7 +844,11 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Return sign (-1 or +1).
+ Return sign of 's' -1 or 1.
+ [codeblock]
+ sign(-6) # returns -1
+ sign(6) # returns 1
+ [/codeblock]
</description>
</method>
<method name="sin">
@@ -749,7 +857,10 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the sine of an angle of s radians.
+ Return the sine of angle 's' in radians.
+ [codeblock]
+ sin(0.523599) # returns 0.5
+ [/codeblock]
</description>
</method>
<method name="sinh">
@@ -758,7 +869,11 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the hyperbolic sine of s.
+ Return the hyperbolic sine of 's'.
+ [codeblock]
+ a = log(2.0) # returns 0.693147
+ sinh(a) # returns 0.75
+ [/codeblock]
</description>
</method>
<method name="sqrt">
@@ -767,7 +882,10 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the square root of s.
+ Return the square root of 's'.
+ [codeblock]
+ sqrt(9) # returns 3
+ [/codeblock]
</description>
</method>
<method name="stepify">
@@ -786,6 +904,12 @@
</return>
<description>
Convert one or more arguments to string in the best way possible.
+ [codeblock]
+ var a = [10, 20, 30]
+ var b = str(a);
+ len(a) # returns 3
+ len(b) # returns 12
+ [/codeblock]
</description>
</method>
<method name="str2var">
@@ -795,6 +919,11 @@
</argument>
<description>
Convert a formatted string that was returned by [method var2str] to the original value.
+ [codeblock]
+ a = '{ "a": 1, "b": 2 }'
+ b = str2var(a)
+ print(b['a']) # prints 1
+ [/codeblock]
</description>
</method>
<method name="tan">
@@ -803,7 +932,10 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the tangent of an angle of s radians.
+ Return the tangent of angle 's' in radians.
+ [codeblock]
+ tan( deg2rad(45) ) # returns 1
+ [/codeblock]
</description>
</method>
<method name="tanh">
@@ -812,7 +944,11 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the hyperbolic tangent of s.
+ Returns the hyperbolic tangent of 's'.
+ [codeblock]
+ a = log(2.0) # returns 0.693147
+ tanh(a) # returns 0.6
+ [/codeblock]
</description>
</method>
<method name="to_json">
@@ -821,7 +957,12 @@
<argument index="0" name="var" type="Variant">
</argument>
<description>
- Convert a Variant to json text.
+ Convert a Variant 'var' to json text and return the result. Useful for serializing data to store or send over the network
+ [codeblock]
+ a = { 'a': 1, 'b': 2 }
+ b = to_json(a)
+ print(b) # {"a":1, "b":2}
+ [/codeblock]
</description>
</method>
<method name="type_exists">
@@ -844,6 +985,13 @@
</argument>
<description>
Return the internal type of the given Variant object, using the TYPE_* enum in [@Global Scope].
+ [codeblock]
+ p = parse_json('["a", "b", "c"]')
+ if typeof(p) == TYPE_ARRAY:
+ print(p[0]) # prints a
+ else:
+ print("unexpected results")
+ [/codeblock]
</description>
</method>
<method name="validate_json">
@@ -852,7 +1000,15 @@
<argument index="0" name="json" type="String">
</argument>
<description>
- This method is used to validate the structure and data types of a piece of JSON, similar to XML Schema for XML.
+ Check that 'json' is valid json data. Return empty string if valid. Return error message if not valid.
+ [codeblock]
+ j = to_json([1, 2, 3])
+ v = validate_json(j)
+ if not v:
+ print("valid")
+ else:
+ prints("invalid", v)
+ [/codeblock]
</description>
</method>
<method name="var2bytes">
@@ -871,6 +1027,17 @@
</argument>
<description>
Convert a value to a formatted string that can later be parsed using [method str2var].
+ [codeblock]
+ a = { 'a': 1, 'b': 2 }
+ print(var2str(a))
+ [/codeblock]
+ prints
+ [codeblock]
+ {
+ "a": 1,
+ "b": 2
+ }
+ [/codeblock]
</description>
</method>
<method name="weakref">
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index 8821a450e5..4244e66a35 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -21,8 +21,8 @@
<argument index="2" name="action" type="String" default="&quot;&quot;">
</argument>
<description>
- Add custom button to the dialog and return the created button.
- The button titled with [i]text[/i] and the [i]action[/i] will be passed to [custom_action] signal when it is pressed.
+ Adds a button with label [i]text[/i] and a custom [i]action[/i] to the dialog and returns the created button. [i]action[/i] will be passed to the [custom_action] signal when pressed.
+ If [code]true[/code], [i]right[/i] will place the button to the right of any sibling buttons. Default value: [code]false[/code].
</description>
</method>
<method name="add_cancel">
@@ -31,7 +31,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Add custom cancel button to the dialog and return the created button.
+ Adds a button with label [i]name[/i] and a cancel action to the dialog and returns the created button.
</description>
</method>
<method name="get_hide_on_ok" qualifiers="const">
@@ -68,7 +68,7 @@
<argument index="0" name="line_edit" type="Node">
</argument>
<description>
- Register a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
+ Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
</description>
</method>
<method name="set_hide_on_ok">
@@ -99,14 +99,14 @@
<signals>
<signal name="confirmed">
<description>
- Emitted when accepted.
+ Emitted when the dialog is accepted.
</description>
</signal>
<signal name="custom_action">
<argument index="0" name="action" type="String">
</argument>
<description>
- Emitted with a custom button is added.
+ Emitted when a custom button is pressed. See [method add_button].
</description>
</signal>
</signals>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 6ee0ba09a1..edf5dd619b 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer" inherits="Node" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Plays back audio.
</brief_description>
<description>
+ Plays background audio.
</description>
<tutorials>
</tutorials>
@@ -57,6 +59,7 @@
<argument index="0" name="from_pos" type="float" default="0.0">
</argument>
<description>
+ Plays the audio from the given position 'from_pos', in seconds.
</description>
</method>
<method name="seek">
@@ -65,6 +68,7 @@
<argument index="0" name="to_pos" type="float">
</argument>
<description>
+ Sets the position from which audio will be played, in seconds.
</description>
</method>
<method name="set_autoplay">
@@ -111,26 +115,33 @@
<return type="void">
</return>
<description>
+ Stops the audio.
</description>
</method>
</methods>
<members>
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled">
+ If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code].
</member>
<member name="bus" type="String" setter="set_bus" getter="get_bus">
+ Bus on which this audio is playing.
</member>
<member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget">
</member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing">
+ If [code]true[/code], audio is playing.
</member>
<member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
+ The [AudioStream] object to be played.
</member>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db">
+ Volume of sound, in dB.
</member>
</members>
<signals>
<signal name="finished">
<description>
+ Emitted when the audio stops playing.
</description>
</signal>
</signals>
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index f2464ddac4..e31f2dd941 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Plays audio in 2D.
</brief_description>
<description>
+ Plays audio that dampens with distance from screen center.
</description>
<tutorials>
+ http://docs.godotengine.org/en/latest/learning/features/audio/index.html
</tutorials>
<demos>
</demos>
@@ -69,6 +72,7 @@
<argument index="0" name="from_pos" type="float" default="0.0">
</argument>
<description>
+ Plays the audio from the given position 'from_pos', in seconds.
</description>
</method>
<method name="seek">
@@ -77,6 +81,7 @@
<argument index="0" name="to_pos" type="float">
</argument>
<description>
+ Sets the position from which audio will be played, in seconds.
</description>
</method>
<method name="set_area_mask">
@@ -139,30 +144,40 @@
<return type="void">
</return>
<description>
+ Stops the audio.
</description>
</method>
</methods>
<members>
<member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask">
+ Areas in which this sound plays.
</member>
<member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation">
+ Dampens audio over distance with this as an exponent.
</member>
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled">
+ If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code].
</member>
<member name="bus" type="String" setter="set_bus" getter="get_bus">
+ Bus on which this audio is playing.
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance">
+ Maximum distance from which audio is still hearable.
</member>
<member name="playing" type="bool" setter="_set_playing" getter="is_playing">
+ If [code]true[/code], audio is playing.
</member>
<member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
+ The [AudioStream] object to be played.
</member>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db">
+ Base volume without dampening.
</member>
</members>
<signals>
<signal name="finished">
<description>
+ Emitted when the audio stops playing.
</description>
</signal>
</signals>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index f19e7ef041..3ee1f10536 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CanvasLayer" inherits="Node" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Canvas Item layer.
+ Canvas drawing layer.
</brief_description>
<description>
- Canvas Item layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
+ Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
</description>
<tutorials>
</tutorials>
@@ -131,12 +131,16 @@
</methods>
<members>
<member name="layer" type="int" setter="set_layer" getter="get_layer">
+ Layer index for draw order. Lower values are drawn first. Default value: [code]1[/code].
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
+ The layer's base offset.
</member>
<member name="rotation" type="float" setter="set_rotationd" getter="get_rotationd">
+ The layer's rotation in degrees.
</member>
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale">
+ The layer's scale.
</member>
</members>
<constants>
diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml
index cf425e3d60..c2496424d6 100644
--- a/doc/classes/CollisionPolygon.xml
+++ b/doc/classes/CollisionPolygon.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CollisionPolygon" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Editor-only class for defining a collision polygon in 3D space.
</brief_description>
<description>
+ Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at runtime. Creates a [Shape] for gameplay. Properties modified during gameplay will have no effect.
</description>
<tutorials>
</tutorials>
@@ -54,10 +56,13 @@
</methods>
<members>
<member name="depth" type="float" setter="set_depth" getter="get_depth">
+ Length that the resulting collision extends in either direction perpendicular to its polygon.
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ If true, no collision will be produced.
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
+ Array of vertices which define the polygon.
</member>
</members>
<constants>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index b602610167..d3dee1e9bb 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Editor-only class for easy editing of collision polygons.
+ Editor-only class for defining a collision polygon in 2D space.
</brief_description>
<description>
- Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. This class is for editing custom shape polygons.
+ Allows editing a collision polygon's vertices. This class is only available in the editor. It will not appear in the scene tree at runtime. Creates a [Shape2D] for gameplay. Properties modified during gameplay will have no effect.
</description>
<tutorials>
</tutorials>
@@ -75,12 +75,16 @@
</methods>
<members>
<member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode">
+ If BUILD_SOLIDS, the polygon and the area within it will have collision. If BUILD_SEGMENTS, only the edges of the polygon will have collision.
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ If true, no collision will be produced.
</member>
<member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled">
+ If true, only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects.
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
+ Array of vertices which define the polygon.
</member>
</members>
<constants>
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index 26c7c6125d..dddae2c0fc 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -63,6 +63,7 @@
<argument index="0" name="rel_vec" type="Vector2">
</argument>
<description>
+ Moves the body along the given vector. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the colliding body.
</description>
</method>
<method name="move_and_slide">
@@ -97,7 +98,7 @@
<argument index="1" name="rel_vec" type="Vector2">
</argument>
<description>
- Return true if there would be a collision if the body moved from the given point in the given direction.
+ Returns true if there would be a collision if the body moved from the given point in the given direction.
</description>
</method>
</methods>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index 4ef35066d0..7a40a39292 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="KinematicCollision2D" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Collision data for KinematicBody2D collisions.
</brief_description>
<description>
+ Contains collision data for KinematicBody2D collisions. When a [KinematicBody2D] is moved using [method KinematicBody2D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned.
+ This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response.
</description>
<tutorials>
</tutorials>
@@ -78,26 +81,37 @@
</methods>
<members>
<member name="collider" type="Object" setter="" getter="get_collider">
+ The colliding body.
</member>
<member name="collider_id" type="int" setter="" getter="get_collider_id">
+ The colliding body's unique [RID].
</member>
<member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata">
+ The colliding body's metadata. See [Object].
</member>
<member name="collider_shape" type="Object" setter="" getter="get_collider_shape">
+ The colliding body's shape.
</member>
<member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index">
+ The colliding shape's index. See [CollisionObject2D].
</member>
<member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity">
+ The colliding object's velocity.
</member>
<member name="local_shape" type="Object" setter="" getter="get_local_shape">
+ The moving object's colliding shape.
</member>
<member name="normal" type="Vector2" setter="" getter="get_normal">
+ The colliding body's shape's normal at the point of collision.
</member>
<member name="position" type="Vector2" setter="" getter="get_position">
+ The point of collision.
</member>
<member name="remainder" type="Vector2" setter="" getter="get_remainder">
+ The moving object's remaining movement vector.
</member>
<member name="travel" type="Vector2" setter="" getter="get_travel">
+ The distance the moving object traveled before collision.
</member>
</members>
<constants>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 2e860aac0c..8c5e69b407 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Label" inherits="Control" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Control that displays formatted text.
+ Displays plain text in a line or wrapped inside a rectangle. For formatted text, use [RichTextLabel].
</brief_description>
<description>
- Label is a control that displays formatted text, optionally autowrapping it to the [Control] area. It inherits from range to be able to scroll wrapped text vertically.
+ Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use [RichTextLabel] instead.
</description>
<tutorials>
</tutorials>
@@ -22,14 +22,14 @@
<return type="int">
</return>
<description>
- Return the amount of lines.
+ Returns the amount of lines of text the Label has.
</description>
</method>
<method name="get_line_height" qualifiers="const">
<return type="int">
</return>
<description>
- Return the height of a line.
+ Returns the font size in pixels.
</description>
</method>
<method name="get_lines_skipped" qualifiers="const">
@@ -98,14 +98,14 @@
<return type="bool">
</return>
<description>
- Return true if text would be cut off if it is too wide.
+ Return [code]true[/code] if text would be cut off if it is too wide.
</description>
</method>
<method name="is_uppercase" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if text is displayed in all capitals.
+ Return [code]true[/code] if text is displayed in all capitals.
</description>
</method>
<method name="set_align">
@@ -201,22 +201,31 @@
</methods>
<members>
<member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align">
+ Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [code]ALIGN_*[/code] constants.
</member>
<member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap">
+ If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. Default: false.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text">
+ If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely.
</member>
<member name="lines_skipped" type="int" setter="set_lines_skipped" getter="get_lines_skipped">
+ The node ignores the first [code]lines_skipped[/code] lines before it starts to display text.
</member>
<member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible">
+ Limits the lines of text the node shows on screen.
</member>
<member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible">
+ Limits the count of visible characters. If you set [code]percent_visible[/code] to 50, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box.
</member>
<member name="text" type="String" setter="set_text" getter="get_text">
+ The text to display on screen.
</member>
<member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase">
+ If [code]true[/code], all the text displays as UPPERCASE.
</member>
<member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign">
+ Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants.
</member>
</members>
<constants>
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
index 1386fc53d9..cc1882c7a4 100644
--- a/doc/classes/Light2D.xml
+++ b/doc/classes/Light2D.xml
@@ -340,46 +340,67 @@
</methods>
<members>
<member name="color" type="Color" setter="set_color" getter="get_color">
+ The Light2D's [Color].
</member>
<member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only">
+ If [code]true[/code] Light2D will only appear when editing the scene. Default value: [code]false[/code].
</member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled">
+ If [code]true[/code] Light2D will emit light. Default value: [code]true[/code].
</member>
<member name="energy" type="float" setter="set_energy" getter="get_energy">
+ The Light2D's energy value. The larger the value, the stronger the light.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode">
+ The Light2D's mode. See MODE_* constants for values.
</member>
<member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset">
+ The offset of the Light2D's [code]texture[/code].
</member>
<member name="range_height" type="float" setter="set_height" getter="get_height">
+ The height of the Light2D. Used with 2D normal mapping.
</member>
<member name="range_item_cull_mask" type="int" setter="set_item_cull_mask" getter="get_item_cull_mask">
+ The layer mask. Only objects with a matching mask will be affected by the Light2D.
</member>
<member name="range_layer_max" type="int" setter="set_layer_range_max" getter="get_layer_range_max">
+ Maximum layer value of objects that are affected by the Light2D. Default value: [code]0[/code].
</member>
<member name="range_layer_min" type="int" setter="set_layer_range_min" getter="get_layer_range_min">
+ Minimum layer value of objects that are affected by the Light2D. Default value: [code]0[/code].
</member>
<member name="range_z_max" type="int" setter="set_z_range_max" getter="get_z_range_max">
+ Maximum [code]Z[/code] value of objects that are affected by the Light2D. Default value: [code]1024[/code].
</member>
<member name="range_z_min" type="int" setter="set_z_range_min" getter="get_z_range_min">
+ Minimum [code]z[/code] value of objects that are affected by the Light2D. Default value: [code]-1024[/code].
</member>
<member name="shadow_buffer_size" type="int" setter="set_shadow_buffer_size" getter="get_shadow_buffer_size">
+ Shadow buffer size. Default value: [code]2048[/code].
</member>
<member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color">
+ [Color] of shadows cast by the Light2D.
</member>
<member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled">
+ If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code].
</member>
<member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter">
+ Shadow filter type. May be one of [code][None, PCF5, PCF9, PCF13][/code]. Default value: [code]None[/code].
</member>
<member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth">
+ Smoothing value for shadows.
</member>
<member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length">
+ Smooth shadow gradient length.
</member>
<member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask">
+ The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching shadow mask will cast shadows.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ [Texture] used for the Light2D's appearance.
</member>
<member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale">
+ The [code]texture[/code]'s scale factor.
</member>
</members>
<constants>
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index 092e928ef9..6829b36e14 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NinePatchRect" inherits="Control" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes.
</brief_description>
<description>
+ Better known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3 by 3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners.
</description>
<tutorials>
</tutorials>
@@ -100,36 +102,49 @@
</methods>
<members>
<member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="NinePatchRect.AxisStretchMode">
+ Doesn't do anything at the time of writing.
</member>
<member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="NinePatchRect.AxisStretchMode">
+ Doesn't do anything at the time of writing.
</member>
<member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled">
+ If [code]true[/code], draw the panel's center. Else, only draw the 9-slice's borders. Default value: [code]true[/code]
</member>
<member name="patch_margin_bottom" type="int" setter="set_patch_margin" getter="get_patch_margin">
+ The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values indivually to create panels with non-uniform borders.
</member>
<member name="patch_margin_left" type="int" setter="set_patch_margin" getter="get_patch_margin">
+ The height of the 9-slice's left column.
</member>
<member name="patch_margin_right" type="int" setter="set_patch_margin" getter="get_patch_margin">
+ The height of the 9-slice's right column.
</member>
<member name="patch_margin_top" type="int" setter="set_patch_margin" getter="get_patch_margin">
+ The height of the 9-slice's top row.
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
+ Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ The node's texture resource.
</member>
</members>
<signals>
<signal name="texture_changed">
<description>
+ Fired when the node's texture changes.
</description>
</signal>
</signals>
<constants>
<constant name="AXIS_STRETCH_MODE_STRETCH" value="0">
+ Doesn't do anything at the time of writing. Default value for [code]axis_stretch_horizontal[/code] and [code]axis_stretch_vertical[/code].
</constant>
<constant name="AXIS_STRETCH_MODE_TILE" value="1">
+ Doesn't do anything at the time of writing.
</constant>
<constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2">
+ Doesn't do anything at the time of writing.
</constant>
</constants>
</class>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index 076d0b9bc3..e43e4dcc1b 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -4,7 +4,7 @@
Most basic 3D game object, parent of all 3D related nodes.
</brief_description>
<description>
- Most basic 3D game object, with a 3D [Transform] and visibility settings. All 3D physics nodes and sprites inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project.
+ Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project.
</description>
<tutorials>
</tutorials>
@@ -15,35 +15,35 @@
<return type="SpatialGizmo">
</return>
<description>
- Return the SpatialGizmo for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor.
+ Returns the SpatialGizmo for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor.
</description>
</method>
<method name="get_global_transform" qualifiers="const">
<return type="Transform">
</return>
<description>
- Return the global transform, relative to worldspace.
+ Returns the global transform, relative to worldspace.
</description>
</method>
<method name="get_parent_spatial" qualifiers="const">
<return type="Spatial">
</return>
<description>
- Return the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial].
+ Returns the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial].
</description>
</method>
<method name="get_rotation" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the rotation (in radians).
+ Returns the rotation (in radians).
</description>
</method>
<method name="get_rotation_deg" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Return the rotation (in degrees).
+ Returns the rotation (in degrees).
</description>
</method>
<method name="get_scale" qualifiers="const">
@@ -56,7 +56,7 @@
<return type="Transform">
</return>
<description>
- Return the local transform, relative to the bone parent.
+ Returns the local transform, relative to the bone parent.
</description>
</method>
<method name="get_translation" qualifiers="const">
@@ -69,7 +69,7 @@
<return type="World">
</return>
<description>
- Return current [World] resource this Spatial node is registered to.
+ Returns the current [World] resource this Spatial node is registered to.
</description>
</method>
<method name="global_rotate">
@@ -80,7 +80,7 @@
<argument index="1" name="radians" type="float">
</argument>
<description>
- Rotate current node along normal [Vector3] by angle in radians in Global space.
+ Rotates the current node along normal [Vector3] by angle in radians in Global space.
</description>
</method>
<method name="global_translate">
@@ -89,49 +89,49 @@
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
- Move current node by [Vector3] offset in Global space.
+ Moves the node by [Vector3] offset in Global space.
</description>
</method>
<method name="hide">
<return type="void">
</return>
<description>
- Disable rendering of this node. Change Spatial Visible property to false.
+ Disables rendering of this node. Change Spatial Visible property to false.
</description>
</method>
<method name="is_local_transform_notification_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether node sends notification that its local transformation changed. Spatial will not propagate this by default.
+ Returns whether node notifies about its local transformation changes. Spatial will not propagate this by default.
</description>
</method>
<method name="is_set_as_toplevel" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether this node is set as Toplevel, ignoring its parent node transformations.
+ Returns whether this node is set as Toplevel, that is whether it ignores its parent nodes transformations.
</description>
</method>
<method name="is_transform_notification_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether node sends notification that its transformation changed. Spatial will not propagate this by default.
+ Returns whether the node notifies about its global and local transformation changes. Spatial will not propagate this by default.
</description>
</method>
<method name="is_visible" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether this node is set to be visible.
+ Returns whether the node is set to be visible.
</description>
</method>
<method name="is_visible_in_tree" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns whether this node is visible, taking into consideration that its parents visibility.
+ Returns whether the node is visible, taking into consideration that its parents visibility.
</description>
</method>
<method name="look_at">
@@ -155,14 +155,14 @@
<argument index="2" name="up" type="Vector3">
</argument>
<description>
- Moves itself to specified position and then rotates itself to point into direction of target position. Operations take place in global space.
+ Moves the node to specified position and then rotates itself to point into direction of target position. Operations take place in global space.
</description>
</method>
<method name="orthonormalize">
<return type="void">
</return>
<description>
- Reset this node transformations (like scale, skew and taper) preserving its rotation and translation. Performs orthonormalization on this node [Transform3D].
+ Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation. Performs orthonormalization on this node [Transform3D].
</description>
</method>
<method name="rotate">
@@ -173,7 +173,7 @@
<argument index="1" name="radians" type="float">
</argument>
<description>
- Rotates node in local space on given normal [Vector3] by angle in radians.
+ Rotates the node in local space on given normal [Vector3] by angle in radians.
</description>
</method>
<method name="rotate_x">
@@ -182,7 +182,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
- Rotates node in local space on X axis by angle in radians.
+ Rotates the node in local space on X axis by angle in radians.
</description>
</method>
<method name="rotate_y">
@@ -191,7 +191,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
- Rotates node in local space on Y axis by angle in radians.
+ Rotates the node in local space on Y axis by angle in radians.
</description>
</method>
<method name="rotate_z">
@@ -200,7 +200,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
- Rotates node in local space on Z axis by angle in radians.
+ Rotates the node in local space on Z axis by angle in radians.
</description>
</method>
<method name="set_as_toplevel">
@@ -209,7 +209,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Makes this node ignore its parents tranformations. Node tranformations are only in global space.
+ Makes the node ignore its parents tranformations. Node tranformations are only in global space.
</description>
</method>
<method name="set_gizmo">
@@ -243,7 +243,7 @@
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set whether this node ignores notification that its transformation changed.
+ Set whether the node ignores notification that its transformation (global or local) changed.
</description>
</method>
<method name="set_notify_local_transform">
@@ -252,7 +252,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether this node sends notification that its local transformation changed. Spatial will not propagate this by default.
+ Set whether the node notifies about its local transformation changes. Spatial will not propagate this by default.
</description>
</method>
<method name="set_notify_transform">
@@ -261,7 +261,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set whether this node sends notification that its transformation changed. Spatial will not propagate this by default.
+ Set whether the node notifies about its global and local transformation changes. Spatial will not propagate this by default.
</description>
</method>
<method name="set_rotation">
@@ -320,7 +320,7 @@
<return type="void">
</return>
<description>
- Enable rendering of this node. Change Spatial Visible property to false.
+ Enables rendering of this node. Change Spatial Visible property to "True".
</description>
</method>
<method name="to_global" qualifiers="const">
@@ -329,7 +329,7 @@
<argument index="0" name="local_point" type="Vector3">
</argument>
<description>
- Tranform [Vector3] from this node local space to world space.
+ Tranforms [Vector3] "local_point" from this node's local space to world space.
</description>
</method>
<method name="to_local" qualifiers="const">
@@ -338,7 +338,7 @@
<argument index="0" name="global_point" type="Vector3">
</argument>
<description>
- Tranform [Vector3] from world space to this node local space.
+ Tranforms [Vector3] "global_point" from world space to this node's local space.
</description>
</method>
<method name="translate">
@@ -347,14 +347,14 @@
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
- Change node position by given offset [Vector3].
+ Changes the node's position by given offset [Vector3].
</description>
</method>
<method name="update_gizmo">
<return type="void">
</return>
<description>
- Update [SpatialGizmo] of this node.
+ Updates the [SpatialGizmo] of this node.
</description>
</method>
</methods>
@@ -384,23 +384,23 @@
<signals>
<signal name="visibility_changed">
<description>
- Emitted when node visibility changed.
+ Emitted when node visibility changes.
</description>
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum="">
- Spatial nodes receive this notification when their global transform changes. This means that either the current or a parent node changed its transform.
+ Spatial nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform.
In order for NOTIFICATION_TRANSFORM_CHANGED to work user first needs to ask for it, with set_notify_transform(true).
</constant>
<constant name="NOTIFICATION_ENTER_WORLD" value="41" enum="">
- Spatial nodes receive this notification when they are registered to new [World] resource.
+ Spatial nodes receives this notification when they are registered to new [World] resource.
</constant>
<constant name="NOTIFICATION_EXIT_WORLD" value="42" enum="">
- Spatial nodes receive this notification when they are unregistered from current [World] resource.
+ Spatial nodes receives this notification when they are unregistered from current [World] resource.
</constant>
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43" enum="">
- Spatial nodes receive this notification when their visibility changes.
+ Spatial nodes receives this notification when their visibility changes.
</constant>
</constants>
</class>
diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml
index 1ac031c411..0a6ffcdeb8 100644
--- a/doc/classes/TextureProgress.xml
+++ b/doc/classes/TextureProgress.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureProgress" inherits="Range" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Textured progress bar implementation.
+ Textured progress bar.
</brief_description>
<description>
- [ProgressBar] implementation that is easier to theme (by just passing a few textures).
+ A [ProgressBar] that uses textures to display fill percentage. Can be set to linear or radial mode.
</description>
<tutorials>
</tutorials>
@@ -148,28 +148,40 @@
</methods>
<members>
<member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode">
+ The fill direction. Uses FILL_* constants.
</member>
<member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch">
+ If [code]true[/code] textures will be stretched as [NinePatchRect]. Uses [code]stretch_margin[/code] properties (see below). Default value: [code]false[/code]
</member>
<member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset">
+ The offset amount for radial mode.
</member>
<member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees">
+ The amount of the texture to use for radial mode.
</member>
<member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle">
+ Start angle for radial mode.
</member>
<member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
+ Nine-patch texture offset for bottom margin.
</member>
<member name="stretch_margin_left" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
+ Nine-patch texture offset for left margin.
</member>
<member name="stretch_margin_right" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
+ Nine-patch texture offset for right margin.
</member>
<member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin">
+ Nine-patch texture offset for top margin.
</member>
<member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture">
+ The [Texture] that will be drawn over the progress bar.
</member>
<member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture">
+ The [Texture] used to display [code]value[/code].
</member>
<member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture">
+ The [Texture] that will be drawn under the progress bar.
</member>
</members>
<constants>
diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml
index 6d137cb14c..af5626ae84 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.0.alpha.custom_build">
<brief_description>
- Control that draws a texture.
+ Draws a sprite or a texture inside a User Interface. The texture can tile or not.
</brief_description>
<description>
- Control that draws a texture.
+ 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.
</description>
<tutorials>
</tutorials>
@@ -56,31 +56,39 @@
</methods>
<members>
<member name="expand" type="bool" setter="set_expand" getter="has_expand">
- If [code]true[/code] texture will expand to fit. 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">
- Stretch mode of the texture. Use STRETCH_* constants as value.
+ 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.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
- The [Texture] resource for the node.
+ The node's [Texture] resource.
</member>
</members>
<constants>
<constant name="STRETCH_SCALE_ON_EXPAND" value="0">
+ Scale to fit the node's bounding rectangle, only if [code]expand[/code] is [code]true[/code]. Default [code]stretch_mode[/code], for backwards compatibility. Until you set [code]expand[/code] to [code]true[/code], the texture will behave like [code]STRETCH_KEEP[/code].
</constant>
<constant name="STRETCH_SCALE" value="1">
+ Scale to fit the node's bounding rectangle.
</constant>
<constant name="STRETCH_TILE" value="2">
+ Tile inside the node's bounding rectangle.
</constant>
<constant name="STRETCH_KEEP" value="3">
+ The texture keeps its original size and stays in the bounding rectangle's top-left corner.
</constant>
<constant name="STRETCH_KEEP_CENTERED" value="4">
+ The texture keeps its original size and stays centered in the node's bounding rectangle.
</constant>
<constant name="STRETCH_KEEP_ASPECT" value="5">
+ Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio.
</constant>
<constant name="STRETCH_KEEP_ASPECT_CENTERED" value="6">
+ Scale the texture to fit the node's bounding rectangle, center it and maintain its aspect ratio.
</constant>
<constant name="STRETCH_KEEP_ASPECT_COVERED" value="7">
+ Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits.
</constant>
</constants>
</class>
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index d632eee70a..6780de1943 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -23,7 +23,7 @@
<argument index="3" name="origin" type="Vector3">
</argument>
<description>
- Construct the Transform from four [Vector3]. Each axis corresponds to local basis vectors (some of which may be scaled).
+ Constructs the Transform from four [Vector3]. Each axis corresponds to local basis vectors (some of which may be scaled).
</description>
</method>
<method name="Transform">
@@ -34,7 +34,7 @@
<argument index="1" name="origin" type="Vector3">
</argument>
<description>
- Construct the Transform from a [Basis] and [Vector3].
+ Constructs the Transform from a [Basis] and [Vector3].
</description>
</method>
<method name="Transform">
@@ -43,7 +43,7 @@
<argument index="0" name="from" type="Transform2D">
</argument>
<description>
- Construct the Transform from a [Transform2D].
+ Constructs the Transform from a [Transform2D].
</description>
</method>
<method name="Transform">
@@ -52,7 +52,7 @@
<argument index="0" name="from" type="Quat">
</argument>
<description>
- Construct the Transform from a [Quat]. The origin will be Vector3(0, 0, 0).
+ Constructs the Transform from a [Quat]. The origin will be Vector3(0, 0, 0).
</description>
</method>
<method name="Transform">
@@ -61,7 +61,7 @@
<argument index="0" name="from" type="Basis">
</argument>
<description>
- Construct the Transform from a [Basis]. The origin will be Vector3(0, 0, 0).
+ Constructs the Transform from a [Basis]. The origin will be Vector3(0, 0, 0).
</description>
</method>
<method name="affine_inverse">
@@ -79,7 +79,7 @@
<argument index="1" name="weight" type="float">
</argument>
<description>
- Interpolate to other Transform by weight amount (0-1).
+ Interpolates the transform to other Transform by weight amount (0-1).
</description>
</method>
<method name="inverse">
@@ -104,7 +104,7 @@
<return type="Transform">
</return>
<description>
- Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
+ Returns the transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
</description>
</method>
<method name="rotated">
@@ -115,7 +115,7 @@
<argument index="1" name="phi" type="float">
</argument>
<description>
- Rotate the transform around given axis by phi. The axis must be a normalized vector.
+ Rotates the transform around given axis by phi. The axis must be a normalized vector.
</description>
</method>
<method name="scaled">
@@ -124,7 +124,7 @@
<argument index="0" name="scale" type="Vector3">
</argument>
<description>
- Scale the transform by the specified 3D scaling factors.
+ Scales the transform by the specified 3D scaling factors.
</description>
</method>
<method name="translated">
@@ -133,7 +133,7 @@
<argument index="0" name="ofs" type="Vector3">
</argument>
<description>
- Translate the transform by the specified offset.
+ Translates the transform by the specified offset.
</description>
</method>
<method name="xform">
@@ -151,7 +151,7 @@
<argument index="0" name="v" type="var">
</argument>
<description>
- Inverse-transforms vector "v" by this transform.
+ Inverse-transforms the given vector "v" by this transform.
</description>
</method>
</methods>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index b3b752c1da..4cbe9123f1 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -66,28 +66,28 @@
<argument index="0" name="v" type="var">
</argument>
<description>
- Inverse-transforms vector "v" by this transform basis (no translation).
+ Inverse-transforms the given vector "v" by this transform basis (no translation).
</description>
</method>
<method name="get_origin">
<return type="Vector2">
</return>
<description>
- Return the origin [Vector2] (translation).
+ Returns the origin [Vector2] (translation).
</description>
</method>
<method name="get_rotation">
<return type="float">
</return>
<description>
- Return the rotation (in radians).
+ Returns the rotation (in radians).
</description>
</method>
<method name="get_scale">
<return type="Vector2">
</return>
<description>
- Return the scale.
+ Returns the scale.
</description>
</method>
<method name="interpolate_with">
@@ -98,7 +98,7 @@
<argument index="1" name="weight" type="float">
</argument>
<description>
- Interpolate to other Transform2D by weight amount (0-1).
+ Interpolates the transform to other Transform2D by weight amount (0-1).
</description>
</method>
<method name="inverse">
@@ -112,7 +112,7 @@
<return type="Transform2D">
</return>
<description>
- Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
+ Returns the transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
</description>
</method>
<method name="rotated">
@@ -121,7 +121,7 @@
<argument index="0" name="phi" type="float">
</argument>
<description>
- Rotate the transform by phi.
+ Rotates the transform by phi.
</description>
</method>
<method name="scaled">
@@ -130,7 +130,7 @@
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Scale the transform by the specified 2D scaling factors.
+ Scales the transform by the specified 2D scaling factors.
</description>
</method>
<method name="translated">
@@ -139,7 +139,7 @@
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Translate the transform by the specified offset.
+ Translates the transform by the specified offset.
</description>
</method>
<method name="xform">
diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml
index 4d76c7c927..816523fc27 100644
--- a/doc/classes/VisibilityNotifier.xml
+++ b/doc/classes/VisibilityNotifier.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisibilityNotifier" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Detect when the node is visible on screen.
+ Detects when the node is visible on screen.
</brief_description>
<description>
- The VisibilityNotifier is used to notify when its bounding box enters the screen, is visible on the screen, or when it exits the screen.
+ The VisibilityNotifier detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera]'s view.
</description>
<tutorials>
</tutorials>
@@ -15,14 +15,14 @@
<return type="Rect3">
</return>
<description>
- Return the visibility bounding box of the VisibilityNotifier.
+ Returns the bounding box of the VisibilityNotifier.
</description>
</method>
<method name="is_on_screen" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if any part of the bounding box is on the screen.
+ If [code]true[/code] the bounding box is on the screen.
</description>
</method>
<method name="set_aabb">
@@ -37,6 +37,7 @@
</methods>
<members>
<member name="aabb" type="Rect3" setter="set_aabb" getter="get_aabb">
+ The VisibilityNotifier's bounding box.
</member>
</members>
<signals>
diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml
index 1058e3d6d4..86227a0277 100644
--- a/doc/classes/VisibilityNotifier2D.xml
+++ b/doc/classes/VisibilityNotifier2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisibilityNotifier2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Detect when the node is visible on screen.
+ Detects when the node is visible on screen.
</brief_description>
<description>
- The VisibilityNotifier2D is used to notify when its bounding rectangle enters the screen, is visible on the screen, or when it exits the screen.
+ The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.
</description>
<tutorials>
</tutorials>
@@ -15,14 +15,14 @@
<return type="Rect2">
</return>
<description>
- Return the visibility bounding rectangle of the VisibilityNotifier2D.
+ Returns the bounding rectangle of the VisibilityNotifier2D.
</description>
</method>
<method name="is_on_screen" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if any part of the bounding rectangle is on the screen.
+ If [code]true[/code] the bounding rectangle is on the screen.
</description>
</method>
<method name="set_rect">
@@ -37,6 +37,7 @@
</methods>
<members>
<member name="rect" type="Rect2" setter="set_rect" getter="get_rect">
+ The VisibilityNotifier2D's bounding rectangle.
</member>
</members>
<signals>