diff options
Diffstat (limited to 'doc/classes')
79 files changed, 785 insertions, 1778 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml deleted file mode 100644 index 553fd4d629..0000000000 --- a/doc/classes/@GDScript.xml +++ /dev/null @@ -1,1301 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="@GDScript" category="Core" version="3.2"> - <brief_description> - Built-in GDScript functions. - </brief_description> - <description> - List of core built-in GDScript functions. Math functions and other utilities. Everything else is provided by objects. (Keywords: builtin, built in, global functions.) - </description> - <tutorials> - </tutorials> - <methods> - <method name="Color8"> - <return type="Color"> - </return> - <argument index="0" name="r8" type="int"> - </argument> - <argument index="1" name="g8" type="int"> - </argument> - <argument index="2" name="b8" type="int"> - </argument> - <argument index="3" name="a8" type="int" default="255"> - </argument> - <description> - 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] - </description> - </method> - <method name="ColorN"> - <return type="Color"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="alpha" type="float" default="1.0"> - </argument> - <description> - Returns a color according to the standardised [code]name[/code] with [code]alpha[/code] ranging from 0 to 1. - [codeblock] - red = ColorN("red", 1) - [/codeblock] - Supported color names: - "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflower", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "webgray", "green", "webgreen", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrod", "lightgray", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "webmaroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navyblue", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "webpurple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen". - </description> - </method> - <method name="abs"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - 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) - [/codeblock] - </description> - </method> - <method name="acos"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - 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) - [/codeblock] - </description> - </method> - <method name="asin"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - 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) - [/codeblock] - </description> - </method> - <method name="assert"> - <return type="void"> - </return> - <argument index="0" name="condition" type="bool"> - </argument> - <description> - Assert that the [code]condition[/code] is [code]true[/code] . If the [code]condition[/code] is [code]false[/code] a fatal error is generated and the program is halted. Useful for debugging to make sure a value is always [code]true[/code]. - [codeblock] - # Speed should always be between 0 and 20 - speed = -10 - assert(speed < 20) # Is true and program continues - assert(speed >= 0) # Is false and program stops - assert(speed >= 0 && speed < 20) # Or combined - [/codeblock] - </description> - </method> - <method name="atan"> - <return type="float"> - </return> - <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"> - <return type="float"> - </return> - <argument index="0" name="y" type="float"> - </argument> - <argument index="1" name="x" type="float"> - </argument> - <description> - 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 = atan2(0, -1) # a is 3.141593 - [/codeblock] - </description> - </method> - <method name="bytes2var"> - <return type="Variant"> - </return> - <argument index="0" name="bytes" type="PoolByteArray"> - </argument> - <argument index="1" name="allow_objects" type="bool" default="false"> - </argument> - <description> - Decodes a byte array back to a value. When [code]allow_objects[/code] is [code]true[/code] decoding objects is allowed. - [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). - </description> - </method> - <method name="cartesian2polar"> - <return type="Vector2"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> - </argument> - <description> - Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle). - </description> - </method> - <method name="ceil"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Rounds [code]s[/code] upward, returning the smallest integral value that is not less than [code]s[/code]. - [codeblock] - i = ceil(1.45) # i is 2 - i = ceil(1.001) # i is 2 - [/codeblock] - </description> - </method> - <method name="char"> - <return type="String"> - </return> - <argument index="0" name="ascii" type="int"> - </argument> - <description> - Returns a character as a String of the given ASCII code. - [codeblock] - # a is 'A' - a = char(65) - # a is 'a' - a = char(65 + 32) - [/codeblock] - </description> - </method> - <method name="clamp"> - <return type="float"> - </return> - <argument index="0" name="value" type="float"> - </argument> - <argument index="1" name="min" type="float"> - </argument> - <argument index="2" name="max" type="float"> - </argument> - <description> - Clamps [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code]. - [codeblock] - speed = 1000 - # a is 20 - a = clamp(speed, 1, 20) - - speed = -10 - # a is 1 - a = clamp(speed, 1, 20) - [/codeblock] - </description> - </method> - <method name="convert"> - <return type="Variant"> - </return> - <argument index="0" name="what" type="Variant"> - </argument> - <argument index="1" name="type" type="int"> - </argument> - <description> - Converts from a type to another in the best way possible. The [code]type[/code] parameter uses the enum TYPE_* in [@GlobalScope]. - [codeblock] - a = Vector2(1, 0) - # prints 1 - print(a.length()) - a = convert(a, TYPE_STRING) - # prints 6 - # (1, 0) is 6 characters - print(a.length()) - [/codeblock] - </description> - </method> - <method name="cos"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Returns the cosine of angle [code]s[/code] in radians. - [codeblock] - # prints 1 and -1 - print(cos(PI * 2)) - print(cos(PI)) - [/codeblock] - </description> - </method> - <method name="cosh"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Returns the hyperbolic cosine of [code]s[/code] in radians. - [codeblock] - # prints 1.543081 - print(cosh(1)) - [/codeblock] - </description> - </method> - <method name="db2linear"> - <return type="float"> - </return> - <argument index="0" name="db" type="float"> - </argument> - <description> - Converts from decibels to linear energy (audio). - </description> - </method> - <method name="decimals"> - <return type="int"> - </return> - <argument index="0" name="step" type="float"> - </argument> - <description> - Deprecated alias for "[method step_decimals]". - </description> - </method> - <method name="dectime"> - <return type="float"> - </return> - <argument index="0" name="value" type="float"> - </argument> - <argument index="1" name="amount" type="float"> - </argument> - <argument index="2" name="step" type="float"> - </argument> - <description> - Returns the result of [code]value[/code] decreased by [code]step[/code] * [code]amount[/code]. - [codeblock] - # a = 59 - a = dectime(60, 10, 0.1)) - [/codeblock] - </description> - </method> - <method name="deg2rad"> - <return type="float"> - </return> - <argument index="0" name="deg" type="float"> - </argument> - <description> - Returns degrees converted to radians. - [codeblock] - # r is 3.141593 - r = deg2rad(180) - [/codeblock] - </description> - </method> - <method name="dict2inst"> - <return type="Object"> - </return> - <argument index="0" name="dict" type="Dictionary"> - </argument> - <description> - Converts a previously converted instance to a dictionary, back into an instance. Useful for deserializing. - </description> - </method> - <method name="ease"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <argument index="1" name="curve" type="float"> - </argument> - <description> - Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. - </description> - </method> - <method name="exp"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - The natural exponential function. It raises the mathematical 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"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - 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"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> - </argument> - <description> - Returns the floating-point remainder of [code]x/y[/code]. - [codeblock] - # remainder is 1.5 - var remainder = fmod(7, 5.5) - [/codeblock] - </description> - </method> - <method name="fposmod"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <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 < 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"> - <return type="FuncRef"> - </return> - <argument index="0" name="instance" type="Object"> - </argument> - <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="get_stack"> - <return type="Array"> - </return> - <description> - Returns an array of dictionaries representing the current call stack. - [codeblock] - func _ready(): - foo() - - func foo(): - bar() - - func bar(): - print(get_stack()) - [/codeblock] - would print - [codeblock] - [{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}] - [/codeblock] - </description> - </method> - <method name="hash"> - <return type="int"> - </return> - <argument index="0" name="var" type="Variant"> - </argument> - <description> - Returns the integer hash of the variable passed. - [codeblock] - print(hash("a")) # prints 177670 - [/codeblock] - </description> - </method> - <method name="inst2dict"> - <return type="Dictionary"> - </return> - <argument index="0" name="inst" type="Object"> - </argument> - <description> - Returns the passed instance converted to a dictionary (useful for serializing). - [codeblock] - var foo = "bar" - func _ready(): - var d = inst2dict(self) - print(d.keys()) - print(d.values()) - [/codeblock] - Prints out: - [codeblock] - [@subpath, @path, foo] - [, res://test.gd, bar] - [/codeblock] - </description> - </method> - <method name="instance_from_id"> - <return type="Object"> - </return> - <argument index="0" name="instance_id" type="int"> - </argument> - <description> - 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) # prints bar - [/codeblock] - </description> - </method> - <method name="inverse_lerp"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> - <argument index="2" name="weight" type="float"> - </argument> - <description> - Returns a normalized value considering the given range. - [codeblock] - inverse_lerp(3, 5, 4) # returns 0.5 - [/codeblock] - </description> - </method> - <method name="is_equal_approx"> - <return type="bool"> - </return> - <argument index="0" name="a" type="float"> - </argument> - <argument index="1" name="b" type="float"> - </argument> - <description> - Returns True/False whether [code]a[/code] and [code]b[/code] are approximately equal to each other. - </description> - </method> - <method name="is_inf"> - <return type="bool"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Returns whether [code]s[/code] is an infinity value (either positive infinity or negative infinity). - </description> - </method> - <method name="is_instance_valid"> - <return type="bool"> - </return> - <argument index="0" name="instance" type="Object"> - </argument> - <description> - Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory). - </description> - </method> - <method name="is_nan"> - <return type="bool"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Returns whether [code]s[/code] is a NaN (Not-A-Number) value. - </description> - </method> - <method name="is_zero_approx"> - <return type="bool"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Returns True/False whether [code]s[/code] is zero or almost zero. - </description> - </method> - <method name="len"> - <return type="int"> - </return> - <argument index="0" name="var" type="Variant"> - </argument> - <description> - Returns length of Variant [code]var[/code]. Length is the character count of String, element count of Array, size of Dictionary, etc. - [b]Note:[/b] Generates a fatal error if Variant can not provide a length. - [codeblock] - a = [1, 2, 3, 4] - len(a) # returns 4 - [/codeblock] - </description> - </method> - <method name="lerp"> - <return type="Variant"> - </return> - <argument index="0" name="from" type="Variant"> - </argument> - <argument index="1" name="to" type="Variant"> - </argument> - <argument index="2" name="weight" type="float"> - </argument> - <description> - Linearly interpolates between two values by a normalized value. - If the [code]from[/code] and [code]to[/code] arguments are of type [int] or [float], the return value is a [float]. - If both are of the same vector type ([Vector2], [Vector3] or [Color]), the return value will be of the same type ([code]lerp[/code] then calls the vector type's [code]linear_interpolate[/code] method). - [codeblock] - lerp(0, 4, 0.75) # returns 3.0 - lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # returns Vector2(2, 3.5) - [/codeblock] - </description> - </method> - <method name="linear2db"> - <return type="float"> - </return> - <argument index="0" name="nrg" type="float"> - </argument> - <description> - Converts from linear energy to decibels (audio). - </description> - </method> - <method name="load"> - <return type="Resource"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <description> - Loads a resource from the filesystem located at [code]path[/code]. - [b]Note:[/b] 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") - [/codeblock] - </description> - </method> - <method name="log"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Natural logarithm. The amount of time needed to reach a certain level of continuous growth. - [b]Note:[/b] This is not the same as the log function on your calculator which is a base 10 logarithm. - [codeblock] - log(10) # returns 2.302585 - [/codeblock] - </description> - </method> - <method name="max"> - <return type="float"> - </return> - <argument index="0" name="a" type="float"> - </argument> - <argument index="1" name="b" type="float"> - </argument> - <description> - Returns the maximum of two values. - [codeblock] - max(1, 2) # returns 2 - max(-3.99, -4) # returns -3.99 - [/codeblock] - </description> - </method> - <method name="min"> - <return type="float"> - </return> - <argument index="0" name="a" type="float"> - </argument> - <argument index="1" name="b" type="float"> - </argument> - <description> - Returns the minimum of two values. - [codeblock] - min(1, 2) # returns 1 - min(-3.99, -4) # returns -4 - [/codeblock] - </description> - </method> - <method name="move_toward"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> - <argument index="2" name="delta" type="float"> - </argument> - <description> - Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value. - Use a negative [code]delta[/code] value to move away. - [codeblock] - move_toward(10, 5, 4) # returns 6 - [/codeblock] - </description> - </method> - <method name="nearest_po2"> - <return type="int"> - </return> - <argument index="0" name="value" type="int"> - </argument> - <description> - Returns the nearest larger power of 2 for integer [code]value[/code]. - [codeblock] - nearest_po2(3) # returns 4 - nearest_po2(4) # returns 4 - nearest_po2(5) # returns 8 - [/codeblock] - </description> - </method> - <method name="parse_json"> - <return type="Variant"> - </return> - <argument index="0" name="json" type="String"> - </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 all numerical values to [float] types. - Note that JSON objects do not preserve key order like Godot dictionaries, thus you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements: - [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="polar2cartesian"> - <return type="Vector2"> - </return> - <argument index="0" name="r" type="float"> - </argument> - <argument index="1" name="th" type="float"> - </argument> - <description> - Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (x and y axis). - </description> - </method> - <method name="pow"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> - </argument> - <description> - Returns the result of [code]x[/code] raised to the power of [code]y[/code]. - [codeblock] - pow(2, 5) # returns 32 - [/codeblock] - </description> - </method> - <method name="preload"> - <return type="Resource"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <description> - Returns a resource from the filesystem that is loaded during script parsing. - [b]Note:[/b] 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"> - <return type="void"> - </return> - <description> - 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) # prints ab[1, 2, 3] - [/codeblock] - </description> - </method> - <method name="print_debug" qualifiers="vararg"> - <return type="void"> - </return> - <description> - Like [method print], but prints only when used in debug mode. - </description> - </method> - <method name="print_stack"> - <return type="void"> - </return> - <description> - 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> - 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> - 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> - 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> - 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="push_error"> - <return type="void"> - </return> - <argument index="0" name="message" type="String"> - </argument> - <description> - Pushes an error message to Godot's built-in debugger and to the OS terminal. - [codeblock] - push_error("test error") # prints "test error" to debugger and terminal as error call - [/codeblock] - </description> - </method> - <method name="push_warning"> - <return type="void"> - </return> - <argument index="0" name="message" type="String"> - </argument> - <description> - Pushes a warning message to Godot's built-in debugger and to the OS terminal. - [codeblock] - push_warning("test warning") # prints "test warning" to debugger and terminal as warning call - [/codeblock] - </description> - </method> - <method name="rad2deg"> - <return type="float"> - </return> - <argument index="0" name="rad" type="float"> - </argument> - <description> - Converts from radians to degrees. - [codeblock] - rad2deg(0.523599) # returns 30 - [/codeblock] - </description> - </method> - <method name="rand_range"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> - <description> - 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 e.g. 0.135591 0.405263 - [/codeblock] - </description> - </method> - <method name="rand_seed"> - <return type="Array"> - </return> - <argument index="0" name="seed" type="int"> - </argument> - <description> - 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> - Returns a random floating point value on the interval [code][0, 1][/code]. - [codeblock] - randf() # returns e.g. 0.375671 - [/codeblock] - </description> - </method> - <method name="randi"> - <return type="int"> - </return> - <description> - Returns a random unsigned 32 bit integer. Use remainder to obtain a random value in the interval [code][0, N][/code] (where N is smaller than 2^32 -1). - [codeblock] - randi() # returns random integer between 0 and 2^32 - 1 - randi() % 20 # returns random integer between 0 and 19 - randi() % 100 # returns random integer between 0 and 99 - randi() % 100 + 1 # returns random integer between 1 and 100 - [/codeblock] - </description> - </method> - <method name="randomize"> - <return type="void"> - </return> - <description> - 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> - 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"> - <return type="float"> - </return> - <argument index="0" name="value" type="float"> - </argument> - <argument index="1" name="istart" type="float"> - </argument> - <argument index="2" name="istop" type="float"> - </argument> - <argument index="3" name="ostart" type="float"> - </argument> - <argument index="4" name="ostop" type="float"> - </argument> - <description> - 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] - </description> - </method> - <method name="round"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - 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"> - <return type="void"> - </return> - <argument index="0" name="seed" type="int"> - </argument> - <description> - Sets seed for the random number generator. - [codeblock] - my_seed = "Godot Rocks" - seed(my_seed.hash()) - [/codeblock] - </description> - </method> - <method name="sign"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Returns the sign of [code]s[/code]: -1 or 1. Returns 0 if [code]s[/code] is 0. - [codeblock] - sign(-6) # returns -1 - sign(0) # returns 0 - sign(6) # returns 1 - [/codeblock] - </description> - </method> - <method name="sin"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Returns the sine of angle [code]s[/code] in radians. - [codeblock] - sin(0.523599) # returns 0.5 - [/codeblock] - </description> - </method> - <method name="sinh"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - 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="smoothstep"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> - <argument index="2" name="weight" type="float"> - </argument> - <description> - Returns a number smoothly interpolated between the [code]from[/code] and [code]to[/code], based on the [code]weight[/code]. Similar to [method lerp], but interpolates faster at the beginning and slower at the end. - [codeblock] - smoothstep(0, 2, 0.5) # returns 0.15 - smoothstep(0, 2, 1.0) # returns 0.5 - smoothstep(0, 2, 2.0) # returns 1.0 - [/codeblock] - </description> - </method> - <method name="sqrt"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Returns the square root of [code]s[/code]. - [codeblock] - sqrt(9) # returns 3 - [/codeblock] - </description> - </method> - <method name="step_decimals"> - <return type="int"> - </return> - <argument index="0" name="step" type="float"> - </argument> - <description> - Returns the position of the first non-zero digit, after the decimal point. - [codeblock] - # n is 0 - n = step_decimals(5) - # n is 4 - n = step_decimals(1.0005) - # n is 9 - n = step_decimals(0.000000005) - [/codeblock] - </description> - </method> - <method name="stepify"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <argument index="1" name="step" type="float"> - </argument> - <description> - Snaps float value [code]s[/code] to a given [code]step[/code]. - </description> - </method> - <method name="str" qualifiers="vararg"> - <return type="String"> - </return> - <description> - 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"> - <return type="Variant"> - </return> - <argument index="0" name="string" type="String"> - </argument> - <description> - 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"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - Returns the tangent of angle [code]s[/code] in radians. - [codeblock] - tan(deg2rad(45)) # returns 1 - [/codeblock] - </description> - </method> - <method name="tanh"> - <return type="float"> - </return> - <argument index="0" name="s" type="float"> - </argument> - <description> - 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"> - <return type="String"> - </return> - <argument index="0" name="var" type="Variant"> - </argument> - <description> - 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"> - <return type="bool"> - </return> - <argument index="0" name="type" type="String"> - </argument> - <description> - Returns whether the given class exists in [ClassDB]. - [codeblock] - type_exists("Sprite") # returns true - type_exists("Variant") # returns false - [/codeblock] - </description> - </method> - <method name="typeof"> - <return type="int"> - </return> - <argument index="0" name="what" type="Variant"> - </argument> - <description> - Returns the internal type of the given Variant object, using the TYPE_* enum in [@GlobalScope]. - [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"> - <return type="String"> - </return> - <argument index="0" name="json" type="String"> - </argument> - <description> - 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"> - <return type="PoolByteArray"> - </return> - <argument index="0" name="var" type="Variant"> - </argument> - <argument index="1" name="full_objects" type="bool" default="false"> - </argument> - <description> - Encodes a variable value to a byte array. When [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code). - </description> - </method> - <method name="var2str"> - <return type="String"> - </return> - <argument index="0" name="var" type="Variant"> - </argument> - <description> - 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"> - <return type="WeakRef"> - </return> - <argument index="0" name="obj" type="Object"> - </argument> - <description> - 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> - <method name="wrapf"> - <return type="float"> - </return> - <argument index="0" name="value" type="float"> - </argument> - <argument index="1" name="min" type="float"> - </argument> - <argument index="2" name="max" type="float"> - </argument> - <description> - Wraps float [code]value[/code] between [code]min[/code] and [code]max[/code]. - Usable for creating loop-alike behavior or infinite surfaces. - [codeblock] - # a is 0.5 - a = wrapf(10.5, 0.0, 10.0) - [/codeblock] - [codeblock] - # a is 9.5 - a = wrapf(-0.5, 0.0, 10.0) - [/codeblock] - [codeblock] - # infinite loop between 0.0 and 0.99 - f = wrapf(f + 0.1, 0.0, 1.0) - [/codeblock] - </description> - </method> - <method name="wrapi"> - <return type="int"> - </return> - <argument index="0" name="value" type="int"> - </argument> - <argument index="1" name="min" type="int"> - </argument> - <argument index="2" name="max" type="int"> - </argument> - <description> - Wraps integer [code]value[/code] between [code]min[/code] and [code]max[/code]. - Usable for creating loop-alike behavior or infinite surfaces. - [codeblock] - # a is 0 - a = wrapi(10, 0, 10) - [/codeblock] - [codeblock] - # a is 9 - a = wrapi(-1, 0, 10) - [/codeblock] - [codeblock] - # infinite loop between 0 and 9 - frame = wrapi(frame + 1, 0, 10) - [/codeblock] - </description> - </method> - <method name="yield"> - <return type="GDScriptFunctionState"> - </return> - <argument index="0" name="object" type="Object" default="null"> - </argument> - <argument index="1" name="signal" type="String" default=""""> - </argument> - <description> - Stops the function execution and returns the current suspended state to the calling function. - From the caller, call [method GDScriptFunctionState.resume] on the state to resume execution. This invalidates the state. Within the resumed function, [code]yield()[/code] returns whatever was passed to the [code]resume()[/code] function call. - If passed an object and a signal, the execution is resumed when the object emits the given signal. In this case, [code]yield()[/code] returns the argument passed to [code]emit_signal()[/code] if the signal takes only one argument, or an array containing all the arguments passed to [code]emit_signal()[/code] if the signal takes multiple arguments. - </description> - </method> - </methods> - <constants> - <constant name="PI" value="3.141593"> - Constant that represents how many times the diameter of a circle fits around its perimeter. - </constant> - <constant name="TAU" value="6.283185"> - The circle constant, the circumference of the unit circle. - </constant> - <constant name="INF" value="inf"> - A positive infinity. (For negative infinity, use -INF). - </constant> - <constant name="NAN" value="nan"> - Macro constant that expands to an expression of type float that represents a NaN. - The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0. - </constant> - </constants> -</class> diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 760287e1b8..d36a545c56 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -18,6 +18,9 @@ <member name="AudioServer" type="AudioServer" setter="" getter=""> [AudioServer] singleton </member> + <member name="CameraServer" type="CameraServer" setter="" getter=""> + [CameraServer] singleton + </member> <member name="ClassDB" type="ClassDB" setter="" getter=""> [ClassDB] singleton </member> @@ -1003,6 +1006,27 @@ <constant name="JOY_DS_Y" value="2" enum="JoystickList"> DualShock controller Y button </constant> + <constant name="JOY_VR_GRIP" value="2" enum="JoystickList"> + Grip (side) buttons on a VR controller + </constant> + <constant name="JOY_VR_PAD" value="14" enum="JoystickList"> + Push down on the touchpad or main joystick on a VR controller + </constant> + <constant name="JOY_VR_TRIGGER" value="15" enum="JoystickList"> + Trigger on a VR controller + </constant> + <constant name="JOY_OCULUS_AX" value="7" enum="JoystickList"> + A button on the right Oculus Touch controller, X button on the left controller (also when used in OpenVR) + </constant> + <constant name="JOY_OCULUS_BY" value="1" enum="JoystickList"> + B button on the right Oculus Touch controller, Y button on the left controller (also when used in OpenVR) + </constant> + <constant name="JOY_OCULUS_MENU" value="3" enum="JoystickList"> + Menu button on either Oculus Touch controller. + </constant> + <constant name="JOY_OPENVR_MENU" value="1" enum="JoystickList"> + Menu button in OpenVR (Except when Oculus Touch controllers are used) + </constant> <constant name="JOY_SELECT" value="10" enum="JoystickList"> Joypad Button Select </constant> @@ -1085,6 +1109,18 @@ <constant name="JOY_ANALOG_R2" value="7" enum="JoystickList"> Joypad Right Analog Trigger </constant> + <constant name="JOY_VR_ANALOG_TRIGGER" value="2" enum="JoystickList"> + VR Controller Analog Trigger + </constant> + <constant name="JOY_VR_ANALOG_GRIP" value="4" enum="JoystickList"> + VR Controller Analog Grip (side buttons) + </constant> + <constant name="JOY_OPENVR_TOUCHPADX" value="0" enum="JoystickList"> + OpenVR touchpad X axis (Joystick axis on Oculus Touch and Windows MR controllers) + </constant> + <constant name="JOY_OPENVR_TOUCHPADY" value="1" enum="JoystickList"> + OpenVR touchpad Y axis (Joystick axis on Oculus Touch and Windows MR controllers) + </constant> <constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MidiMessageList"> </constant> <constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MidiMessageList"> diff --git a/doc/classes/@NativeScript.xml b/doc/classes/@NativeScript.xml deleted file mode 100644 index cb5de198ac..0000000000 --- a/doc/classes/@NativeScript.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="@NativeScript" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/@VisualScript.xml b/doc/classes/@VisualScript.xml deleted file mode 100644 index 8d9408e6d4..0000000000 --- a/doc/classes/@VisualScript.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="@VisualScript" category="Core" version="3.2"> - <brief_description> - Built-in visual script functions. - </brief_description> - <description> - A list of built-in visual script functions, see [VisualScriptBuiltinFunc] and [VisualScript]. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index 11084fb98e..c286811b5d 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -10,6 +10,13 @@ <tutorials> </tutorials> <methods> + <method name="get_camera_feed_id"> + <return type="int"> + </return> + <description> + If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed id in the [CameraServer] for this interface. + </description> + </method> <method name="get_capabilities" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 9854d4c27e..23f7a316d9 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -215,6 +215,7 @@ </signal> <signal name="tree_changed"> <description> + Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and [AnimationNodeBlendTree]. </description> </signal> </signals> diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml index ac2a28e396..890d6f8b49 100644 --- a/doc/classes/AnimationNodeAdd2.xml +++ b/doc/classes/AnimationNodeAdd2.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeAdd2" inherits="AnimationNode" category="Core" version="3.2"> <brief_description> + Blends two animations additively inside of an [AnimationNodeBlendTree]. </brief_description> <description> + A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ </methods> <members> <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync"> + If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> <constants> diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml index 9cfeb47378..7747c333bf 100644 --- a/doc/classes/AnimationNodeAdd3.xml +++ b/doc/classes/AnimationNodeAdd3.xml @@ -1,8 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeAdd3" inherits="AnimationNode" category="Core" version="3.2"> <brief_description> + Blends two of three animations additively inside of an [AnimationNodeBlendTree]. </brief_description> <description> + A resource to add to an [AnimationNodeBlendTree]. Blends two animations together additively out of three based on a value in the [code][-1.0, 1.0][/code] range. + This node has three inputs: + - The base animation to add to + - A -add animation to blend with when the blend amount is in the [code][-1.0, 0.0][/code] range. + - A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range </description> <tutorials> </tutorials> @@ -10,6 +16,7 @@ </methods> <members> <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync"> + If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> <constants> diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index e7d53fc7b3..420a702d38 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeAnimation" inherits="AnimationRootNode" category="Core" version="3.2"> <brief_description> + Input animation to use in an [AnimationNodeBlendTree]. </brief_description> <description> + A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ </methods> <members> <member name="animation" type="String" setter="set_animation" getter="get_animation"> + Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]. </member> </members> <constants> diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml index f15fa44f39..9358c5eeef 100644 --- a/doc/classes/AnimationNodeBlend2.xml +++ b/doc/classes/AnimationNodeBlend2.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeBlend2" inherits="AnimationNode" category="Core" version="3.2"> <brief_description> + Blends two animations linearly inside of an [AnimationNodeBlendTree]. </brief_description> <description> + A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ </methods> <members> <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync"> + If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> <constants> diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml index 2f82eea041..f4a108f930 100644 --- a/doc/classes/AnimationNodeBlend3.xml +++ b/doc/classes/AnimationNodeBlend3.xml @@ -1,8 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeBlend3" inherits="AnimationNode" category="Core" version="3.2"> <brief_description> + Blends two of three animations linearly inside of an [AnimationNodeBlendTree]. </brief_description> <description> + A resource to add to an [AnimationNodeBlendTree]. Blends two animations together linearly out of three based on a value in the [code][-1.0, 1.0][/code] range. + This node has three inputs: + - The base animation + - A -blend animation to blend with when the blend amount is in the [code][-1.0, 0.0][/code] range. + - A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range </description> <tutorials> </tutorials> @@ -10,6 +16,7 @@ </methods> <members> <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync"> + If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> <constants> diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml index b13aee277e..6fb5c6312b 100644 --- a/doc/classes/AnimationNodeBlendSpace1D.xml +++ b/doc/classes/AnimationNodeBlendSpace1D.xml @@ -1,8 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" category="Core" version="3.2"> <brief_description> + Blends linearly between two of any number of [AnimationNode] of any type placed on a virtual axis. </brief_description> <description> + A resource to add to an [AnimationNodeBlendTree]. + This is a virtual axis on which you can add any type of [AnimationNode] using [method add_blend_point]. + Outputs the linear blend of the two [code]AnimationNode[/code] closest to the node's current [code]value[/code]. + You can set the extents of the axis using the [member min_space] and [member max_space]. </description> <tutorials> </tutorials> @@ -17,12 +22,14 @@ <argument index="2" name="at_index" type="int" default="-1"> </argument> <description> + Add a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array. </description> </method> <method name="get_blend_point_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of points on the blend axis. </description> </method> <method name="get_blend_point_node" qualifiers="const"> @@ -31,6 +38,7 @@ <argument index="0" name="point" type="int"> </argument> <description> + Returns the [code]AnimationNode[/code] referenced by the point at index [code]point[/code]. </description> </method> <method name="get_blend_point_position" qualifiers="const"> @@ -39,6 +47,7 @@ <argument index="0" name="point" type="int"> </argument> <description> + Returns the position of the point at index [code]point[/code]. </description> </method> <method name="remove_blend_point"> @@ -47,6 +56,7 @@ <argument index="0" name="point" type="int"> </argument> <description> + Removes the point at index [code]point[/code] from the blend axis. </description> </method> <method name="set_blend_point_node"> @@ -57,6 +67,7 @@ <argument index="1" name="node" type="AnimationRootNode"> </argument> <description> + Changes the AnimationNode referenced by the point at index [code]point[/code]. </description> </method> <method name="set_blend_point_position"> @@ -67,17 +78,22 @@ <argument index="1" name="pos" type="float"> </argument> <description> + Updates the position of the point at index [code]point[/code] on the blend axis. </description> </method> </methods> <members> <member name="max_space" type="float" setter="set_max_space" getter="get_max_space"> + The blend space's axis's upper limit for the points' position. See [method add_blend_point]. </member> <member name="min_space" type="float" setter="set_min_space" getter="get_min_space"> + The blend space's axis's lower limit for the points' position. See [method add_blend_point]. </member> <member name="snap" type="float" setter="set_snap" getter="get_snap"> + Position increment to snap to when moving a point on the axis. </member> <member name="value_label" type="String" setter="set_value_label" getter="get_value_label"> + Label of the virtual axis of the blend space. </member> </members> <constants> diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index 2ec5977301..6567098d6c 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -1,8 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" category="Core" version="3.2"> <brief_description> + Blends linearly between three [AnimationNode] of any type placed in a 2d space. </brief_description> <description> + A resource to add to an [AnimationNodeBlendTree]. + This node allows you to blend linearly between three animations using a [Vector2] weight. + You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand. </description> <tutorials> </tutorials> @@ -17,6 +21,7 @@ <argument index="2" name="at_index" type="int" default="-1"> </argument> <description> + Add a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array. </description> </method> <method name="add_triangle"> @@ -31,12 +36,14 @@ <argument index="3" name="at_index" type="int" default="-1"> </argument> <description> + Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array. </description> </method> <method name="get_blend_point_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of points in the blend space. </description> </method> <method name="get_blend_point_node" qualifiers="const"> @@ -45,6 +52,7 @@ <argument index="0" name="point" type="int"> </argument> <description> + Returns the [code]AnimationRootNode[/code] referenced by the point at index [code]point[/code]. </description> </method> <method name="get_blend_point_position" qualifiers="const"> @@ -53,12 +61,14 @@ <argument index="0" name="point" type="int"> </argument> <description> + Returns the position of the point at index [code]point[/code]. </description> </method> <method name="get_triangle_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of triangles in the blend space. </description> </method> <method name="get_triangle_point"> @@ -69,6 +79,7 @@ <argument index="1" name="point" type="int"> </argument> <description> + Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code]. </description> </method> <method name="remove_blend_point"> @@ -77,6 +88,7 @@ <argument index="0" name="point" type="int"> </argument> <description> + Removes the point at index [code]point[/code] from the blend space. </description> </method> <method name="remove_triangle"> @@ -85,6 +97,7 @@ <argument index="0" name="triangle" type="int"> </argument> <description> + Removes the triangle at index [code]triangle[/code] from the blend space. </description> </method> <method name="set_blend_point_node"> @@ -95,6 +108,7 @@ <argument index="1" name="node" type="AnimationRootNode"> </argument> <description> + Changes the AnimationNode referenced by the point at index [code]point[/code]. </description> </method> <method name="set_blend_point_position"> @@ -105,39 +119,49 @@ <argument index="1" name="pos" type="Vector2"> </argument> <description> + Updates the position of the point at index [code]point[/code] on the blend axis. </description> </method> </methods> <members> <member name="auto_triangles" type="bool" setter="set_auto_triangles" getter="get_auto_triangles"> + If true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point]. </member> <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode"> + Controls the interpolation between animations. See [enum BlendMode] constants. </member> <member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space"> + The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point]. </member> <member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space"> + The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point]. </member> <member name="snap" type="Vector2" setter="set_snap" getter="get_snap"> + Position increment to snap to when moving a point. </member> <member name="x_label" type="String" setter="set_x_label" getter="get_x_label"> + Name of the blend space's X axis. </member> <member name="y_label" type="String" setter="set_y_label" getter="get_y_label"> + Name of the blend space's Y axis. </member> </members> <signals> <signal name="triangles_updated"> <description> + Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position. </description> </signal> </signals> <constants> <constant name="BLEND_MODE_INTERPOLATED" value="0" enum="BlendMode"> + The interpolation between animations is linear. </constant> <constant name="BLEND_MODE_DISCRETE" value="1" enum="BlendMode"> - Useful for frame-by-frame 2D animations. + The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations. </constant> <constant name="BLEND_MODE_DISCRETE_CARRY" value="2" enum="BlendMode"> - Keep the current play position when switching between discrete animations. + Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position. </constant> </constants> </class> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 745d803a30..d44e3c54c9 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ArrayMesh" inherits="Mesh" category="Core" version="3.2"> <brief_description> + [Mesh] type that provides utility for constructing a surface from arrays. </brief_description> <description> The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays. The most basic example is the creation of a single triangle @@ -30,6 +31,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Add name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added. </description> </method> <method name="add_surface_from_arrays"> @@ -176,6 +178,7 @@ <argument index="2" name="data" type="PoolByteArray"> </argument> <description> + Updates a specified region of mesh arrays on GPU. Warning: only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments. </description> </method> </methods> @@ -183,7 +186,7 @@ <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode"> </member> <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb"> - An overriding bounding box for this mesh. + Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices. </member> </members> <constants> diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml index 59f7bec889..757c6c6a34 100644 --- a/doc/classes/Bone2D.xml +++ b/doc/classes/Bone2D.xml @@ -1,8 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Bone2D" inherits="Node2D" category="Core" version="3.2"> <brief_description> + Joint used with [Skeleton2D] to control and animate other nodes. </brief_description> <description> + Use a hierarchy of [code]Bone2D[/code] bound to a [Skeleton2D] to control, and animate other [Node2D] nodes. + You can use [code]Bone2D[/code] and [code]Skeleton2D[/code] nodes to animate 2D meshes created with the Polygon 2D UV editor. + Each bone has a [member rest] transform that you can reset to with [method apply_rest]. These rest poses are relative to the bone's parent. + If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses. </description> <tutorials> </tutorials> @@ -11,25 +16,30 @@ <return type="void"> </return> <description> + Stores the node's current transforms in [member rest]. </description> </method> <method name="get_index_in_skeleton" qualifiers="const"> <return type="int"> </return> <description> + Returns the node's index as part of the entire skeleton. See [Skeleton2D]. </description> </method> <method name="get_skeleton_rest" qualifiers="const"> <return type="Transform2D"> </return> <description> + Returns the node's [member rest] [code]Transform2D[/code] if it doesn't have a parent, or its rest pose relative to its parent. </description> </method> </methods> <members> <member name="default_length" type="float" setter="set_default_length" getter="get_default_length"> + Length of the bone's representation drawn in the editor's viewport in pixels. </member> <member name="rest" type="Transform2D" setter="set_rest" getter="get_rest"> + Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest]. </member> </members> <constants> diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml index 599c067328..c9c92102f3 100644 --- a/doc/classes/CPUParticles.xml +++ b/doc/classes/CPUParticles.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CPUParticles" inherits="GeometryInstance" category="Core" version="3.2"> <brief_description> + CPU-based 3D particle emitter. </brief_description> <description> + CPU-based 3D particle node used to create a variety of particle systems and effects. + See also [Particles], which provides the same functionality with hardware acceleration, but may not run on older devices. </description> <tutorials> </tutorials> @@ -13,56 +16,77 @@ <argument index="0" name="particles" type="Node"> </argument> <description> + Sets this node's properties to match a given [Particles] node with an assigned [ParticlesMaterial]. </description> </method> <method name="restart"> <return type="void"> </return> <description> + Restarts the particle emitter. </description> </method> </methods> <members> <member name="amount" type="int" setter="set_amount" getter="get_amount"> + Number of particles emitted in one emission cycle. </member> <member name="angle" type="float" setter="set_param" getter="get_param"> + Initial rotation applied to each particle, in degrees. </member> <member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's rotation will be animated along this [Curve]. </member> <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Rotation randomness ratio. Default value: [code]0[/code]. </member> <member name="angular_velocity" type="float" setter="set_param" getter="get_param"> + Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. </member> <member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's angular velocity will vary along this [Curve]. </member> <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Angular velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="anim_offset" type="float" setter="set_param" getter="get_param"> + Particle animation offset. </member> <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's animation offset will vary along this [Curve]. </member> <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Animation offset randomness ratio. Default value: [code]0[/code]. </member> <member name="anim_speed" type="float" setter="set_param" getter="get_param"> + Particle animation speed. </member> <member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's animation speed will vary along this [Curve]. </member> <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Animation speed randomness ratio. Default value: [code]0[/code]. </member> <member name="color" type="Color" setter="set_color" getter="get_color"> + Unused for 3D particles. </member> <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> - Each particle's vertex color will vary along this [GradientTexture]. + Unused for 3D particles. </member> <member name="damping" type="float" setter="set_param" getter="get_param"> + The rate at which particles lose velocity. </member> <member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Damping will vary along this [Curve]. </member> <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Damping randomness ratio. Default value: [code]0[/code]. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles.DrawOrder"> + Particle draw order. Uses [enum DrawOrder] values. Default value: [constant DRAW_ORDER_INDEX]. </member> <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents"> + The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. </member> <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors"> </member> @@ -71,124 +95,199 @@ <member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points"> </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape"> + Particles will be emitted inside this region. Use [enum EmissionShape] for values. Default value: [constant EMISSION_SHAPE_POINT]. </member> <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius"> + The sphere's radius if [enum EmissionShape] is set to [constant EMISSION_SHAPE_SPHERE]. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> + If [code]true[/code], particles are being emitted. Default value: [code]true[/code]. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> + How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. Default value: [code]0[/code]. </member> <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> + The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. </member> <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag"> + Align y-axis of particle with the direction of its velocity. </member> <member name="flag_disable_z" type="bool" setter="set_particle_flag" getter="get_particle_flag"> + If [code]true[/code], particles will not move on the z axis. Default value: [code]false[/code]. </member> <member name="flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag"> + If [code]true[/code], particles rotate around y-axis by [member angle]. </member> <member name="flatness" type="float" setter="set_flatness" getter="get_flatness"> + Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. Default [code]0[/code]. </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code] </member> <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity"> + Gravity applied to every particle. Default value: [code](0, -9.8, 0)[/code]. </member> <member name="hue_variation" type="float" setter="set_param" getter="get_param"> + Initial hue variation applied to each particle. </member> <member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's hue will vary along this [Curve]. </member> <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Hue variation randomness ratio. Default value: [code]0[/code]. </member> <member name="initial_velocity" type="float" setter="set_param" getter="get_param"> + Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. </member> <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Initial velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> + Amount of time each particle will exist. Default value: [code]1[/code]. </member> <member name="linear_accel" type="float" setter="set_param" getter="get_param"> + Linear acceleration applied to each particle in the direction of motion. </member> <member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's linear acceleration will vary along this [Curve]. </member> <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Linear acceleration randomness ratio. Default value: [code]0[/code]. </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. </member> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> + The [Mesh] used for each particle. If [code]null[/code], particles will be spheres. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> + If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. + </member> + <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> + Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second. + This property is only available when [member flag_disable_z] is [code]true[/code]. + </member> + <member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's orbital velocity will vary along this [Curve]. + </member> + <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Orbital velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> + Particle system starts as if it had already run for this many seconds. </member> <member name="radial_accel" type="float" setter="set_param" getter="get_param"> + Radial acceleration applied to each particle. Makes particle accelerate away from origin. </member> <member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's radial acceleration will vary along this [Curve]. </member> <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Radial acceleration randomness ratio. Default value: [code]0[/code]. </member> <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio"> + Emission lifetime randomness ratio. Default value: [code]0[/code]. </member> <member name="scale_amount" type="float" setter="set_param" getter="get_param"> + Initial scale applied to each particle. </member> <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's scale will vary along this [Curve]. </member> <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Scale randomness ratio. Default value: [code]0[/code]. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> + Particle system's running speed scaling ratio. Default value: [code]1[/code]. A value of [code]0[/code] can be used to pause the particles. </member> <member name="spread" type="float" setter="set_spread" getter="get_spread"> + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. </member> <member name="tangential_accel" type="float" setter="set_param" getter="get_param"> + Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. </member> <member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's tangential acceleration will vary along this [Curve]. </member> <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Tangential acceleration randomness ratio. Default value: [code]0[/code]. </member> </members> <constants> <constant name="DRAW_ORDER_INDEX" value="0" enum="DrawOrder"> + Particles are drawn in the order emitted. </constant> <constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder"> + Particles are drawn in order of remaining lifetime. </constant> <constant name="DRAW_ORDER_VIEW_DEPTH" value="2" enum="DrawOrder"> + Particles are drawn in order of depth. </constant> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set initial velocity properties. </constant> <constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties. </constant> - <constant name="PARAM_LINEAR_ACCEL" value="2" enum="Parameter"> + <constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital velocity properties. </constant> - <constant name="PARAM_RADIAL_ACCEL" value="3" enum="Parameter"> + <constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties. </constant> - <constant name="PARAM_TANGENTIAL_ACCEL" value="4" enum="Parameter"> + <constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set radial acceleration properties. </constant> - <constant name="PARAM_DAMPING" value="5" enum="Parameter"> + <constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set tangential acceleration properties. </constant> - <constant name="PARAM_ANGLE" value="6" enum="Parameter"> + <constant name="PARAM_DAMPING" value="6" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set damping properties. </constant> - <constant name="PARAM_SCALE" value="7" enum="Parameter"> + <constant name="PARAM_ANGLE" value="7" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angle properties. </constant> - <constant name="PARAM_HUE_VARIATION" value="8" enum="Parameter"> + <constant name="PARAM_SCALE" value="8" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties. </constant> - <constant name="PARAM_ANIM_SPEED" value="9" enum="Parameter"> + <constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue variation properties. </constant> - <constant name="PARAM_ANIM_OFFSET" value="10" enum="Parameter"> + <constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties. </constant> - <constant name="PARAM_MAX" value="11" enum="Parameter"> + <constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties. + </constant> + <constant name="PARAM_MAX" value="12" enum="Parameter"> + Represents the size of the [enum Parameter] enum. </constant> <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags"> + Use with [method set_flag] to set [member flag_align_y]. </constant> <constant name="FLAG_ROTATE_Y" value="1" enum="Flags"> + Use with [method set_flag] to set [member flag_rotate_y]. + </constant> + <constant name="FLAG_DISABLE_Z" value="2" enum="Flags"> + Use with [method set_flag] to set [member flag_disable_z]. </constant> <constant name="FLAG_MAX" value="3" enum="Flags"> + Represents the size of the [enum Flags] enum. </constant> <constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape"> + All particles will be emitted from a single point. </constant> <constant name="EMISSION_SHAPE_SPHERE" value="1" enum="EmissionShape"> + Particles will be emitted in the volume of a sphere. </constant> <constant name="EMISSION_SHAPE_BOX" value="2" enum="EmissionShape"> + Particles will be emitted in the volume of a box. </constant> <constant name="EMISSION_SHAPE_POINTS" value="3" enum="EmissionShape"> + Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors]. </constant> <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> + Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. </constant> </constants> </class> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index e1f71e3600..7283d5084c 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -1,10 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CPUParticles2D" inherits="Node2D" category="Core" version="3.2"> <brief_description> + CPU-based 2D particle emitter. </brief_description> <description> + CPU-based 2D particle node used to create a variety of particle systems and effects. + See also [Particles2D], which provides the same functionality with hardware acceleration, but may not run on older devices. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link> </tutorials> <methods> <method name="convert_from_particles"> @@ -13,53 +17,74 @@ <argument index="0" name="particles" type="Node"> </argument> <description> + Sets this node's properties to match a given [Particles2D] node with an assigned [ParticlesMaterial]. </description> </method> <method name="restart"> <return type="void"> </return> <description> + Restarts the particle emitter. </description> </method> </methods> <members> <member name="amount" type="int" setter="set_amount" getter="get_amount"> + Number of particles emitted in one emission cycle. </member> <member name="angle" type="float" setter="set_param" getter="get_param"> + Initial rotation applied to each particle, in degrees. </member> <member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's rotation will be animated along this [Curve]. </member> <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Rotation randomness ratio. Default value: [code]0[/code]. </member> <member name="angular_velocity" type="float" setter="set_param" getter="get_param"> + Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. </member> <member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's angular velocity will vary along this [Curve]. </member> <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Angular velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="anim_offset" type="float" setter="set_param" getter="get_param"> + Particle animation offset. </member> <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's animation offset will vary along this [Curve]. </member> <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Animation offset randomness ratio. Default value: [code]0[/code]. </member> <member name="anim_speed" type="float" setter="set_param" getter="get_param"> + Particle animation speed. </member> <member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's animation speed will vary along this [Curve]. </member> <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Animation speed randomness ratio. Default value: [code]0[/code]. </member> <member name="color" type="Color" setter="set_color" getter="get_color"> + Each particle's initial color. If [member texture] is defined, it will be multiplied by this color. </member> <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> + Each particle's color will vary along this [Gradient]. </member> <member name="damping" type="float" setter="set_param" getter="get_param"> + The rate at which particles lose velocity. </member> <member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Damping will vary along this [Curve]. </member> <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Damping randomness ratio. Default value: [code]0[/code]. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles2D.DrawOrder"> + Particle draw order. Uses [enum DrawOrder] values. Default value: [constant DRAW_ORDER_INDEX]. </member> <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors"> </member> @@ -68,122 +93,194 @@ <member name="emission_points" type="PoolVector2Array" setter="set_emission_points" getter="get_emission_points"> </member> <member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents"> + The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE]. </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles2D.EmissionShape"> + Particles will be emitted inside this region. Use [enum EmissionShape] for values. Default value: [constant EMISSION_SHAPE_POINT]. </member> <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius"> + The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE]. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> + If [code]true[/code], particles are being emitted. Default value: [code]true[/code]. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> + How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. Default value: [code]0[/code]. </member> <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> + The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. </member> <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag"> + Align y-axis of particle with the direction of its velocity. </member> <member name="flatness" type="float" setter="set_flatness" getter="get_flatness"> </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code] </member> <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity"> + Gravity applied to every particle. Default value: [code](0, 98)[/code]. </member> <member name="hue_variation" type="float" setter="set_param" getter="get_param"> + Initial hue variation applied to each particle. </member> <member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's hue will vary along this [Curve]. </member> <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Hue variation randomness ratio. Default value: [code]0[/code]. </member> <member name="initial_velocity" type="float" setter="set_param" getter="get_param"> + Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. </member> <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Initial velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> + Amount of time each particle will exist. Default value: [code]1[/code]. </member> <member name="linear_accel" type="float" setter="set_param" getter="get_param"> + Linear acceleration applied to each particle in the direction of motion. </member> <member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's linear acceleration will vary along this [Curve]. </member> <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Linear acceleration randomness ratio. Default value: [code]0[/code]. </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. </member> <member name="normalmap" type="Texture" setter="set_normalmap" getter="get_normalmap"> + Normal map to be used for the [member texture] property. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> + If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. + </member> + <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> + Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. + </member> + <member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's orbital velocity will vary along this [Curve]. + </member> + <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Orbital velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> + Particle system starts as if it had already run for this many seconds. </member> <member name="radial_accel" type="float" setter="set_param" getter="get_param"> + Radial acceleration applied to each particle. Makes particle accelerate away from origin. </member> <member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's radial acceleration will vary along this [Curve]. </member> <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Radial acceleration randomness ratio. Default value: [code]0[/code]. </member> <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio"> + Emission lifetime randomness ratio. Default value: [code]0[/code]. </member> <member name="scale_amount" type="float" setter="set_param" getter="get_param"> + Initial scale applied to each particle. </member> <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's scale will vary along this [Curve]. </member> <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Scale randomness ratio. Default value: [code]0[/code]. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> + Particle system's running speed scaling ratio. Default value: [code]1[/code]. A value of [code]0[/code] can be used to pause the particles. </member> <member name="spread" type="float" setter="set_spread" getter="get_spread"> + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. </member> <member name="tangential_accel" type="float" setter="set_param" getter="get_param"> + Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. </member> <member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + Each particle's tangential acceleration will vary along this [Curve]. </member> <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Tangential acceleration randomness ratio. Default value: [code]0[/code]. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + Particle texture. If [code]null[/code] particles will be squares. </member> </members> <constants> <constant name="DRAW_ORDER_INDEX" value="0" enum="DrawOrder"> + Particles are drawn in the order emitted. </constant> <constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder"> + Particles are drawn in order of remaining lifetime. </constant> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set initial velocity properties. </constant> <constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties. </constant> <constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital velocity properties. </constant> <constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties. </constant> <constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set radial acceleration properties. </constant> <constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set tangential acceleration properties. </constant> <constant name="PARAM_DAMPING" value="6" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set damping properties. </constant> <constant name="PARAM_ANGLE" value="7" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angle properties. </constant> <constant name="PARAM_SCALE" value="8" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties. </constant> <constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue variation properties. </constant> <constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties. </constant> <constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties. </constant> <constant name="PARAM_MAX" value="12" enum="Parameter"> + Represents the size of the [enum Parameter] enum. </constant> <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags"> + Use with [method set_flag] to set [member flag_align_y]. + </constant> + <constant name="FLAG_ROTATE_Y" value="1" enum="Flags"> + Present for consistency with 3D particle nodes, not used in 2D. + </constant> + <constant name="FLAG_DISABLE_Z" value="2" enum="Flags"> + Present for consistency with 3D particle nodes, not used in 2D. </constant> - <constant name="FLAG_MAX" value="1" enum="Flags"> + <constant name="FLAG_MAX" value="3" enum="Flags"> + Represents the size of the [enum Flags] enum. </constant> <constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape"> + All particles will be emitted from a single point. </constant> - <constant name="EMISSION_SHAPE_CIRCLE" value="1" enum="EmissionShape"> + <constant name="EMISSION_SHAPE_SPHERE" value="1" enum="EmissionShape"> + Particles will be emitted on the surface of a sphere flattened to two dimensions. </constant> <constant name="EMISSION_SHAPE_RECTANGLE" value="2" enum="EmissionShape"> + Particles will be emitted in the area of a rectangle. </constant> <constant name="EMISSION_SHAPE_POINTS" value="3" enum="EmissionShape"> + Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors]. </constant> <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> + Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. </constant> </constants> </class> diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml new file mode 100644 index 0000000000..7f353f7a05 --- /dev/null +++ b/doc/classes/CameraFeed.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CameraFeed" inherits="Reference" category="Core" version="3.2"> + <brief_description> + A camera feed gives you access to a single physical camera attached to your device. + </brief_description> + <description> + A camera feed gives you access to a single physical camera attached to your device. + When enabled Godot will start capturing frames from the camera which can then be used. Do note that many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_id" qualifiers="const"> + <return type="int"> + </return> + <description> + Get unique id for this feed + </description> + </method> + <method name="get_name" qualifiers="const"> + <return type="String"> + </return> + <description> + Get name of the camera + </description> + </method> + <method name="get_position" qualifiers="const"> + <return type="int" enum="CameraFeed.FeedPosition"> + </return> + <description> + Position of camera on the device. + </description> + </method> + </methods> + <members> + <member name="feed_is_active" type="bool" setter="set_active" getter="is_active"> + </member> + <member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform"> + </member> + </members> + <constants> + <constant name="FEED_NOIMAGE" value="0" enum="FeedDataType"> + No image set for the feed. + </constant> + <constant name="FEED_RGB" value="1" enum="FeedDataType"> + Feed supplies RGB images. + </constant> + <constant name="FEED_YCbCr" value="2" enum="FeedDataType"> + Feed supplies YCbCr images that need to be converted to RGB. + </constant> + <constant name="FEED_YCbCr_Sep" value="3" enum="FeedDataType"> + Feed supplies separate Y and CbCr images that need to be combined and converted to RGB. + </constant> + <constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition"> + Unspecified position. + </constant> + <constant name="FEED_FRONT" value="1" enum="FeedPosition"> + Camera is mounted at the front of the device. + </constant> + <constant name="FEED_BACK" value="2" enum="FeedPosition"> + Camera is moutned at the back of the device. + </constant> + </constants> +</class> diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml new file mode 100644 index 0000000000..f492bda74f --- /dev/null +++ b/doc/classes/CameraServer.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CameraServer" inherits="Object" category="Core" version="3.2"> + <brief_description> + Our camera server keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_feed"> + <return type="void"> + </return> + <argument index="0" name="feed" type="CameraFeed"> + </argument> + <description> + Adds a camera feed to the camera server. + </description> + </method> + <method name="feeds"> + <return type="Array"> + </return> + <description> + Returns an array of [CameraFeed]s. + </description> + </method> + <method name="get_feed"> + <return type="CameraFeed"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + Returns the [CameraFeed] with this id. + </description> + </method> + <method name="get_feed_count"> + <return type="int"> + </return> + <description> + Returns the number of [CameraFeed]s registered. + </description> + </method> + <method name="remove_feed"> + <return type="void"> + </return> + <argument index="0" name="feed" type="CameraFeed"> + </argument> + <description> + Removes a [CameraFeed]. + </description> + </method> + </methods> + <signals> + <signal name="camera_feed_added"> + <argument index="0" name="id" type="int"> + </argument> + <description> + Emitted when a [CameraFeed] is added (webcam is plugged in). + </description> + </signal> + <signal name="camera_feed_removed"> + <argument index="0" name="id" type="int"> + </argument> + <description> + Emitted when a [CameraFeed] is removed (webcam is removed). + </description> + </signal> + </signals> + <constants> + <constant name="FEED_RGBA_IMAGE" value="0" enum="FeedImage"> + The RGBA camera image. + </constant> + <constant name="FEED_YCbCr_IMAGE" value="0" enum="FeedImage"> + The YCbCr camera image. + </constant> + <constant name="FEED_Y_IMAGE" value="0" enum="FeedImage"> + The Y component camera image. + </constant> + <constant name="FEED_CbCr_IMAGE" value="1" enum="FeedImage"> + The CbCr component camera image. + </constant> + </constants> +</class> diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml new file mode 100644 index 0000000000..02f7f8bf58 --- /dev/null +++ b/doc/classes/CameraTexture.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CameraTexture" inherits="Texture" category="Core" version="3.2"> + <brief_description> + This texture gives access to the camera texture provided by a [CameraFeed]. Note that many cameras supply YCbCr images which need to be converted in a shader. + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id"> + Id of the [CameraFeed] for which we want to display the image. + </member> + <member name="camera_is_active" type="bool" setter="set_camera_active" getter="get_camera_active"> + Convenience property that gives access to the active property of the [CameraFeed]. + </member> + <member name="which_feed" type="int" setter="set_which_feed" getter="get_which_feed" enum="CameraServer.FeedImage"> + Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/ClippedCamera.xml b/doc/classes/ClippedCamera.xml index b7f158dd65..c6dcd6cd96 100644 --- a/doc/classes/ClippedCamera.xml +++ b/doc/classes/ClippedCamera.xml @@ -29,6 +29,12 @@ <description> </description> </method> + <method name="get_clip_offset" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> <method name="get_collision_mask_bit" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index ab5d7a0a5d..30e80fa512 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -144,7 +144,7 @@ <return type="Color"> </return> <description> - Returns the inverted color [code](1 - r, 1 - g, 1 - b, 1 - a)[/code]. + Returns the inverted color [code](1 - r, 1 - g, 1 - b, a)[/code]. [codeblock] var c = Color(0.3, 0.4, 0.9) var inverted_color = c.inverted() # a color of an RGBA(178, 153, 26, 255) diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 2a4ab4ce0d..eb94447529 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -57,6 +57,9 @@ <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed"> Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. </member> + <member name="background_camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id"> + The id of the camera feed to show in the background. + </member> <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer"> Maximum layer id (if using Layer background mode). </member> @@ -266,7 +269,10 @@ <constant name="BG_CANVAS" value="4" enum="BGMode"> Display a [CanvasLayer] in the background. </constant> - <constant name="BG_MAX" value="6" enum="BGMode"> + <constant name="BG_CAMERA_FEED" value="6" enum="BGMode"> + Display a camera feed in the background. + </constant> + <constant name="BG_MAX" value="7" enum="BGMode"> Helper constant keeping track of the enum's size, has no direct usage in API calls. </constant> <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="GlowBlendMode"> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 30da143f88..32fa628bbf 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -115,7 +115,7 @@ <return type="int" enum="Error"> </return> <description> - Returns the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@GlobalScope]. + Returns the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [enum @GlobalScope.Error]. </description> </method> <method name="get_float" qualifiers="const"> @@ -241,7 +241,7 @@ <argument index="2" name="compression_mode" type="int" enum="File.CompressionMode" default="0"> </argument> <description> - Opens a compressed file for reading or writing. Use COMPRESSION_* constants to set [code]compression_mode[/code]. + Opens a compressed file for reading or writing. Use [enum CompressionMode] constants to set [code]compression_mode[/code]. </description> </method> <method name="open_encrypted"> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 953f364bdb..908c017ac9 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -138,5 +138,7 @@ </theme_item> <theme_item name="reload" type="Texture"> </theme_item> + <theme_item name="toggle_hidden" type="Texture"> + </theme_item> </theme_items> </class> diff --git a/doc/classes/GDNativeLibraryResourceLoader.xml b/doc/classes/GDNativeLibraryResourceLoader.xml deleted file mode 100644 index 1b98fa3889..0000000000 --- a/doc/classes/GDNativeLibraryResourceLoader.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GDNativeLibraryResourceLoader" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/GDNativeLibraryResourceSaver.xml b/doc/classes/GDNativeLibraryResourceSaver.xml deleted file mode 100644 index 346d0d87d4..0000000000 --- a/doc/classes/GDNativeLibraryResourceSaver.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GDNativeLibraryResourceSaver" inherits="ResourceFormatSaver" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 8dfabdd884..75434b031e 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -361,7 +361,7 @@ <return type="void"> </return> <description> - Locks the data for writing access. + Locks the data for reading and writing access. Sends an error to the console if the image is not locked when reading or writing a pixel. </description> </method> <method name="normalmap_to_xy"> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index 86a1362230..53b1f74bd4 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -29,7 +29,7 @@ Key scancode, one of the [enum KeyList] constants. </member> <member name="unicode" type="int" setter="set_unicode" getter="get_unicode"> - Key unicode identifier when relevant. + Key unicode identifier when relevant. Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information. </member> </members> <constants> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index ba3a7fe6d8..d78c930351 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -46,7 +46,7 @@ <return type="void"> </return> <description> - Ensure selection is visible, adjusting the scroll position as necessary. + Ensure current selection is visible, adjusting the scroll position as necessary. </description> </method> <method name="get_item_at_position" qualifiers="const"> @@ -64,7 +64,7 @@ <return type="int"> </return> <description> - Returns count of items currently in the item list. + Returns the number of items currently in the list. </description> </method> <method name="get_item_custom_bg_color" qualifiers="const"> @@ -73,6 +73,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the custom background color of the item specified by [code]idx[/code] index. Default value is [code]Color(0, 0, 0, 0)[/code]. </description> </method> <method name="get_item_custom_fg_color" qualifiers="const"> @@ -81,6 +82,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the custom foreground color of the item specified by [code]idx[/code] index. Default value is [code]Color(0, 0, 0, 0)[/code]. </description> </method> <method name="get_item_icon" qualifiers="const"> @@ -89,6 +91,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the icon associated with the specified index. Default value is [code]null[/code] </description> </method> <method name="get_item_icon_modulate" qualifiers="const"> @@ -114,6 +117,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the metadata value of the specified index. </description> </method> <method name="get_item_text" qualifiers="const"> @@ -122,7 +126,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the text for specified item index. + Returns the text associated with the specified index. </description> </method> <method name="get_item_tooltip" qualifiers="const"> @@ -131,21 +135,21 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns tooltip hint for specified item index. + Returns the tooltip hint associated with the specified index. </description> </method> <method name="get_selected_items"> <return type="PoolIntArray"> </return> <description> - Returns the list of selected indexes. + Returns an array with the indexes of the selected items. </description> </method> <method name="get_v_scroll"> <return type="VScrollBar"> </return> <description> - Returns the current vertical scroll bar for the List. + Returns the [Object] ID associated with the list. </description> </method> <method name="is_anything_selected"> @@ -161,7 +165,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether or not the item at the specified index is disabled + Returns whether or not the item at the specified index is disabled. </description> </method> <method name="is_item_icon_transposed" qualifiers="const"> @@ -207,7 +211,7 @@ <argument index="1" name="to_idx" type="int"> </argument> <description> - Moves item at index [code]from_idx[/code] to [code]to_idx[/code]. + Moves item from index [code]from_idx[/code] to [code]to_idx[/code]. </description> </method> <method name="remove_item"> @@ -216,7 +220,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Remove item at specified index from the list. + Removes the item specified by [code]idx[/code] index from the list. </description> </method> <method name="select"> @@ -239,6 +243,11 @@ <argument index="1" name="custom_bg_color" type="Color"> </argument> <description> + Sets the background color of the item specified by [code]idx[/code] index to the specified [Color]. + [codeblock] + var some_string = "Some text" + some_string.set_item_custom_bg_color(0,Color(1, 0, 0, 1) # This will set the background color of the first item of the control to red. + [/codeblock] </description> </method> <method name="set_item_custom_fg_color"> @@ -249,6 +258,11 @@ <argument index="1" name="custom_fg_color" type="Color"> </argument> <description> + Sets the foreground color of the item specified by [code]idx[/code] index to the specified [Color]. + [codeblock] + var some_string = "Some text" + some_string.set_item_custom_fg_color(0,Color(1, 0, 0, 1) # This will set the foreground color of the first item of the control to red. + [/codeblock] </description> </method> <method name="set_item_disabled"> @@ -259,8 +273,8 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - Disable (or enable) item at specified index. - Disabled items are not be selectable and do not fire activation (Enter or double-click) signals. + Disable (or enable) item at the specified index. + Disabled items are not be selectable and do not trigger activation (Enter or double-click) signals. </description> </method> <method name="set_item_icon"> @@ -271,7 +285,7 @@ <argument index="1" name="icon" type="Texture"> </argument> <description> - Set (or replace) icon of the item at the specified index. + Set (or replace) the icon's [Texture] associated with the specified index. </description> </method> <method name="set_item_icon_modulate"> @@ -282,7 +296,7 @@ <argument index="1" name="modulate" type="Color"> </argument> <description> - Sets a modulating [Color] for item's icon at the specified index. + Sets a modulating [Color] of the item associated with the specified index. </description> </method> <method name="set_item_icon_region"> @@ -313,7 +327,7 @@ <argument index="1" name="metadata" type="Variant"> </argument> <description> - Sets a value (of any type) to be stored with the item at the specified index. + Sets a value (of any type) to be stored with the item associated with the specified index. </description> </method> <method name="set_item_selectable"> @@ -324,7 +338,7 @@ <argument index="1" name="selectable" type="bool"> </argument> <description> - Allow or disallow selection of the item at the specified index. + Allow or disallow selection of the item associated with the specified index. </description> </method> <method name="set_item_text"> @@ -335,7 +349,7 @@ <argument index="1" name="text" type="String"> </argument> <description> - Sets text of item at specified index. + Sets text of the item associated with the specified index. </description> </method> <method name="set_item_tooltip"> @@ -346,7 +360,7 @@ <argument index="1" name="tooltip" type="String"> </argument> <description> - Sets tooltip hint for item at specified index. + Sets tooltip hint for the item associated with the specified index. </description> </method> <method name="set_item_tooltip_enabled"> @@ -357,7 +371,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - Sets whether the tooltip is enabled for specified item index. + Sets whether the tooltip hint is enabled for specified item index. </description> </method> <method name="sort_items_by_text"> @@ -373,7 +387,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Ensure item at specified index is not selected. + Ensure the item associated with the specified index is not selected. </description> </method> <method name="unselect_all"> @@ -386,29 +400,38 @@ </methods> <members> <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect"> - If [code]true[/code], the currently selected item may be selected again. + If [code]true[/code], the currently selected item can be selected again. </member> <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select"> - If [code]true[/code], a right mouse button click can select items. + If [code]true[/code], right mouse button click can select items. </member> <member name="auto_height" type="bool" setter="set_auto_height" getter="has_auto_height"> + If [code]true[/code], the control will automatically resize the height to fit its content. </member> <member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width"> + Sets the default column width in pixels. + If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width. </member> <member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size"> + Sets the default icon size in pixels. </member> <member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" enum="ItemList.IconMode"> + Sets the default position of the icon to either [constant ICON_MODE_LEFT] or [constant ICON_MODE_TOP]. </member> <member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale"> + Sets the icon size to its initial size multiplied by the specified scale. Default value is 1.0. </member> <member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns"> + Sets the maximum columns the list will have. + If set to anything other than the default, the content will be split among the specified columns. </member> <member name="max_text_lines" type="int" setter="set_max_text_lines" getter="get_max_text_lines"> </member> <member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width"> + If set to [code]true[/code], all columns will have the same width specified by [member fixed_column_width]. </member> <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode"> - Allow single or multiple selection. See the [code]SELECT_*[/code] constants. + Allow single or multiple item selection. See the [enum SelectMode] constants. </member> </members> <signals> @@ -416,7 +439,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Fired when specified list item is activated via double click or Enter. + Triggered when specified list item is activated via double click or Enter. </description> </signal> <signal name="item_rmb_selected"> @@ -425,7 +448,7 @@ <argument index="1" name="at_position" type="Vector2"> </argument> <description> - Fired when specified list item has been selected via right mouse clicking. + Triggered when specified list item has been selected via right mouse clicking. The click position is also provided to allow appropriate popup of context menus at the correct location. [member allow_rmb_select] must be enabled. @@ -435,7 +458,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Fired when specified item has been selected. + Triggered when specified item has been selected. [member allow_reselect] must be enabled to reselect an item. </description> </signal> @@ -445,17 +468,20 @@ <argument index="1" name="selected" type="bool"> </argument> <description> - Fired when a multiple selection is altered on a list allowing multiple selection. + Triggered when a multiple selection is altered on a list allowing multiple selection. </description> </signal> <signal name="nothing_selected"> <description> + Triggered when a left mouse click is issued within the rect of the list but on empty space. </description> </signal> <signal name="rmb_clicked"> <argument index="0" name="at_position" type="Vector2"> </argument> <description> + Triggered when a right mouse click is issued within the rect of the list but on empty space. + [member allow_rmb_select] must be enabled. </description> </signal> </signals> diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml index c5c15e0ddc..f5868f51cb 100644 --- a/doc/classes/MeshInstance.xml +++ b/doc/classes/MeshInstance.xml @@ -43,6 +43,7 @@ <return type="int"> </return> <description> + Returns the number of surface materials. </description> </method> <method name="set_surface_material"> diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index d18ba96a95..4b38b9aa96 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="MeshInstance2D" inherits="Node2D" category="Core" version="3.2"> <brief_description> + Node used for displaying a [Mesh] in 2D. </brief_description> <description> + Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite] use tool in Toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D". </description> <tutorials> <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link> @@ -11,12 +13,21 @@ </methods> <members> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> + The [Mesh] that will be drawn by the [MeshInstance2D]. </member> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + The normal map that will be used if using the default [CanvasItemMaterial]. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. </member> </members> + <signals> + <signal name="texture_changed"> + <description> + </description> + </signal> + </signals> <constants> </constants> </class> diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml new file mode 100644 index 0000000000..8509986c3c --- /dev/null +++ b/doc/classes/MultiMeshInstance2D.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MultiMeshInstance2D" inherits="Node2D" category="Core" version="3.2"> + <brief_description> + Node that instances a [MultiMesh] in 2D. + </brief_description> + <description> + [MultiMeshInstance2D] is a specialized node to instance a [MultiMesh] resource in 2D. + Usage is the same as [MultiMeshInstance]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh"> + The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]. + </member> + <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + The normal map that will be used if using the default [CanvasItemMaterial]. + </member> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. + </member> + </members> + <signals> + <signal name="texture_changed"> + <description> + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml index 3690c1d682..f0ae3fef99 100644 --- a/doc/classes/Navigation.xml +++ b/doc/classes/Navigation.xml @@ -59,7 +59,7 @@ <argument index="2" name="optimize" type="bool" default="true"> </argument> <description> - Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (raidus, height, etc.) are considered in the path calculation, otherwise they are ignored. + Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored. </description> </method> <method name="navmesh_add"> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index dd0fcd63e7..7b50021284 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -221,14 +221,16 @@ <return type="Vector2"> </return> <description> - Returns IME selection range. + Returns IME cursor position (currently edited portion of the string) relative to the characters in the composition string. + [code]NOTIFICATION_OS_IME_UPDATE[/code] is sent to the application to notify it of changes to the IME cursor position. </description> </method> <method name="get_ime_text" qualifiers="const"> <return type="String"> </return> <description> - Returns IME intermediate text. + Returns IME intermediate composition string. + [code]NOTIFICATION_OS_IME_UPDATE[/code] is sent to the application to notify it of changes to the IME composition string. </description> </method> <method name="get_latin_keyboard_variant" qualifiers="const"> @@ -506,7 +508,8 @@ <argument index="0" name="tag_name" type="String"> </argument> <description> - Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on platform, build etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. See feature tags documentation. + Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on platform, build etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=https://docs.godotengine.org/en/latest/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details. + Note that tag names are case-sensitive. </description> </method> <method name="has_touchscreen_ui_hint" qualifiers="const"> @@ -710,6 +713,9 @@ </argument> <description> Sets whether IME input mode should be enabled. + If active IME handles key events before the application and creates an composition string and suggestion list. + Application can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions. + Completed composition string is committed when input is finished. </description> </method> <method name="set_ime_position"> @@ -805,6 +811,12 @@ <member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode"> If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. </member> + <member name="max_window_size" type="Vector2" setter="set_max_window_size" getter="get_max_window_size"> + The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value. + </member> + <member name="min_window_size" type="Vector2" setter="set_min_window_size" getter="get_min_window_size"> + The minimum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value. + </member> <member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation"> The current screen orientation. </member> @@ -813,6 +825,7 @@ </member> <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window"> If [code]true[/code], removes the window frame. + Note: Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency. </member> <member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen"> If [code]true[/code], the window is fullscreen. @@ -824,6 +837,9 @@ If [code]true[/code], the window is minimized. </member> <member name="window_per_pixel_transparency_enabled" type="bool" setter="set_window_per_pixel_transparency_enabled" getter="get_window_per_pixel_transparency_enabled"> + If [code]true[/code], the window background is transparent and window frame is removed. + Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering. + Note: This property has no effect if "Project > Project Settings > Display > Window > Per-pixel transparency > Allowed" setting is disabled. </member> <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position"> The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index 0023fce97d..a29b621406 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -15,13 +15,14 @@ <return type="AABB"> </return> <description> + Returns the bounding box that contains all the particles that are active in the current frame. </description> </method> <method name="restart"> <return type="void"> </return> <description> - Restarts the particle emmission, clearing existing particles. + Restarts the particle emission, clearing existing particles. </description> </method> </methods> @@ -54,8 +55,10 @@ Time ratio between each emission. If [code]0[/code] particles are emitted continuously. If [code]1[/code] all particles are emitted simultaneously. Default value: [code]0[/code]. </member> <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> + The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code]. </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> Amount of time each particle will exist. Default value: [code]1[/code]. diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index de4877b639..78114e985d 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -40,7 +40,7 @@ How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. Default value: [code]0[/code]. </member> <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> - The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. + The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code] @@ -52,7 +52,7 @@ If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. </member> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> - Normal map to be used for the [code]texture[/code] property. + Normal map to be used for the [member texture] property. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index dd7a7cd151..cb06593bc2 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -100,7 +100,7 @@ Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. Default [code]0[/code]. </member> <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity"> - Gravity applied to every particle. Default value: [code](0, 98, 0)[/code]. + Gravity applied to every particle. Default value: [code](0, -9.8, 0)[/code]. </member> <member name="hue_variation" type="float" setter="set_param" getter="get_param"> Initial hue variation applied to each particle. @@ -112,13 +112,13 @@ Hue variation randomness ratio. Default value: [code]0[/code]. </member> <member name="initial_velocity" type="float" setter="set_param" getter="get_param"> - Initial velocity magnitude for each particle. Direction comes from [member spread]. + Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. </member> <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> Initial velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="linear_accel" type="float" setter="set_param" getter="get_param"> - Linear acceleration applied to each particle. Acceleration increases velocity magnitude each frame without affecting direction. + Linear acceleration applied to each particle in the direction of motion. </member> <member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> Each particle's linear acceleration will vary along this [CurveTexture]. @@ -184,7 +184,7 @@ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties. </constant> <constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital_velocity properties. + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital velocity properties. </constant> <constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter"> Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties. @@ -205,7 +205,7 @@ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties. </constant> <constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue_variation properties. + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue variation properties. </constant> <constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter"> Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties. diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index c9c3643edb..2214357308 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -4,7 +4,7 @@ Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. </brief_description> <description> - Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. + Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [CapsuleMesh], [CubeMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], [QuadMesh], and [SphereMesh]. </description> <tutorials> </tutorials> @@ -13,13 +13,16 @@ <return type="Array"> </return> <description> + Returns mesh arrays used to constitute surface of [Mesh]. Mesh array can be used with [ArrayMesh] to create new surface. </description> </method> </methods> <members> <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb"> + Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices. </member> <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces"> + If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. Result is the same as using *CULL_BACK* in [SpatialMaterial]. Default is false. </member> <member name="material" type="Material" setter="set_material" getter="get_material"> The current [Material] of the primitive mesh. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 5bcd39a8d6..316f948778 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -173,6 +173,9 @@ <member name="application/boot_splash/image" type="String" setter="" getter=""> Path to an image used as the boot splash. </member> + <member name="application/boot_splash/use_filter" type="bool" setter="" getter=""> + If [code]true[/code], applies linear filtering when scaling the image (recommended for high resolution artwork). If [code]false[/code], uses nearest-neighbor interpolation (recommended for pixel art). + </member> <member name="application/config/custom_user_dir_name" type="String" setter="" getter=""> This user directory is used for storing persistent data ([code]user://[/code] filesystem). If left empty, [code]user://[/code] resolves to a project-specific folder in Godot's own configuration folder (see [method OS.get_user_data_dir]). If a custom directory name is defined, this name will be used instead and appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in [method OS.get_user_data_dir]). The [member application/config/use_custom_user_dir] setting must be enabled for this to take effect. @@ -374,11 +377,10 @@ Default orientation on mobile devices. </member> <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter=""> - If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance if not needed, so leave it on [code]false[/code] unless you need it. + If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance, so leave it on [code]false[/code] unless you need it. </member> <member name="display/window/per_pixel_transparency/enabled" type="bool" setter="" getter=""> - </member> - <member name="display/window/per_pixel_transparency/splash" type="bool" setter="" getter=""> + Set the window background to transparent when it starts. </member> <member name="display/window/size/always_on_top" type="bool" setter="" getter=""> Force the window to be always on top. @@ -723,7 +725,7 @@ Shaders have a time variable that constantly increases. At some point, it needs to be rolled back to zero to avoid precision errors on shader animations. This setting specifies when (in seconds). </member> <member name="rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround" type="bool" setter="" getter=""> - Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913][/url] for details. + Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913]GitHub issue 9913[/url] for details. If [code]true[/code], this option enables a "safe" code path for such NVIDIA GPUs at the cost of performance. This option only impacts the GLES2 rendering backend (so the bug stays if you use GLES3), and only desktop platforms. </member> <member name="rendering/quality/2d/use_pixel_snap" type="bool" setter="" getter=""> diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml index 779ce11180..cf7e56f895 100644 --- a/doc/classes/QuadMesh.xml +++ b/doc/classes/QuadMesh.xml @@ -12,6 +12,7 @@ </methods> <members> <member name="size" type="Vector2" setter="set_size" getter="get_size"> + Size in the X and Y axes. Default is [code]Vector2(1, 1)[/code]. </member> </members> <constants> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 211bda1a09..acd608de6a 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -4,7 +4,7 @@ Base class for all resources. </brief_description> <description> - Resource is the base class for all resource types, serving primarily as data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. + Resource is the base class for all Godot-specific resource types, serving primarily as data containers. They are reference counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/resources.html</link> @@ -14,6 +14,7 @@ <return type="void"> </return> <description> + Virtual function which can be overridden to customize the behavior value of [method setup_local_to_scene]. </description> </method> <method name="duplicate" qualifiers="const"> @@ -29,6 +30,7 @@ <return type="Node"> </return> <description> + If [member resource_local_to_scene] is enabled and the resource was loaded from a [PackedScene] instantiation, returns the local scene where this resource's unique copy is in use. Otherwise, returns [code]null[/code]. </description> </method> <method name="get_rid" qualifiers="const"> @@ -42,6 +44,8 @@ <return type="void"> </return> <description> + This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by overriding [method _setup_local_to_scene] from script. + For most resources, this method performs no base logic. [ViewportTexture] performs custom logic to properly set the proxy texture and flags in the local viewport. </description> </method> <method name="take_over_path"> @@ -50,12 +54,13 @@ <argument index="0" name="path" type="String"> </argument> <description> - Sets the path of the resource. Differs from [code]set_path()[/code], if another [Resource] exists with "path" it over-takes it, instead of failing. + Sets the path of the resource, potentially overriding an existing cache entry for this path. This differs from setting [member resource_path], as the latter would error out if another resource was already cached for the given path. </description> </method> </methods> <members> <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene"> + If [code]true[/code], the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene. </member> <member name="resource_name" type="String" setter="set_name" getter="get_name"> The name of the resource. This is an optional identifier. diff --git a/doc/classes/ResourceFormatDDS.xml b/doc/classes/ResourceFormatDDS.xml deleted file mode 100644 index 9717052a5d..0000000000 --- a/doc/classes/ResourceFormatDDS.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatDDS" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatImporter.xml b/doc/classes/ResourceFormatImporter.xml deleted file mode 100644 index e5c84e6db4..0000000000 --- a/doc/classes/ResourceFormatImporter.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatImporter" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index 925706b50c..f62191413a 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -4,9 +4,9 @@ Loads a specific resource type from a file. </brief_description> <description> - Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They get queried when you call [code]load[/code], or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoader are registered in the engine. - Extending this class allows you to define your own. You should give it a global class name with [code]class_name[/code] for it to be registered. You may as well implement a [ResourceFormatSaver]. - Note: You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. Example: it's better to import .PNG textures as .STEX first, so they can be loaded with better efficiency on the graphics card. + Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the [ResourceLoader] singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine. + Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with [code]class_name[/code] for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a [ResourceFormatSaver]. + Note: You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture]) first, so they can be loaded with better efficiency on the graphics card. </description> <tutorials> </tutorials> @@ -19,7 +19,7 @@ <argument index="1" name="add_types" type="String"> </argument> <description> - If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]Resource[/code] for them. + If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. </description> </method> <method name="get_recognized_extensions" qualifiers="virtual"> @@ -55,7 +55,7 @@ <argument index="1" name="original_path" type="String"> </argument> <description> - Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a resource object if succeeded, or an [code]ERR_*[/code] constant listed in [@GlobalScope] if it failed. + Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a [Resource] object on success, or an [enum @GlobalScope.Error] constant in case of failure. </description> </method> <method name="rename_dependencies" qualifiers="virtual"> @@ -66,7 +66,8 @@ <argument index="1" name="renames" type="String"> </argument> <description> - If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String => String }[/code] mapping old dependency paths to new paths. Returns [code]OK[/code] on success, or an [code]ERR_*[/code] constant listed in [@GlobalScope] in case of failure. + If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String => String }[/code] mapping old dependency paths to new paths. + Returns [constant @GlobalScope.OK] on success, or an [enum @GlobalScope.Error] constant in case of failure. </description> </method> </methods> diff --git a/doc/classes/ResourceFormatLoaderBMFont.xml b/doc/classes/ResourceFormatLoaderBMFont.xml deleted file mode 100644 index f5b26a6ff7..0000000000 --- a/doc/classes/ResourceFormatLoaderBMFont.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderBMFont" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderBinary.xml b/doc/classes/ResourceFormatLoaderBinary.xml deleted file mode 100644 index cf4a2373dc..0000000000 --- a/doc/classes/ResourceFormatLoaderBinary.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderBinary" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderDynamicFont.xml b/doc/classes/ResourceFormatLoaderDynamicFont.xml deleted file mode 100644 index af06ea0d8d..0000000000 --- a/doc/classes/ResourceFormatLoaderDynamicFont.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderDynamicFont" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderGDScript.xml b/doc/classes/ResourceFormatLoaderGDScript.xml deleted file mode 100644 index 5bb9127978..0000000000 --- a/doc/classes/ResourceFormatLoaderGDScript.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderGDScript" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderImage.xml b/doc/classes/ResourceFormatLoaderImage.xml deleted file mode 100644 index de53d2c076..0000000000 --- a/doc/classes/ResourceFormatLoaderImage.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderImage" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderNativeScript.xml b/doc/classes/ResourceFormatLoaderNativeScript.xml deleted file mode 100644 index 7355f702b9..0000000000 --- a/doc/classes/ResourceFormatLoaderNativeScript.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderNativeScript" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderShader.xml b/doc/classes/ResourceFormatLoaderShader.xml deleted file mode 100644 index 1bef7485fb..0000000000 --- a/doc/classes/ResourceFormatLoaderShader.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderShader" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderStreamTexture.xml b/doc/classes/ResourceFormatLoaderStreamTexture.xml deleted file mode 100644 index 4bdc74acbc..0000000000 --- a/doc/classes/ResourceFormatLoaderStreamTexture.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderStreamTexture" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderText.xml b/doc/classes/ResourceFormatLoaderText.xml deleted file mode 100644 index 92ad3179bf..0000000000 --- a/doc/classes/ResourceFormatLoaderText.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderText" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderTextureLayered.xml b/doc/classes/ResourceFormatLoaderTextureLayered.xml deleted file mode 100644 index 69c3eedf63..0000000000 --- a/doc/classes/ResourceFormatLoaderTextureLayered.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderTextureLayered" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderTheora.xml b/doc/classes/ResourceFormatLoaderTheora.xml deleted file mode 100644 index 1b5e30f09c..0000000000 --- a/doc/classes/ResourceFormatLoaderTheora.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderTheora" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatLoaderWebm.xml b/doc/classes/ResourceFormatLoaderWebm.xml deleted file mode 100644 index a45e5d488d..0000000000 --- a/doc/classes/ResourceFormatLoaderWebm.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderWebm" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatPKM.xml b/doc/classes/ResourceFormatPKM.xml deleted file mode 100644 index 6c442cd934..0000000000 --- a/doc/classes/ResourceFormatPKM.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatPKM" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatPVR.xml b/doc/classes/ResourceFormatPVR.xml deleted file mode 100644 index d82f48f207..0000000000 --- a/doc/classes/ResourceFormatPVR.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatPVR" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index caa05dce26..c40f614aa2 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -4,8 +4,8 @@ Saves a specific resource type to a file. </brief_description> <description> - The engine can save resources when you do it from the editor, or when you call [method ResourceSaver.save]. This is accomplished with multiple [ResourceFormatSaver]s, each handling its own format. - By default, Godot saves resources as [code].tres[/code], [code].res[/code] or another built-in format, but you can choose to create your own format by extending this class. You should give it a global class name with [code]class_name[/code] for it to be registered. You may as well implement a [ResourceFormatLoader]. + The engine can save resources when you do it from the editor, or when you use the [ResourceSaver] singleton. This is accomplished thanks to multiple [ResourceFormatSaver]s, each handling its own format and called automatically by the engine. + By default, Godot saves resources as [code].tres[/code] (text-based), [code].res[/code] (binary) or another built-in format, but you can choose to create your own format by extending this class. Be sure to respect the documented return types and values. You should give it a global class name with [code]class_name[/code] for it to be registered. Like built-in ResourceFormatSavers, it will be called automatically when saving resources of its recognized type(s). You may also implement a [ResourceFormatLoader]. </description> <tutorials> </tutorials> @@ -16,7 +16,7 @@ <argument index="0" name="resource" type="Resource"> </argument> <description> - Gets the list of extensions for files this saver is able to write. + Returns the list of extensions available for saving the resource object, provided it is recognized (see [method recognize]). </description> </method> <method name="recognize" qualifiers="virtual"> @@ -25,7 +25,7 @@ <argument index="0" name="resource" type="Resource"> </argument> <description> - Returns [code]true[/code] if the given resource object can be saved by this saver. + Returns whether the given resource object can be saved by this saver. </description> </method> <method name="save" qualifiers="virtual"> @@ -38,7 +38,8 @@ <argument index="2" name="flags" type="int"> </argument> <description> - Saves the given resource object to a file. [code]flags[/code] is a bitmask composed with [code]FLAG_*[/code] constants defined in [ResourceSaver]. Returns [code]OK[/code] on success, or an [code]ERR_*[/code] constant listed in [@GlobalScope] if it failed. + Saves the given resource object to a file at the target [code]path[/code]. [code]flags[/code] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants. + Returns [constant @GlobalScope.OK] on success, or an [enum @GlobalScope.Error] constant in case of failure. </description> </method> </methods> diff --git a/doc/classes/ResourceFormatSaverBinary.xml b/doc/classes/ResourceFormatSaverBinary.xml deleted file mode 100644 index 32c286d0d9..0000000000 --- a/doc/classes/ResourceFormatSaverBinary.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatSaverBinary" inherits="ResourceFormatSaver" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatSaverGDScript.xml b/doc/classes/ResourceFormatSaverGDScript.xml deleted file mode 100644 index 0fe65e28b0..0000000000 --- a/doc/classes/ResourceFormatSaverGDScript.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatSaverGDScript" inherits="ResourceFormatSaver" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatSaverNativeScript.xml b/doc/classes/ResourceFormatSaverNativeScript.xml deleted file mode 100644 index 7a699a2cca..0000000000 --- a/doc/classes/ResourceFormatSaverNativeScript.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatSaverNativeScript" inherits="ResourceFormatSaver" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatSaverShader.xml b/doc/classes/ResourceFormatSaverShader.xml deleted file mode 100644 index 65ddee42fd..0000000000 --- a/doc/classes/ResourceFormatSaverShader.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatSaverShader" inherits="ResourceFormatSaver" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceFormatSaverText.xml b/doc/classes/ResourceFormatSaverText.xml deleted file mode 100644 index 921de81031..0000000000 --- a/doc/classes/ResourceFormatSaverText.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatSaverText" inherits="ResourceFormatSaver" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml deleted file mode 100644 index e0c0aa9a47..0000000000 --- a/doc/classes/ResourceImporter.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceImporter" inherits="Reference" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml index bb9826999c..9d5a52deb2 100644 --- a/doc/classes/ResourceInteractiveLoader.xml +++ b/doc/classes/ResourceInteractiveLoader.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ResourceInteractiveLoader" inherits="Reference" category="Core" version="3.2"> <brief_description> - Interactive Resource Loader. + Interactive [Resource] loader. </brief_description> <description> - Interactive Resource Loader. This object is returned by ResourceLoader when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying load bars/percentages. + Interactive [Resource] loader. This object is returned by [ResourceLoader] when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying loading bars/percentages. </description> <tutorials> </tutorials> @@ -13,14 +13,14 @@ <return type="Resource"> </return> <description> - Returns the loaded resource (only if loaded). Otherwise, returns null. + Returns the loaded resource if the load operation completed successfully, [code]null[/code] otherwise. </description> </method> <method name="get_stage" qualifiers="const"> <return type="int"> </return> <description> - Returns the load stage. The total amount of stages can be queried with [method get_stage_count] + Returns the load stage. The total amount of stages can be queried with [method get_stage_count]. </description> </method> <method name="get_stage_count" qualifiers="const"> @@ -34,13 +34,19 @@ <return type="int" enum="Error"> </return> <description> - Poll the load. If OK is returned, this means poll will have to be called again. If ERR_FILE_EOF is returned, them the load has finished and the resource can be obtained by calling [method get_resource]. + Polls the loading operation, i.e. loads a data chunk up to the next stage. + Returns [constant @GlobalScope.OK] if the poll is successful but the load operation has not finished yet (intermediate stage). This means [method poll] will have to be called again until the last stage is completed. + Returns [constant @GlobalScope.ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource]. + Returns another [enum @GlobalScope.Error] code if the poll has failed. </description> </method> <method name="wait"> <return type="int" enum="Error"> </return> <description> + Polls the loading operation successively until the resource is completely loaded or a [method poll] fails. + Returns [constant @GlobalScope.ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource]. + Returns another [enum @GlobalScope.Error] code if a poll has failed, aborting the operation. </description> </method> </methods> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 76b7c39191..558852704e 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ResourceLoader" inherits="Object" category="Core" version="3.2"> <brief_description> - Resource Loader. + Singleton used to load resource files. </brief_description> <description> - Resource Loader. This is a static object accessible as [ResourceLoader]. GDScript has a simplified load() function, though. + Singleton used to load resource files from the filesystem. + It uses the many [ResourceFormatLoader] classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine. + GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios. </description> <tutorials> </tutorials> @@ -17,6 +19,8 @@ <argument index="1" name="type_hint" type="String" default=""""> </argument> <description> + Returns whether a recognized resource exists for the given [code]path[/code]. + An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. </description> </method> <method name="get_dependencies"> @@ -25,6 +29,7 @@ <argument index="0" name="path" type="String"> </argument> <description> + Returns the dependencies for the resource at the given [code]path[/code]. </description> </method> <method name="get_recognized_extensions_for_type"> @@ -42,6 +47,7 @@ <argument index="0" name="path" type="String"> </argument> <description> + Deprecated method. Use [method has_cached] or [method exists] instead. </description> </method> <method name="has_cached"> @@ -50,6 +56,8 @@ <argument index="0" name="path" type="String"> </argument> <description> + Returns whether a cached resource is available for the given [code]path[/code]. + Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] or [method load_interactive] methods will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path. </description> </method> <method name="load"> @@ -62,6 +70,11 @@ <argument index="2" name="no_cache" type="bool" default="false"> </argument> <description> + Loads a resource at the given [code]path[/code], caching the result for further access. + The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted. + An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. + If [code]no_cache[/code] is [code]true[/code], the resource cache will be bypassed and the resource will be loaded anew. Otherwise, the cached resource will be returned if it exists. + Returns an empty resource if no ResourceFormatLoader could handle the file. </description> </method> <method name="load_interactive"> @@ -72,7 +85,8 @@ <argument index="1" name="type_hint" type="String" default=""""> </argument> <description> - Load a resource interactively, the returned object allows to load with high granularity. + Starts loading a resource interactively. The returned [ResourceInteractiveLoader] object allows to load with high granularity, calling its [method ResourceInteractiveLoader.poll] method successively to load chunks. + An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. </description> </method> <method name="set_abort_on_missing_resources"> diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml index d6c635b6eb..2b00c038e1 100644 --- a/doc/classes/ResourcePreloader.xml +++ b/doc/classes/ResourcePreloader.xml @@ -5,6 +5,7 @@ </brief_description> <description> This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. + GDScript has a simplified [method @GDScript.preload] built-in method which can be used in most situations, leaving the use of [ResourcePreloader] for more advanced scenarios. </description> <tutorials> </tutorials> diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index eac022f564..778ba4293f 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ResourceSaver" inherits="Object" category="Core" version="3.2"> <brief_description> - Resource saving interface. + Singleton for saving Godot-specific resource types. </brief_description> <description> - Resource saving interface, used for saving resources to disk. + Singleton for saving Godot-specific resource types to the filesystem. + It uses the many [ResourceFormatSaver] classes registered in the engine (either built-in or from a plugin) to save engine-specific resource data to text-based (e.g. [code].tres[/code] or [code].tscn[/code]) or binary files (e.g. [code].res[/code] or [code].scn[/code]). </description> <tutorials> </tutorials> @@ -28,24 +29,33 @@ <argument index="2" name="flags" type="int" enum="ResourceSaver.SaverFlags" default="0"> </argument> <description> - Saves a resource to disk. + Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object. + The [code]flags[/code] bitmask can be specified to customize the save behavior. + Returns [constant @GlobalScope.OK] on success. </description> </method> </methods> <constants> <constant name="FLAG_RELATIVE_PATHS" value="1" enum="SaverFlags"> + Save the resource with a path relative to the scene which uses it. </constant> <constant name="FLAG_BUNDLE_RESOURCES" value="2" enum="SaverFlags"> + Bundles external resources. </constant> <constant name="FLAG_CHANGE_PATH" value="4" enum="SaverFlags"> + Change the [member Resource.resource_path] of the saved resource to match its new location. </constant> <constant name="FLAG_OMIT_EDITOR_PROPERTIES" value="8" enum="SaverFlags"> + Do not save editor-specific metadata (identified by their [code]__editor[/code] prefix). </constant> <constant name="FLAG_SAVE_BIG_ENDIAN" value="16" enum="SaverFlags"> + Save as big endian (see [member File.endian_swap]). </constant> <constant name="FLAG_COMPRESS" value="32" enum="SaverFlags"> + Compress the resource on save using [constant File.COMPRESSION_ZSTD]. Only available for binary resource types. </constant> <constant name="FLAG_REPLACE_SUBRESOURCE_PATHS" value="64" enum="SaverFlags"> + Take over the paths of the saved subresources (see [method Resource.take_over_path]). </constant> </constants> </class> diff --git a/doc/classes/ResourceSaverPNG.xml b/doc/classes/ResourceSaverPNG.xml deleted file mode 100644 index 5ed4829f25..0000000000 --- a/doc/classes/ResourceSaverPNG.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceSaverPNG" inherits="ResourceFormatSaver" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml index 26ff67cc74..097a5f2ed2 100644 --- a/doc/classes/Sprite.xml +++ b/doc/classes/Sprite.xml @@ -28,6 +28,8 @@ <argument index="0" name="pos" type="Vector2"> </argument> <description> + Returns [code]true[/code], if the pixel at the given position is opaque and [code]false[/code] in other case. + Note: It also returns [code]false[/code], if the sprite's texture is null or if the given position is invalid. </description> </method> </methods> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index a5a8766ca0..af7e5a395a 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -662,16 +662,17 @@ <method name="rsplit"> <return type="PoolStringArray"> </return> - <argument index="0" name="divisor" type="String"> + <argument index="0" name="delimiter" type="String"> </argument> <argument index="1" name="allow_empty" type="bool" default="True"> </argument> <argument index="2" name="maxsplit" type="int" default="0"> </argument> <description> - Splits the string by a [code]divisor[/code] string and returns an array of the substrings, starting from right. - [b]Example:[/b] [code]"One,Two,Three"[/code] will return [code]["One","Two","Three"][/code] if split by [code]","[/code]. - If [code]maxsplit[/code] is specified, then it is number of splits to do, default is 0 which splits all the items. + Splits the string by a [code]delimiter[/code] string and returns an array of the substrings, starting from right. + The splits in the returned array are sorted in the same order as the original string, from left to right. + If [code]maxsplit[/code] is specified, it defines the number of splits to do from the right up to [code]maxsplit[/code]. The default value of 0 means that all items are split, thus giving the same result as [method split]. + [b]Example:[/b] [code]"One,Two,Three,Four"[/code] will return [code]["Three","Four"][/code] if split by [code]","[/code] with [code]maxsplit[/code] of 2. </description> </method> <method name="rstrip"> @@ -709,27 +710,27 @@ <method name="split"> <return type="PoolStringArray"> </return> - <argument index="0" name="divisor" type="String"> + <argument index="0" name="delimiter" type="String"> </argument> <argument index="1" name="allow_empty" type="bool" default="True"> </argument> <argument index="2" name="maxsplit" type="int" default="0"> </argument> <description> - Splits the string by a divisor string and returns an array of the substrings. - [b]Example:[/b] [code]"One,Two,Three"[/code] will return [code]["One","Two","Three"][/code] if split by [code]","[/code]. - If [code]maxsplit[/code] is given, at most maxsplit number of splits occur, and the remainder of the string is returned as the final element of the list (thus, the list will have at most maxsplit+1 elements) + Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. + If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of 0 means that all items are split. + [b]Example:[/b] [code]"One,Two,Three"[/code] will return [code]["One","Two"][/code] if split by [code]","[/code] with [code]maxsplit[/code] of 2. </description> </method> <method name="split_floats"> <return type="PoolRealArray"> </return> - <argument index="0" name="divisor" type="String"> + <argument index="0" name="delimiter" type="String"> </argument> <argument index="1" name="allow_empty" type="bool" default="True"> </argument> <description> - Splits the string in floats by using a divisor string and returns an array of the substrings. + Splits the string in floats by using a delimiter string and returns an array of the substrings. [b]Example:[/b] [code]"1,2.5,3"[/code] will return [code][1,2.5,3][/code] if split by [code]","[/code]. </description> </method> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 62e8a2c34f..8139da3a4c 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -32,7 +32,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Add a keyword and its color. + Add a [code]keyword[/code] and its [Color]. </description> </method> <method name="can_fold" qualifiers="const"> @@ -48,21 +48,21 @@ <return type="void"> </return> <description> - Clear all the syntax coloring information. + Clears all the syntax coloring information. </description> </method> <method name="clear_undo_history"> <return type="void"> </return> <description> - Clear the undo history. + Clears the undo history. </description> </method> <method name="copy"> <return type="void"> </return> <description> - Copy the current selection. + Copy's the current text selection. </description> </method> <method name="cursor_get_column" qualifiers="const"> @@ -87,6 +87,8 @@ <argument index="1" name="adjust_viewport" type="bool" default="true"> </argument> <description> + Moves the cursor at the specified [code]column[/code] index. + If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. Default value is [code]true[/code]. </description> </method> <method name="cursor_set_line"> @@ -101,20 +103,23 @@ <argument index="3" name="wrap_index" type="int" default="0"> </argument> <description> + Moves the cursor at the specified [code]line[/code] index. + If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. Default value is [code]true[/code]. + If [code]can_be_hidden[/code] is set to true, the specified [code]line[/code] can be hidden using [method set_line_as_hidden]. Default value is [code]true[/code]. </description> </method> <method name="cut"> <return type="void"> </return> <description> - Cut the current selection. + Cut's the current selection. </description> </method> <method name="deselect"> <return type="void"> </return> <description> - Clears the current selection. + Deselects the current selection. </description> </method> <method name="fold_all_lines"> @@ -146,6 +151,7 @@ <argument index="0" name="keyword" type="String"> </argument> <description> + Returns the [Color] of the specified [code]keyword[/code]. </description> </method> <method name="get_line" qualifiers="const"> @@ -210,6 +216,7 @@ <return type="String"> </return> <description> + Returns a [String] text with the word under the mouse cursor location. </description> </method> <method name="has_keyword_color" qualifiers="const"> @@ -218,6 +225,7 @@ <argument index="0" name="keyword" type="String"> </argument> <description> + Returns whether the specified [code]keyword[/code] has a color set to it or not. </description> </method> <method name="insert_text_at_cursor"> @@ -226,7 +234,7 @@ <argument index="0" name="text" type="String"> </argument> <description> - Insert a given text at the cursor position. + Insert the specified text at the cursor position. </description> </method> <method name="is_folded" qualifiers="const"> @@ -235,7 +243,7 @@ <argument index="0" name="line" type="int"> </argument> <description> - Returns if the given line is folded. + Returns whether the line at the specified index is folded or not. </description> </method> <method name="is_line_hidden" qualifiers="const"> @@ -244,6 +252,7 @@ <argument index="0" name="line" type="int"> </argument> <description> + Returns whether the line at the specified index is hidden or not. </description> </method> <method name="is_selection_active" qualifiers="const"> @@ -259,6 +268,7 @@ <argument index="0" name="option" type="int"> </argument> <description> + Triggers a right click menu action by the specified index. See [enum MenuItems] for a list of available indexes. </description> </method> <method name="paste"> @@ -327,6 +337,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], hides the line of the specified index. </description> </method> <method name="toggle_fold_line"> @@ -358,6 +369,7 @@ <return type="void"> </return> <description> + Unhide all lines that were previously set to hidden by [method set_line_as_hidden]. </description> </method> </methods> @@ -391,9 +403,11 @@ <member name="fold_gutter" type="bool" setter="set_draw_fold_gutter" getter="is_drawing_fold_gutter"> If [code]true[/code], the fold gutter is visible. This enables folding groups of indented lines. </member> - <member name="hiding_enabled" type="int" setter="set_hiding_enabled" getter="is_hiding_enabled"> + <member name="hiding_enabled" type="bool" setter="set_hiding_enabled" getter="is_hiding_enabled"> + If [code]true[/code], all lines that have been set to hidden by [method set_line_as_hidden], will not be visible. </member> <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled"> + If [code]true[/code], all occurrences of the selected text will be highlighted. </member> <member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled"> If [code]true[/code], the line containing the cursor is highlighted. @@ -407,8 +421,10 @@ If [code]true[/code], line numbers are displayed to the left of the text. </member> <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled"> + If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling. </member> <member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled"> + If [code]true[/code], any custom color properties that have been set for this [TextEdit] will be visible. </member> <member name="text" type="String" setter="set_text" getter="get_text"> String value of the [TextEdit]. @@ -439,6 +455,7 @@ <argument index="1" name="info" type="String"> </argument> <description> + Emitted when the info icon is clicked. </description> </signal> <signal name="request_completion"> @@ -490,8 +507,10 @@ Undoes the previous action. </constant> <constant name="MENU_REDO" value="6" enum="MenuItems"> + Redoes the previous action. </constant> <constant name="MENU_MAX" value="7" enum="MenuItems"> + Represents the size of the [enum MenuItems] enum. </constant> </constants> <theme_items> diff --git a/doc/classes/TranslationLoaderPO.xml b/doc/classes/TranslationLoaderPO.xml deleted file mode 100644 index d9896e1807..0000000000 --- a/doc/classes/TranslationLoaderPO.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="TranslationLoaderPO" inherits="ResourceFormatLoader" category="Core" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 400a6e31d5..268fb5b6a5 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -31,6 +31,7 @@ <return type="Array"> </return> <description> + Returns an Array of all loaded locales of the game. </description> </method> <method name="get_locale" qualifiers="const"> diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml index 9600a1d196..2125aa5e17 100644 --- a/doc/classes/TriangleMesh.xml +++ b/doc/classes/TriangleMesh.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TriangleMesh" inherits="Reference" category="Core" version="3.2"> <brief_description> + Internal mesh type. </brief_description> <description> + Mesh type used internally for collision calculations. </description> <tutorials> </tutorials> diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml index c3b668c170..0bc0e351e4 100644 --- a/doc/classes/VehicleWheel.xml +++ b/doc/classes/VehicleWheel.xml @@ -19,7 +19,7 @@ <return type="float"> </return> <description> - Returns a value between 0.0 and 1.0 that indicates whether this wheel is skidding. 0.0 is not skidding, 1.0 means the wheel has lost grip. + Returns a value between 0.0 and 1.0 that indicates whether this wheel is skidding. 0.0 is skidding (the wheel has lost grip, e.g. icy terrain), 1.0 means not skidding (the wheel has full grip, e.g. dry asphalt road). </description> </method> <method name="is_in_contact" qualifiers="const"> diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 3997798cca..f9b668b38a 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -3157,8 +3157,10 @@ </argument> <argument index="2" name="scale" type="bool"> </argument> + <argument index="3" name="use_filter" type="bool" default="true"> + </argument> <description> - Sets a boot image. The color defines the background color and if scale is [code]true[/code] the image will be scaled to fit the screen size. + Sets a boot image. The color defines the background color. If [code]scale[/code] is [code]true[/code], the image will be scaled to fit the screen size. If [code]use_filter[/code] is [code]true[/code], the image will be scaled with linear interpolation. If [code]use_filter[/code] is [code]false[/code], the image will be scaled with nearest-neighbor interpolation. </description> </method> <method name="set_debug_generate_wireframes"> @@ -3359,6 +3361,17 @@ <description> </description> </method> + <method name="texture_bind"> + <return type="void"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <argument index="1" name="number" type="int"> + </argument> + <description> + Binds the texture to a texture slot. + </description> + </method> <method name="texture_create"> <return type="RID"> </return> @@ -4427,7 +4440,7 @@ </constant> <constant name="ENV_BG_KEEP" value="5" enum="EnvironmentBG"> </constant> - <constant name="ENV_BG_MAX" value="6" enum="EnvironmentBG"> + <constant name="ENV_BG_MAX" value="7" enum="EnvironmentBG"> </constant> <constant name="ENV_DOF_BLUR_QUALITY_LOW" value="0" enum="EnvironmentDOFBlurQuality"> </constant> |