summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GDScript.xml379
-rw-r--r--doc/classes/@Global Scope.xml2
-rw-r--r--doc/classes/AcceptDialog.xml12
-rw-r--r--doc/classes/AnimationTreePlayer.xml4
-rw-r--r--doc/classes/Area.xml10
-rw-r--r--doc/classes/AudioEffectDistortion.xml10
-rw-r--r--doc/classes/AudioEffectFilter.xml8
-rw-r--r--doc/classes/AudioServer.xml6
-rw-r--r--doc/classes/AudioStreamOGGVorbis.xml3
-rw-r--r--doc/classes/AudioStreamPlayer.xml17
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml15
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml32
-rw-r--r--doc/classes/AudioStreamRandomPitch.xml4
-rw-r--r--doc/classes/AudioStreamSample.xml27
-rw-r--r--doc/classes/BoxContainer.xml14
-rw-r--r--doc/classes/BoxShape.xml3
-rw-r--r--doc/classes/CanvasLayer.xml8
-rw-r--r--doc/classes/CapsuleShape.xml6
-rw-r--r--doc/classes/CapsuleShape2D.xml6
-rw-r--r--doc/classes/CircleShape2D.xml5
-rw-r--r--doc/classes/CollisionPolygon.xml5
-rw-r--r--doc/classes/CollisionPolygon2D.xml12
-rw-r--r--doc/classes/Curve.xml6
-rw-r--r--doc/classes/EditorExportPlugin.xml61
-rw-r--r--doc/classes/EditorFileDialog.xml4
-rw-r--r--doc/classes/EditorPlugin.xml16
-rw-r--r--doc/classes/GeometryInstance.xml12
-rw-r--r--doc/classes/JSON.xml31
-rw-r--r--doc/classes/JSONParseResult.xml81
-rw-r--r--doc/classes/KinematicBody2D.xml3
-rw-r--r--doc/classes/KinematicCollision.xml14
-rw-r--r--doc/classes/KinematicCollision2D.xml14
-rw-r--r--doc/classes/Label.xml21
-rw-r--r--doc/classes/Light2D.xml33
-rw-r--r--doc/classes/Line2D.xml24
-rw-r--r--doc/classes/LineShape2D.xml6
-rw-r--r--doc/classes/Mesh.xml68
-rw-r--r--doc/classes/NinePatchRect.xml15
-rw-r--r--doc/classes/OS.xml8
-rw-r--r--doc/classes/OmniLight.xml8
-rw-r--r--doc/classes/PhysicsBody.xml12
-rw-r--r--doc/classes/PhysicsBody2D.xml9
-rw-r--r--doc/classes/PhysicsServer.xml24
-rw-r--r--doc/classes/RayShape2D.xml5
-rw-r--r--doc/classes/RectangleShape2D.xml5
-rw-r--r--doc/classes/Reference.xml2
-rw-r--r--doc/classes/RigidBody.xml43
-rw-r--r--doc/classes/RigidBody2D.xml27
-rw-r--r--doc/classes/SegmentShape2D.xml6
-rw-r--r--doc/classes/Spatial.xml72
-rw-r--r--doc/classes/TabContainer.xml6
-rw-r--r--doc/classes/TextureProgress.xml16
-rw-r--r--doc/classes/TextureRect.xml18
-rw-r--r--doc/classes/TouchScreenButton.xml4
-rw-r--r--doc/classes/Transform.xml22
-rw-r--r--doc/classes/Transform2D.xml18
-rw-r--r--doc/classes/TreeItem.xml6
-rw-r--r--doc/classes/UndoRedo.xml26
-rw-r--r--doc/classes/Viewport.xml14
-rw-r--r--doc/classes/VisibilityNotifier.xml9
-rw-r--r--doc/classes/VisibilityNotifier2D.xml9
-rw-r--r--doc/classes/VisualScriptBuiltinFunc.xml116
-rw-r--r--doc/classes/VisualScriptFunctionCall.xml12
-rw-r--r--doc/classes/VisualScriptInputAction.xml8
-rw-r--r--doc/classes/VisualScriptMathConstant.xml18
-rw-r--r--doc/classes/VisualScriptPropertySet.xml24
66 files changed, 1282 insertions, 262 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 52df939fc5..b61cf93ef7 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -23,11 +23,11 @@
<argument index="3" name="a8" type="int">
</argument>
<description>
- Returns a 32 bit color with red, green, blue and alpha channels. Each channel has 8bits of information ranging from 0 to 255.
- 'r8' red channel
- 'g8' green channel
- 'b8' blue channel
- 'a8' alpha channel
+ Returns a 32 bit color with red, green, blue and alpha channels. Each channel has 8 bits of information ranging from 0 to 255.
+ [code]r8[/code] red channel
+ [code]g8[/code] green channel
+ [code]b8[/code] blue channel
+ [code]a8[/code] alpha channel
[codeblock]
red = Color8(255, 0, 0)
[/codeblock]
@@ -41,7 +41,7 @@
<argument index="1" name="alpha" type="float">
</argument>
<description>
- Returns color 'name' with alpha ranging from 0 to 1. Note: 'name' is defined in color_names.inc.
+ Returns color [code]name[/code] with [code]alpha[/code] ranging from 0 to 1. Note: [code]name[/code] is defined in color_names.inc.
[codeblock]
red = ColorN('red')
[/codeblock]
@@ -53,7 +53,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the absolute value of parameter 's' (i.e. unsigned value, works for integer and float).
+ Returns the absolute value of parameter [code]s[/code] (i.e. unsigned value, works for integer and float).
[codeblock]
# a is 1
a = abs(-1)
@@ -66,7 +66,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the arc cosine of 's' in radians. Use to get the angle of cosine 's'.
+ Returns the arc cosine of [code]s[/code] in radians. Use to get the angle of cosine [code]s[/code].
[codeblock]
# c is 0.523599 or 30 degrees if converted with rad2deg(s)
c = acos(0.866025)
@@ -79,10 +79,10 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the arc sine of 's' in radians. Use to get the angle of sine 's'.
+ Returns the arc sine of [code]s[/code] in radians. Use to get the angle of sine [code]s[/code].
[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 [code]condition[/code] is true. If the [code]condition[/code] 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 &lt; 20) # Is true and program continues
+ assert(speed &gt;= 0) # Is false and program stops
+ assert(speed &gt;= 0 &amp;&amp; speed &lt; 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 [code]s[/code] 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 [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. 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>
@@ -123,7 +135,7 @@
<argument index="0" name="bytes" type="PoolByteArray">
</argument>
<description>
- Decode a byte array back to a value.
+ Decodes a byte array back to a value.
</description>
</method>
<method name="ceil">
@@ -132,12 +144,10 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Rounds 's' upward, returning the smallest integral value that is not less than 's'.
+ Rounds [code]s[/code] upward, returning the smallest integral value that is not less than [code]s[/code].
[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>
@@ -147,7 +157,7 @@
<argument index="0" name="ascii" type="int">
</argument>
<description>
- Returns a character as String of the given ASCII code.
+ Returns a character as a String of the given ASCII code.
[codeblock]
# a is 'A'
a = char(65)
@@ -166,7 +176,7 @@
<argument index="2" name="max" type="float">
</argument>
<description>
- Clamp 'val' and return a value not less than 'min' and not more than 'max'.
+ Clamps [code]val[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
[codeblock]
speed = 1000
# a is 20
@@ -186,7 +196,7 @@
<argument index="1" name="type" type="int">
</argument>
<description>
- Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in [@Global Scope].
+ Converts from a type to another in the best way possible. The [code]type[/code] parameter uses the enum TYPE_* in [@Global Scope].
[codeblock]
a = Vector2(1, 0)
# prints 1
@@ -204,7 +214,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the cosine of angle 's' in radians.
+ Returns the cosine of angle [code]s[/code] in radians.
[codeblock]
# prints 1 and -1
print(cos(PI*2))
@@ -218,7 +228,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the hyperbolic cosine of 's' in radians.
+ Returns the hyperbolic cosine of [code]s[/code] in radians.
[codeblock]
# prints 1.543081
print(cosh(1))
@@ -231,7 +241,7 @@
<argument index="0" name="db" type="float">
</argument>
<description>
- Convert from decibels to linear energy (audio).
+ Converts from decibels to linear energy (audio).
</description>
</method>
<method name="decimals">
@@ -240,7 +250,7 @@
<argument index="0" name="step" type="float">
</argument>
<description>
- Returns the number of digit places after the decimal that the first non-zero digit occurs.
+ Returns the position of the first non-zero digit, after the decimal point.
[codeblock]
# n is 2
n = decimals(0.035)
@@ -257,7 +267,7 @@
<argument index="2" name="step" type="float">
</argument>
<description>
- Returns the result of 'value' decreased by 'step' * 'amount'.
+ Returns the result of [code]value[/code] decreased by [code]step[/code] * [code]amount[/code].
[codeblock]
# a = 59
a = dectime(60, 10, 0.1))
@@ -283,7 +293,7 @@
<argument index="0" name="dict" type="Dictionary">
</argument>
<description>
- Convert a previously converted instance to dictionary back into an instance. Useful for deserializing.
+ Converts a previously converted instance to a dictionary, back into an instance. Useful for deserializing.
</description>
</method>
<method name="ease">
@@ -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 [code]s[/code] and returns it. [b]e[/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 [code]s[/code] 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">
@@ -323,11 +342,11 @@
<argument index="1" name="y" type="float">
</argument>
<description>
- Returns the floating-point remainder of x/y (rounded towards zero):
+ Returns the floating-point remainder of [code]x/y[/code].
[codeblock]
- fmod = x - tquot * y
+ # remainder is 1.5
+ var remainder = fmod(7, 5.5)
[/codeblock]
- Where tquot is the truncated (i.e., rounded towards zero) result of: x/y.
</description>
</method>
<method name="fposmod">
@@ -338,6 +357,26 @@
<argument index="1" name="y" type="float">
</argument>
<description>
+ Returns the floating-point remainder of [code]x/y[/code] that wraps equally in positive and negative.
+ [codeblock]
+ var i = -10;
+ while i &lt; 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 [code]funcname[/code] in the [code]instance[/code] node. As functions aren't first-class objects in GDscript, use [code]funcref[/code] to store a [FuncRef] 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>
@@ -369,7 +415,7 @@
<argument index="0" name="inst" type="Object">
</argument>
<description>
- Returns the passed instance converted a dictionary (useful for serializing).
+ Returns the passed instance converted to a dictionary (useful for serializing).
[codeblock]
var foo = "bar"
func _ready():
@@ -390,15 +436,14 @@
<argument index="0" name="instance_id" type="int">
</argument>
<description>
- Returns the Object that corresponds to 'instance_id'. All Objects have a unique instance ID.
+ Returns the Object that corresponds to [code]instance_id[/code]. All Objects have a unique instance ID.
[codeblock]
var foo = "bar"
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>
@@ -423,7 +468,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns True/False whether 's' is an infinity value (either positive infinity or negative infinity).
+ Returns True/False whether [code]s[/code] is an infinity value (either positive infinity or negative infinity).
</description>
</method>
<method name="is_nan">
@@ -432,7 +477,7 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns True/False whether 's' is a NaN (Not-A-Number) value.
+ Returns True/False whether [code]s[/code] is a NaN (Not-A-Number) value.
</description>
</method>
<method name="len">
@@ -441,12 +486,11 @@
<argument index="0" name="var" type="Variant">
</argument>
<description>
- 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.
+ Returns length of Variant [code]var[/code]. 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">
@@ -459,7 +503,10 @@
<argument index="2" name="weight" type="float">
</argument>
<description>
- Linear interpolates between two values by a normalized value.
+ Linearly interpolates between two values by a normalized value.
+ [codeblock]
+ lerp(1, 3, 0.5) # returns 2
+ [/codeblock]
</description>
</method>
<method name="linear2db">
@@ -468,7 +515,7 @@
<argument index="0" name="nrg" type="float">
</argument>
<description>
- Convert from linear energy to decibels (audio).
+ Converts from linear energy to decibels (audio).
</description>
</method>
<method name="load">
@@ -477,7 +524,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Load a resource from the filesystem located at 'path'. Note: resource paths can be obtained by right clicking on a resource in the Assets Pannel and choosing "Copy Path".
+ Loads a resource from the filesystem located at 'path'. Note: resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
[codeblock]
# load a scene called main located in the root of the project directory
var main = load("res://main.tscn")
@@ -490,10 +537,9 @@
<argument index="0" name="s" type="float">
</argument>
<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.
+ Natural logarithm. The amount of time needed to reach a certain level of continuous growth. Note: This is not the same as the log function 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 [code]val[/code].
[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>
@@ -555,11 +594,11 @@
</argument>
<description>
Parse JSON text to a Variant (use [method typeof] to check if it is what you expect).
- Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert every numerical values to [float] types.
+ Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to [float] types.
[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]
@@ -573,10 +612,9 @@
<argument index="1" name="y" type="float">
</argument>
<description>
- Returns the result of 'x' raised to the power of 'y'.
+ Returns the result of [code]x[/code] raised to the power of [code]y[/code].
[codeblock]
- # a is 32
- a = pow(2,5)
+ pow(2,5) # returns 32
[/codeblock]
</description>
</method>
@@ -586,10 +624,11 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Returns a resource from the filesystem that is loaded during script parsing. Note: resource paths can be obtained by right clicking on a resource in the Assets Pannel and choosing "Copy Path".
+ Returns a resource from the filesystem that is loaded during script parsing. Note: resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
[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,44 +638,61 @@
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">
<return type="void">
</return>
<description>
- Print a stack track at code location, only works when running with debugger turned on.
+ Prints 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">
<return type="void">
</return>
<description>
- Print one or more arguments to strings in the best way possible to standard error line.
+ Prints 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">
<return type="void">
</return>
<description>
- Print one or more arguments to strings in the best way possible to console. No newline is added at the end.
+ Prints 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">
<return type="void">
</return>
<description>
- Print one or more arguments to the console with a space between each argument.
+ Prints 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">
<return type="void">
</return>
<description>
- Print one or more arguments to the console with a tab between each argument.
+ Prints 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">
@@ -645,7 +701,10 @@
<argument index="0" name="rad" type="float">
</argument>
<description>
- Convert from radians to degrees.
+ Converts from radians to degrees.
+ [codeblock]
+ rad2deg(0.523599) # returns 30
+ [/codeblock]
</description>
</method>
<method name="rand_range">
@@ -656,7 +715,10 @@
<argument index="1" name="to" type="float">
</argument>
<description>
- Random range, any floating point value between 'from' and 'to'.
+ Random range, any floating point value between [code]from[/code] and [code]to[/code].
+ [codeblock]
+ prints(rand_range(0, 1), rand_range(0, 1)) # prints 0.135591 0.405263
+ [/codeblock]
</description>
</method>
<method name="rand_seed">
@@ -665,35 +727,70 @@
<argument index="0" name="seed" type="int">
</argument>
<description>
- Random from seed: pass a seed, and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
+ Random from seed: pass a [code]seed[/code], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
</description>
</method>
<method name="randf">
<return type="float">
</return>
<description>
- Return a random floating point value between 0 and 1.
+ Returns 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.
+ Returns 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">
<return type="void">
</return>
<description>
- Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
+ Randomizes 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">
<return type="Array">
</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).
+ Returns 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">
@@ -710,7 +807,7 @@
<argument index="4" name="ostop" type="float">
</argument>
<description>
- Maps a value from range [istart, istop] to [ostart, ostop].
+ Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code].
[codeblock]
range_lerp(75, 0, 100, -1, 1) # returns 0.5
[/codeblock]
@@ -722,7 +819,10 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns the integral value that is nearest to s, with halfway cases rounded away from zero.
+ Returns the integral value that is nearest to [code]s[/code], with halfway cases rounded away from zero.
+ [codeblock]
+ round(2.6) # returns 3
+ [/codeblock]
</description>
</method>
<method name="seed">
@@ -731,7 +831,11 @@
<argument index="0" name="seed" type="int">
</argument>
<description>
- Set seed for the random number generator.
+ Sets 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).
+ Returns sign of [code]s[/code] -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.
+ Returns the sine of angle [code]s[/code] 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.
+ Returns the hyperbolic sine of [code]s[/code].
+ [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.
+ Returns the square root of [code]s[/code].
+ [codeblock]
+ sqrt(9) # returns 3
+ [/codeblock]
</description>
</method>
<method name="stepify">
@@ -778,14 +896,20 @@
<argument index="1" name="step" type="float">
</argument>
<description>
- Snap float value to a given step.
+ Snaps float value [code]s[/code] to a given [code]step[/code].
</description>
</method>
<method name="str" qualifiers="vararg">
<return type="String">
</return>
<description>
- Convert one or more arguments to string in the best way possible.
+ Converts 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">
@@ -794,7 +918,12 @@
<argument index="0" name="string" type="String">
</argument>
<description>
- Convert a formatted string that was returned by [method var2str] to the original value.
+ Converts 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.
+ Returns the tangent of angle [code]s[/code] 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 [code]s[/code].
+ [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.
+ Converts a Variant [code]var[/code] 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">
@@ -830,7 +971,7 @@
<argument index="0" name="type" type="String">
</argument>
<description>
- Returns whether the given class is exist in [ClassDB].
+ Returns whether the given class exists in [ClassDB].
[codeblock]
type_exists("Sprite") # returns true
type_exists("Variant") # returns false
@@ -843,7 +984,14 @@
<argument index="0" name="what" type="Variant">
</argument>
<description>
- Return the internal type of the given Variant object, using the TYPE_* enum in [@Global Scope].
+ Returns 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.
+ Checks that [code]json[/code] is valid JSON data. Returns empty string if valid. Returns 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">
@@ -861,7 +1017,7 @@
<argument index="0" name="var" type="Variant">
</argument>
<description>
- Encode a variable value to a byte array.
+ Encodes a variable value to a byte array.
</description>
</method>
<method name="var2str">
@@ -870,7 +1026,18 @@
<argument index="0" name="var" type="Variant">
</argument>
<description>
- Convert a value to a formatted string that can later be parsed using [method str2var].
+ Converts a Variant [code]var[/code] 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">
@@ -879,7 +1046,7 @@
<argument index="0" name="obj" type="Object">
</argument>
<description>
- Return a weak reference to an object.
+ Returns a weak reference to an object.
A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
</description>
</method>
@@ -891,7 +1058,7 @@
<argument index="1" name="signal" type="String">
</argument>
<description>
- Stop the function execution and return the current state. Call [method GDFunctionState.resume] on the state to resume execution. This invalidates the state.
+ Stops the function execution and returns the current state. Call [method GDFunctionState.resume] on the state to resume execution. This invalidates the state.
Returns anything that was passed to the resume function call. If passed an object and a signal, the execution is resumed when the object's signal is emitted.
</description>
</method>
diff --git a/doc/classes/@Global Scope.xml b/doc/classes/@Global Scope.xml
index 4044c4ed1f..a8fd377ecf 100644
--- a/doc/classes/@Global Scope.xml
+++ b/doc/classes/@Global Scope.xml
@@ -38,6 +38,8 @@
<member name="InputMap" type="InputMap" setter="" getter="">
[InputMap] singleton
</member>
+ <member name="JSON" type="JSON" setter="" getter="">
+ </member>
<member name="Marshalls" type="Reference" setter="" getter="">
[Marshalls] singleton
</member>
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/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml
index ad9bc922e4..e128b4d865 100644
--- a/doc/classes/AnimationTreePlayer.xml
+++ b/doc/classes/AnimationTreePlayer.xml
@@ -659,5 +659,9 @@
<constant name="NODE_TRANSITION" value="9">
Transition node.
</constant>
+ <constant name="ANIMATION_PROCESS_FIXED" value="0">
+ </constant>
+ <constant name="ANIMATION_PROCESS_IDLE" value="1">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml
index 4e366e124e..c59bbee084 100644
--- a/doc/classes/Area.xml
+++ b/doc/classes/Area.xml
@@ -493,5 +493,15 @@
</signal>
</signals>
<constants>
+ <constant name="SPACE_OVERRIDE_DISABLED" value="0">
+ </constant>
+ <constant name="SPACE_OVERRIDE_COMBINE" value="1">
+ </constant>
+ <constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2">
+ </constant>
+ <constant name="SPACE_OVERRIDE_REPLACE" value="3">
+ </constant>
+ <constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml
index d8b9dee9dc..e5c5a3b50e 100644
--- a/doc/classes/AudioEffectDistortion.xml
+++ b/doc/classes/AudioEffectDistortion.xml
@@ -93,5 +93,15 @@
</member>
</members>
<constants>
+ <constant name="MODE_CLIP" value="0">
+ </constant>
+ <constant name="MODE_ATAN" value="1">
+ </constant>
+ <constant name="MODE_LOFI" value="2">
+ </constant>
+ <constant name="MODE_OVERDRIVE" value="3">
+ </constant>
+ <constant name="MODE_WAVESHAPE" value="4">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml
index 6285539a61..17aa01d60a 100644
--- a/doc/classes/AudioEffectFilter.xml
+++ b/doc/classes/AudioEffectFilter.xml
@@ -77,5 +77,13 @@
</member>
</members>
<constants>
+ <constant name="FILTER_6DB" value="0">
+ </constant>
+ <constant name="FILTER_12DB" value="1">
+ </constant>
+ <constant name="FILTER_18DB" value="2">
+ </constant>
+ <constant name="FILTER_24DB" value="3">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 7856537804..dc30c0c5f9 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -307,5 +307,11 @@
</signal>
</signals>
<constants>
+ <constant name="SPEAKER_MODE_STEREO" value="0">
+ </constant>
+ <constant name="SPEAKER_SURROUND_51" value="2">
+ </constant>
+ <constant name="SPEAKER_SURROUND_71" value="3">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/AudioStreamOGGVorbis.xml b/doc/classes/AudioStreamOGGVorbis.xml
index fd9018764d..679438b66b 100644
--- a/doc/classes/AudioStreamOGGVorbis.xml
+++ b/doc/classes/AudioStreamOGGVorbis.xml
@@ -56,10 +56,13 @@
</methods>
<members>
<member name="data" type="PoolByteArray" setter="set_data" getter="get_data">
+ Raw audio data.
</member>
<member name="loop" type="bool" setter="set_loop" getter="has_loop">
+ If [code]true[/code], audio will loop continuously. Default value: [code]false[/code].
</member>
<member name="loop_offset" type="float" setter="set_loop_offset" getter="get_loop_offset">
+ If loop is [code]true[/code], loop starts from this position, in seconds.
</member>
</members>
<constants>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 64823c3be5..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,29 +115,42 @@
<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>
<constants>
+ <constant name="MIX_TARGET_STEREO" value="0">
+ </constant>
+ <constant name="MIX_TARGET_SURROUND" value="1">
+ </constant>
+ <constant name="MIX_TARGET_CENTER" value="2">
+ </constant>
</constants>
</class>
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/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index 668e0cc0d2..3aad0ea87a 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Plays 3D sound in 3D space
</brief_description>
<description>
+ Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space.
</description>
<tutorials>
+ http://docs.godotengine.org/en/latest/learning/features/audio/index.html
</tutorials>
<demos>
</demos>
@@ -123,6 +126,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">
@@ -131,6 +135,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">
@@ -265,67 +270,94 @@
<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_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz">
+ Dampens audio above this frequency, in Hz.
</member>
<member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db">
+ Amount how much the filter affects the loudness, in dB.
</member>
<member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" enum="AudioStreamPlayer3D.AttenuationModel">
+ Decides if audio should get quieter with distance linearly, quadratically or logarithmically.
</member>
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled">
+ If [code]true[/code], audio plays 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="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking">
+ Decides in which step the Doppler effect should be calculated.
</member>
<member name="emission_angle_degrees" type="float" setter="set_emission_angle" getter="get_emission_angle">
+ The angle in which the audio reaches cameras undampened.
</member>
<member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled">
+ If [code]true[/code], the audio should be dampened according to the direction of the sound.
</member>
<member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db">
+ dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB.
</member>
<member name="max_db" type="float" setter="set_max_db" getter="get_max_db">
+ Sets the absolute maximum of the soundlevel, in dB.
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance">
+ Sets the distance from wich the 'out_of_range_mode' takes effect. Has no effect if set to 0.
</member>
<member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode">
+ Decides if audio should pause when source is outside of 'max_distance' range.
</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="unit_db" type="float" setter="set_unit_db" getter="get_unit_db">
+ Base sound level unaffected by dampening, in dB.
</member>
<member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size">
+ Factor for the attenuation effect.
</member>
</members>
<signals>
<signal name="finished">
<description>
+ Fires when the audio stops playing.
</description>
</signal>
</signals>
<constants>
<constant name="ATTENUATION_INVERSE_DISTANCE" value="0">
+ Linear dampening of loudness according to distance.
</constant>
<constant name="ATTENUATION_INVERSE_SQUARE_DISTANCE" value="1">
+ Squared dampening of loudness according to distance.
</constant>
<constant name="ATTENUATION_LOGARITHMIC" value="2">
+ Logarithmic dampening of loudness according to distance.
</constant>
<constant name="OUT_OF_RANGE_MIX" value="0">
+ Mix this audio in, even when it's out of range.
</constant>
<constant name="OUT_OF_RANGE_PAUSE" value="1">
+ Pause this audio when it gets out of range.
</constant>
<constant name="DOPPLER_TRACKING_DISABLED" value="0">
+ Disables doppler tracking.
</constant>
<constant name="DOPPLER_TRACKING_IDLE_STEP" value="1">
+ Executes doppler trackin in idle step.
</constant>
<constant name="DOPPLER_TRACKING_FIXED_STEP" value="2">
+ Executes doppler tracking in fixed step.
</constant>
</constants>
</class>
diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml
index 91856682e6..1573a78d1f 100644
--- a/doc/classes/AudioStreamRandomPitch.xml
+++ b/doc/classes/AudioStreamRandomPitch.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Plays audio with random pitch tweaking.
</brief_description>
<description>
+ Randomly varies pitch on each start.
</description>
<tutorials>
</tutorials>
@@ -40,8 +42,10 @@
</methods>
<members>
<member name="audio_stream" type="AudioStream" setter="set_audio_stream" getter="get_audio_stream">
+ The current [AudioStream].
</member>
<member name="random_pitch" type="float" setter="set_random_pitch" getter="get_random_pitch">
+ The intensity of random pitch variation.
</member>
</members>
<constants>
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml
index e14a17a05c..7f7414e4d3 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamSample.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Plays audio.
</brief_description>
<description>
+ Plays audio, can loop.
</description>
<tutorials>
</tutorials>
@@ -110,20 +112,45 @@
</methods>
<members>
<member name="data" type="PoolByteArray" setter="set_data" getter="get_data">
+ Raw audio data.
</member>
<member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format">
+ Audio format. See FORMAT_* constants for values.
</member>
<member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin">
+ Loop start in bytes.
</member>
<member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end">
+ Loop end in bytes.
</member>
<member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode">
+ Loop mode. See LOOP_* constants for values.
</member>
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate">
+ The sample rate for mixing this audio.
</member>
<member name="stereo" type="bool" setter="set_stereo" getter="is_stereo">
+ If [code]true[/code], audio is stereo. Default value: [code]false[/code].
</member>
</members>
<constants>
+ <constant name="FORMAT_8_BITS" value="0">
+ Audio codec 8 bit.
+ </constant>
+ <constant name="FORMAT_16_BITS" value="1">
+ Audio codec 16 bit.
+ </constant>
+ <constant name="FORMAT_IMA_ADPCM" value="2">
+ Audio codec IMA ADPCM.
+ </constant>
+ <constant name="LOOP_DISABLED" value="0">
+ Audio does not loop.
+ </constant>
+ <constant name="LOOP_FORWARD" value="1">
+ Audio loops the data between loop_begin and loop_end playing forward only.
+ </constant>
+ <constant name="LOOP_PING_PONG" value="2">
+ Audio loops the data between loop_begin and loop_end playing back and forth.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
index f7e50f02d8..0c70d919f3 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BoxContainer" inherits="Container" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Base class for Box containers.
+ Base class for box containers.
</brief_description>
<description>
- Base class for Box containers. It arranges children controls vertically or horizontally, and rearranges them automatically when their minimum size changes.
+ Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
</description>
<tutorials>
</tutorials>
@@ -17,8 +17,7 @@
<argument index="0" name="begin" type="bool">
</argument>
<description>
- Add a control to the box as a spacer.
- If [i]begin[/i] is true the spacer control will be inserted in front of other children.
+ Adds a control to the box as a spacer. If [code]true[/code], [i]begin[/i] will insert the spacer control in front of other children.
</description>
</method>
<method name="get_alignment" qualifiers="const">
@@ -40,17 +39,18 @@
</methods>
<members>
<member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode">
+ The alignment of the container's children (must be one of ALIGN_BEGIN, ALIGN_CENTER, or ALIGN_END).
</member>
</members>
<constants>
<constant name="ALIGN_BEGIN" value="0">
- Align children with beginning of the container.
+ Aligns children with the beginning of the container.
</constant>
<constant name="ALIGN_CENTER" value="1">
- Align children with center of the container.
+ Aligns children with the center of the container.
</constant>
<constant name="ALIGN_END" value="2">
- Align children with end of the container.
+ Aligns children with the end of the container.
</constant>
</constants>
</class>
diff --git a/doc/classes/BoxShape.xml b/doc/classes/BoxShape.xml
index 8c98c93b57..4e8eb0ba6f 100644
--- a/doc/classes/BoxShape.xml
+++ b/doc/classes/BoxShape.xml
@@ -4,7 +4,7 @@
Box shape resource.
</brief_description>
<description>
- Box shape resource, which can be set into a [PhysicsBody] or area.
+ 3D box shape that can be a child of a [PhysicsBody] or [Area].
</description>
<tutorials>
</tutorials>
@@ -30,6 +30,7 @@
</methods>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents">
+ The shape's half extents.
</member>
</members>
<constants>
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/CapsuleShape.xml b/doc/classes/CapsuleShape.xml
index 29072203ea..db075a504c 100644
--- a/doc/classes/CapsuleShape.xml
+++ b/doc/classes/CapsuleShape.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CapsuleShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Capsule shape resource.
+ Capsule shape for collisions.
</brief_description>
<description>
- Capsule shape resource, which can be set into a [PhysicsBody] or area.
+ Capsule shape for collisions.
</description>
<tutorials>
</tutorials>
@@ -46,8 +46,10 @@
</methods>
<members>
<member name="height" type="float" setter="set_height" getter="get_height">
+ The capsule's height.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius">
+ The capsule's radius.
</member>
</members>
<constants>
diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml
index 9c2b1c4a3d..df833e0582 100644
--- a/doc/classes/CapsuleShape2D.xml
+++ b/doc/classes/CapsuleShape2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CapsuleShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Capsule 2D shape resource for physics.
+ Capsule shape for 2D collisions.
</brief_description>
<description>
- Capsule 2D shape resource for physics. A capsule (or sometimes called "pill") is like a line grown in all directions. It has a radius and a height, and is often useful for modeling biped characters.
+ Capsule shape for 2D collisions.
</description>
<tutorials>
</tutorials>
@@ -46,8 +46,10 @@
</methods>
<members>
<member name="height" type="float" setter="set_height" getter="get_height">
+ The capsule's height.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius">
+ The capsules's radius.
</member>
</members>
<constants>
diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml
index c3d4bdae03..1ed54f0705 100644
--- a/doc/classes/CircleShape2D.xml
+++ b/doc/classes/CircleShape2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CircleShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Circular Shape for 2D Physics.
+ Circular shape for 2D collisions.
</brief_description>
<description>
- Circular Shape for 2D Physics. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast.
+ Circular shape for 2D collisions. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast.
</description>
<tutorials>
</tutorials>
@@ -30,6 +30,7 @@
</methods>
<members>
<member name="radius" type="float" setter="set_radius" getter="get_radius">
+ The circle's radius.
</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 ef0f1ce451..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,14 +75,22 @@
</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>
+ <constant name="BUILD_SOLIDS" value="0">
+ </constant>
+ <constant name="BUILD_SEGMENTS" value="1">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml
index bf9f7598e0..d676f635c9 100644
--- a/doc/classes/Curve.xml
+++ b/doc/classes/Curve.xml
@@ -227,5 +227,11 @@
</signal>
</signals>
<constants>
+ <constant name="TANGENT_FREE" value="0">
+ </constant>
+ <constant name="TANGENT_LINEAR" value="1">
+ </constant>
+ <constant name="TANGENT_MODE_COUNT" value="2">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
new file mode 100644
index 0000000000..b0ed24b767
--- /dev/null
+++ b/doc/classes/EditorExportPlugin.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorExportPlugin" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_export_begin" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="features" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_export_file" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <argument index="2" name="features" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_file">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="file" type="PoolByteArray">
+ </argument>
+ <argument index="2" name="remap" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_shared_object">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="skip">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index 1e0f27ef7f..6ae893f189 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -185,5 +185,9 @@
</constant>
<constant name="ACCESS_FILESYSTEM" value="2">
</constant>
+ <constant name="DISPLAY_THUMBNAILS" value="0">
+ </constant>
+ <constant name="DISPLAY_LIST" value="1">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index f620c33f7a..2831555d41 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -66,6 +66,14 @@
During run-time, this will be a simple object with a script so this function does not need to be called then.
</description>
</method>
+ <method name="add_export_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="exporter" type="EditorExportPlugin">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="add_import_plugin">
<return type="void">
</return>
@@ -266,6 +274,14 @@
Remove a custom type added by [method EditorPlugin.add_custom_type]
</description>
</method>
+ <method name="remove_export_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="exporter" type="EditorExportPlugin">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="remove_import_plugin">
<return type="void">
</return>
diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml
index 550a1e97d7..57aec8be41 100644
--- a/doc/classes/GeometryInstance.xml
+++ b/doc/classes/GeometryInstance.xml
@@ -149,15 +149,17 @@
</member>
</members>
<constants>
- <constant name="FLAG_MAX" value="1" enum="">
+ <constant name="SHADOW_CASTING_SETTING_OFF" value="0">
</constant>
- <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="">
+ <constant name="SHADOW_CASTING_SETTING_ON" value="1">
</constant>
- <constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="">
+ <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2">
</constant>
- <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="">
+ <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3">
</constant>
- <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="">
+ <constant name="FLAG_USE_BAKED_LIGHT" value="0">
+ </constant>
+ <constant name="FLAG_MAX" value="1">
</constant>
</constants>
</class>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
new file mode 100644
index 0000000000..a38b2f61cf
--- /dev/null
+++ b/doc/classes/JSON.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="JSON" inherits="Object" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="parse">
+ <return type="JSONParseResult">
+ </return>
+ <argument index="0" name="json" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="print">
+ <return type="String">
+ </return>
+ <argument index="0" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
new file mode 100644
index 0000000000..6aeb614508
--- /dev/null
+++ b/doc/classes/JSONParseResult.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="JSONParseResult" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="get_error" qualifiers="const">
+ <return type="int" enum="Error">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_error_line" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_error_string" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_result" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_error">
+ <return type="void">
+ </return>
+ <argument index="0" name="error" type="int" enum="Error">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_error_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="error_line" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_error_string">
+ <return type="void">
+ </return>
+ <argument index="0" name="error_string" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_result">
+ <return type="void">
+ </return>
+ <argument index="0" name="result" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="error" type="int" setter="set_error" getter="get_error" enum="Error">
+ </member>
+ <member name="error_line" type="int" setter="set_error_line" getter="get_error_line">
+ </member>
+ <member name="error_string" type="String" setter="set_error_string" getter="get_error_string">
+ </member>
+ <member name="result" type="Variant" setter="set_result" getter="get_result">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
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/KinematicCollision.xml b/doc/classes/KinematicCollision.xml
index 5e5b125654..b7269a646e 100644
--- a/doc/classes/KinematicCollision.xml
+++ b/doc/classes/KinematicCollision.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="KinematicCollision" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Collision data for KinematicBody2D collisions.
</brief_description>
<description>
+ Contains collision data for KinematicBody collisions. When a [KinematicBody] is moved using [method KinematicBody.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision 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 [CollisionObject].
</member>
<member name="collider_velocity" type="Vector3" 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="Vector3" setter="" getter="get_normal">
+ The colliding body's shape's normal at the point of collision.
</member>
<member name="position" type="Vector3" setter="" getter="get_position">
+ The point of collision.
</member>
<member name="remainder" type="Vector3" setter="" getter="get_remainder">
+ The moving object's remaining movement vector.
</member>
<member name="travel" type="Vector3" setter="" getter="get_travel">
+ The distance the moving object traveled before collision.
</member>
</members>
<constants>
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 593799b57d..7ce7cef7c1 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>
@@ -395,5 +416,17 @@
<constant name="MODE_MASK" value="3">
The light texture of the Light2D is used as a mask, hiding or revealing parts of the screen underneath depending on the value of each pixel of the light (mask) texture.
</constant>
+ <constant name="SHADOW_FILTER_NONE" value="0">
+ </constant>
+ <constant name="SHADOW_FILTER_PCF3" value="1">
+ </constant>
+ <constant name="SHADOW_FILTER_PCF5" value="2">
+ </constant>
+ <constant name="SHADOW_FILTER_PCF7" value="3">
+ </constant>
+ <constant name="SHADOW_FILTER_PCF9" value="4">
+ </constant>
+ <constant name="SHADOW_FILTER_PCF13" value="5">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index e954173047..81fd255781 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -21,7 +21,7 @@
</description>
</method>
<method name="get_begin_cap_mode" qualifiers="const">
- <return type="int" enum="LineCapMode">
+ <return type="int" enum="Line2D.LineCapMode">
</return>
<description>
</description>
@@ -33,7 +33,7 @@
</description>
</method>
<method name="get_end_cap_mode" qualifiers="const">
- <return type="int" enum="LineCapMode">
+ <return type="int" enum="Line2D.LineCapMode">
</return>
<description>
</description>
@@ -45,7 +45,7 @@
</description>
</method>
<method name="get_joint_mode" qualifiers="const">
- <return type="int" enum="LineJointMode">
+ <return type="int" enum="Line2D.LineJointMode">
</return>
<description>
</description>
@@ -89,7 +89,7 @@
</description>
</method>
<method name="get_texture_mode" qualifiers="const">
- <return type="int" enum="LineTextureMode">
+ <return type="int" enum="Line2D.LineTextureMode">
</return>
<description>
</description>
@@ -112,7 +112,7 @@
<method name="set_begin_cap_mode">
<return type="void">
</return>
- <argument index="0" name="mode" type="int" enum="LineCapMode">
+ <argument index="0" name="mode" type="int" enum="Line2D.LineCapMode">
</argument>
<description>
</description>
@@ -128,7 +128,7 @@
<method name="set_end_cap_mode">
<return type="void">
</return>
- <argument index="0" name="mode" type="int" enum="LineCapMode">
+ <argument index="0" name="mode" type="int" enum="Line2D.LineCapMode">
</argument>
<description>
</description>
@@ -144,7 +144,7 @@
<method name="set_joint_mode">
<return type="void">
</return>
- <argument index="0" name="mode" type="int" enum="LineJointMode">
+ <argument index="0" name="mode" type="int" enum="Line2D.LineJointMode">
</argument>
<description>
</description>
@@ -194,7 +194,7 @@
<method name="set_texture_mode">
<return type="void">
</return>
- <argument index="0" name="mode" type="int" enum="LineTextureMode">
+ <argument index="0" name="mode" type="int" enum="Line2D.LineTextureMode">
</argument>
<description>
</description>
@@ -209,15 +209,15 @@
</method>
</methods>
<members>
- <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="LineCapMode">
+ <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode">
</member>
<member name="default_color" type="Color" setter="set_default_color" getter="get_default_color">
</member>
- <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="LineCapMode">
+ <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode">
</member>
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient">
</member>
- <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="LineJointMode">
+ <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode">
</member>
<member name="points" type="PoolVector2Array" setter="set_points" getter="get_points">
</member>
@@ -227,7 +227,7 @@
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
</member>
- <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="LineTextureMode">
+ <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode">
</member>
<member name="width" type="float" setter="set_width" getter="get_width">
</member>
diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml
index 3346c46a19..5596c48162 100644
--- a/doc/classes/LineShape2D.xml
+++ b/doc/classes/LineShape2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LineShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Line shape for 2D collision objects.
+ Line shape for 2D collisions.
</brief_description>
<description>
- Line shape for 2D collision objects. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.
+ Line shape for 2D collisions. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.
</description>
<tutorials>
</tutorials>
@@ -46,8 +46,10 @@
</methods>
<members>
<member name="d" type="float" setter="set_d" getter="get_d">
+ The line's distance from the origin.
</member>
<member name="normal" type="Vector2" setter="set_normal" getter="get_normal">
+ The line's normal.
</member>
</members>
<constants>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index 66b52e7f48..658265d242 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -71,5 +71,73 @@
<constant name="PRIMITIVE_TRIANGLE_FAN" value="6">
Render array as triangle fans.
</constant>
+ <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0">
+ </constant>
+ <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1">
+ </constant>
+ <constant name="ARRAY_FORMAT_VERTEX" value="1">
+ </constant>
+ <constant name="ARRAY_FORMAT_NORMAL" value="2">
+ </constant>
+ <constant name="ARRAY_FORMAT_TANGENT" value="4">
+ </constant>
+ <constant name="ARRAY_FORMAT_COLOR" value="8">
+ </constant>
+ <constant name="ARRAY_FORMAT_TEX_UV" value="16">
+ </constant>
+ <constant name="ARRAY_FORMAT_TEX_UV2" value="32">
+ </constant>
+ <constant name="ARRAY_FORMAT_BONES" value="64">
+ </constant>
+ <constant name="ARRAY_FORMAT_WEIGHTS" value="128">
+ </constant>
+ <constant name="ARRAY_FORMAT_INDEX" value="256">
+ </constant>
+ <constant name="ARRAY_COMPRESS_BASE" value="9">
+ </constant>
+ <constant name="ARRAY_COMPRESS_VERTEX" value="512">
+ </constant>
+ <constant name="ARRAY_COMPRESS_NORMAL" value="1024">
+ </constant>
+ <constant name="ARRAY_COMPRESS_TANGENT" value="2048">
+ </constant>
+ <constant name="ARRAY_COMPRESS_COLOR" value="4096">
+ </constant>
+ <constant name="ARRAY_COMPRESS_TEX_UV" value="8192">
+ </constant>
+ <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384">
+ </constant>
+ <constant name="ARRAY_COMPRESS_BONES" value="32768">
+ </constant>
+ <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536">
+ </constant>
+ <constant name="ARRAY_COMPRESS_INDEX" value="131072">
+ </constant>
+ <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144">
+ </constant>
+ <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288">
+ </constant>
+ <constant name="ARRAY_COMPRESS_DEFAULT" value="97792">
+ </constant>
+ <constant name="ARRAY_VERTEX" value="0">
+ </constant>
+ <constant name="ARRAY_NORMAL" value="1">
+ </constant>
+ <constant name="ARRAY_TANGENT" value="2">
+ </constant>
+ <constant name="ARRAY_COLOR" value="3">
+ </constant>
+ <constant name="ARRAY_TEX_UV" value="4">
+ </constant>
+ <constant name="ARRAY_TEX_UV2" value="5">
+ </constant>
+ <constant name="ARRAY_BONES" value="6">
+ </constant>
+ <constant name="ARRAY_WEIGHTS" value="7">
+ </constant>
+ <constant name="ARRAY_INDEX" value="8">
+ </constant>
+ <constant name="ARRAY_MAX" value="9">
+ </constant>
</constants>
</class>
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/OS.xml b/doc/classes/OS.xml
index 38f1eb8ce1..65200c4769 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -233,7 +233,7 @@
</description>
</method>
<method name="get_power_state">
- <return type="int" enum="PowerState">
+ <return type="int" enum="OS.PowerState">
</return>
<description>
</description>
@@ -286,7 +286,7 @@
</description>
</method>
<method name="get_screen_orientation" qualifiers="const">
- <return type="int" enum="_OS.ScreenOrientation">
+ <return type="int" enum="OS.ScreenOrientation">
</return>
<description>
Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class.
@@ -331,7 +331,7 @@
<method name="get_system_dir" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="dir" type="int" enum="_OS.SystemDir">
+ <argument index="0" name="dir" type="int" enum="OS.SystemDir">
</argument>
<description>
</description>
@@ -660,7 +660,7 @@
<method name="set_screen_orientation">
<return type="void">
</return>
- <argument index="0" name="orientation" type="int" enum="_OS.ScreenOrientation">
+ <argument index="0" name="orientation" type="int" enum="OS.ScreenOrientation">
</argument>
<description>
Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class.
diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml
index 8750fd7e99..cb8e756a4c 100644
--- a/doc/classes/OmniLight.xml
+++ b/doc/classes/OmniLight.xml
@@ -51,5 +51,13 @@
</member>
</members>
<constants>
+ <constant name="SHADOW_DUAL_PARABOLOID" value="0">
+ </constant>
+ <constant name="SHADOW_CUBE" value="1">
+ </constant>
+ <constant name="SHADOW_DETAIL_VERTICAL" value="0">
+ </constant>
+ <constant name="SHADOW_DETAIL_HORIZONTAL" value="1">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml
index e8ae986346..e75fbb8e2d 100644
--- a/doc/classes/PhysicsBody.xml
+++ b/doc/classes/PhysicsBody.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsBody" inherits="CollisionObject" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Base class for different types of Physics bodies.
+ Base class for all objects affected by physics in 3D space.
</brief_description>
<description>
- PhysicsBody is an abstract base class for implementing a physics body. All PhysicsBody types inherit from it.
+ PhysicsBody is an abstract base class for implementing a physics body. All *Body types inherit from it.
</description>
<tutorials>
</tutorials>
@@ -17,7 +17,7 @@
<argument index="0" name="body" type="Node">
</argument>
<description>
- Adds a body to the collision exception list. This list contains bodies that this body will not collide with.
+ Adds a body to the list of bodies that this body can't collide with.
</description>
</method>
<method name="get_collision_layer" qualifiers="const">
@@ -54,7 +54,7 @@
<argument index="0" name="body" type="Node">
</argument>
<description>
- Removes a body from the collision exception list.
+ Removes a body from the list of bodies that this body can't collide with.
</description>
</method>
<method name="set_collision_layer">
@@ -96,8 +96,12 @@
</methods>
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ The physics layers this area is in.
+ Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
+ The physics layers this area can scan for collisions.
</member>
</members>
<constants>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index e160311090..748506baa9 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsBody2D" inherits="CollisionObject2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Base class for all objects affected by physics.
+ Base class for all objects affected by physics in 2D space.
</brief_description>
<description>
PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
@@ -17,6 +17,7 @@
<argument index="0" name="body" type="Node">
</argument>
<description>
+ Adds a body to the list of bodies that this body can't collide with.
</description>
</method>
<method name="get_collision_layer" qualifiers="const">
@@ -57,6 +58,7 @@
<argument index="0" name="body" type="Node">
</argument>
<description>
+ Removes a body from the list of bodies that this body can't collide with.
</description>
</method>
<method name="set_collision_layer">
@@ -104,10 +106,15 @@
</methods>
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ The physics layers this area is in.
+ Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
+ A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
+ The physics layers this area can scan for collisions.
</member>
<member name="layers" type="int" setter="_set_layers" getter="_get_layers">
+ Both collision_layer and collision_mask. Returns collision_layer when accessed. Updates collision_layers and collision_mask when modified.
</member>
</members>
<constants>
diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml
index 93a50eb1bf..0076625ebd 100644
--- a/doc/classes/PhysicsServer.xml
+++ b/doc/classes/PhysicsServer.xml
@@ -1248,5 +1248,29 @@
</constant>
<constant name="INFO_ISLAND_COUNT" value="2">
</constant>
+ <constant name="SPACE_PARAM_CONTACT_RECYCLE_RADIUS" value="0">
+ </constant>
+ <constant name="SPACE_PARAM_CONTACT_MAX_SEPARATION" value="1">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION" value="2">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD" value="3">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD" value="4">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_TIME_TO_SLEEP" value="5">
+ </constant>
+ <constant name="SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO" value="6">
+ </constant>
+ <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="7">
+ </constant>
+ <constant name="BODY_AXIS_LOCK_DISABLED" value="0">
+ </constant>
+ <constant name="BODY_AXIS_LOCK_X" value="1">
+ </constant>
+ <constant name="BODY_AXIS_LOCK_Y" value="2">
+ </constant>
+ <constant name="BODY_AXIS_LOCK_Z" value="3">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml
index 8414ee2348..4f6313a1d2 100644
--- a/doc/classes/RayShape2D.xml
+++ b/doc/classes/RayShape2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RayShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Ray 2D shape resource for physics.
+ Ray shape for 2D collisions.
</brief_description>
<description>
- Ray 2D shape resource for physics. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
+ Ray shape for 2D collisions. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
</description>
<tutorials>
</tutorials>
@@ -30,6 +30,7 @@
</methods>
<members>
<member name="length" type="float" setter="set_length" getter="get_length">
+ The ray's length.
</member>
</members>
<constants>
diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml
index 9c18df970b..7a1aec2021 100644
--- a/doc/classes/RectangleShape2D.xml
+++ b/doc/classes/RectangleShape2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RectangleShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Rectangle Shape for 2D Physics.
+ Rectangle shape for 2D collisions.
</brief_description>
<description>
- Rectangle Shape for 2D Physics. This shape is useful for modeling box-like 2D objects.
+ Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects.
</description>
<tutorials>
</tutorials>
@@ -30,6 +30,7 @@
</methods>
<members>
<member name="extents" type="Vector2" setter="set_extents" getter="get_extents">
+ The rectangle's half extents. The width and height of this shape is twice the half extents.
</member>
</members>
<constants>
diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml
index a8ca4cde0c..2531ea88ad 100644
--- a/doc/classes/Reference.xml
+++ b/doc/classes/Reference.xml
@@ -18,7 +18,7 @@
</description>
</method>
<method name="reference">
- <return type="void">
+ <return type="bool">
</return>
<description>
Increase the internal reference counter. Use this only if you really know what you are doing.
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index 446c6d14cb..8347597daf 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RigidBody" inherits="PhysicsBody" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Rigid body node.
+ Physics Body whose position is determined through physics simulation in 3D space.
</brief_description>
<description>
- Rigid body node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift mode between regular Rigid body, Kinematic, Character or Static.
+ This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
+ This node can use custom force integration, for writing complex physics motion behavior per node.
+ This node can shift state between regular Rigid body, Kinematic, Character or Static.
+ Character mode forbids this node from being rotated.
+ As a warning, don't change RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior.
</description>
<tutorials>
</tutorials>
@@ -324,55 +328,56 @@
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp">
- Dampens rotational forces of the Rigid body by the 'angular_damp' rate.
+ Damps RigidBody's rotational forces.
</member>
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity">
- The current rotational velocity of the Rigid body
+ RigidBody's rotational velocity.
</member>
<member name="axis_lock" type="int" setter="set_axis_lock" getter="get_axis_lock" enum="RigidBody.AxisLock">
Locks the rotational forces to a particular axis, preventing rotations on other axes.
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
- Bounciness of the Rigid body.
+ RigidBody's bounciness.
</member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep">
- If true, the Rigid body will no longer calculate forces when there is no movement and will act as a static body. It will wake up when other forces are applied through other collisions or when the 'apply_impulse' method is used.
+ If [code]true[/code] the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used.
</member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled">
- If true, the Rigid body will emit signals when it collides with another Rigid body.
+ If true, the RigidBody will emit signals when it collides with another RigidBody.
</member>
<member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported">
The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
</member>
<member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection">
- Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects.
+ If [code]true[/code] continuous collision detection is used.
+ Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses less impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects.
</member>
<member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator">
- If true, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
+ If [code]true[/code] internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction">
The body friction, from 0 (frictionless) to 1 (max friction).
</member>
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale">
- The 'gravity_scale' for this Rigid body will be multiplied by the global 3d gravity setting found in "Project &gt; Project Settings &gt; Physics &gt; 3d". A value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
+ This is multiplied by the global 3D gravity setting found in "Project &gt; Project Settings &gt; Physics &gt; 3d" to produce RigidBody's gravity. E.g. a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp">
- The linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
+ RigidBody's linear damp. Default value: -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
</member>
<member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity">
- The body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
+ RigidBody's linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
</member>
<member name="mass" type="float" setter="set_mass" getter="get_mass">
- The body mass.
+ RigidBody's mass.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody.Mode">
The body mode from the MODE_* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER.
</member>
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping">
- The current 'sleeping' state of the Rigid body.
+ If [code]true[/code] RigidBody is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method.
</member>
<member name="weight" type="float" setter="set_weight" getter="get_weight">
- The body weight given standard earth-weight (gravity 9.8).
+ RigidBody's weight based on its mass and the global 3D gravity. Global values are set in "Project &gt; Project Settings &gt; Physics &gt; 3d".
</member>
</members>
<signals>
@@ -437,5 +442,13 @@
<constant name="MODE_CHARACTER" value="2">
Character body. This behaves like a rigid body, but can not rotate.
</constant>
+ <constant name="AXIS_LOCK_DISABLED" value="0">
+ </constant>
+ <constant name="AXIS_LOCK_X" value="1">
+ </constant>
+ <constant name="AXIS_LOCK_Y" value="2">
+ </constant>
+ <constant name="AXIS_LOCK_Z" value="3">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index e92c417323..a4faa697de 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Rigid body 2D node.
+ Physics Body whose position is determined through physics simulation in 2D space.
</brief_description>
<description>
- Rigid body 2D node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift state between regular Rigid body, Kinematic, Character or Static.
- Character mode forbids the node from being rotated. This node can have a custom force integrator function, for writing complex physics motion behavior per node.
- As a warning, don't change this node position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior.
+ This is the node that implements full 2D physics. This means that you do not control a RigidBody2D directly. Instead you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
+ This node can use custom force integration, for writing complex physics motion behavior per node.
+ This node can shift state between regular Rigid body, Kinematic, Character or Static.
+ Character mode forbids this node from being rotated.
+ As a warning, don't change RigidBody2D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior.
</description>
<tutorials>
</tutorials>
@@ -382,36 +384,53 @@
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp">
+ Damps RigidBody2D's rotational forces.
</member>
<member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity">
+ RigidBody2D's rotational velocity.
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
+ RigidBody2D's bounciness.
</member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep">
+ If [code]true[/code] RigidBody2D will not calculate forces and will act as a static body while there is no movement. It will wake up when other forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. Default value: [code]true[/code]
</member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled">
+ If [code]true[/code] RigidBody2D will emit signals when it collides with another RigidBody2D.
</member>
<member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported">
+ The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
</member>
<member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode">
+ If [code]true[/code] continuous collision detection is used. Default value: [code]false[/code]
+ Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses less impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects.
</member>
<member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator">
+ If [code]true[/code] internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction">
+ The body friction, from 0 (frictionless) to 1 (max friction).
</member>
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale">
+ This is multiplied by the global 2D gravity setting found in "Project &gt; Project Settings &gt; Physics &gt; 2d" to produce RigidBody2D's gravity. E.g. a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp">
+ RigidBody2D's linear damp. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden.
</member>
<member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity">
+ RigidBody2D's linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
</member>
<member name="mass" type="float" setter="set_mass" getter="get_mass">
+ RigidBody2D's mass.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody2D.Mode">
+ The body mode from the MODE_* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER.
</member>
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping">
+ If [code]true[/code] RigidBody2D is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method.
</member>
<member name="weight" type="float" setter="set_weight" getter="get_weight">
+ RigidBody2D's weight based on its mass and the global 2D gravity. Global values are set in "Project &gt; Project Settings &gt; Physics &gt; 2d".
</member>
</members>
<signals>
diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml
index 0e2c5c86f3..3b7a747bcb 100644
--- a/doc/classes/SegmentShape2D.xml
+++ b/doc/classes/SegmentShape2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SegmentShape2D" inherits="Shape2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Segment Shape for 2D Collision Detection.
+ Segment shape for 2D collisions.
</brief_description>
<description>
- Segment Shape for 2D Collision Detection, consists of two points, 'a' and 'b'.
+ Segment shape for 2D collisions. Consists of two points, [code]a[/code] and [code]b[/code].
</description>
<tutorials>
</tutorials>
@@ -46,8 +46,10 @@
</methods>
<members>
<member name="a" type="Vector2" setter="set_a" getter="get_a">
+ The segment's first point position.
</member>
<member name="b" type="Vector2" setter="set_b" getter="get_b">
+ The segment's second point position.
</member>
</members>
<constants>
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/TabContainer.xml b/doc/classes/TabContainer.xml
index f96b31262c..ffe99eb82b 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -190,6 +190,12 @@
</signal>
</signals>
<constants>
+ <constant name="ALIGN_LEFT" value="0">
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ </constant>
+ <constant name="ALIGN_RIGHT" value="2">
+ </constant>
</constants>
<theme_items>
<theme_item name="decrement" type="Texture">
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/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml
index bf8af20da9..8a96fa1454 100644
--- a/doc/classes/TouchScreenButton.xml
+++ b/doc/classes/TouchScreenButton.xml
@@ -173,5 +173,9 @@
</signal>
</signals>
<constants>
+ <constant name="VISIBILITY_ALWAYS" value="0">
+ </constant>
+ <constant name="VISIBILITY_TOUCHSCREEN_ONLY" value="1">
+ </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/TreeItem.xml b/doc/classes/TreeItem.xml
index 02c264cbff..d1e45bd10f 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -545,5 +545,11 @@
</constant>
<constant name="CELL_MODE_CUSTOM" value="5">
</constant>
+ <constant name="ALIGN_LEFT" value="0">
+ </constant>
+ <constant name="ALIGN_CENTER" value="1">
+ </constant>
+ <constant name="ALIGN_RIGHT" value="2">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 43e0ad7873..d450a8812e 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -108,6 +108,12 @@
Get the name of the current action.
</description>
</method>
+ <method name="get_max_steps" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_version" qualifiers="const">
<return type="int">
</return>
@@ -116,6 +122,26 @@
This is useful mostly to check if something changed from a saved version.
</description>
</method>
+ <method name="redo">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_max_steps">
+ <return type="void">
+ </return>
+ <argument index="0" name="max_steps" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="undo">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<constants>
<constant name="MERGE_DISABLE" value="0">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index c12ec86cbb..a5170b8d03 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -650,5 +650,19 @@
</constant>
<constant name="MSAA_16X" value="4">
</constant>
+ <constant name="USAGE_2D" value="0">
+ </constant>
+ <constant name="USAGE_2D_NO_SAMPLING" value="1">
+ </constant>
+ <constant name="USAGE_3D" value="2">
+ </constant>
+ <constant name="USAGE_3D_NO_EFFECTS" value="3">
+ </constant>
+ <constant name="CLEAR_MODE_ALWAYS" value="0">
+ </constant>
+ <constant name="CLEAR_MODE_NEVER" value="1">
+ </constant>
+ <constant name="CLEAR_MODE_ONLY_NEXT_FRAME" value="2">
+ </constant>
</constants>
</class>
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>
diff --git a/doc/classes/VisualScriptBuiltinFunc.xml b/doc/classes/VisualScriptBuiltinFunc.xml
index eb9af69ea9..a88633749e 100644
--- a/doc/classes/VisualScriptBuiltinFunc.xml
+++ b/doc/classes/VisualScriptBuiltinFunc.xml
@@ -29,5 +29,121 @@
</member>
</members>
<constants>
+ <constant name="MATH_SIN" value="0">
+ </constant>
+ <constant name="MATH_COS" value="1">
+ </constant>
+ <constant name="MATH_TAN" value="2">
+ </constant>
+ <constant name="MATH_SINH" value="3">
+ </constant>
+ <constant name="MATH_COSH" value="4">
+ </constant>
+ <constant name="MATH_TANH" value="5">
+ </constant>
+ <constant name="MATH_ASIN" value="6">
+ </constant>
+ <constant name="MATH_ACOS" value="7">
+ </constant>
+ <constant name="MATH_ATAN" value="8">
+ </constant>
+ <constant name="MATH_ATAN2" value="9">
+ </constant>
+ <constant name="MATH_SQRT" value="10">
+ </constant>
+ <constant name="MATH_FMOD" value="11">
+ </constant>
+ <constant name="MATH_FPOSMOD" value="12">
+ </constant>
+ <constant name="MATH_FLOOR" value="13">
+ </constant>
+ <constant name="MATH_CEIL" value="14">
+ </constant>
+ <constant name="MATH_ROUND" value="15">
+ </constant>
+ <constant name="MATH_ABS" value="16">
+ </constant>
+ <constant name="MATH_SIGN" value="17">
+ </constant>
+ <constant name="MATH_POW" value="18">
+ </constant>
+ <constant name="MATH_LOG" value="19">
+ </constant>
+ <constant name="MATH_EXP" value="20">
+ </constant>
+ <constant name="MATH_ISNAN" value="21">
+ </constant>
+ <constant name="MATH_ISINF" value="22">
+ </constant>
+ <constant name="MATH_EASE" value="23">
+ </constant>
+ <constant name="MATH_DECIMALS" value="24">
+ </constant>
+ <constant name="MATH_STEPIFY" value="25">
+ </constant>
+ <constant name="MATH_LERP" value="26">
+ </constant>
+ <constant name="MATH_DECTIME" value="27">
+ </constant>
+ <constant name="MATH_RANDOMIZE" value="28">
+ </constant>
+ <constant name="MATH_RAND" value="29">
+ </constant>
+ <constant name="MATH_RANDF" value="30">
+ </constant>
+ <constant name="MATH_RANDOM" value="31">
+ </constant>
+ <constant name="MATH_SEED" value="32">
+ </constant>
+ <constant name="MATH_RANDSEED" value="33">
+ </constant>
+ <constant name="MATH_DEG2RAD" value="34">
+ </constant>
+ <constant name="MATH_RAD2DEG" value="35">
+ </constant>
+ <constant name="MATH_LINEAR2DB" value="36">
+ </constant>
+ <constant name="MATH_DB2LINEAR" value="37">
+ </constant>
+ <constant name="LOGIC_MAX" value="38">
+ </constant>
+ <constant name="LOGIC_MIN" value="39">
+ </constant>
+ <constant name="LOGIC_CLAMP" value="40">
+ </constant>
+ <constant name="LOGIC_NEAREST_PO2" value="41">
+ </constant>
+ <constant name="OBJ_WEAKREF" value="42">
+ </constant>
+ <constant name="FUNC_FUNCREF" value="43">
+ </constant>
+ <constant name="TYPE_CONVERT" value="44">
+ </constant>
+ <constant name="TYPE_OF" value="45">
+ </constant>
+ <constant name="TYPE_EXISTS" value="46">
+ </constant>
+ <constant name="TEXT_CHAR" value="47">
+ </constant>
+ <constant name="TEXT_STR" value="48">
+ </constant>
+ <constant name="TEXT_PRINT" value="49">
+ </constant>
+ <constant name="TEXT_PRINTERR" value="50">
+ </constant>
+ <constant name="TEXT_PRINTRAW" value="51">
+ </constant>
+ <constant name="VAR_TO_STR" value="52">
+ </constant>
+ <constant name="STR_TO_VAR" value="53">
+ </constant>
+ <constant name="VAR_TO_BYTES" value="54">
+ </constant>
+ <constant name="BYTES_TO_VAR" value="55">
+ </constant>
+ <constant name="COLORN" value="56">
+ </constant>
+ <constant name="FUNC_MAX" value="57">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualScriptFunctionCall.xml b/doc/classes/VisualScriptFunctionCall.xml
index 9a56831253..36c808afce 100644
--- a/doc/classes/VisualScriptFunctionCall.xml
+++ b/doc/classes/VisualScriptFunctionCall.xml
@@ -183,5 +183,17 @@
</constant>
<constant name="CALL_MODE_BASIC_TYPE" value="3">
</constant>
+ <constant name="CALL_MODE_SINGLETON" value="4">
+ </constant>
+ <constant name="RPC_DISABLED" value="0">
+ </constant>
+ <constant name="RPC_RELIABLE" value="1">
+ </constant>
+ <constant name="RPC_UNRELIABLE" value="2">
+ </constant>
+ <constant name="RPC_RELIABLE_TO_ID" value="3">
+ </constant>
+ <constant name="RPC_UNRELIABLE_TO_ID" value="4">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualScriptInputAction.xml b/doc/classes/VisualScriptInputAction.xml
index b0f7827024..b555a0228b 100644
--- a/doc/classes/VisualScriptInputAction.xml
+++ b/doc/classes/VisualScriptInputAction.xml
@@ -45,5 +45,13 @@
</member>
</members>
<constants>
+ <constant name="MODE_PRESSED" value="0">
+ </constant>
+ <constant name="MODE_RELEASED" value="1">
+ </constant>
+ <constant name="MODE_JUST_PRESSED" value="2">
+ </constant>
+ <constant name="MODE_JUST_RELEASED" value="3">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualScriptMathConstant.xml b/doc/classes/VisualScriptMathConstant.xml
index 8e0436edfa..1ef7d71e10 100644
--- a/doc/classes/VisualScriptMathConstant.xml
+++ b/doc/classes/VisualScriptMathConstant.xml
@@ -29,5 +29,23 @@
</member>
</members>
<constants>
+ <constant name="MATH_CONSTANT_ONE" value="0">
+ </constant>
+ <constant name="MATH_CONSTANT_PI" value="1">
+ </constant>
+ <constant name="MATH_CONSTANT_2PI" value="2">
+ </constant>
+ <constant name="MATH_CONSTANT_HALF_PI" value="3">
+ </constant>
+ <constant name="MATH_CONSTANT_E" value="4">
+ </constant>
+ <constant name="MATH_CONSTANT_SQRT2" value="5">
+ </constant>
+ <constant name="MATH_CONSTANT_INF" value="6">
+ </constant>
+ <constant name="MATH_CONSTANT_NAN" value="7">
+ </constant>
+ <constant name="MATH_CONSTANT_MAX" value="8">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualScriptPropertySet.xml b/doc/classes/VisualScriptPropertySet.xml
index a129cc36f8..88d47a7463 100644
--- a/doc/classes/VisualScriptPropertySet.xml
+++ b/doc/classes/VisualScriptPropertySet.xml
@@ -149,5 +149,29 @@
</constant>
<constant name="CALL_MODE_INSTANCE" value="2">
</constant>
+ <constant name="CALL_MODE_BASIC_TYPE" value="3">
+ </constant>
+ <constant name="ASSIGN_OP_NONE" value="0">
+ </constant>
+ <constant name="ASSIGN_OP_ADD" value="1">
+ </constant>
+ <constant name="ASSIGN_OP_SUB" value="2">
+ </constant>
+ <constant name="ASSIGN_OP_MUL" value="3">
+ </constant>
+ <constant name="ASSIGN_OP_DIV" value="4">
+ </constant>
+ <constant name="ASSIGN_OP_MOD" value="5">
+ </constant>
+ <constant name="ASSIGN_OP_SHIFT_LEFT" value="6">
+ </constant>
+ <constant name="ASSIGN_OP_SHIFT_RIGHT" value="7">
+ </constant>
+ <constant name="ASSIGN_OP_BIT_AND" value="8">
+ </constant>
+ <constant name="ASSIGN_OP_BIT_OR" value="9">
+ </constant>
+ <constant name="ASSIGN_OP_BIT_XOR" value="10">
+ </constant>
</constants>
</class>