diff options
Diffstat (limited to 'doc')
301 files changed, 7424 insertions, 4484 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 3ca7e0716b..ed0cf5bd5d 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -50,7 +50,7 @@ <argument index="0" name="x" type="float"> </argument> <description> - Returns the arc cosine of [code]x[/code] in radians. Use to get the angle of cosine [code]x[/code]. + Returns the arc cosine of [code]x[/code] in radians. Use to get the angle of cosine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN]. [codeblock] # c is 0.523599 or 30 degrees if converted with rad2deg(c) c = acos(0.866025) @@ -63,7 +63,7 @@ <argument index="0" name="x" type="float"> </argument> <description> - Returns the arc sine of [code]x[/code] in radians. Use to get the angle of sine [code]x[/code]. + Returns the arc sine of [code]x[/code] in radians. Use to get the angle of sine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN]. [codeblock] # s is 0.523599 or 30 degrees if converted with rad2deg(s) s = asin(0.5) @@ -652,6 +652,31 @@ 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="posmod"> + <return type="int"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <description> + Returns the integer modulus of [code]x/y[/code] that wraps equally in positive and negative. + [codeblock] + for i in range(-3, 4): + print("%2d %2d %2d" % [i, i % 3, posmod(i, 3)]) + [/codeblock] + Produces: + [codeblock] + -3 0 0 + -2 -2 1 + -1 -1 2 + 0 0 0 + 1 1 1 + 2 2 2 + 3 0 0 + [/codeblock] + </description> + </method> <method name="pow"> <return type="float"> </return> @@ -777,7 +802,7 @@ <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 - 1][/code] (where N is smaller than 2^32). + Returns a random unsigned 32-bit integer. Use remainder to obtain a random value in the interval [code][0, N - 1][/code] (where N is smaller than 2^32). [codeblock] randi() # Returns random integer between 0 and 2^32 - 1 randi() % 20 # Returns random integer between 0 and 19 @@ -804,10 +829,7 @@ <method name="randomize"> <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] + [b]Note:[/b] This method is called automatically when the project is run. If you need to fix the seed to have reproducible results, use [method seed] to initialize the random number generator. </description> </method> <method name="range_lerp"> @@ -1280,6 +1302,10 @@ <constant name="HORIZONTAL" value="0" enum="Orientation"> General horizontal alignment, usually used for [Separator], [ScrollBar], [Slider], etc. </constant> + <constant name="CLOCKWISE" value="0" enum="ClockDirection"> + </constant> + <constant name="COUNTERCLOCKWISE" value="1" enum="ClockDirection"> + </constant> <constant name="HALIGN_LEFT" value="0" enum="HAlign"> Horizontal left alignment, usually for text-derived classes. </constant> @@ -1304,730 +1330,730 @@ <constant name="SPKEY" value="16777216"> Keycodes with this bit applied are non-printable. </constant> - <constant name="KEY_ESCAPE" value="16777217" enum="KeyList"> + <constant name="KEY_ESCAPE" value="16777217" enum="Key"> Escape key. </constant> - <constant name="KEY_TAB" value="16777218" enum="KeyList"> + <constant name="KEY_TAB" value="16777218" enum="Key"> Tab key. </constant> - <constant name="KEY_BACKTAB" value="16777219" enum="KeyList"> + <constant name="KEY_BACKTAB" value="16777219" enum="Key"> Shift + Tab key. </constant> - <constant name="KEY_BACKSPACE" value="16777220" enum="KeyList"> + <constant name="KEY_BACKSPACE" value="16777220" enum="Key"> Backspace key. </constant> - <constant name="KEY_ENTER" value="16777221" enum="KeyList"> + <constant name="KEY_ENTER" value="16777221" enum="Key"> Return key (on the main keyboard). </constant> - <constant name="KEY_KP_ENTER" value="16777222" enum="KeyList"> + <constant name="KEY_KP_ENTER" value="16777222" enum="Key"> Enter key on the numeric keypad. </constant> - <constant name="KEY_INSERT" value="16777223" enum="KeyList"> + <constant name="KEY_INSERT" value="16777223" enum="Key"> Insert key. </constant> - <constant name="KEY_DELETE" value="16777224" enum="KeyList"> + <constant name="KEY_DELETE" value="16777224" enum="Key"> Delete key. </constant> - <constant name="KEY_PAUSE" value="16777225" enum="KeyList"> + <constant name="KEY_PAUSE" value="16777225" enum="Key"> Pause key. </constant> - <constant name="KEY_PRINT" value="16777226" enum="KeyList"> + <constant name="KEY_PRINT" value="16777226" enum="Key"> Print Screen key. </constant> - <constant name="KEY_SYSREQ" value="16777227" enum="KeyList"> + <constant name="KEY_SYSREQ" value="16777227" enum="Key"> System Request key. </constant> - <constant name="KEY_CLEAR" value="16777228" enum="KeyList"> + <constant name="KEY_CLEAR" value="16777228" enum="Key"> Clear key. </constant> - <constant name="KEY_HOME" value="16777229" enum="KeyList"> + <constant name="KEY_HOME" value="16777229" enum="Key"> Home key. </constant> - <constant name="KEY_END" value="16777230" enum="KeyList"> + <constant name="KEY_END" value="16777230" enum="Key"> End key. </constant> - <constant name="KEY_LEFT" value="16777231" enum="KeyList"> + <constant name="KEY_LEFT" value="16777231" enum="Key"> Left arrow key. </constant> - <constant name="KEY_UP" value="16777232" enum="KeyList"> + <constant name="KEY_UP" value="16777232" enum="Key"> Up arrow key. </constant> - <constant name="KEY_RIGHT" value="16777233" enum="KeyList"> + <constant name="KEY_RIGHT" value="16777233" enum="Key"> Right arrow key. </constant> - <constant name="KEY_DOWN" value="16777234" enum="KeyList"> + <constant name="KEY_DOWN" value="16777234" enum="Key"> Down arrow key. </constant> - <constant name="KEY_PAGEUP" value="16777235" enum="KeyList"> + <constant name="KEY_PAGEUP" value="16777235" enum="Key"> Page Up key. </constant> - <constant name="KEY_PAGEDOWN" value="16777236" enum="KeyList"> + <constant name="KEY_PAGEDOWN" value="16777236" enum="Key"> Page Down key. </constant> - <constant name="KEY_SHIFT" value="16777237" enum="KeyList"> + <constant name="KEY_SHIFT" value="16777237" enum="Key"> Shift key. </constant> - <constant name="KEY_CONTROL" value="16777238" enum="KeyList"> + <constant name="KEY_CTRL" value="16777238" enum="Key"> Control key. </constant> - <constant name="KEY_META" value="16777239" enum="KeyList"> + <constant name="KEY_META" value="16777239" enum="Key"> Meta key. </constant> - <constant name="KEY_ALT" value="16777240" enum="KeyList"> + <constant name="KEY_ALT" value="16777240" enum="Key"> Alt key. </constant> - <constant name="KEY_CAPSLOCK" value="16777241" enum="KeyList"> + <constant name="KEY_CAPSLOCK" value="16777241" enum="Key"> Caps Lock key. </constant> - <constant name="KEY_NUMLOCK" value="16777242" enum="KeyList"> + <constant name="KEY_NUMLOCK" value="16777242" enum="Key"> Num Lock key. </constant> - <constant name="KEY_SCROLLLOCK" value="16777243" enum="KeyList"> + <constant name="KEY_SCROLLLOCK" value="16777243" enum="Key"> Scroll Lock key. </constant> - <constant name="KEY_F1" value="16777244" enum="KeyList"> + <constant name="KEY_F1" value="16777244" enum="Key"> F1 key. </constant> - <constant name="KEY_F2" value="16777245" enum="KeyList"> + <constant name="KEY_F2" value="16777245" enum="Key"> F2 key. </constant> - <constant name="KEY_F3" value="16777246" enum="KeyList"> + <constant name="KEY_F3" value="16777246" enum="Key"> F3 key. </constant> - <constant name="KEY_F4" value="16777247" enum="KeyList"> + <constant name="KEY_F4" value="16777247" enum="Key"> F4 key. </constant> - <constant name="KEY_F5" value="16777248" enum="KeyList"> + <constant name="KEY_F5" value="16777248" enum="Key"> F5 key. </constant> - <constant name="KEY_F6" value="16777249" enum="KeyList"> + <constant name="KEY_F6" value="16777249" enum="Key"> F6 key. </constant> - <constant name="KEY_F7" value="16777250" enum="KeyList"> + <constant name="KEY_F7" value="16777250" enum="Key"> F7 key. </constant> - <constant name="KEY_F8" value="16777251" enum="KeyList"> + <constant name="KEY_F8" value="16777251" enum="Key"> F8 key. </constant> - <constant name="KEY_F9" value="16777252" enum="KeyList"> + <constant name="KEY_F9" value="16777252" enum="Key"> F9 key. </constant> - <constant name="KEY_F10" value="16777253" enum="KeyList"> + <constant name="KEY_F10" value="16777253" enum="Key"> F10 key. </constant> - <constant name="KEY_F11" value="16777254" enum="KeyList"> + <constant name="KEY_F11" value="16777254" enum="Key"> F11 key. </constant> - <constant name="KEY_F12" value="16777255" enum="KeyList"> + <constant name="KEY_F12" value="16777255" enum="Key"> F12 key. </constant> - <constant name="KEY_F13" value="16777256" enum="KeyList"> + <constant name="KEY_F13" value="16777256" enum="Key"> F13 key. </constant> - <constant name="KEY_F14" value="16777257" enum="KeyList"> + <constant name="KEY_F14" value="16777257" enum="Key"> F14 key. </constant> - <constant name="KEY_F15" value="16777258" enum="KeyList"> + <constant name="KEY_F15" value="16777258" enum="Key"> F15 key. </constant> - <constant name="KEY_F16" value="16777259" enum="KeyList"> + <constant name="KEY_F16" value="16777259" enum="Key"> F16 key. </constant> - <constant name="KEY_KP_MULTIPLY" value="16777345" enum="KeyList"> + <constant name="KEY_KP_MULTIPLY" value="16777345" enum="Key"> Multiply (*) key on the numeric keypad. </constant> - <constant name="KEY_KP_DIVIDE" value="16777346" enum="KeyList"> + <constant name="KEY_KP_DIVIDE" value="16777346" enum="Key"> Divide (/) key on the numeric keypad. </constant> - <constant name="KEY_KP_SUBTRACT" value="16777347" enum="KeyList"> + <constant name="KEY_KP_SUBTRACT" value="16777347" enum="Key"> Subtract (-) key on the numeric keypad. </constant> - <constant name="KEY_KP_PERIOD" value="16777348" enum="KeyList"> + <constant name="KEY_KP_PERIOD" value="16777348" enum="Key"> Period (.) key on the numeric keypad. </constant> - <constant name="KEY_KP_ADD" value="16777349" enum="KeyList"> + <constant name="KEY_KP_ADD" value="16777349" enum="Key"> Add (+) key on the numeric keypad. </constant> - <constant name="KEY_KP_0" value="16777350" enum="KeyList"> + <constant name="KEY_KP_0" value="16777350" enum="Key"> Number 0 on the numeric keypad. </constant> - <constant name="KEY_KP_1" value="16777351" enum="KeyList"> + <constant name="KEY_KP_1" value="16777351" enum="Key"> Number 1 on the numeric keypad. </constant> - <constant name="KEY_KP_2" value="16777352" enum="KeyList"> + <constant name="KEY_KP_2" value="16777352" enum="Key"> Number 2 on the numeric keypad. </constant> - <constant name="KEY_KP_3" value="16777353" enum="KeyList"> + <constant name="KEY_KP_3" value="16777353" enum="Key"> Number 3 on the numeric keypad. </constant> - <constant name="KEY_KP_4" value="16777354" enum="KeyList"> + <constant name="KEY_KP_4" value="16777354" enum="Key"> Number 4 on the numeric keypad. </constant> - <constant name="KEY_KP_5" value="16777355" enum="KeyList"> + <constant name="KEY_KP_5" value="16777355" enum="Key"> Number 5 on the numeric keypad. </constant> - <constant name="KEY_KP_6" value="16777356" enum="KeyList"> + <constant name="KEY_KP_6" value="16777356" enum="Key"> Number 6 on the numeric keypad. </constant> - <constant name="KEY_KP_7" value="16777357" enum="KeyList"> + <constant name="KEY_KP_7" value="16777357" enum="Key"> Number 7 on the numeric keypad. </constant> - <constant name="KEY_KP_8" value="16777358" enum="KeyList"> + <constant name="KEY_KP_8" value="16777358" enum="Key"> Number 8 on the numeric keypad. </constant> - <constant name="KEY_KP_9" value="16777359" enum="KeyList"> + <constant name="KEY_KP_9" value="16777359" enum="Key"> Number 9 on the numeric keypad. </constant> - <constant name="KEY_SUPER_L" value="16777260" enum="KeyList"> + <constant name="KEY_SUPER_L" value="16777260" enum="Key"> Left Super key (Windows key). </constant> - <constant name="KEY_SUPER_R" value="16777261" enum="KeyList"> + <constant name="KEY_SUPER_R" value="16777261" enum="Key"> Right Super key (Windows key). </constant> - <constant name="KEY_MENU" value="16777262" enum="KeyList"> + <constant name="KEY_MENU" value="16777262" enum="Key"> Context menu key. </constant> - <constant name="KEY_HYPER_L" value="16777263" enum="KeyList"> + <constant name="KEY_HYPER_L" value="16777263" enum="Key"> Left Hyper key. </constant> - <constant name="KEY_HYPER_R" value="16777264" enum="KeyList"> + <constant name="KEY_HYPER_R" value="16777264" enum="Key"> Right Hyper key. </constant> - <constant name="KEY_HELP" value="16777265" enum="KeyList"> + <constant name="KEY_HELP" value="16777265" enum="Key"> Help key. </constant> - <constant name="KEY_DIRECTION_L" value="16777266" enum="KeyList"> + <constant name="KEY_DIRECTION_L" value="16777266" enum="Key"> Left Direction key. </constant> - <constant name="KEY_DIRECTION_R" value="16777267" enum="KeyList"> + <constant name="KEY_DIRECTION_R" value="16777267" enum="Key"> Right Direction key. </constant> - <constant name="KEY_BACK" value="16777280" enum="KeyList"> + <constant name="KEY_BACK" value="16777280" enum="Key"> Media back key. Not to be confused with the Back button on an Android device. </constant> - <constant name="KEY_FORWARD" value="16777281" enum="KeyList"> + <constant name="KEY_FORWARD" value="16777281" enum="Key"> Media forward key. </constant> - <constant name="KEY_STOP" value="16777282" enum="KeyList"> + <constant name="KEY_STOP" value="16777282" enum="Key"> Media stop key. </constant> - <constant name="KEY_REFRESH" value="16777283" enum="KeyList"> + <constant name="KEY_REFRESH" value="16777283" enum="Key"> Media refresh key. </constant> - <constant name="KEY_VOLUMEDOWN" value="16777284" enum="KeyList"> + <constant name="KEY_VOLUMEDOWN" value="16777284" enum="Key"> Volume down key. </constant> - <constant name="KEY_VOLUMEMUTE" value="16777285" enum="KeyList"> + <constant name="KEY_VOLUMEMUTE" value="16777285" enum="Key"> Mute volume key. </constant> - <constant name="KEY_VOLUMEUP" value="16777286" enum="KeyList"> + <constant name="KEY_VOLUMEUP" value="16777286" enum="Key"> Volume up key. </constant> - <constant name="KEY_BASSBOOST" value="16777287" enum="KeyList"> + <constant name="KEY_BASSBOOST" value="16777287" enum="Key"> Bass Boost key. </constant> - <constant name="KEY_BASSUP" value="16777288" enum="KeyList"> + <constant name="KEY_BASSUP" value="16777288" enum="Key"> Bass up key. </constant> - <constant name="KEY_BASSDOWN" value="16777289" enum="KeyList"> + <constant name="KEY_BASSDOWN" value="16777289" enum="Key"> Bass down key. </constant> - <constant name="KEY_TREBLEUP" value="16777290" enum="KeyList"> + <constant name="KEY_TREBLEUP" value="16777290" enum="Key"> Treble up key. </constant> - <constant name="KEY_TREBLEDOWN" value="16777291" enum="KeyList"> + <constant name="KEY_TREBLEDOWN" value="16777291" enum="Key"> Treble down key. </constant> - <constant name="KEY_MEDIAPLAY" value="16777292" enum="KeyList"> + <constant name="KEY_MEDIAPLAY" value="16777292" enum="Key"> Media play key. </constant> - <constant name="KEY_MEDIASTOP" value="16777293" enum="KeyList"> + <constant name="KEY_MEDIASTOP" value="16777293" enum="Key"> Media stop key. </constant> - <constant name="KEY_MEDIAPREVIOUS" value="16777294" enum="KeyList"> + <constant name="KEY_MEDIAPREVIOUS" value="16777294" enum="Key"> Previous song key. </constant> - <constant name="KEY_MEDIANEXT" value="16777295" enum="KeyList"> + <constant name="KEY_MEDIANEXT" value="16777295" enum="Key"> Next song key. </constant> - <constant name="KEY_MEDIARECORD" value="16777296" enum="KeyList"> + <constant name="KEY_MEDIARECORD" value="16777296" enum="Key"> Media record key. </constant> - <constant name="KEY_HOMEPAGE" value="16777297" enum="KeyList"> + <constant name="KEY_HOMEPAGE" value="16777297" enum="Key"> Home page key. </constant> - <constant name="KEY_FAVORITES" value="16777298" enum="KeyList"> + <constant name="KEY_FAVORITES" value="16777298" enum="Key"> Favorites key. </constant> - <constant name="KEY_SEARCH" value="16777299" enum="KeyList"> + <constant name="KEY_SEARCH" value="16777299" enum="Key"> Search key. </constant> - <constant name="KEY_STANDBY" value="16777300" enum="KeyList"> + <constant name="KEY_STANDBY" value="16777300" enum="Key"> Standby key. </constant> - <constant name="KEY_OPENURL" value="16777301" enum="KeyList"> + <constant name="KEY_OPENURL" value="16777301" enum="Key"> Open URL / Launch Browser key. </constant> - <constant name="KEY_LAUNCHMAIL" value="16777302" enum="KeyList"> + <constant name="KEY_LAUNCHMAIL" value="16777302" enum="Key"> Launch Mail key. </constant> - <constant name="KEY_LAUNCHMEDIA" value="16777303" enum="KeyList"> + <constant name="KEY_LAUNCHMEDIA" value="16777303" enum="Key"> Launch Media key. </constant> - <constant name="KEY_LAUNCH0" value="16777304" enum="KeyList"> + <constant name="KEY_LAUNCH0" value="16777304" enum="Key"> Launch Shortcut 0 key. </constant> - <constant name="KEY_LAUNCH1" value="16777305" enum="KeyList"> + <constant name="KEY_LAUNCH1" value="16777305" enum="Key"> Launch Shortcut 1 key. </constant> - <constant name="KEY_LAUNCH2" value="16777306" enum="KeyList"> + <constant name="KEY_LAUNCH2" value="16777306" enum="Key"> Launch Shortcut 2 key. </constant> - <constant name="KEY_LAUNCH3" value="16777307" enum="KeyList"> + <constant name="KEY_LAUNCH3" value="16777307" enum="Key"> Launch Shortcut 3 key. </constant> - <constant name="KEY_LAUNCH4" value="16777308" enum="KeyList"> + <constant name="KEY_LAUNCH4" value="16777308" enum="Key"> Launch Shortcut 4 key. </constant> - <constant name="KEY_LAUNCH5" value="16777309" enum="KeyList"> + <constant name="KEY_LAUNCH5" value="16777309" enum="Key"> Launch Shortcut 5 key. </constant> - <constant name="KEY_LAUNCH6" value="16777310" enum="KeyList"> + <constant name="KEY_LAUNCH6" value="16777310" enum="Key"> Launch Shortcut 6 key. </constant> - <constant name="KEY_LAUNCH7" value="16777311" enum="KeyList"> + <constant name="KEY_LAUNCH7" value="16777311" enum="Key"> Launch Shortcut 7 key. </constant> - <constant name="KEY_LAUNCH8" value="16777312" enum="KeyList"> + <constant name="KEY_LAUNCH8" value="16777312" enum="Key"> Launch Shortcut 8 key. </constant> - <constant name="KEY_LAUNCH9" value="16777313" enum="KeyList"> + <constant name="KEY_LAUNCH9" value="16777313" enum="Key"> Launch Shortcut 9 key. </constant> - <constant name="KEY_LAUNCHA" value="16777314" enum="KeyList"> + <constant name="KEY_LAUNCHA" value="16777314" enum="Key"> Launch Shortcut A key. </constant> - <constant name="KEY_LAUNCHB" value="16777315" enum="KeyList"> + <constant name="KEY_LAUNCHB" value="16777315" enum="Key"> Launch Shortcut B key. </constant> - <constant name="KEY_LAUNCHC" value="16777316" enum="KeyList"> + <constant name="KEY_LAUNCHC" value="16777316" enum="Key"> Launch Shortcut C key. </constant> - <constant name="KEY_LAUNCHD" value="16777317" enum="KeyList"> + <constant name="KEY_LAUNCHD" value="16777317" enum="Key"> Launch Shortcut D key. </constant> - <constant name="KEY_LAUNCHE" value="16777318" enum="KeyList"> + <constant name="KEY_LAUNCHE" value="16777318" enum="Key"> Launch Shortcut E key. </constant> - <constant name="KEY_LAUNCHF" value="16777319" enum="KeyList"> + <constant name="KEY_LAUNCHF" value="16777319" enum="Key"> Launch Shortcut F key. </constant> - <constant name="KEY_UNKNOWN" value="33554431" enum="KeyList"> + <constant name="KEY_UNKNOWN" value="33554431" enum="Key"> Unknown key. </constant> - <constant name="KEY_SPACE" value="32" enum="KeyList"> + <constant name="KEY_SPACE" value="32" enum="Key"> Space key. </constant> - <constant name="KEY_EXCLAM" value="33" enum="KeyList"> + <constant name="KEY_EXCLAM" value="33" enum="Key"> ! key. </constant> - <constant name="KEY_QUOTEDBL" value="34" enum="KeyList"> + <constant name="KEY_QUOTEDBL" value="34" enum="Key"> " key. </constant> - <constant name="KEY_NUMBERSIGN" value="35" enum="KeyList"> + <constant name="KEY_NUMBERSIGN" value="35" enum="Key"> # key. </constant> - <constant name="KEY_DOLLAR" value="36" enum="KeyList"> + <constant name="KEY_DOLLAR" value="36" enum="Key"> $ key. </constant> - <constant name="KEY_PERCENT" value="37" enum="KeyList"> + <constant name="KEY_PERCENT" value="37" enum="Key"> % key. </constant> - <constant name="KEY_AMPERSAND" value="38" enum="KeyList"> + <constant name="KEY_AMPERSAND" value="38" enum="Key"> & key. </constant> - <constant name="KEY_APOSTROPHE" value="39" enum="KeyList"> + <constant name="KEY_APOSTROPHE" value="39" enum="Key"> ' key. </constant> - <constant name="KEY_PARENLEFT" value="40" enum="KeyList"> + <constant name="KEY_PARENLEFT" value="40" enum="Key"> ( key. </constant> - <constant name="KEY_PARENRIGHT" value="41" enum="KeyList"> + <constant name="KEY_PARENRIGHT" value="41" enum="Key"> ) key. </constant> - <constant name="KEY_ASTERISK" value="42" enum="KeyList"> + <constant name="KEY_ASTERISK" value="42" enum="Key"> * key. </constant> - <constant name="KEY_PLUS" value="43" enum="KeyList"> + <constant name="KEY_PLUS" value="43" enum="Key"> + key. </constant> - <constant name="KEY_COMMA" value="44" enum="KeyList"> + <constant name="KEY_COMMA" value="44" enum="Key"> , key. </constant> - <constant name="KEY_MINUS" value="45" enum="KeyList"> + <constant name="KEY_MINUS" value="45" enum="Key"> - key. </constant> - <constant name="KEY_PERIOD" value="46" enum="KeyList"> + <constant name="KEY_PERIOD" value="46" enum="Key"> . key. </constant> - <constant name="KEY_SLASH" value="47" enum="KeyList"> + <constant name="KEY_SLASH" value="47" enum="Key"> / key. </constant> - <constant name="KEY_0" value="48" enum="KeyList"> + <constant name="KEY_0" value="48" enum="Key"> Number 0. </constant> - <constant name="KEY_1" value="49" enum="KeyList"> + <constant name="KEY_1" value="49" enum="Key"> Number 1. </constant> - <constant name="KEY_2" value="50" enum="KeyList"> + <constant name="KEY_2" value="50" enum="Key"> Number 2. </constant> - <constant name="KEY_3" value="51" enum="KeyList"> + <constant name="KEY_3" value="51" enum="Key"> Number 3. </constant> - <constant name="KEY_4" value="52" enum="KeyList"> + <constant name="KEY_4" value="52" enum="Key"> Number 4. </constant> - <constant name="KEY_5" value="53" enum="KeyList"> + <constant name="KEY_5" value="53" enum="Key"> Number 5. </constant> - <constant name="KEY_6" value="54" enum="KeyList"> + <constant name="KEY_6" value="54" enum="Key"> Number 6. </constant> - <constant name="KEY_7" value="55" enum="KeyList"> + <constant name="KEY_7" value="55" enum="Key"> Number 7. </constant> - <constant name="KEY_8" value="56" enum="KeyList"> + <constant name="KEY_8" value="56" enum="Key"> Number 8. </constant> - <constant name="KEY_9" value="57" enum="KeyList"> + <constant name="KEY_9" value="57" enum="Key"> Number 9. </constant> - <constant name="KEY_COLON" value="58" enum="KeyList"> + <constant name="KEY_COLON" value="58" enum="Key"> : key. </constant> - <constant name="KEY_SEMICOLON" value="59" enum="KeyList"> + <constant name="KEY_SEMICOLON" value="59" enum="Key"> ; key. </constant> - <constant name="KEY_LESS" value="60" enum="KeyList"> + <constant name="KEY_LESS" value="60" enum="Key"> < key. </constant> - <constant name="KEY_EQUAL" value="61" enum="KeyList"> + <constant name="KEY_EQUAL" value="61" enum="Key"> = key. </constant> - <constant name="KEY_GREATER" value="62" enum="KeyList"> + <constant name="KEY_GREATER" value="62" enum="Key"> > key. </constant> - <constant name="KEY_QUESTION" value="63" enum="KeyList"> + <constant name="KEY_QUESTION" value="63" enum="Key"> ? key. </constant> - <constant name="KEY_AT" value="64" enum="KeyList"> + <constant name="KEY_AT" value="64" enum="Key"> @ key. </constant> - <constant name="KEY_A" value="65" enum="KeyList"> + <constant name="KEY_A" value="65" enum="Key"> A key. </constant> - <constant name="KEY_B" value="66" enum="KeyList"> + <constant name="KEY_B" value="66" enum="Key"> B key. </constant> - <constant name="KEY_C" value="67" enum="KeyList"> + <constant name="KEY_C" value="67" enum="Key"> C key. </constant> - <constant name="KEY_D" value="68" enum="KeyList"> + <constant name="KEY_D" value="68" enum="Key"> D key. </constant> - <constant name="KEY_E" value="69" enum="KeyList"> + <constant name="KEY_E" value="69" enum="Key"> E key. </constant> - <constant name="KEY_F" value="70" enum="KeyList"> + <constant name="KEY_F" value="70" enum="Key"> F key. </constant> - <constant name="KEY_G" value="71" enum="KeyList"> + <constant name="KEY_G" value="71" enum="Key"> G key. </constant> - <constant name="KEY_H" value="72" enum="KeyList"> + <constant name="KEY_H" value="72" enum="Key"> H key. </constant> - <constant name="KEY_I" value="73" enum="KeyList"> + <constant name="KEY_I" value="73" enum="Key"> I key. </constant> - <constant name="KEY_J" value="74" enum="KeyList"> + <constant name="KEY_J" value="74" enum="Key"> J key. </constant> - <constant name="KEY_K" value="75" enum="KeyList"> + <constant name="KEY_K" value="75" enum="Key"> K key. </constant> - <constant name="KEY_L" value="76" enum="KeyList"> + <constant name="KEY_L" value="76" enum="Key"> L key. </constant> - <constant name="KEY_M" value="77" enum="KeyList"> + <constant name="KEY_M" value="77" enum="Key"> M key. </constant> - <constant name="KEY_N" value="78" enum="KeyList"> + <constant name="KEY_N" value="78" enum="Key"> N key. </constant> - <constant name="KEY_O" value="79" enum="KeyList"> + <constant name="KEY_O" value="79" enum="Key"> O key. </constant> - <constant name="KEY_P" value="80" enum="KeyList"> + <constant name="KEY_P" value="80" enum="Key"> P key. </constant> - <constant name="KEY_Q" value="81" enum="KeyList"> + <constant name="KEY_Q" value="81" enum="Key"> Q key. </constant> - <constant name="KEY_R" value="82" enum="KeyList"> + <constant name="KEY_R" value="82" enum="Key"> R key. </constant> - <constant name="KEY_S" value="83" enum="KeyList"> + <constant name="KEY_S" value="83" enum="Key"> S key. </constant> - <constant name="KEY_T" value="84" enum="KeyList"> + <constant name="KEY_T" value="84" enum="Key"> T key. </constant> - <constant name="KEY_U" value="85" enum="KeyList"> + <constant name="KEY_U" value="85" enum="Key"> U key. </constant> - <constant name="KEY_V" value="86" enum="KeyList"> + <constant name="KEY_V" value="86" enum="Key"> V key. </constant> - <constant name="KEY_W" value="87" enum="KeyList"> + <constant name="KEY_W" value="87" enum="Key"> W key. </constant> - <constant name="KEY_X" value="88" enum="KeyList"> + <constant name="KEY_X" value="88" enum="Key"> X key. </constant> - <constant name="KEY_Y" value="89" enum="KeyList"> + <constant name="KEY_Y" value="89" enum="Key"> Y key. </constant> - <constant name="KEY_Z" value="90" enum="KeyList"> + <constant name="KEY_Z" value="90" enum="Key"> Z key. </constant> - <constant name="KEY_BRACKETLEFT" value="91" enum="KeyList"> + <constant name="KEY_BRACKETLEFT" value="91" enum="Key"> [ key. </constant> - <constant name="KEY_BACKSLASH" value="92" enum="KeyList"> + <constant name="KEY_BACKSLASH" value="92" enum="Key"> \ key. </constant> - <constant name="KEY_BRACKETRIGHT" value="93" enum="KeyList"> + <constant name="KEY_BRACKETRIGHT" value="93" enum="Key"> ] key. </constant> - <constant name="KEY_ASCIICIRCUM" value="94" enum="KeyList"> + <constant name="KEY_ASCIICIRCUM" value="94" enum="Key"> ^ key. </constant> - <constant name="KEY_UNDERSCORE" value="95" enum="KeyList"> + <constant name="KEY_UNDERSCORE" value="95" enum="Key"> _ key. </constant> - <constant name="KEY_QUOTELEFT" value="96" enum="KeyList"> + <constant name="KEY_QUOTELEFT" value="96" enum="Key"> ` key. </constant> - <constant name="KEY_BRACELEFT" value="123" enum="KeyList"> + <constant name="KEY_BRACELEFT" value="123" enum="Key"> { key. </constant> - <constant name="KEY_BAR" value="124" enum="KeyList"> + <constant name="KEY_BAR" value="124" enum="Key"> | key. </constant> - <constant name="KEY_BRACERIGHT" value="125" enum="KeyList"> + <constant name="KEY_BRACERIGHT" value="125" enum="Key"> } key. </constant> - <constant name="KEY_ASCIITILDE" value="126" enum="KeyList"> + <constant name="KEY_ASCIITILDE" value="126" enum="Key"> ~ key. </constant> - <constant name="KEY_NOBREAKSPACE" value="160" enum="KeyList"> + <constant name="KEY_NOBREAKSPACE" value="160" enum="Key"> Non-breakable space key. </constant> - <constant name="KEY_EXCLAMDOWN" value="161" enum="KeyList"> + <constant name="KEY_EXCLAMDOWN" value="161" enum="Key"> ¡ key. </constant> - <constant name="KEY_CENT" value="162" enum="KeyList"> + <constant name="KEY_CENT" value="162" enum="Key"> ¢ key. </constant> - <constant name="KEY_STERLING" value="163" enum="KeyList"> + <constant name="KEY_STERLING" value="163" enum="Key"> £ key. </constant> - <constant name="KEY_CURRENCY" value="164" enum="KeyList"> + <constant name="KEY_CURRENCY" value="164" enum="Key"> ¤ key. </constant> - <constant name="KEY_YEN" value="165" enum="KeyList"> + <constant name="KEY_YEN" value="165" enum="Key"> ¥ key. </constant> - <constant name="KEY_BROKENBAR" value="166" enum="KeyList"> + <constant name="KEY_BROKENBAR" value="166" enum="Key"> ¦ key. </constant> - <constant name="KEY_SECTION" value="167" enum="KeyList"> + <constant name="KEY_SECTION" value="167" enum="Key"> § key. </constant> - <constant name="KEY_DIAERESIS" value="168" enum="KeyList"> + <constant name="KEY_DIAERESIS" value="168" enum="Key"> ¨ key. </constant> - <constant name="KEY_COPYRIGHT" value="169" enum="KeyList"> + <constant name="KEY_COPYRIGHT" value="169" enum="Key"> © key. </constant> - <constant name="KEY_ORDFEMININE" value="170" enum="KeyList"> + <constant name="KEY_ORDFEMININE" value="170" enum="Key"> ª key. </constant> - <constant name="KEY_GUILLEMOTLEFT" value="171" enum="KeyList"> + <constant name="KEY_GUILLEMOTLEFT" value="171" enum="Key"> « key. </constant> - <constant name="KEY_NOTSIGN" value="172" enum="KeyList"> + <constant name="KEY_NOTSIGN" value="172" enum="Key"> ¬ key. </constant> - <constant name="KEY_HYPHEN" value="173" enum="KeyList"> + <constant name="KEY_HYPHEN" value="173" enum="Key"> Soft hyphen key. </constant> - <constant name="KEY_REGISTERED" value="174" enum="KeyList"> + <constant name="KEY_REGISTERED" value="174" enum="Key"> ® key. </constant> - <constant name="KEY_MACRON" value="175" enum="KeyList"> + <constant name="KEY_MACRON" value="175" enum="Key"> ¯ key. </constant> - <constant name="KEY_DEGREE" value="176" enum="KeyList"> + <constant name="KEY_DEGREE" value="176" enum="Key"> ° key. </constant> - <constant name="KEY_PLUSMINUS" value="177" enum="KeyList"> + <constant name="KEY_PLUSMINUS" value="177" enum="Key"> ± key. </constant> - <constant name="KEY_TWOSUPERIOR" value="178" enum="KeyList"> + <constant name="KEY_TWOSUPERIOR" value="178" enum="Key"> ² key. </constant> - <constant name="KEY_THREESUPERIOR" value="179" enum="KeyList"> + <constant name="KEY_THREESUPERIOR" value="179" enum="Key"> ³ key. </constant> - <constant name="KEY_ACUTE" value="180" enum="KeyList"> + <constant name="KEY_ACUTE" value="180" enum="Key"> ´ key. </constant> - <constant name="KEY_MU" value="181" enum="KeyList"> + <constant name="KEY_MU" value="181" enum="Key"> µ key. </constant> - <constant name="KEY_PARAGRAPH" value="182" enum="KeyList"> + <constant name="KEY_PARAGRAPH" value="182" enum="Key"> ¶ key. </constant> - <constant name="KEY_PERIODCENTERED" value="183" enum="KeyList"> + <constant name="KEY_PERIODCENTERED" value="183" enum="Key"> · key. </constant> - <constant name="KEY_CEDILLA" value="184" enum="KeyList"> + <constant name="KEY_CEDILLA" value="184" enum="Key"> ¸ key. </constant> - <constant name="KEY_ONESUPERIOR" value="185" enum="KeyList"> + <constant name="KEY_ONESUPERIOR" value="185" enum="Key"> ¹ key. </constant> - <constant name="KEY_MASCULINE" value="186" enum="KeyList"> + <constant name="KEY_MASCULINE" value="186" enum="Key"> º key. </constant> - <constant name="KEY_GUILLEMOTRIGHT" value="187" enum="KeyList"> + <constant name="KEY_GUILLEMOTRIGHT" value="187" enum="Key"> » key. </constant> - <constant name="KEY_ONEQUARTER" value="188" enum="KeyList"> + <constant name="KEY_ONEQUARTER" value="188" enum="Key"> ¼ key. </constant> - <constant name="KEY_ONEHALF" value="189" enum="KeyList"> + <constant name="KEY_ONEHALF" value="189" enum="Key"> ½ key. </constant> - <constant name="KEY_THREEQUARTERS" value="190" enum="KeyList"> + <constant name="KEY_THREEQUARTERS" value="190" enum="Key"> ¾ key. </constant> - <constant name="KEY_QUESTIONDOWN" value="191" enum="KeyList"> + <constant name="KEY_QUESTIONDOWN" value="191" enum="Key"> ¿ key. </constant> - <constant name="KEY_AGRAVE" value="192" enum="KeyList"> + <constant name="KEY_AGRAVE" value="192" enum="Key"> À key. </constant> - <constant name="KEY_AACUTE" value="193" enum="KeyList"> + <constant name="KEY_AACUTE" value="193" enum="Key"> Á key. </constant> - <constant name="KEY_ACIRCUMFLEX" value="194" enum="KeyList"> + <constant name="KEY_ACIRCUMFLEX" value="194" enum="Key"> Â key. </constant> - <constant name="KEY_ATILDE" value="195" enum="KeyList"> + <constant name="KEY_ATILDE" value="195" enum="Key"> Ã key. </constant> - <constant name="KEY_ADIAERESIS" value="196" enum="KeyList"> + <constant name="KEY_ADIAERESIS" value="196" enum="Key"> Ä key. </constant> - <constant name="KEY_ARING" value="197" enum="KeyList"> + <constant name="KEY_ARING" value="197" enum="Key"> Å key. </constant> - <constant name="KEY_AE" value="198" enum="KeyList"> + <constant name="KEY_AE" value="198" enum="Key"> Æ key. </constant> - <constant name="KEY_CCEDILLA" value="199" enum="KeyList"> + <constant name="KEY_CCEDILLA" value="199" enum="Key"> Ç key. </constant> - <constant name="KEY_EGRAVE" value="200" enum="KeyList"> + <constant name="KEY_EGRAVE" value="200" enum="Key"> È key. </constant> - <constant name="KEY_EACUTE" value="201" enum="KeyList"> + <constant name="KEY_EACUTE" value="201" enum="Key"> É key. </constant> - <constant name="KEY_ECIRCUMFLEX" value="202" enum="KeyList"> + <constant name="KEY_ECIRCUMFLEX" value="202" enum="Key"> Ê key. </constant> - <constant name="KEY_EDIAERESIS" value="203" enum="KeyList"> + <constant name="KEY_EDIAERESIS" value="203" enum="Key"> Ë key. </constant> - <constant name="KEY_IGRAVE" value="204" enum="KeyList"> + <constant name="KEY_IGRAVE" value="204" enum="Key"> Ì key. </constant> - <constant name="KEY_IACUTE" value="205" enum="KeyList"> + <constant name="KEY_IACUTE" value="205" enum="Key"> Í key. </constant> - <constant name="KEY_ICIRCUMFLEX" value="206" enum="KeyList"> + <constant name="KEY_ICIRCUMFLEX" value="206" enum="Key"> Î key. </constant> - <constant name="KEY_IDIAERESIS" value="207" enum="KeyList"> + <constant name="KEY_IDIAERESIS" value="207" enum="Key"> Ï key. </constant> - <constant name="KEY_ETH" value="208" enum="KeyList"> + <constant name="KEY_ETH" value="208" enum="Key"> Ð key. </constant> - <constant name="KEY_NTILDE" value="209" enum="KeyList"> + <constant name="KEY_NTILDE" value="209" enum="Key"> Ñ key. </constant> - <constant name="KEY_OGRAVE" value="210" enum="KeyList"> + <constant name="KEY_OGRAVE" value="210" enum="Key"> Ò key. </constant> - <constant name="KEY_OACUTE" value="211" enum="KeyList"> + <constant name="KEY_OACUTE" value="211" enum="Key"> Ó key. </constant> - <constant name="KEY_OCIRCUMFLEX" value="212" enum="KeyList"> + <constant name="KEY_OCIRCUMFLEX" value="212" enum="Key"> Ô key. </constant> - <constant name="KEY_OTILDE" value="213" enum="KeyList"> + <constant name="KEY_OTILDE" value="213" enum="Key"> Õ key. </constant> - <constant name="KEY_ODIAERESIS" value="214" enum="KeyList"> + <constant name="KEY_ODIAERESIS" value="214" enum="Key"> Ö key. </constant> - <constant name="KEY_MULTIPLY" value="215" enum="KeyList"> + <constant name="KEY_MULTIPLY" value="215" enum="Key"> × key. </constant> - <constant name="KEY_OOBLIQUE" value="216" enum="KeyList"> + <constant name="KEY_OOBLIQUE" value="216" enum="Key"> Ø key. </constant> - <constant name="KEY_UGRAVE" value="217" enum="KeyList"> + <constant name="KEY_UGRAVE" value="217" enum="Key"> Ù key. </constant> - <constant name="KEY_UACUTE" value="218" enum="KeyList"> + <constant name="KEY_UACUTE" value="218" enum="Key"> Ú key. </constant> - <constant name="KEY_UCIRCUMFLEX" value="219" enum="KeyList"> + <constant name="KEY_UCIRCUMFLEX" value="219" enum="Key"> Û key. </constant> - <constant name="KEY_UDIAERESIS" value="220" enum="KeyList"> + <constant name="KEY_UDIAERESIS" value="220" enum="Key"> Ü key. </constant> - <constant name="KEY_YACUTE" value="221" enum="KeyList"> + <constant name="KEY_YACUTE" value="221" enum="Key"> Ý key. </constant> - <constant name="KEY_THORN" value="222" enum="KeyList"> + <constant name="KEY_THORN" value="222" enum="Key"> Þ key. </constant> - <constant name="KEY_SSHARP" value="223" enum="KeyList"> + <constant name="KEY_SSHARP" value="223" enum="Key"> ß key. </constant> - <constant name="KEY_DIVISION" value="247" enum="KeyList"> + <constant name="KEY_DIVISION" value="247" enum="Key"> ÷ key. </constant> - <constant name="KEY_YDIAERESIS" value="255" enum="KeyList"> + <constant name="KEY_YDIAERESIS" value="255" enum="Key"> ÿ key. </constant> <constant name="KEY_CODE_MASK" value="33554431" enum="KeyModifierMask"> @@ -2057,166 +2083,166 @@ <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824" enum="KeyModifierMask"> Group Switch key mask. </constant> - <constant name="BUTTON_LEFT" value="1" enum="ButtonList"> + <constant name="MOUSE_BUTTON_LEFT" value="1" enum="MouseButton"> Left mouse button. </constant> - <constant name="BUTTON_RIGHT" value="2" enum="ButtonList"> + <constant name="MOUSE_BUTTON_RIGHT" value="2" enum="MouseButton"> Right mouse button. </constant> - <constant name="BUTTON_MIDDLE" value="3" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MIDDLE" value="3" enum="MouseButton"> Middle mouse button. </constant> - <constant name="BUTTON_XBUTTON1" value="8" enum="ButtonList"> + <constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton"> Extra mouse button 1 (only present on some mice). </constant> - <constant name="BUTTON_XBUTTON2" value="9" enum="ButtonList"> + <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton"> Extra mouse button 2 (only present on some mice). </constant> - <constant name="BUTTON_WHEEL_UP" value="4" enum="ButtonList"> + <constant name="MOUSE_BUTTON_WHEEL_UP" value="4" enum="MouseButton"> Mouse wheel up. </constant> - <constant name="BUTTON_WHEEL_DOWN" value="5" enum="ButtonList"> + <constant name="MOUSE_BUTTON_WHEEL_DOWN" value="5" enum="MouseButton"> Mouse wheel down. </constant> - <constant name="BUTTON_WHEEL_LEFT" value="6" enum="ButtonList"> + <constant name="MOUSE_BUTTON_WHEEL_LEFT" value="6" enum="MouseButton"> Mouse wheel left button (only present on some mice). </constant> - <constant name="BUTTON_WHEEL_RIGHT" value="7" enum="ButtonList"> + <constant name="MOUSE_BUTTON_WHEEL_RIGHT" value="7" enum="MouseButton"> Mouse wheel right button (only present on some mice). </constant> - <constant name="BUTTON_MASK_LEFT" value="1" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButton"> Left mouse button mask. </constant> - <constant name="BUTTON_MASK_RIGHT" value="2" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MASK_RIGHT" value="2" enum="MouseButton"> Right mouse button mask. </constant> - <constant name="BUTTON_MASK_MIDDLE" value="4" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MASK_MIDDLE" value="4" enum="MouseButton"> Middle mouse button mask. </constant> - <constant name="BUTTON_MASK_XBUTTON1" value="128" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MASK_XBUTTON1" value="128" enum="MouseButton"> Extra mouse button 1 mask. </constant> - <constant name="BUTTON_MASK_XBUTTON2" value="256" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MASK_XBUTTON2" value="256" enum="MouseButton"> Extra mouse button 2 mask. </constant> - <constant name="JOY_BUTTON_INVALID" value="-1" enum="JoyButtonList"> + <constant name="JOY_BUTTON_INVALID" value="-1" enum="JoyButton"> An invalid game controller button. </constant> - <constant name="JOY_BUTTON_A" value="0" enum="JoyButtonList"> + <constant name="JOY_BUTTON_A" value="0" enum="JoyButton"> Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B. </constant> - <constant name="JOY_BUTTON_B" value="1" enum="JoyButtonList"> + <constant name="JOY_BUTTON_B" value="1" enum="JoyButton"> Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A. </constant> - <constant name="JOY_BUTTON_X" value="2" enum="JoyButtonList"> + <constant name="JOY_BUTTON_X" value="2" enum="JoyButton"> Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y. </constant> - <constant name="JOY_BUTTON_Y" value="3" enum="JoyButtonList"> + <constant name="JOY_BUTTON_Y" value="3" enum="JoyButton"> Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X. </constant> - <constant name="JOY_BUTTON_BACK" value="4" enum="JoyButtonList"> + <constant name="JOY_BUTTON_BACK" value="4" enum="JoyButton"> Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button. </constant> - <constant name="JOY_BUTTON_GUIDE" value="5" enum="JoyButtonList"> + <constant name="JOY_BUTTON_GUIDE" value="5" enum="JoyButton"> Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button. </constant> - <constant name="JOY_BUTTON_START" value="6" enum="JoyButtonList"> + <constant name="JOY_BUTTON_START" value="6" enum="JoyButton"> Game controller SDL start button. Corresponds to the Nintendo + button. </constant> - <constant name="JOY_BUTTON_LEFT_STICK" value="7" enum="JoyButtonList"> + <constant name="JOY_BUTTON_LEFT_STICK" value="7" enum="JoyButton"> Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button. </constant> - <constant name="JOY_BUTTON_RIGHT_STICK" value="8" enum="JoyButtonList"> + <constant name="JOY_BUTTON_RIGHT_STICK" value="8" enum="JoyButton"> Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button. </constant> - <constant name="JOY_BUTTON_LEFT_SHOULDER" value="9" enum="JoyButtonList"> + <constant name="JOY_BUTTON_LEFT_SHOULDER" value="9" enum="JoyButton"> Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button. </constant> - <constant name="JOY_BUTTON_RIGHT_SHOULDER" value="10" enum="JoyButtonList"> + <constant name="JOY_BUTTON_RIGHT_SHOULDER" value="10" enum="JoyButton"> Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button. </constant> - <constant name="JOY_BUTTON_DPAD_UP" value="11" enum="JoyButtonList"> + <constant name="JOY_BUTTON_DPAD_UP" value="11" enum="JoyButton"> Game controller D-pad up button. </constant> - <constant name="JOY_BUTTON_DPAD_DOWN" value="12" enum="JoyButtonList"> + <constant name="JOY_BUTTON_DPAD_DOWN" value="12" enum="JoyButton"> Game controller D-pad down button. </constant> - <constant name="JOY_BUTTON_DPAD_LEFT" value="13" enum="JoyButtonList"> + <constant name="JOY_BUTTON_DPAD_LEFT" value="13" enum="JoyButton"> Game controller D-pad left button. </constant> - <constant name="JOY_BUTTON_DPAD_RIGHT" value="14" enum="JoyButtonList"> + <constant name="JOY_BUTTON_DPAD_RIGHT" value="14" enum="JoyButton"> Game controller D-pad right button. </constant> - <constant name="JOY_BUTTON_MISC1" value="15" enum="JoyButtonList"> + <constant name="JOY_BUTTON_MISC1" value="15" enum="JoyButton"> Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo capture button. </constant> - <constant name="JOY_BUTTON_PADDLE1" value="16" enum="JoyButtonList"> + <constant name="JOY_BUTTON_PADDLE1" value="16" enum="JoyButton"> Game controller SDL paddle 1 button. </constant> - <constant name="JOY_BUTTON_PADDLE2" value="17" enum="JoyButtonList"> + <constant name="JOY_BUTTON_PADDLE2" value="17" enum="JoyButton"> Game controller SDL paddle 2 button. </constant> - <constant name="JOY_BUTTON_PADDLE3" value="18" enum="JoyButtonList"> + <constant name="JOY_BUTTON_PADDLE3" value="18" enum="JoyButton"> Game controller SDL paddle 3 button. </constant> - <constant name="JOY_BUTTON_PADDLE4" value="19" enum="JoyButtonList"> + <constant name="JOY_BUTTON_PADDLE4" value="19" enum="JoyButton"> Game controller SDL paddle 4 button. </constant> - <constant name="JOY_BUTTON_TOUCHPAD" value="20" enum="JoyButtonList"> + <constant name="JOY_BUTTON_TOUCHPAD" value="20" enum="JoyButton"> Game controller SDL touchpad button. </constant> - <constant name="JOY_BUTTON_SDL_MAX" value="21" enum="JoyButtonList"> + <constant name="JOY_BUTTON_SDL_MAX" value="21" enum="JoyButton"> The number of SDL game controller buttons. </constant> - <constant name="JOY_BUTTON_MAX" value="36" enum="JoyButtonList"> + <constant name="JOY_BUTTON_MAX" value="36" enum="JoyButton"> The maximum number of game controller buttons: Android supports up to 36 buttons. </constant> - <constant name="JOY_AXIS_INVALID" value="-1" enum="JoyAxisList"> + <constant name="JOY_AXIS_INVALID" value="-1" enum="JoyAxis"> An invalid game controller axis. </constant> - <constant name="JOY_AXIS_LEFT_X" value="0" enum="JoyAxisList"> + <constant name="JOY_AXIS_LEFT_X" value="0" enum="JoyAxis"> Game controller left joystick x-axis. </constant> - <constant name="JOY_AXIS_LEFT_Y" value="1" enum="JoyAxisList"> + <constant name="JOY_AXIS_LEFT_Y" value="1" enum="JoyAxis"> Game controller left joystick y-axis. </constant> - <constant name="JOY_AXIS_RIGHT_X" value="2" enum="JoyAxisList"> + <constant name="JOY_AXIS_RIGHT_X" value="2" enum="JoyAxis"> Game controller right joystick x-axis. </constant> - <constant name="JOY_AXIS_RIGHT_Y" value="3" enum="JoyAxisList"> + <constant name="JOY_AXIS_RIGHT_Y" value="3" enum="JoyAxis"> Game controller right joystick y-axis. </constant> - <constant name="JOY_AXIS_TRIGGER_LEFT" value="4" enum="JoyAxisList"> + <constant name="JOY_AXIS_TRIGGER_LEFT" value="4" enum="JoyAxis"> Game controller left trigger axis. </constant> - <constant name="JOY_AXIS_TRIGGER_RIGHT" value="5" enum="JoyAxisList"> + <constant name="JOY_AXIS_TRIGGER_RIGHT" value="5" enum="JoyAxis"> Game controller right trigger axis. </constant> - <constant name="JOY_AXIS_SDL_MAX" value="6" enum="JoyAxisList"> + <constant name="JOY_AXIS_SDL_MAX" value="6" enum="JoyAxis"> The number of SDL game controller axes. </constant> - <constant name="JOY_AXIS_MAX" value="10" enum="JoyAxisList"> + <constant name="JOY_AXIS_MAX" value="10" enum="JoyAxis"> The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes. </constant> - <constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MIDIMessage"> MIDI note OFF message. </constant> - <constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MIDIMessage"> MIDI note ON message. </constant> - <constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MIDIMessage"> MIDI aftertouch message. </constant> - <constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MIDIMessage"> MIDI control change message. </constant> - <constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MIDIMessage"> MIDI program change message. </constant> - <constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MIDIMessage"> MIDI channel pressure message. </constant> - <constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MIDIMessage"> MIDI pitch bend message. </constant> <constant name="OK" value="0" enum="Error"> @@ -2405,43 +2431,49 @@ <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="9" enum="PropertyHint"> Hints that an integer property is a bitmask using the optionally named 2D physics layers. </constant> - <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="10" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="10" enum="PropertyHint"> + Hints that an integer property is a bitmask using the optionally named 2D navigation layers. + </constant> + <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="11" enum="PropertyHint"> Hints that an integer property is a bitmask using the optionally named 3D render layers. </constant> - <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="11" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="12" enum="PropertyHint"> Hints that an integer property is a bitmask using the optionally named 3D physics layers. </constant> - <constant name="PROPERTY_HINT_FILE" value="12" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="13" enum="PropertyHint"> + Hints that an integer property is a bitmask using the optionally named 2D navigation layers. + </constant> + <constant name="PROPERTY_HINT_FILE" value="14" enum="PropertyHint"> Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code]. </constant> - <constant name="PROPERTY_HINT_DIR" value="13" enum="PropertyHint"> + <constant name="PROPERTY_HINT_DIR" value="15" enum="PropertyHint"> Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path. </constant> - <constant name="PROPERTY_HINT_GLOBAL_FILE" value="14" enum="PropertyHint"> + <constant name="PROPERTY_HINT_GLOBAL_FILE" value="16" enum="PropertyHint"> Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code]. </constant> - <constant name="PROPERTY_HINT_GLOBAL_DIR" value="15" enum="PropertyHint"> + <constant name="PROPERTY_HINT_GLOBAL_DIR" value="17" enum="PropertyHint"> Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path. </constant> - <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="16" enum="PropertyHint"> + <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="18" enum="PropertyHint"> Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate. </constant> - <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="17" enum="PropertyHint"> + <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="19" enum="PropertyHint"> Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed. </constant> - <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="18" enum="PropertyHint"> + <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="20" enum="PropertyHint"> Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use. </constant> - <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="19" enum="PropertyHint"> + <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="21" enum="PropertyHint"> Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited. </constant> - <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="20" enum="PropertyHint"> + <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="22" enum="PropertyHint"> Hints that an image is compressed using lossy compression. </constant> - <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="21" enum="PropertyHint"> + <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="23" enum="PropertyHint"> Hints that an image is compressed using lossless compression. </constant> - <constant name="PROPERTY_HINT_TYPE_STRING" value="23" enum="PropertyHint"> + <constant name="PROPERTY_HINT_TYPE_STRING" value="25" enum="PropertyHint"> Hint that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. For instance: [codeblock] hint_string = "%s:" % [TYPE_INT] # Array of inteters. @@ -2520,6 +2552,8 @@ <constant name="METHOD_FLAG_FROM_SCRIPT" value="64" enum="MethodFlags"> Deprecated method flag, unused. </constant> + <constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags"> + </constant> <constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags"> Default method flags. </constant> @@ -2562,8 +2596,8 @@ <constant name="TYPE_PLANE" value="12" enum="Variant.Type"> Variable is of type [Plane]. </constant> - <constant name="TYPE_QUAT" value="13" enum="Variant.Type"> - Variable is of type [Quat]. + <constant name="TYPE_QUATERNION" value="13" enum="Variant.Type"> + Variable is of type [Quaternion]. </constant> <constant name="TYPE_AABB" value="14" enum="Variant.Type"> Variable is of type [AABB]. @@ -2571,8 +2605,8 @@ <constant name="TYPE_BASIS" value="15" enum="Variant.Type"> Variable is of type [Basis]. </constant> - <constant name="TYPE_TRANSFORM" value="16" enum="Variant.Type"> - Variable is of type [Transform]. + <constant name="TYPE_TRANSFORM3D" value="16" enum="Variant.Type"> + Variable is of type [Transform3D]. </constant> <constant name="TYPE_COLOR" value="17" enum="Variant.Type"> Variable is of type [Color]. diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 8cd7e6f5fa..af34a948f5 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -41,14 +41,14 @@ Constructs an [AABB] from a position and size. </description> </method> - <method name="abs"> + <method name="abs" qualifiers="const"> <return type="AABB"> </return> <description> Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive. </description> </method> - <method name="encloses"> + <method name="encloses" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="with" type="AABB"> @@ -57,7 +57,7 @@ Returns [code]true[/code] if this [AABB] completely encloses another one. </description> </method> - <method name="expand"> + <method name="expand" qualifiers="const"> <return type="AABB"> </return> <argument index="0" name="to_point" type="Vector3"> @@ -66,14 +66,14 @@ Returns this [AABB] expanded to include a given point. </description> </method> - <method name="get_area"> + <method name="get_area" qualifiers="const"> <return type="float"> </return> <description> Returns the volume of the [AABB]. </description> </method> - <method name="get_endpoint"> + <method name="get_endpoint" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="idx" type="int"> @@ -82,49 +82,49 @@ Gets the position of the 8 endpoints of the [AABB] in space. </description> </method> - <method name="get_longest_axis"> + <method name="get_longest_axis" qualifiers="const"> <return type="Vector3"> </return> <description> Returns the normalized longest axis of the [AABB]. </description> </method> - <method name="get_longest_axis_index"> + <method name="get_longest_axis_index" qualifiers="const"> <return type="int"> </return> <description> Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants). </description> </method> - <method name="get_longest_axis_size"> + <method name="get_longest_axis_size" qualifiers="const"> <return type="float"> </return> <description> Returns the scalar length of the longest axis of the [AABB]. </description> </method> - <method name="get_shortest_axis"> + <method name="get_shortest_axis" qualifiers="const"> <return type="Vector3"> </return> <description> Returns the normalized shortest axis of the [AABB]. </description> </method> - <method name="get_shortest_axis_index"> + <method name="get_shortest_axis_index" qualifiers="const"> <return type="int"> </return> <description> Returns the index of the shortest axis of the [AABB] (according to [Vector3]::AXIS* enum). </description> </method> - <method name="get_shortest_axis_size"> + <method name="get_shortest_axis_size" qualifiers="const"> <return type="float"> </return> <description> Returns the scalar length of the shortest axis of the [AABB]. </description> </method> - <method name="get_support"> + <method name="get_support" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="dir" type="Vector3"> @@ -133,7 +133,7 @@ Returns the support point in a given direction. This is useful for collision detection algorithms. </description> </method> - <method name="grow"> + <method name="grow" qualifiers="const"> <return type="AABB"> </return> <argument index="0" name="by" type="float"> @@ -142,21 +142,21 @@ Returns a copy of the [AABB] grown a given amount of units towards all the sides. </description> </method> - <method name="has_no_area"> + <method name="has_no_area" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if the [AABB] is flat or empty. </description> </method> - <method name="has_no_surface"> + <method name="has_no_surface" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if the [AABB] is empty. </description> </method> - <method name="has_point"> + <method name="has_point" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="point" type="Vector3"> @@ -165,7 +165,7 @@ Returns [code]true[/code] if the [AABB] contains a point. </description> </method> - <method name="intersection"> + <method name="intersection" qualifiers="const"> <return type="AABB"> </return> <argument index="0" name="with" type="AABB"> @@ -174,7 +174,7 @@ Returns the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure. </description> </method> - <method name="intersects"> + <method name="intersects" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="with" type="AABB"> @@ -183,7 +183,7 @@ Returns [code]true[/code] if the [AABB] overlaps with another. </description> </method> - <method name="intersects_plane"> + <method name="intersects_plane" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="plane" type="Plane"> @@ -192,7 +192,7 @@ Returns [code]true[/code] if the [AABB] is on both sides of a plane. </description> </method> - <method name="intersects_ray"> + <method name="intersects_ray" qualifiers="const"> <return type="Variant"> </return> <argument index="0" name="from" type="Vector3"> @@ -202,7 +202,7 @@ <description> </description> </method> - <method name="intersects_segment"> + <method name="intersects_segment" qualifiers="const"> <return type="Variant"> </return> <argument index="0" name="from" type="Vector3"> @@ -213,7 +213,7 @@ Returns [code]true[/code] if the [AABB] intersects the line segment between [code]from[/code] and [code]to[/code]. </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="aabb" type="AABB"> @@ -222,7 +222,7 @@ Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component. </description> </method> - <method name="merge"> + <method name="merge" qualifiers="const"> <return type="AABB"> </return> <argument index="0" name="with" type="AABB"> @@ -242,7 +242,7 @@ <method name="operator *" qualifiers="operator"> <return type="AABB"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> @@ -264,7 +264,7 @@ Beginning corner. Typically has values lower than [member end]. </member> <member name="size" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> - Size from [member position] to [member end]. Typically all components are positive. + Size from [member position] to [member end]. Typically, all components are positive. If the size is negative, you can use [method abs] to fix it. </member> </members> diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index bfdc66623d..fce2b90197 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AStar" inherits="Reference" version="4.0"> <brief_description> - An implementation of A* to find shortest paths among connected points in space. + An implementation of A* to find the shortest paths among connected points in space. </brief_description> <description> A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in three-dimensional space and Euclidean distances by default. @@ -289,6 +289,7 @@ </argument> <description> Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. + [b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector3Array] and will print an error message. </description> </method> <method name="get_point_position" qualifiers="const"> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 2a51678209..3efd2f604c 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -258,6 +258,7 @@ </argument> <description> Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. + [b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector2Array] and will print an error message. </description> </method> <method name="get_point_position" qualifiers="const"> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index f4cf246713..f644606040 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -49,7 +49,7 @@ <method name="register_text_enter"> <return type="void"> </return> - <argument index="0" name="line_edit" type="Node"> + <argument index="0" name="line_edit" type="Control"> </argument> <description> Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted. diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index 969e9cc85b..d18419f163 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -22,7 +22,7 @@ <method name="play"> <return type="void"> </return> - <argument index="0" name="anim" type="StringName" default="@"""> + <argument index="0" name="anim" type="StringName" default="&"""> </argument> <argument index="1" name="backwards" type="bool" default="false"> </argument> @@ -39,7 +39,7 @@ </method> </methods> <members> - <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@"default""> + <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&"default""> The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true"> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 02ccab4e05..39ab317b79 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -20,7 +20,7 @@ <method name="play"> <return type="void"> </return> - <argument index="0" name="anim" type="StringName" default="@"""> + <argument index="0" name="anim" type="StringName" default="&"""> </argument> <description> Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. @@ -35,7 +35,7 @@ </method> </methods> <members> - <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@"default""> + <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&"default""> The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 9720405ffd..02203a3725 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -640,7 +640,7 @@ </argument> <argument index="2" name="location" type="Vector3"> </argument> - <argument index="3" name="rotation" type="Quat"> + <argument index="3" name="rotation" type="Quaternion"> </argument> <argument index="4" name="scale" type="Vector3"> </argument> @@ -656,7 +656,7 @@ <argument index="1" name="time_sec" type="float"> </argument> <description> - Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]). + Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quaternion]) and scale ([Vector3]). </description> </method> <method name="value_track_get_key_indices" qualifiers="const"> @@ -710,7 +710,7 @@ [b]Note:[/b] Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. </member> <member name="loop" type="bool" setter="set_loop" getter="has_loop" default="false"> - A flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. + A flag indicating that the animation must loop. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. </member> <member name="step" type="float" setter="set_step" getter="get_step" default="0.1"> The animation step value. @@ -727,8 +727,8 @@ <constant name="TYPE_VALUE" value="0" enum="TrackType"> Value tracks set values in node properties, but only those which can be Interpolated. </constant> - <constant name="TYPE_TRANSFORM" value="1" enum="TrackType"> - Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are interpolated. + <constant name="TYPE_TRANSFORM3D" value="1" enum="TrackType"> + Transform3D tracks are used to change node local transforms or skeleton pose bones of 3D nodes. Transitions are interpolated. </constant> <constant name="TYPE_METHOD" value="2" enum="TrackType"> Method tracks call functions with given arguments per key. diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index 3f0843c112..75dae6a48e 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -14,7 +14,7 @@ <methods> </methods> <members> - <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="@"""> + <member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&"""> Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]. </member> </members> diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index 2f0ebd7de6..7f07afecee 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -10,7 +10,7 @@ <methods> </methods> <members> - <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="@"""> + <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="&"""> Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]: [codeblocks] [gdscript] diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml index eb5335c792..171d65fbe0 100644 --- a/doc/classes/AnimationNodeTimeSeek.xml +++ b/doc/classes/AnimationNodeTimeSeek.xml @@ -4,7 +4,27 @@ A time-seeking animation node to be used with [AnimationTree]. </brief_description> <description> - This node can be used to cause a seek command to happen to any sub-children of the graph. After setting the time, this value returns to -1. + This node can be used to cause a seek command to happen to any sub-children of the animation graph. Use this node type to play an [Animation] from the start or a certain playback position inside the [AnimationNodeBlendTree]. After setting the time and changing the animation playback, the seek node automatically goes into sleep mode on the next process frame by setting its [code]seek_position[/code] value to [code]-1.0[/code]. + [codeblocks] + [gdscript] + # Play child animation from the start. + animation_tree.set("parameters/Seek/seek_position", 0.0) + # Alternative syntax (same result as above). + animation_tree["parameters/Seek/seek_position"] = 0.0 + + # Play child animation from 12 second timestamp. + animation_tree.set("parameters/Seek/seek_position", 12.0) + # Alternative syntax (same result as above). + animation_tree["parameters/Seek/seek_position"] = 12.0 + [/gdscript] + [csharp] + // Play child animation from the start. + animationTree.Set("parameters/Seek/seek_position", 0.0); + + // Play child animation from 12 second timestamp. + animationTree.Set("parameters/Seek/seek_position", 12.0); + [/csharp] + [/codeblocks] </description> <tutorials> <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index e5ba1d58f7..7696f36009 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -237,7 +237,7 @@ </member> <member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default=""""> The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations. - [b]Note[/b]: while this property appears in the inspector, it's not meant to be edited and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]. + [b]Note[/b]: while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]. </member> <member name="current_animation_length" type="float" setter="" getter="get_current_animation_length"> The length (in seconds) of the currently being played animation. diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index 2517941133..af7d8d73e8 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -21,10 +21,10 @@ </description> </method> <method name="get_root_motion_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> - Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM], returns an identity transformation. + Retrieve the motion of the [member root_motion_track] as a [Transform3D] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM3D], returns an identity transformation. </description> </method> <method name="rename_parameter"> @@ -50,7 +50,7 @@ </member> <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath("")"> The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code]. - If the track has type [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place. + If the track has type [constant Animation.TYPE_TRANSFORM3D], the transformation will be cancelled visually, and the animation will appear to stay in place. </member> <member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root"> The root animation node of this [AnimationTree]. See [AnimationNode]. diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 9711a2a35b..96333988f8 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Area2D" inherits="CollisionObject2D" version="4.0"> <brief_description> - 2D area for detection and 2D physics influence. + 2D area for detection and physics and audio influence. </brief_description> <description> - 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). + 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus. </description> <tutorials> <link title="Using Area2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html</link> @@ -13,24 +13,6 @@ <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link> </tutorials> <methods> - <method name="get_collision_layer_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <description> - Returns an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer. - </description> - </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <description> - Returns an individual bit on the collision mask. Describes whether this area will collide with others on the given layer. - </description> - </method> <method name="get_overlapping_areas" qualifiers="const"> <return type="Area2D[]"> </return> @@ -66,48 +48,20 @@ The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). </description> </method> - <method name="set_collision_layer_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> - <description> - Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier. - </description> - </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> - <description> - Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. - </description> - </method> </methods> <members> <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="1.0"> The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping. </member> - <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="@"Master""> + <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="&"Master""> The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false"> If [code]true[/code], the area's audio bus overrides the default audio bus. </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - </member> - <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="98.0"> - The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. + <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="980.0"> + The area's gravity intensity (in pixels per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. </member> <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0"> The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. @@ -153,7 +107,7 @@ </description> </signal> <signal name="area_shape_entered"> - <argument index="0" name="area_id" type="int"> + <argument index="0" name="area_rid" type="RID"> </argument> <argument index="1" name="area" type="Area2D"> </argument> @@ -170,7 +124,7 @@ </description> </signal> <signal name="area_shape_exited"> - <argument index="0" name="area_id" type="int"> + <argument index="0" name="area_rid" type="RID"> </argument> <argument index="1" name="area" type="Area2D"> </argument> @@ -203,7 +157,7 @@ </description> </signal> <signal name="body_shape_entered"> - <argument index="0" name="body_id" type="int"> + <argument index="0" name="body_rid" type="RID"> </argument> <argument index="1" name="body" type="Node2D"> </argument> @@ -220,7 +174,7 @@ </description> </signal> <signal name="body_shape_exited"> - <argument index="0" name="body_id" type="int"> + <argument index="0" name="body_rid" type="RID"> </argument> <argument index="1" name="body" type="Node2D"> </argument> diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index 4271769155..a2724f3f23 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -1,34 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Area3D" inherits="CollisionObject3D" version="4.0"> <brief_description> - General-purpose area node for detection and 3D physics influence. + 3D area for detection and physics and audio influence. </brief_description> <description> - 3D area that detects [CollisionObject3D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). + 3D area that detects [CollisionObject3D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to custom audio buses. </description> <tutorials> <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link> </tutorials> <methods> - <method name="get_collision_layer_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <description> - Returns an individual bit on the layer mask. - </description> - </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <description> - Returns an individual bit on the collision mask. - </description> - </method> <method name="get_overlapping_areas" qualifiers="const"> <return type="Area3D[]"> </return> @@ -64,48 +46,20 @@ The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). </description> </method> - <method name="set_collision_layer_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> - <description> - Set/clear individual bits on the layer mask. This simplifies editing this [Area3D]'s layers. - </description> - </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> - <description> - Set/clear individual bits on the collision mask. This simplifies editing which [Area3D] layers this [Area3D] scans. - </description> - </method> </methods> <members> <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.1"> The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping. </member> - <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="@"Master""> + <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="&"Master""> The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false"> If [code]true[/code], the area's audio bus overrides the default audio bus. </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - </member> <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="9.8"> - The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. + The area's gravity intensity (in meters per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. </member> <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0"> The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. @@ -135,7 +89,7 @@ <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false"> If [code]true[/code], the area applies reverb to its associated audio. </member> - <member name="reverb_bus_name" type="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="@"Master""> + <member name="reverb_bus_name" type="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="&"Master""> The reverb bus name to use for this area's associated audio. </member> <member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" default="0.0"> @@ -163,7 +117,7 @@ </description> </signal> <signal name="area_shape_entered"> - <argument index="0" name="area_id" type="int"> + <argument index="0" name="area_rid" type="RID"> </argument> <argument index="1" name="area" type="Area3D"> </argument> @@ -180,7 +134,7 @@ </description> </signal> <signal name="area_shape_exited"> - <argument index="0" name="area_id" type="int"> + <argument index="0" name="area_rid" type="RID"> </argument> <argument index="1" name="area" type="Area3D"> </argument> @@ -213,7 +167,7 @@ </description> </signal> <signal name="body_shape_entered"> - <argument index="0" name="body_id" type="int"> + <argument index="0" name="body_rid" type="RID"> </argument> <argument index="1" name="body" type="Node3D"> </argument> @@ -230,7 +184,7 @@ </description> </signal> <signal name="body_shape_exited"> - <argument index="0" name="body_id" type="int"> + <argument index="0" name="body_rid" type="RID"> </argument> <argument index="1" name="body" type="Node3D"> </argument> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 8fb688a8ae..49775fa28b 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -166,7 +166,7 @@ [/codeblock] </description> </method> - <method name="back"> + <method name="back" qualifiers="const"> <return type="Variant"> </return> <description> @@ -207,7 +207,7 @@ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]. </description> </method> - <method name="count"> + <method name="count" qualifiers="const"> <return type="int"> </return> <argument index="0" name="value" type="Variant"> @@ -216,7 +216,7 @@ Returns the number of times an element is in the array. </description> </method> - <method name="duplicate"> + <method name="duplicate" qualifiers="const"> <return type="Array"> </return> <argument index="0" name="deep" type="bool" default="false"> @@ -237,7 +237,46 @@ [b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed. </description> </method> - <method name="find"> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="Variant"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements: + [codeblocks] + [gdscript] + var array = [] + array.resize(10) + array.fill(0) # Initialize the 10 elements to 0. + [/gdscript] + [csharp] + var array = new Godot.Collections.Array{}; + array.Resize(10); + array.Fill(0); // Initialize the 10 elements to 0. + [/csharp] + [/codeblocks] + </description> + </method> + <method name="filter" qualifiers="const"> + <return type="Array"> + </return> + <argument index="0" name="method" type="Callable"> + </argument> + <description> + Calls the provided [Callable] on each element in the array and returns a new array with the elements for which the method returned [code]true[/code]. + The callable's method should take one [Variant] parameter (the current array element) and return a boolean value. + [codeblock] + func _ready(): + print([1, 2, 3].filter(remove_1)) # Prints [2, 3]. + print([1, 2, 3].filter(func(number): return number != 1)) # Same as above, but using lambda function. + + func remove_1(number): + return number != 1 + [/codeblock] + </description> + </method> + <method name="find" qualifiers="const"> <return type="int"> </return> <argument index="0" name="what" type="Variant"> @@ -248,7 +287,7 @@ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. </description> </method> - <method name="find_last"> + <method name="find_last" qualifiers="const"> <return type="int"> </return> <argument index="0" name="value" type="Variant"> @@ -257,7 +296,7 @@ Searches the array in reverse order for a value and returns its index or [code]-1[/code] if not found. </description> </method> - <method name="front"> + <method name="front" qualifiers="const"> <return type="Variant"> </return> <description> @@ -265,7 +304,7 @@ [b]Note:[/b] Calling this function is not the same as writing [code]array[0][/code]. If the array is empty, accessing by index will pause project execution when running from the editor. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="value" type="Variant"> @@ -294,20 +333,20 @@ [gdscript] # Will evaluate to `true`. if 2 in [2, 4, 6, 8]: - print("Containes!") + print("Contains!") [/gdscript] [csharp] // As there is no "in" keyword in C#, you have to use Contains var array = new Godot.Collections.Array{2, 4, 6, 8}; if (array.Contains(2)) { - GD.Print("Containes!"); + GD.Print("Contains!"); } [/csharp] [/codeblocks] </description> </method> - <method name="hash"> + <method name="hash" qualifiers="const"> <return type="int"> </return> <description> @@ -328,28 +367,39 @@ [b]Note:[/b] On large arrays, this method will be slower if the inserted element is close to the beginning of the array (index 0). This is because all elements placed after the newly inserted element have to be reindexed. </description> </method> - <method name="invert"> - <return type="void"> + <method name="is_empty" qualifiers="const"> + <return type="bool"> </return> <description> - Reverses the order of the elements in the array. + Returns [code]true[/code] if the array is empty. </description> </method> - <method name="is_empty"> - <return type="bool"> + <method name="map" qualifiers="const"> + <return type="Array"> </return> + <argument index="0" name="method" type="Callable"> + </argument> <description> - Returns [code]true[/code] if the array is empty. + Calls the provided [Callable] for each element in the array and returns a new array filled with values returned by the method. + The callable's method should take one [Variant] parameter (the current array element) and can return any [Variant]. + [codeblock] + func _ready(): + print([1, 2, 3].map(negate)) # Prints [-1, -2, -3]. + print([1, 2, 3].map(func(number): return -number)) # Same as above, but using lambda function. + + func negate(number): + return -number + [/codeblock] </description> </method> - <method name="max"> + <method name="max" qualifiers="const"> <return type="Variant"> </return> <description> Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> - <method name="min"> + <method name="min" qualifiers="const"> <return type="Variant"> </return> <description> @@ -454,6 +504,26 @@ [b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be. </description> </method> + <method name="reduce" qualifiers="const"> + <return type="Variant"> + </return> + <argument index="0" name="method" type="Callable"> + </argument> + <argument index="1" name="accum" type="Variant" default="null"> + </argument> + <description> + Calls the provided [Callable] for each element in array and accumulates the result in [code]accum[/code]. + The callable's method takes two arguments: the current value of [code]accum[/code] and the current array element. If [code]accum[/code] is [code]null[/code] (default value), the iteration will start from the second element, with the first one used as initial value of [code]accum[/code]. + [codeblock] + func _ready(): + print([1, 2, 3].reduce(sum, 10)) # Prints 16. + print([1, 2, 3].reduce(func(accum, number): return accum + number, 10)) # Same as above, but using lambda function. + + func sum(accum, number): + return accum + number + [/codeblock] + </description> + </method> <method name="remove"> <return type="void"> </return> @@ -474,7 +544,14 @@ Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are [code]null[/code]. </description> </method> - <method name="rfind"> + <method name="reverse"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> + <method name="rfind" qualifiers="const"> <return type="int"> </return> <argument index="0" name="what" type="Variant"> @@ -492,14 +569,14 @@ Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GlobalScope.randi]. Call [method @GlobalScope.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling. </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> Returns the number of elements in the array. </description> </method> - <method name="slice"> + <method name="slice" qualifiers="const"> <return type="Array"> </return> <argument index="0" name="begin" type="int"> @@ -538,7 +615,7 @@ <argument index="0" name="func" type="Callable"> </argument> <description> - Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. + Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. For two elements [code]a[/code] and [code]b[/code], if the given method returns [code]true[/code], element [code]b[/code] will be after element [code]a[/code] in the array. [b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. [codeblocks] [gdscript] diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index e2c4ed1430..7826932179 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -113,7 +113,7 @@ <method name="lightmap_unwrap"> <return type="int" enum="Error"> </return> - <argument index="0" name="transform" type="Transform"> + <argument index="0" name="transform" type="Transform3D"> </argument> <argument index="1" name="texel_size" type="float"> </argument> @@ -128,6 +128,16 @@ Will regenerate normal maps for the [ArrayMesh]. </description> </method> + <method name="set_blend_shape_name"> + <return type="void"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <description> + </description> + </method> <method name="surface_find_by_name" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml index 5bc077ef49..9865319419 100644 --- a/doc/classes/AtlasTexture.xml +++ b/doc/classes/AtlasTexture.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AtlasTexture" inherits="Texture2D" version="4.0"> <brief_description> - Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls. + Crops out one part of a texture, such as a texture from a texture atlas. </brief_description> <description> - [Texture2D] resource aimed at managing big textures files that pack multiple smaller textures. Consists of a [Texture2D], a margin that defines the border width, and a region that defines the actual area of the AtlasTexture. + [Texture2D] resource that crops out one part of the [member atlas] texture, defined by [member region]. The main use case is cropping out textures from a texture atlas, which is a big texture file that packs multiple smaller textures. Consists of a [Texture2D] for the [member atlas], a [member region] that defines the area of [member atlas] to use, and a [member margin] that defines the border width. + [AtlasTexture] cannot be used in an [AnimatedTexture], cannot be tiled in nodes such as [TextureRect], and does not work properly if used inside of other [AtlasTexture] resources. Multiple [AtlasTexture] resources can be used to crop multiple textures from the atlas. Using a texture atlas helps to optimize video memory costs and render calls compared to using multiple small files. </description> <tutorials> </tutorials> diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml index cf3d87c2e4..c7ee621ca6 100644 --- a/doc/classes/AudioEffectCapture.xml +++ b/doc/classes/AudioEffectCapture.xml @@ -67,7 +67,7 @@ </methods> <members> <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.1"> - Length of the internal ring buffer, in seconds. + Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized. </member> </members> <constants> diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml index 3117978d8a..4e924bcb65 100644 --- a/doc/classes/AudioEffectCompressor.xml +++ b/doc/classes/AudioEffectCompressor.xml @@ -32,7 +32,7 @@ <member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms" default="250.0"> Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000. </member> - <member name="sidechain" type="StringName" setter="set_sidechain" getter="get_sidechain" default="@"""> + <member name="sidechain" type="StringName" setter="set_sidechain" getter="get_sidechain" default="&"""> Reduce the sound level using another audio bus for threshold detection. </member> <member name="threshold" type="float" setter="set_threshold" getter="get_threshold" default="0.0"> diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml index afe364de63..917556fded 100644 --- a/doc/classes/AudioEffectPitchShift.xml +++ b/doc/classes/AudioEffectPitchShift.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFT_Size" default="3"> + <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFTSize" default="3"> </member> <member name="oversampling" type="int" setter="set_oversampling" getter="get_oversampling" default="4"> </member> @@ -21,18 +21,18 @@ </member> </members> <constants> - <constant name="FFT_SIZE_256" value="0" enum="FFT_Size"> + <constant name="FFT_SIZE_256" value="0" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_512" value="1" enum="FFT_Size"> + <constant name="FFT_SIZE_512" value="1" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_1024" value="2" enum="FFT_Size"> + <constant name="FFT_SIZE_1024" value="2" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_2048" value="3" enum="FFT_Size"> + <constant name="FFT_SIZE_2048" value="3" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_4096" value="4" enum="FFT_Size"> + <constant name="FFT_SIZE_4096" value="4" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_MAX" value="5" enum="FFT_Size"> - Represents the size of the [enum FFT_Size] enum. + <constant name="FFT_SIZE_MAX" value="5" enum="FFTSize"> + Represents the size of the [enum FFTSize] enum. </constant> </constants> </class> diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml index 4c08b18f1d..79a8932e25 100644 --- a/doc/classes/AudioEffectSpectrumAnalyzer.xml +++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml @@ -11,24 +11,24 @@ <members> <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0"> </member> - <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectSpectrumAnalyzer.FFT_Size" default="2"> + <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectSpectrumAnalyzer.FFTSize" default="2"> </member> <member name="tap_back_pos" type="float" setter="set_tap_back_pos" getter="get_tap_back_pos" default="0.01"> </member> </members> <constants> - <constant name="FFT_SIZE_256" value="0" enum="FFT_Size"> + <constant name="FFT_SIZE_256" value="0" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_512" value="1" enum="FFT_Size"> + <constant name="FFT_SIZE_512" value="1" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_1024" value="2" enum="FFT_Size"> + <constant name="FFT_SIZE_1024" value="2" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_2048" value="3" enum="FFT_Size"> + <constant name="FFT_SIZE_2048" value="3" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_4096" value="4" enum="FFT_Size"> + <constant name="FFT_SIZE_4096" value="4" enum="FFTSize"> </constant> - <constant name="FFT_SIZE_MAX" value="5" enum="FFT_Size"> - Represents the size of the [enum FFT_Size] enum. + <constant name="FFT_SIZE_MAX" value="5" enum="FFTSize"> + Represents the size of the [enum FFTSize] enum. </constant> </constants> </class> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 55190c5f9f..7c7f7e0cea 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -5,6 +5,7 @@ </brief_description> <description> Plays an audio stream non-positionally. + To play audio positionally, use [AudioStreamPlayer2D] or [AudioStreamPlayer3D] instead of [AudioStreamPlayer]. </description> <tutorials> <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> @@ -59,7 +60,7 @@ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&"Master""> Bus on which this audio is playing. </member> <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0"> diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index d8b9385736..b1e18ab550 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamPlayer2D" inherits="Node2D" version="4.0"> <brief_description> - Plays audio in 2D. + Plays positional sound in 2D space. </brief_description> <description> Plays audio that dampens with distance from screen center. + See also [AudioStreamPlayer] to play a sound non-positionally. + [b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing). </description> <tutorials> <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> @@ -60,7 +62,7 @@ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&"Master""> Bus on which this audio is playing. </member> <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0"> diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 7a8c4b2cc7..3bd20b4b9b 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -1,11 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamPlayer3D" inherits="Node3D" version="4.0"> <brief_description> - Plays 3D sound in 3D space. + Plays positional sound in 3D space. </brief_description> <description> Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting [member attenuation_filter_cutoff_hz] to [code]20500[/code]. By default, audio is heard from the camera position. This can be changed by adding a [Listener3D] node to the scene and enabling it by calling [method Listener3D.make_current] on it. + See also [AudioStreamPlayer] to play a sound non-positionally. + [b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member unit_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing). </description> <tutorials> <link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> @@ -67,7 +69,7 @@ <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> If [code]true[/code], audio plays when the AudioStreamPlayer3D node is added to scene tree. </member> - <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&"Master""> The bus on which this audio is playing. </member> <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking" default="0"> @@ -106,7 +108,7 @@ <member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db" default="0.0"> The base sound level unaffected by dampening, in decibels. </member> - <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" default="1.0"> + <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" default="10.0"> The factor for the attenuation effect. Higher values make the sound audible over a larger distance. </member> </members> diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml index 7cc6a5613b..9a70b8f20c 100644 --- a/doc/classes/BackBufferCopy.xml +++ b/doc/classes/BackBufferCopy.xml @@ -4,7 +4,7 @@ Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the [code]texture(SCREEN_TEXTURE, ...)[/code] function. </brief_description> <description> - Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use the [code]texture(SCREEN_TEXTURE, ...)[/code] function in your shader scripts to access the buffer. + Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is buffered with the content of the screen it covers, or the entire screen according to the copy mode set. Use the [code]texture(SCREEN_TEXTURE, ...)[/code] function in your shader scripts to access the buffer. [b]Note:[/b] Since this node inherits from [Node2D] (and not [Control]), anchors and margins won't apply to child [Control]-derived nodes. This can be problematic when resizing the window. To avoid this, add [Control]-derived nodes as [i]siblings[/i] to the BackBufferCopy node instead of adding them as children. </description> <tutorials> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 45ef4cb14c..f7e31f5f9c 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -49,7 +49,7 @@ </member> <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1"> Binary mask to choose which mouse buttons this button will respond to. - To allow both left-click and right-click, use [code]BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT[/code]. + To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code]. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], the button is in disabled state and can't be clicked or toggled. diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 31e6ea5e54..49edb4c691 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -82,7 +82,7 @@ Texture to multiply by [member albedo_color]. Used for basic texturing of objects. </member> <member name="alpha_antialiasing_edge" type="float" setter="set_alpha_antialiasing_edge" getter="get_alpha_antialiasing_edge"> - Threshold at which antialiasing will by applied on the alpha channel. + Threshold at which antialiasing will be applied on the alpha channel. </member> <member name="alpha_antialiasing_mode" type="int" setter="set_alpha_antialiasing" getter="get_alpha_antialiasing" enum="BaseMaterial3D.AlphaAntiAliasing"> The type of alpha antialiasing to apply. See [enum AlphaAntiAliasing]. @@ -93,7 +93,7 @@ <member name="alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold"> Threshold at which the alpha scissor will discard values. </member> - <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy"> + <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy" default="0.0"> The strength of the anisotropy effect. </member> <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> @@ -105,19 +105,19 @@ <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], ambient occlusion is enabled. Ambient occlusion darkens areas based on the [member ao_texture]. </member> - <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect"> + <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect" default="0.0"> Amount that ambient occlusion affects lighting from lights. If [code]0[/code], ambient occlusion only affects ambient light. If [code]1[/code], ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic. </member> - <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag"> + <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], use [code]UV2[/code] coordinates to look up from the [member ao_texture]. </member> <member name="ao_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture that defines the amount of ambient occlusion for a given point on the object. </member> - <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="BaseMaterial3D.TextureChannel"> + <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0"> Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> - <member name="backlight" type="Color" setter="set_backlight" getter="get_backlight"> + <member name="backlight" type="Color" setter="set_backlight" getter="get_backlight" default="Color( 0, 0, 0, 1 )"> The color used by the backlight effect. Represents the light passing through an object. </member> <member name="backlight_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> @@ -127,7 +127,7 @@ Texture used to control the backlight effect per-pixel. Added to [member backlight]. </member> <member name="billboard_keep_scale" type="bool" setter="set_flag" getter="get_flag" default="false"> - If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member billboard_mode] is [constant BILLBOARD_ENABLED]. + If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. Only applies when [member billboard_mode] is [constant BILLBOARD_ENABLED]. </member> <member name="billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0"> Controls how the object faces the camera. See [enum BillboardMode]. @@ -137,13 +137,14 @@ The material's blend mode. [b]Note:[/b] Values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode]. </member> - <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat"> + <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat" default="1.0"> Sets the strength of the clearcoat effect. Setting to [code]0[/code] looks the same as disabling the clearcoat effect. </member> <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough. + [b]Note:[/b] Clearcoat rendering is not visible if the material's [member shading_mode] is [constant SHADING_MODE_UNSHADED]. </member> - <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss"> + <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss" default="0.5"> Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat. </member> <member name="clearcoat_texture" type="Texture2D" setter="set_texture" getter="get_texture"> @@ -158,7 +159,7 @@ <member name="detail_albedo" type="Texture2D" setter="set_texture" getter="get_texture"> Texture that specifies the color of the detail overlay. </member> - <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="BaseMaterial3D.BlendMode"> + <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="BaseMaterial3D.BlendMode" default="0"> Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options. </member> <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> @@ -171,7 +172,7 @@ Texture that specifies the per-pixel normal of the detail overlay. [b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. </member> - <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV"> + <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV" default="0"> Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options. </member> <member name="diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" enum="BaseMaterial3D.DiffuseMode" default="0"> @@ -183,30 +184,30 @@ <member name="disable_receive_shadows" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the object receives no shadow that would otherwise be cast onto it. </member> - <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance"> + <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance" default="10.0"> Distance at which the object appears fully opaque. [b]Note:[/b] If [code]distance_fade_max_distance[/code] is less than [code]distance_fade_min_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code]. </member> - <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance"> + <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance" default="0.0"> Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible. [b]Note:[/b] If [code]distance_fade_min_distance[/code] is greater than [code]distance_fade_max_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code]. </member> <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="BaseMaterial3D.DistanceFadeMode" default="0"> Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s. </member> - <member name="emission" type="Color" setter="set_emission" getter="get_emission"> + <member name="emission" type="Color" setter="set_emission" getter="get_emission" default="Color( 0, 0, 0, 1 )"> The emitted light's color. See [member emission_enabled]. </member> <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [GIProbe] is used and this object is used in baked lighting. + If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [VoxelGI] is used and this object is used in baked lighting. </member> - <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy"> + <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0"> The emitted light's strength. See [member emission_enabled]. </member> - <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag"> + <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag" default="false"> Use [code]UV2[/code] to read from the [member emission_texture]. </member> - <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="BaseMaterial3D.EmissionOperator"> + <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="BaseMaterial3D.EmissionOperator" default="0"> Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum EmissionOperator] for options. </member> <member name="emission_texture" type="Texture2D" setter="set_texture" getter="get_texture"> @@ -221,21 +222,23 @@ <member name="grow_amount" type="float" setter="set_grow" getter="get_grow" default="0.0"> Grows object vertices in the direction of their normals. </member> - <member name="heightmap_deep_parallax" type="bool" setter="set_heightmap_deep_parallax" getter="is_heightmap_deep_parallax_enabled"> + <member name="heightmap_deep_parallax" type="bool" setter="set_heightmap_deep_parallax" getter="is_heightmap_deep_parallax_enabled" default="false"> </member> <member name="heightmap_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also [member normal_enabled]. + [b]Note:[/b] Height mapping is not supported if triplanar mapping is used on the same material. The value of [member heightmap_enabled] will be ignored if [member uv1_triplanar] is enabled. </member> - <member name="heightmap_flip_binormal" type="bool" setter="set_heightmap_deep_parallax_flip_binormal" getter="get_heightmap_deep_parallax_flip_binormal"> + <member name="heightmap_flip_binormal" type="bool" setter="set_heightmap_deep_parallax_flip_binormal" getter="get_heightmap_deep_parallax_flip_binormal" default="false"> </member> - <member name="heightmap_flip_tangent" type="bool" setter="set_heightmap_deep_parallax_flip_tangent" getter="get_heightmap_deep_parallax_flip_tangent"> + <member name="heightmap_flip_tangent" type="bool" setter="set_heightmap_deep_parallax_flip_tangent" getter="get_heightmap_deep_parallax_flip_tangent" default="false"> </member> - <member name="heightmap_flip_texture" type="bool" setter="set_flag" getter="get_flag"> + <member name="heightmap_flip_texture" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> <member name="heightmap_max_layers" type="int" setter="set_heightmap_deep_parallax_max_layers" getter="get_heightmap_deep_parallax_max_layers"> </member> <member name="heightmap_min_layers" type="int" setter="set_heightmap_deep_parallax_min_layers" getter="get_heightmap_deep_parallax_min_layers"> </member> - <member name="heightmap_scale" type="float" setter="set_heightmap_scale" getter="get_heightmap_scale"> + <member name="heightmap_scale" type="float" setter="set_heightmap_scale" getter="get_heightmap_scale" default="0.05"> </member> <member name="heightmap_texture" type="Texture2D" setter="set_texture" getter="get_texture"> </member> @@ -258,7 +261,7 @@ <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], normal mapping is enabled. </member> - <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale"> + <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale" default="1.0"> The strength of the normal map's effect. </member> <member name="normal_texture" type="Texture2D" setter="set_texture" getter="get_texture"> @@ -279,7 +282,7 @@ <member name="point_size" type="float" setter="set_point_size" getter="get_point_size" default="1.0"> The point size in pixels. See [member use_point_size]. </member> - <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance"> + <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance" default="1.0"> Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade. </member> <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled" default="false"> @@ -288,25 +291,26 @@ <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object. </member> - <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction"> + <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction" default="0.05"> The strength of the refraction effect. </member> <member name="refraction_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture that controls the strength of the refraction per-pixel. Multiplied by [member refraction_scale]. </member> - <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="BaseMaterial3D.TextureChannel"> + <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0"> Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> - <member name="rim" type="float" setter="set_rim" getter="get_rim"> + <member name="rim" type="float" setter="set_rim" getter="get_rim" default="1.0"> Sets the strength of the rim lighting effect. </member> <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. + [b]Note:[/b] Rim lighting is not visible if the material's [member shading_mode] is [constant SHADING_MODE_UNSHADED]. </member> <member name="rim_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by [member rim]. </member> - <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint"> + <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint" default="0.5"> The amount of to blend light and albedo color when rendering rim effect. If [code]0[/code] the light color is used, while [code]1[/code] means albedo color is used. An intermediate value generally works best. </member> <member name="roughness" type="float" setter="set_roughness" getter="get_roughness" default="1.0"> @@ -330,24 +334,24 @@ <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. </member> - <member name="subsurf_scatter_skin_mode" type="bool" setter="set_flag" getter="get_flag"> + <member name="subsurf_scatter_skin_mode" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin. </member> - <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength"> + <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength" default="0.0"> The strength of the subsurface scattering effect. </member> <member name="subsurf_scatter_texture" type="Texture2D" setter="set_texture" getter="get_texture"> Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength]. </member> - <member name="subsurf_scatter_transmittance_boost" type="float" setter="set_transmittance_boost" getter="get_transmittance_boost"> + <member name="subsurf_scatter_transmittance_boost" type="float" setter="set_transmittance_boost" getter="get_transmittance_boost" default="0.0"> </member> - <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color"> + <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color" default="Color( 1, 1, 1, 1 )"> </member> - <member name="subsurf_scatter_transmittance_curve" type="float" setter="set_transmittance_curve" getter="get_transmittance_curve"> + <member name="subsurf_scatter_transmittance_curve" type="float" setter="set_transmittance_curve" getter="get_transmittance_curve" default="1.0"> </member> - <member name="subsurf_scatter_transmittance_depth" type="float" setter="set_transmittance_depth" getter="get_transmittance_depth"> + <member name="subsurf_scatter_transmittance_depth" type="float" setter="set_transmittance_depth" getter="get_transmittance_depth" default="0.1"> </member> - <member name="subsurf_scatter_transmittance_enabled" type="bool" setter="set_feature" getter="get_feature"> + <member name="subsurf_scatter_transmittance_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> </member> <member name="subsurf_scatter_transmittance_texture" type="Texture2D" setter="set_texture" getter="get_texture"> </member> @@ -360,6 +364,8 @@ <member name="transparency" type="int" setter="set_transparency" getter="get_transparency" enum="BaseMaterial3D.Transparency" default="0"> If [code]true[/code], transparency is enabled on the body. See also [member blend_mode]. </member> + <member name="use_particle_trails" type="bool" setter="set_flag" getter="get_flag" default="false"> + </member> <member name="use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], render point size can be changed. [b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size]. @@ -651,7 +657,9 @@ <constant name="FLAG_SUBSURFACE_MODE_SKIN" value="18" enum="Flags"> Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin. </constant> - <constant name="FLAG_MAX" value="19" enum="Flags"> + <constant name="FLAG_PARTICLE_TRAILS_MODE" value="19" enum="Flags"> + </constant> + <constant name="FLAG_MAX" value="20" enum="Flags"> Represents the size of the [enum Flags] enum. </constant> <constant name="DIFFUSE_BURLEY" value="0" enum="DiffuseMode"> @@ -663,10 +671,7 @@ <constant name="DIFFUSE_LAMBERT_WRAP" value="2" enum="DiffuseMode"> Extends Lambert to cover more than 90 degrees when roughness increases. </constant> - <constant name="DIFFUSE_OREN_NAYAR" value="3" enum="DiffuseMode"> - Attempts to use roughness to emulate microsurfacing. - </constant> - <constant name="DIFFUSE_TOON" value="4" enum="DiffuseMode"> + <constant name="DIFFUSE_TOON" value="3" enum="DiffuseMode"> Uses a hard cut for lighting, with smoothing affected by roughness. </constant> <constant name="SPECULAR_SCHLICK_GGX" value="0" enum="SpecularMode"> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 4c9cd5702e..14fca04672 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -4,7 +4,7 @@ 3×3 matrix datatype. </brief_description> <description> - 3×3 matrix used for 3D rotation and scale. Almost always used as an orthogonal basis for a Transform. + 3×3 matrix used for 3D rotation and scale. Almost always used as an orthogonal basis for a [Transform3D]. Contains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). Can also be accessed as array of 3D vectors. These vectors are normally orthogonal to each other, but are not necessarily normalized (due to scaling). For more information, read the "Matrices and transforms" documentation article. @@ -53,13 +53,13 @@ </argument> <description> Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle). - Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles. + Consider using the [Quaternion] constructor instead, which uses a quaternion instead of Euler angles. </description> </method> <method name="Basis" qualifiers="constructor"> <return type="Basis"> </return> - <argument index="0" name="from" type="Quat"> + <argument index="0" name="from" type="Quaternion"> </argument> <description> Constructs a pure rotation basis matrix from the given quaternion. @@ -78,7 +78,7 @@ Constructs a basis matrix from 3 axis vectors (matrix columns). </description> </method> - <method name="determinant"> + <method name="determinant" qualifiers="const"> <return type="float"> </return> <description> @@ -86,43 +86,43 @@ A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid. </description> </method> - <method name="get_euler"> + <method name="get_euler" qualifiers="const"> <return type="Vector3"> </return> <description> Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). - Consider using the [method get_rotation_quat] method instead, which returns a [Quat] quaternion instead of Euler angles. + Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles. </description> </method> - <method name="get_orthogonal_index"> + <method name="get_orthogonal_index" qualifiers="const"> <return type="int"> </return> <description> This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the [GridMap] editor. For further details, refer to the Godot source code. </description> </method> - <method name="get_rotation_quat"> - <return type="Quat"> + <method name="get_rotation_quaternion" qualifiers="const"> + <return type="Quaternion"> </return> <description> Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles. </description> </method> - <method name="get_scale"> + <method name="get_scale" qualifiers="const"> <return type="Vector3"> </return> <description> Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis. </description> </method> - <method name="inverse"> + <method name="inverse" qualifiers="const"> <return type="Basis"> </return> <description> Returns the inverse of the matrix. </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="b" type="Basis"> @@ -171,14 +171,14 @@ <description> </description> </method> - <method name="orthonormalized"> + <method name="orthonormalized" qualifiers="const"> <return type="Basis"> </return> <description> Returns the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix. </description> </method> - <method name="rotated"> + <method name="rotated" qualifiers="const"> <return type="Basis"> </return> <argument index="0" name="axis" type="Vector3"> @@ -189,7 +189,7 @@ Introduce an additional rotation around the given axis by phi (radians). The axis must be a normalized vector. </description> </method> - <method name="scaled"> + <method name="scaled" qualifiers="const"> <return type="Basis"> </return> <argument index="0" name="scale" type="Vector3"> @@ -198,7 +198,7 @@ Introduce an additional scaling specified by the given 3D scaling factor. </description> </method> - <method name="slerp"> + <method name="slerp" qualifiers="const"> <return type="Basis"> </return> <argument index="0" name="to" type="Basis"> @@ -209,7 +209,7 @@ Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix. </description> </method> - <method name="tdotx"> + <method name="tdotx" qualifiers="const"> <return type="float"> </return> <argument index="0" name="with" type="Vector3"> @@ -218,7 +218,7 @@ Transposed dot product with the X axis of the matrix. </description> </method> - <method name="tdoty"> + <method name="tdoty" qualifiers="const"> <return type="float"> </return> <argument index="0" name="with" type="Vector3"> @@ -227,7 +227,7 @@ Transposed dot product with the Y axis of the matrix. </description> </method> - <method name="tdotz"> + <method name="tdotz" qualifiers="const"> <return type="float"> </return> <argument index="0" name="with" type="Vector3"> @@ -236,7 +236,7 @@ Transposed dot product with the Z axis of the matrix. </description> </method> - <method name="transposed"> + <method name="transposed" qualifiers="const"> <return type="Basis"> </return> <description> diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml index 910d488dfd..93744ddad7 100644 --- a/doc/classes/Bone2D.xml +++ b/doc/classes/Bone2D.xml @@ -19,6 +19,28 @@ Stores the node's current transforms in [member rest]. </description> </method> + <method name="get_autocalculate_length_and_angle" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns whether this [code]Bone2D[/code] node is going to autocalculate its length and bone angle using its first [code]Bone2D[/code] child node, if one exists. If there are no [code]Bone2D[/code] children, then it cannot autocalculate these values and will print a warning. + </description> + </method> + <method name="get_bone_angle" qualifiers="const"> + <return type="float"> + </return> + <description> + Returns the angle of the bone in the [code]Bone2D[/code] node. + [b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node. + </description> + </method> + <method name="get_default_length" qualifiers="const"> + <return type="float"> + </return> + <description> + Deprecated. Please use [code]get_length[/code] instead. + </description> + </method> <method name="get_index_in_skeleton" qualifiers="const"> <return type="int"> </return> @@ -26,6 +48,13 @@ Returns the node's index as part of the entire skeleton. See [Skeleton2D]. </description> </method> + <method name="get_length" qualifiers="const"> + <return type="float"> + </return> + <description> + Returns the length of the bone in the [code]Bone2D[/code] node. + </description> + </method> <method name="get_skeleton_rest" qualifiers="const"> <return type="Transform2D"> </return> @@ -33,11 +62,45 @@ 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> + <method name="set_autocalculate_length_and_angle"> + <return type="void"> + </return> + <argument index="0" name="auto_calculate" type="bool"> + </argument> + <description> + When set to [code]true[/code], the [code]Bone2D[/code] node will attempt to automatically calculate the bone angle and length using the first child [code]Bone2D[/code] node, if one exists. If none exist, the [code]Bone2D[/code] cannot automatically calculate these values and will print a warning. + </description> + </method> + <method name="set_bone_angle"> + <return type="void"> + </return> + <argument index="0" name="angle" type="float"> + </argument> + <description> + Sets the bone angle for the [code]Bone2D[/code] node. This is typically set to the rotation from the [code]Bone2D[/code] node to a child [code]Bone2D[/code] node. + [b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node. + </description> + </method> + <method name="set_default_length"> + <return type="void"> + </return> + <argument index="0" name="default_length" type="float"> + </argument> + <description> + Deprecated. Please use [code]set_length[/code] instead. + </description> + </method> + <method name="set_length"> + <return type="void"> + </return> + <argument index="0" name="length" type="float"> + </argument> + <description> + Sets the length of the bone in the [code]Bone2D[/code] node. + </description> + </method> </methods> <members> - <member name="default_length" type="float" setter="set_default_length" getter="get_default_length" default="16.0"> - 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" default="Transform2D( 0, 0, 0, 0, 0, 0 )"> Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest]. </member> diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml index 0d8233e6ff..ffa7c9066a 100644 --- a/doc/classes/BoxContainer.xml +++ b/doc/classes/BoxContainer.xml @@ -10,7 +10,7 @@ </tutorials> <methods> <method name="add_spacer"> - <return type="void"> + <return type="Control"> </return> <argument index="0" name="begin" type="bool"> </argument> diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index 5aa2d699a8..0b31352611 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -28,6 +28,15 @@ <members> <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" /> </members> + <signals> + <signal name="pressed"> + <argument index="0" name="button" type="Object"> + </argument> + <description> + Emitted when one of the buttons of the group is pressed. + </description> + </signal> + </signals> <constants> </constants> </class> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index aa9f99a31e..9e70978db8 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -199,7 +199,7 @@ <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> - <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 98 )"> + <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 980 )"> Gravity applied to every particle. </member> <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index b69768d33f..cbab1a8f50 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -63,70 +63,70 @@ Creates a new [Callable] for the method called [code]method[/code] in the specified [code]object[/code]. </description> </method> - <method name="bind" qualifiers="vararg"> + <method name="bind" qualifiers="vararg const"> <return type="Callable"> </return> <description> Returns a copy of this [Callable] with the arguments bound. Bound arguments are passed after the arguments supplied by [method call]. </description> </method> - <method name="call" qualifiers="vararg"> + <method name="call" qualifiers="vararg const"> <return type="Variant"> </return> <description> Calls the method represented by this [Callable]. Arguments can be passed and should match the method's signature. </description> </method> - <method name="call_deferred" qualifiers="vararg"> + <method name="call_deferred" qualifiers="vararg const"> <return type="void"> </return> <description> Calls the method represented by this [Callable] in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature. </description> </method> - <method name="get_method"> + <method name="get_method" qualifiers="const"> <return type="StringName"> </return> <description> Returns the name of the method represented by this [Callable]. </description> </method> - <method name="get_object"> + <method name="get_object" qualifiers="const"> <return type="Object"> </return> <description> Returns the object on which this [Callable] is called. </description> </method> - <method name="get_object_id"> + <method name="get_object_id" qualifiers="const"> <return type="int"> </return> <description> Returns the ID of this [Callable]'s object (see [method Object.get_instance_id]). </description> </method> - <method name="hash"> + <method name="hash" qualifiers="const"> <return type="int"> </return> <description> Returns the hash value of this [Callable]'s object. </description> </method> - <method name="is_custom"> + <method name="is_custom" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if this [Callable] is a custom callable whose behavior differs based on implementation details. Custom callables are used in the engine for various reasons. If [code]true[/code], you can't use [method get_method]. </description> </method> - <method name="is_null"> + <method name="is_null" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if this [Callable] has no target to call the method on. </description> </method> - <method name="is_standard"> + <method name="is_standard" qualifiers="const"> <return type="bool"> </return> <description> @@ -151,7 +151,23 @@ Returns [code]true[/code] if both [Callable]s invoke the same custom target. </description> </method> - <method name="unbind"> + <method name="rpc" qualifiers="vararg const"> + <return type="void"> + </return> + <description> + Perform an RPC (Remote Procedure Call). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i]. Calling it on unsupported functions will result in an error. + </description> + </method> + <method name="rpc_id" qualifiers="vararg const"> + <return type="void"> + </return> + <argument index="0" name="peer_id" type="int"> + </argument> + <description> + Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i]. Calling it on unsupported functions will result in an error. + </description> + </method> + <method name="unbind" qualifiers="const"> <return type="Callable"> </return> <argument index="0" name="argcount" type="int"> diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 034b2e9629..30f6c2b951 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -27,7 +27,7 @@ </description> </method> <method name="get_camera_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> Gets the camera transform. Subclassed cameras such as [ClippedCamera3D] may provide different transforms than the [Node] transform. @@ -194,7 +194,7 @@ </member> <member name="fov" type="float" setter="set_fov" getter="get_fov" default="75.0"> The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle. - For reference, the default vertical field of view value ([code]75.0[/code]) is equivalent to an horizontal FOV of: + For reference, the default vertical field of view value ([code]75.0[/code]) is equivalent to a horizontal FOV of: - ~91.31 degrees in a 4:3 viewport - ~101.67 degrees in a 16:10 viewport - ~107.51 degrees in a 16:9 viewport diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index d13f431a16..87b157db4e 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -318,7 +318,7 @@ <argument index="9" name="flags" type="int" default="3"> </argument> <description> - Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. [b]Example using the default project font:[/b] [codeblocks] [gdscript] diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml index fab11d44cc..031abd0112 100644 --- a/doc/classes/CapsuleMesh.xml +++ b/doc/classes/CapsuleMesh.xml @@ -12,7 +12,8 @@ </methods> <members> <member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height" default="1.0"> - Height of the capsule mesh from the center point. + Height of the middle cylindrical part of the capsule (without the hemispherical ends). + [b]Note:[/b] The capsule's total height is equal to [member mid_height] + 2 * [member radius]. </member> <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64"> Number of radial segments on the capsule mesh. diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index 850098f741..7b57dc05f8 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -37,7 +37,7 @@ The position offset the character will be drawn with (in pixels). </member> <member name="outline" type="bool" setter="set_outline" getter="is_outline" default="false"> - If [code]ture[/code], FX transform is called for outline drawing. Setting this property won't affect drawing. + If [code]true[/code], FX transform is called for outline drawing. Setting this property won't affect drawing. </member> <member name="range" type="Vector2i" setter="set_range" getter="get_range" default="Vector2i( 0, 0 )"> Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing. diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml new file mode 100644 index 0000000000..0e6ca073a7 --- /dev/null +++ b/doc/classes/CharacterBody2D.xml @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CharacterBody2D" inherits="PhysicsBody2D" version="4.0"> + <brief_description> + Character body 2D node. + </brief_description> + <description> + Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses: + [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics. + [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path. + </description> + <tutorials> + <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> + <link title="Using KinematicBody2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link> + <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> + <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link> + </tutorials> + <methods> + <method name="get_floor_normal" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + </description> + </method> + <method name="get_floor_velocity" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + </description> + </method> + <method name="get_slide_collision"> + <return type="KinematicCollision2D"> + </return> + <argument index="0" name="slide_idx" type="int"> + </argument> + <description> + Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). + [b]Example usage:[/b] + [codeblocks] + [gdscript] + for i in get_slide_count(): + var collision = get_slide_collision(i) + print("Collided with: ", collision.collider.name) + [/gdscript] + [csharp] + for (int i = 0; i < GetSlideCount(); i++) + { + KinematicCollision2D collision = GetSlideCollision(i); + GD.Print("Collided with: ", (collision.Collider as Node).Name); + } + [/csharp] + [/codeblocks] + </description> + </method> + <method name="get_slide_count" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. + </description> + </method> + <method name="is_on_ceiling" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> + <method name="is_on_floor" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> + <method name="is_on_wall" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> + <method name="move_and_slide"> + <return type="void"> + </return> + <description> + Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. + This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. + Modifies [member linear_velocity] if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. + </description> + </method> + </methods> + <members> + <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.08"> + Extra margin used for collision recovery when calling [method move_and_slide]. + If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. + A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. + A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. + </member> + <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398"> + Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. + </member> + <member name="floor_max_angle_degrees" type="float" setter="set_floor_max_angle_degrees" getter="get_floor_max_angle_degrees" default="45.0"> + Maximum angle (in degrees) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. + </member> + <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true"> + If [code]true[/code], the body will be able to push [RigidBody2D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D]. + </member> + <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2( 0, 0 )"> + Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide]. + </member> + <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4"> + Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. + </member> + <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> + If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method PhysicsBody2D.move_and_collide] functions. + </member> + <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2( 0, 0 )"> + When set to a value different from [code]Vector2(0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide]. + As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector2(0, 0)[/code]. + </member> + <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false"> + If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. + </member> + <member name="up_direction" type="Vector2" setter="set_up_direction" getter="get_up_direction" default="Vector2( 0, -1 )"> + Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector2.UP[/code]. If set to [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml new file mode 100644 index 0000000000..790edfcad1 --- /dev/null +++ b/doc/classes/CharacterBody3D.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CharacterBody3D" inherits="PhysicsBody3D" version="4.0"> + <brief_description> + Character body 3D node. + </brief_description> + <description> + Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses: + [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics. + [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path. + </description> + <tutorials> + <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> + <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> + </tutorials> + <methods> + <method name="get_floor_normal" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + </description> + </method> + <method name="get_floor_velocity" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + </description> + </method> + <method name="get_slide_collision"> + <return type="KinematicCollision3D"> + </return> + <argument index="0" name="slide_idx" type="int"> + </argument> + <description> + Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). + </description> + </method> + <method name="get_slide_count" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. + </description> + </method> + <method name="is_on_ceiling" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> + <method name="is_on_floor" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> + <method name="is_on_wall" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> + <method name="move_and_slide"> + <return type="void"> + </return> + <description> + Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. + This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. + Modifies [member linear_velocity] if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. + </description> + </method> + </methods> + <members> + <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001"> + Extra margin used for collision recovery when calling [method move_and_slide]. + If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. + A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. + A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. + </member> + <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398"> + Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. + </member> + <member name="floor_max_angle_degrees" type="float" setter="set_floor_max_angle_degrees" getter="get_floor_max_angle_degrees" default="45.0"> + Maximum angle (in degrees) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. + </member> + <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true"> + If [code]true[/code], the body will be able to push [RigidBody3D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D]. + </member> + <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3( 0, 0, 0 )"> + Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide]. + </member> + <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4"> + Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. + </member> + <member name="snap" type="Vector3" setter="set_snap" getter="get_snap" default="Vector3( 0, 0, 0 )"> + When set to a value different from [code]Vector3(0, 0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide]. + As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector3(0, 0, 0)[/code]. + </member> + <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false"> + If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. + </member> + <member name="up_direction" type="Vector3" setter="set_up_direction" getter="get_up_direction" default="Vector3( 0, 1, 0 )"> + Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector3.UP[/code]. If set to [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 80febfbfe7..05e412e9da 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -24,6 +24,8 @@ <theme_item name="checked" type="Texture2D"> The check icon to display when the [CheckBox] is checked. </theme_item> + <theme_item name="checked_disabled" type="Texture2D"> + </theme_item> <theme_item name="disabled" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is disabled. </theme_item> @@ -75,11 +77,17 @@ <theme_item name="radio_checked" type="Texture2D"> If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked. </theme_item> + <theme_item name="radio_checked_disabled" type="Texture2D"> + </theme_item> <theme_item name="radio_unchecked" type="Texture2D"> If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked. </theme_item> + <theme_item name="radio_unchecked_disabled" type="Texture2D"> + </theme_item> <theme_item name="unchecked" type="Texture2D"> The check icon to display when the [CheckBox] is unchecked. </theme_item> + <theme_item name="unchecked_disabled" type="Texture2D"> + </theme_item> </theme_items> </class> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index d1483ac88e..4076198df6 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -3,11 +3,96 @@ <brief_description> </brief_description> <description> - [b]Note[/b]: By default [CodeEdit] always use left-to-right text direction to correcly display source code. + [b]Note[/b]: By default [CodeEdit] always use left-to-right text direction to correctly display source code. </description> <tutorials> </tutorials> <methods> + <method name="_confirm_code_completion" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="replace" type="bool"> + </argument> + <description> + Override this method to define how the selected entry should be inserted. If [code]replace[/code] is true, any existing text should be replaced. + </description> + </method> + <method name="_filter_code_completion_candidates" qualifiers="virtual"> + <return type="Array"> + </return> + <argument index="0" name="candidates" type="Array"> + </argument> + <description> + Override this method to define what items in [code]candidates[/code] should be displayed. + Both [code]candidates[/code] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content. + </description> + </method> + <method name="_request_code_completion" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="force" type="bool"> + </argument> + <description> + Override this method to define what happens when the user requests code completion. If [code]force[/code] is true, any checks should be bypassed. + </description> + </method> + <method name="add_code_completion_option"> + <return type="void"> + </return> + <argument index="0" name="type" type="int" enum="CodeEdit.CodeCompletionKind"> + </argument> + <argument index="1" name="display_text" type="String"> + </argument> + <argument index="2" name="insert_text" type="String"> + </argument> + <argument index="3" name="text_color" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <argument index="4" name="icon" type="Resource" default="null"> + </argument> + <argument index="5" name="value" type="Variant" default="0"> + </argument> + <description> + Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list. + [b]Note[/b]: This list will replace all current candidates. + </description> + </method> + <method name="add_comment_delimiter"> + <return type="void"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <argument index="1" name="end_key" type="String"> + </argument> + <argument index="2" name="line_only" type="bool" default="false"> + </argument> + <description> + Adds a comment delimiter. + Both the start and end keys must be symbols. Only the start key has to be unique. + Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code]. + </description> + </method> + <method name="add_string_delimiter"> + <return type="void"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <argument index="1" name="end_key" type="String"> + </argument> + <argument index="2" name="line_only" type="bool" default="false"> + </argument> + <description> + Adds a string delimiter. + Both the start and end keys must be symbols. Only the start key has to be unique. + Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code]. + </description> + </method> + <method name="cancel_code_completion"> + <return type="void"> + </return> + <description> + Cancels the autocomplete menu. + </description> + </method> <method name="clear_bookmarked_lines"> <return type="void"> </return> @@ -20,12 +105,35 @@ <description> </description> </method> + <method name="clear_comment_delimiters"> + <return type="void"> + </return> + <description> + Removes all comment delimiters. + </description> + </method> <method name="clear_executing_lines"> <return type="void"> </return> <description> </description> </method> + <method name="clear_string_delimiters"> + <return type="void"> + </return> + <description> + Removes all string delimiters. + </description> + </method> + <method name="confirm_code_completion"> + <return type="void"> + </return> + <argument index="0" name="replace" type="bool" default="false"> + </argument> + <description> + Inserts the selected entry into the text. If [code]replace[/code] is true, any existing text is replaced rather then merged. + </description> + </method> <method name="get_bookmarked_lines" qualifiers="const"> <return type="Array"> </return> @@ -38,12 +146,128 @@ <description> </description> </method> + <method name="get_code_completion_option" qualifiers="const"> + <return type="Dictionary"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + Gets the completion option at [code]index[/code]. The return [Dictionary] has the following key-values: + [code]kind[/code]: [enum CodeCompletionKind] + [code]display_text[/code]: Text that is shown on the autocomplete menu. + [code]insert_text[/code]: Text that is to be inserted when this item is selected. + [code]font_color[/code]: Color of the text on the autocomplete menu. + [code]icon[/code]: Icon to draw on the autocomplete menu. + [code]default_value[/code]: Value of the symbol. + </description> + </method> + <method name="get_code_completion_options" qualifiers="const"> + <return type="Dictionary[]"> + </return> + <description> + Gets all completion options, see [method get_code_completion_option] for return content. + </description> + </method> + <method name="get_code_completion_selected_index" qualifiers="const"> + <return type="int"> + </return> + <description> + Gets the index of the current selected completion option. + </description> + </method> + <method name="get_delimiter_end_key" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="delimiter_index" type="int"> + </argument> + <description> + Gets the end key for a string or comment region index. + </description> + </method> + <method name="get_delimiter_end_postion" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="column" type="int"> + </argument> + <description> + If [code]line[/code] [code]column[/code] is in a string or comment, returns the end position of the region. If not or no end could be found, both [Vector2] values will be [code]-1[/code]. + </description> + </method> + <method name="get_delimiter_start_key" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="delimiter_index" type="int"> + </argument> + <description> + Gets the start key for a string or comment region index. + </description> + </method> + <method name="get_delimiter_start_postion" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="column" type="int"> + </argument> + <description> + If [code]line[/code] [code]column[/code] is in a string or comment, returns the start position of the region. If not or no start could be found, both [Vector2] values will be [code]-1[/code]. + </description> + </method> <method name="get_executing_lines" qualifiers="const"> <return type="Array"> </return> <description> </description> </method> + <method name="get_text_for_code_completion" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the full text with char [code]0xFFFF[/code] at the caret location. + </description> + </method> + <method name="has_comment_delimiter" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <description> + Returns [code]true[/code] if comment [code]start_key[/code] exists. + </description> + </method> + <method name="has_string_delimiter" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <description> + Returns [code]true[/code] if string [code]start_key[/code] exists. + </description> + </method> + <method name="is_in_comment" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="column" type="int" default="-1"> + </argument> + <description> + Return delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code]. + </description> + </method> + <method name="is_in_string" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="column" type="int" default="-1"> + </argument> + <description> + Return the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code]. + </description> + </method> <method name="is_line_bookmarked" qualifiers="const"> <return type="bool"> </return> @@ -68,6 +292,60 @@ <description> </description> </method> + <method name="remove_comment_delimiter"> + <return type="void"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <description> + Removes the comment delimiter with [code]start_key[/code]. + </description> + </method> + <method name="remove_string_delimiter"> + <return type="void"> + </return> + <argument index="0" name="start_key" type="String"> + </argument> + <description> + Removes the string delimiter with [code]start_key[/code]. + </description> + </method> + <method name="request_code_completion"> + <return type="void"> + </return> + <argument index="0" name="force" type="bool" default="false"> + </argument> + <description> + Emits [signal request_code_completion], if [code]force[/code] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal. + </description> + </method> + <method name="set_code_completion_selected_index"> + <return type="void"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + Sets the current selected completion option. + </description> + </method> + <method name="set_code_hint"> + <return type="void"> + </return> + <argument index="0" name="code_hint" type="String"> + </argument> + <description> + Sets the code hint text. Pass an empty string to clear. + </description> + </method> + <method name="set_code_hint_draw_below"> + <return type="void"> + </return> + <argument index="0" name="draw_below" type="bool"> + </argument> + <description> + Sets if the code hint should draw below the text. + </description> + </method> <method name="set_line_as_bookmarked"> <return type="void"> </return> @@ -98,8 +376,30 @@ <description> </description> </method> + <method name="update_code_completion_options"> + <return type="void"> + </return> + <argument index="0" name="force" type="bool"> + </argument> + <description> + Submits all completion options added with [method add_code_completion_option]. Will try to force the autoccomplete menu to popup, if [code]force[/code] is [code]true[/code]. + [b]Note[/b]: This will replace all current candidates. + </description> + </method> </methods> <members> + <member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false"> + Sets whether code completion is allowed. + </member> + <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_comletion_prefixes" default="[ ]"> + Sets prefixes that will trigger code completion. + </member> + <member name="delimiter_comments" type="String[]" setter="set_comment_delimiters" getter="get_comment_delimiters" default="[ ]"> + Sets the comment delimiters. All existing comment delimiters will be removed. + </member> + <member name="delimiter_strings" type="String[]" setter="set_string_delimiters" getter="get_string_delimiters" default="[ ]"> + Sets the string delimiters. All existing string delimiters will be removed. + </member> <member name="draw_bookmarks" type="bool" setter="set_draw_bookmarks_gutter" getter="is_drawing_bookmarks_gutter" default="false"> </member> <member name="draw_breakpoints_gutter" type="bool" setter="set_draw_breakpoints_gutter" getter="is_drawing_breakpoints_gutter" default="false"> @@ -123,8 +423,33 @@ <description> </description> </signal> + <signal name="request_code_completion"> + <description> + Emitted when the user requests code completion. + </description> + </signal> </signals> <constants> + <constant name="KIND_CLASS" value="0" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_FUNCTION" value="1" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_SIGNAL" value="2" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_VARIABLE" value="3" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_MEMBER" value="4" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_ENUM" value="5" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_CONSTANT" value="6" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_NODE_PATH" value="7" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_FILE_PATH" value="8" enum="CodeCompletionKind"> + </constant> + <constant name="KIND_PLAIN_TEXT" value="9" enum="CodeCompletionKind"> + </constant> </constants> <theme_items> <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )"> @@ -193,8 +518,6 @@ </theme_item> <theme_item name="line_spacing" type="int" default="4"> </theme_item> - <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )"> - </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> <theme_item name="outline_size" type="int" default="0"> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index e8f7a59e4c..7c4c75bf0f 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -31,6 +31,24 @@ Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. </description> </method> + <method name="get_collision_layer_bit" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <description> + Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set. + </description> + </method> + <method name="get_collision_mask_bit" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <description> + Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set. + </description> + </method> <method name="get_rid" qualifiers="const"> <return type="RID"> </return> @@ -81,6 +99,30 @@ Removes the given shape owner. </description> </method> + <method name="set_collision_layer_bit"> + <return type="void"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + If [code]value[/value] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_layer]. + If [code]value[/value] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_layer]. + </description> + </method> + <method name="set_collision_mask_bit"> + <return type="void"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + If [code]value[/value] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_mask]. + If [code]value[/value] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_mask]. + </description> + </method> <method name="shape_find_owner" qualifiers="const"> <return type="int"> </return> @@ -216,6 +258,14 @@ </method> </methods> <members> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> + The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. + [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + </member> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> + The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. + [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + </member> <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" default="true"> If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [code]collision_layer[/code] bit to be set. </member> diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml index f8e897653d..4ab37f5c7b 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -16,14 +16,14 @@ </argument> <argument index="1" name="event" type="InputEvent"> </argument> - <argument index="2" name="click_position" type="Vector3"> + <argument index="2" name="position" type="Vector3"> </argument> - <argument index="3" name="click_normal" type="Vector3"> + <argument index="3" name="normal" type="Vector3"> </argument> <argument index="4" name="shape_idx" type="int"> </argument> <description> - Accepts unhandled [InputEvent]s. [code]click_position[/code] is the clicked location in world space and [code]click_normal[/code] is the normal vector extending from the clicked surface of the [Shape3D] at [code]shape_idx[/code]. Connect to the [code]input_event[/code] signal to easily pick up these events. + Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events. </description> </method> <method name="create_shape_owner"> @@ -35,6 +35,24 @@ Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. </description> </method> + <method name="get_collision_layer_bit" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <description> + Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set. + </description> + </method> + <method name="get_collision_mask_bit" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <description> + Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set. + </description> + </method> <method name="get_rid" qualifiers="const"> <return type="RID"> </return> @@ -67,6 +85,30 @@ Removes the given shape owner. </description> </method> + <method name="set_collision_layer_bit"> + <return type="void"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + If [code]value[/value] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_layer]. + If [code]value[/value] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_layer]. + </description> + </method> + <method name="set_collision_mask_bit"> + <return type="void"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + If [code]value[/value] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_mask]. + If [code]value[/value] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_mask]. + </description> + </method> <method name="shape_find_owner" qualifiers="const"> <return type="int"> </return> @@ -137,12 +179,12 @@ </description> </method> <method name="shape_owner_get_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="owner_id" type="int"> </argument> <description> - Returns the shape owner's [Transform]. + Returns the shape owner's [Transform3D]. </description> </method> <method name="shape_owner_remove_shape"> @@ -172,14 +214,22 @@ </return> <argument index="0" name="owner_id" type="int"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> - Sets the [Transform] of the given shape owner. + Sets the [Transform3D] of the given shape owner. </description> </method> </methods> <members> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> + The physics layers this CollisionObject3D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. + [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + </member> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> + The physics layers this CollisionObject3D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. + [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + </member> <member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag" default="false"> If [code]true[/code], the [CollisionObject3D] will continue to receive input events as the mouse is dragged across its shapes. </member> @@ -193,14 +243,14 @@ </argument> <argument index="1" name="event" type="InputEvent"> </argument> - <argument index="2" name="click_position" type="Vector3"> + <argument index="2" name="position" type="Vector3"> </argument> - <argument index="3" name="click_normal" type="Vector3"> + <argument index="3" name="normal" type="Vector3"> </argument> <argument index="4" name="shape_idx" type="int"> </argument> <description> - Emitted when [method _input_event] receives an event. See its description for details. + Emitted when the object receives an unhandled [InputEvent]. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. </description> </signal> <signal name="mouse_entered"> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index ce88e0ae88..ddff92e6fc 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -56,10 +56,8 @@ </return> <argument index="0" name="code" type="String"> </argument> - <argument index="1" name="alpha" type="float"> - </argument> <description> - Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants. + Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants. </description> </method> <method name="Color" qualifiers="constructor"> @@ -67,8 +65,10 @@ </return> <argument index="0" name="code" type="String"> </argument> + <argument index="1" name="alpha" type="float"> + </argument> <description> - Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants. + Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants. </description> </method> <method name="Color" qualifiers="constructor"> @@ -80,16 +80,14 @@ </argument> <argument index="2" name="b" type="float"> </argument> - <argument index="3" name="a" type="float"> - </argument> <description> - Constructs a [Color] from RGBA values, typically between 0 and 1. + Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)` + var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)` [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)` + var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)` [/csharp] [/codeblocks] </description> @@ -103,19 +101,21 @@ </argument> <argument index="2" name="b" type="float"> </argument> + <argument index="3" name="a" type="float"> + </argument> <description> - Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1. + Constructs a [Color] from RGBA values, typically between 0 and 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)` + var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)` [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)` + var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)` [/csharp] [/codeblocks] </description> </method> - <method name="blend"> + <method name="blend" qualifiers="const"> <return type="Color"> </return> <argument index="0" name="over" type="Color"> @@ -136,7 +136,18 @@ [/codeblocks] </description> </method> - <method name="darkened"> + <method name="clamp" qualifiers="const"> + <return type="Color"> + </return> + <argument index="0" name="min" type="Color" default="Color( 0, 0, 0, 0 )"> + </argument> + <argument index="1" name="max" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <description> + Returns a new color with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. + </description> + </method> + <method name="darkened" qualifiers="const"> <return type="Color"> </return> <argument index="0" name="amount" type="float"> @@ -155,7 +166,87 @@ [/codeblocks] </description> </method> - <method name="inverted"> + <method name="find_named_color" qualifiers="static"> + <return type="int"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> + <method name="from_rgbe9995" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="rgbe" type="int"> + </argument> + <description> + </description> + </method> + <method name="from_string" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="str" type="String"> + </argument> + <argument index="1" name="default" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_named_color" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_named_color_count" qualifiers="static"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_named_color_name" qualifiers="static"> + <return type="String"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="hex" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="hex" type="int"> + </argument> + <description> + </description> + </method> + <method name="hex64" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="hex" type="int"> + </argument> + <description> + </description> + </method> + <method name="html" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="rgba" type="String"> + </argument> + <description> + </description> + </method> + <method name="html_is_valid" qualifiers="static"> + <return type="bool"> + </return> + <argument index="0" name="color" type="String"> + </argument> + <description> + </description> + </method> + <method name="inverted" qualifiers="const"> <return type="Color"> </return> <description> @@ -172,7 +263,7 @@ [/codeblocks] </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="to" type="Color"> @@ -181,7 +272,7 @@ Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> - <method name="lerp"> + <method name="lerp" qualifiers="const"> <return type="Color"> </return> <argument index="0" name="to" type="Color"> @@ -189,7 +280,7 @@ <argument index="1" name="weight" type="float"> </argument> <description> - Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1. + Returns the linear interpolation with another color. The interpolation factor [code]weight[/code] is between 0 and 1. [codeblocks] [gdscript] var c1 = Color(1.0, 0.0, 0.0) @@ -204,7 +295,7 @@ [/codeblocks] </description> </method> - <method name="lightened"> + <method name="lightened" qualifiers="const"> <return type="Color"> </return> <argument index="0" name="amount" type="float"> @@ -323,7 +414,7 @@ <description> </description> </method> - <method name="to_abgr32"> + <method name="to_abgr32" qualifiers="const"> <return type="int"> </return> <description> @@ -340,7 +431,7 @@ [/codeblocks] </description> </method> - <method name="to_abgr64"> + <method name="to_abgr64" qualifiers="const"> <return type="int"> </return> <description> @@ -357,7 +448,7 @@ [/codeblocks] </description> </method> - <method name="to_argb32"> + <method name="to_argb32" qualifiers="const"> <return type="int"> </return> <description> @@ -374,7 +465,7 @@ [/codeblocks] </description> </method> - <method name="to_argb64"> + <method name="to_argb64" qualifiers="const"> <return type="int"> </return> <description> @@ -391,7 +482,7 @@ [/codeblocks] </description> </method> - <method name="to_html"> + <method name="to_html" qualifiers="const"> <return type="String"> </return> <argument index="0" name="with_alpha" type="bool" default="true"> @@ -413,7 +504,7 @@ [/codeblocks] </description> </method> - <method name="to_rgba32"> + <method name="to_rgba32" qualifiers="const"> <return type="int"> </return> <description> @@ -430,7 +521,7 @@ [/codeblocks] </description> </method> - <method name="to_rgba64"> + <method name="to_rgba64" qualifiers="const"> <return type="int"> </return> <description> @@ -484,442 +575,442 @@ </member> </members> <constants> - <constant name="aliceblue" value="Color( 0.94, 0.97, 1, 1 )"> + <constant name="ALICE_BLUE" value="Color( 0.94, 0.97, 1, 1 )"> Alice blue color. </constant> - <constant name="antiquewhite" value="Color( 0.98, 0.92, 0.84, 1 )"> + <constant name="ANTIQUE_WHITE" value="Color( 0.98, 0.92, 0.84, 1 )"> Antique white color. </constant> - <constant name="aqua" value="Color( 0, 1, 1, 1 )"> + <constant name="AQUA" value="Color( 0, 1, 1, 1 )"> Aqua color. </constant> - <constant name="aquamarine" value="Color( 0.5, 1, 0.83, 1 )"> + <constant name="AQUAMARINE" value="Color( 0.5, 1, 0.83, 1 )"> Aquamarine color. </constant> - <constant name="azure" value="Color( 0.94, 1, 1, 1 )"> + <constant name="AZURE" value="Color( 0.94, 1, 1, 1 )"> Azure color. </constant> - <constant name="beige" value="Color( 0.96, 0.96, 0.86, 1 )"> + <constant name="BEIGE" value="Color( 0.96, 0.96, 0.86, 1 )"> Beige color. </constant> - <constant name="bisque" value="Color( 1, 0.89, 0.77, 1 )"> + <constant name="BISQUE" value="Color( 1, 0.89, 0.77, 1 )"> Bisque color. </constant> - <constant name="black" value="Color( 0, 0, 0, 1 )"> + <constant name="BLACK" value="Color( 0, 0, 0, 1 )"> Black color. </constant> - <constant name="blanchedalmond" value="Color( 1, 0.92, 0.8, 1 )"> - Blanche almond color. + <constant name="BLANCHED_ALMOND" value="Color( 1, 0.92, 0.8, 1 )"> + Blanched almond color. </constant> - <constant name="blue" value="Color( 0, 0, 1, 1 )"> + <constant name="BLUE" value="Color( 0, 0, 1, 1 )"> Blue color. </constant> - <constant name="blueviolet" value="Color( 0.54, 0.17, 0.89, 1 )"> + <constant name="BLUE_VIOLET" value="Color( 0.54, 0.17, 0.89, 1 )"> Blue violet color. </constant> - <constant name="brown" value="Color( 0.65, 0.16, 0.16, 1 )"> + <constant name="BROWN" value="Color( 0.65, 0.16, 0.16, 1 )"> Brown color. </constant> - <constant name="burlywood" value="Color( 0.87, 0.72, 0.53, 1 )"> - Burly wood color. + <constant name="BURLYWOOD" value="Color( 0.87, 0.72, 0.53, 1 )"> + Burlywood color. </constant> - <constant name="cadetblue" value="Color( 0.37, 0.62, 0.63, 1 )"> + <constant name="CADET_BLUE" value="Color( 0.37, 0.62, 0.63, 1 )"> Cadet blue color. </constant> - <constant name="chartreuse" value="Color( 0.5, 1, 0, 1 )"> + <constant name="CHARTREUSE" value="Color( 0.5, 1, 0, 1 )"> Chartreuse color. </constant> - <constant name="chocolate" value="Color( 0.82, 0.41, 0.12, 1 )"> + <constant name="CHOCOLATE" value="Color( 0.82, 0.41, 0.12, 1 )"> Chocolate color. </constant> - <constant name="coral" value="Color( 1, 0.5, 0.31, 1 )"> + <constant name="CORAL" value="Color( 1, 0.5, 0.31, 1 )"> Coral color. </constant> - <constant name="cornflower" value="Color( 0.39, 0.58, 0.93, 1 )"> - Cornflower color. + <constant name="CORNFLOWER_BLUE" value="Color( 0.39, 0.58, 0.93, 1 )"> + Cornflower blue color. </constant> - <constant name="cornsilk" value="Color( 1, 0.97, 0.86, 1 )"> - Corn silk color. + <constant name="CORNSILK" value="Color( 1, 0.97, 0.86, 1 )"> + Cornsilk color. </constant> - <constant name="crimson" value="Color( 0.86, 0.08, 0.24, 1 )"> + <constant name="CRIMSON" value="Color( 0.86, 0.08, 0.24, 1 )"> Crimson color. </constant> - <constant name="cyan" value="Color( 0, 1, 1, 1 )"> + <constant name="CYAN" value="Color( 0, 1, 1, 1 )"> Cyan color. </constant> - <constant name="darkblue" value="Color( 0, 0, 0.55, 1 )"> + <constant name="DARK_BLUE" value="Color( 0, 0, 0.55, 1 )"> Dark blue color. </constant> - <constant name="darkcyan" value="Color( 0, 0.55, 0.55, 1 )"> + <constant name="DARK_CYAN" value="Color( 0, 0.55, 0.55, 1 )"> Dark cyan color. </constant> - <constant name="darkgoldenrod" value="Color( 0.72, 0.53, 0.04, 1 )"> + <constant name="DARK_GOLDENROD" value="Color( 0.72, 0.53, 0.04, 1 )"> Dark goldenrod color. </constant> - <constant name="darkgray" value="Color( 0.66, 0.66, 0.66, 1 )"> + <constant name="DARK_GRAY" value="Color( 0.66, 0.66, 0.66, 1 )"> Dark gray color. </constant> - <constant name="darkgreen" value="Color( 0, 0.39, 0, 1 )"> + <constant name="DARK_GREEN" value="Color( 0, 0.39, 0, 1 )"> Dark green color. </constant> - <constant name="darkkhaki" value="Color( 0.74, 0.72, 0.42, 1 )"> + <constant name="DARK_KHAKI" value="Color( 0.74, 0.72, 0.42, 1 )"> Dark khaki color. </constant> - <constant name="darkmagenta" value="Color( 0.55, 0, 0.55, 1 )"> + <constant name="DARK_MAGENTA" value="Color( 0.55, 0, 0.55, 1 )"> Dark magenta color. </constant> - <constant name="darkolivegreen" value="Color( 0.33, 0.42, 0.18, 1 )"> + <constant name="DARK_OLIVE_GREEN" value="Color( 0.33, 0.42, 0.18, 1 )"> Dark olive green color. </constant> - <constant name="darkorange" value="Color( 1, 0.55, 0, 1 )"> + <constant name="DARK_ORANGE" value="Color( 1, 0.55, 0, 1 )"> Dark orange color. </constant> - <constant name="darkorchid" value="Color( 0.6, 0.2, 0.8, 1 )"> + <constant name="DARK_ORCHID" value="Color( 0.6, 0.2, 0.8, 1 )"> Dark orchid color. </constant> - <constant name="darkred" value="Color( 0.55, 0, 0, 1 )"> + <constant name="DARK_RED" value="Color( 0.55, 0, 0, 1 )"> Dark red color. </constant> - <constant name="darksalmon" value="Color( 0.91, 0.59, 0.48, 1 )"> + <constant name="DARK_SALMON" value="Color( 0.91, 0.59, 0.48, 1 )"> Dark salmon color. </constant> - <constant name="darkseagreen" value="Color( 0.56, 0.74, 0.56, 1 )"> + <constant name="DARK_SEA_GREEN" value="Color( 0.56, 0.74, 0.56, 1 )"> Dark sea green color. </constant> - <constant name="darkslateblue" value="Color( 0.28, 0.24, 0.55, 1 )"> + <constant name="DARK_SLATE_BLUE" value="Color( 0.28, 0.24, 0.55, 1 )"> Dark slate blue color. </constant> - <constant name="darkslategray" value="Color( 0.18, 0.31, 0.31, 1 )"> + <constant name="DARK_SLATE_GRAY" value="Color( 0.18, 0.31, 0.31, 1 )"> Dark slate gray color. </constant> - <constant name="darkturquoise" value="Color( 0, 0.81, 0.82, 1 )"> + <constant name="DARK_TURQUOISE" value="Color( 0, 0.81, 0.82, 1 )"> Dark turquoise color. </constant> - <constant name="darkviolet" value="Color( 0.58, 0, 0.83, 1 )"> + <constant name="DARK_VIOLET" value="Color( 0.58, 0, 0.83, 1 )"> Dark violet color. </constant> - <constant name="deeppink" value="Color( 1, 0.08, 0.58, 1 )"> + <constant name="DEEP_PINK" value="Color( 1, 0.08, 0.58, 1 )"> Deep pink color. </constant> - <constant name="deepskyblue" value="Color( 0, 0.75, 1, 1 )"> + <constant name="DEEP_SKY_BLUE" value="Color( 0, 0.75, 1, 1 )"> Deep sky blue color. </constant> - <constant name="dimgray" value="Color( 0.41, 0.41, 0.41, 1 )"> + <constant name="DIM_GRAY" value="Color( 0.41, 0.41, 0.41, 1 )"> Dim gray color. </constant> - <constant name="dodgerblue" value="Color( 0.12, 0.56, 1, 1 )"> + <constant name="DODGER_BLUE" value="Color( 0.12, 0.56, 1, 1 )"> Dodger blue color. </constant> - <constant name="firebrick" value="Color( 0.7, 0.13, 0.13, 1 )"> + <constant name="FIREBRICK" value="Color( 0.7, 0.13, 0.13, 1 )"> Firebrick color. </constant> - <constant name="floralwhite" value="Color( 1, 0.98, 0.94, 1 )"> + <constant name="FLORAL_WHITE" value="Color( 1, 0.98, 0.94, 1 )"> Floral white color. </constant> - <constant name="forestgreen" value="Color( 0.13, 0.55, 0.13, 1 )"> + <constant name="FOREST_GREEN" value="Color( 0.13, 0.55, 0.13, 1 )"> Forest green color. </constant> - <constant name="fuchsia" value="Color( 1, 0, 1, 1 )"> + <constant name="FUCHSIA" value="Color( 1, 0, 1, 1 )"> Fuchsia color. </constant> - <constant name="gainsboro" value="Color( 0.86, 0.86, 0.86, 1 )"> + <constant name="GAINSBORO" value="Color( 0.86, 0.86, 0.86, 1 )"> Gainsboro color. </constant> - <constant name="ghostwhite" value="Color( 0.97, 0.97, 1, 1 )"> + <constant name="GHOST_WHITE" value="Color( 0.97, 0.97, 1, 1 )"> Ghost white color. </constant> - <constant name="gold" value="Color( 1, 0.84, 0, 1 )"> + <constant name="GOLD" value="Color( 1, 0.84, 0, 1 )"> Gold color. </constant> - <constant name="goldenrod" value="Color( 0.85, 0.65, 0.13, 1 )"> + <constant name="GOLDENROD" value="Color( 0.85, 0.65, 0.13, 1 )"> Goldenrod color. </constant> - <constant name="gray" value="Color( 0.75, 0.75, 0.75, 1 )"> + <constant name="GRAY" value="Color( 0.75, 0.75, 0.75, 1 )"> Gray color. </constant> - <constant name="green" value="Color( 0, 1, 0, 1 )"> + <constant name="GREEN" value="Color( 0, 1, 0, 1 )"> Green color. </constant> - <constant name="greenyellow" value="Color( 0.68, 1, 0.18, 1 )"> + <constant name="GREEN_YELLOW" value="Color( 0.68, 1, 0.18, 1 )"> Green yellow color. </constant> - <constant name="honeydew" value="Color( 0.94, 1, 0.94, 1 )"> + <constant name="HONEYDEW" value="Color( 0.94, 1, 0.94, 1 )"> Honeydew color. </constant> - <constant name="hotpink" value="Color( 1, 0.41, 0.71, 1 )"> + <constant name="HOT_PINK" value="Color( 1, 0.41, 0.71, 1 )"> Hot pink color. </constant> - <constant name="indianred" value="Color( 0.8, 0.36, 0.36, 1 )"> + <constant name="INDIAN_RED" value="Color( 0.8, 0.36, 0.36, 1 )"> Indian red color. </constant> - <constant name="indigo" value="Color( 0.29, 0, 0.51, 1 )"> + <constant name="INDIGO" value="Color( 0.29, 0, 0.51, 1 )"> Indigo color. </constant> - <constant name="ivory" value="Color( 1, 1, 0.94, 1 )"> + <constant name="IVORY" value="Color( 1, 1, 0.94, 1 )"> Ivory color. </constant> - <constant name="khaki" value="Color( 0.94, 0.9, 0.55, 1 )"> + <constant name="KHAKI" value="Color( 0.94, 0.9, 0.55, 1 )"> Khaki color. </constant> - <constant name="lavender" value="Color( 0.9, 0.9, 0.98, 1 )"> + <constant name="LAVENDER" value="Color( 0.9, 0.9, 0.98, 1 )"> Lavender color. </constant> - <constant name="lavenderblush" value="Color( 1, 0.94, 0.96, 1 )"> + <constant name="LAVENDER_BLUSH" value="Color( 1, 0.94, 0.96, 1 )"> Lavender blush color. </constant> - <constant name="lawngreen" value="Color( 0.49, 0.99, 0, 1 )"> + <constant name="LAWN_GREEN" value="Color( 0.49, 0.99, 0, 1 )"> Lawn green color. </constant> - <constant name="lemonchiffon" value="Color( 1, 0.98, 0.8, 1 )"> + <constant name="LEMON_CHIFFON" value="Color( 1, 0.98, 0.8, 1 )"> Lemon chiffon color. </constant> - <constant name="lightblue" value="Color( 0.68, 0.85, 0.9, 1 )"> + <constant name="LIGHT_BLUE" value="Color( 0.68, 0.85, 0.9, 1 )"> Light blue color. </constant> - <constant name="lightcoral" value="Color( 0.94, 0.5, 0.5, 1 )"> + <constant name="LIGHT_CORAL" value="Color( 0.94, 0.5, 0.5, 1 )"> Light coral color. </constant> - <constant name="lightcyan" value="Color( 0.88, 1, 1, 1 )"> + <constant name="LIGHT_CYAN" value="Color( 0.88, 1, 1, 1 )"> Light cyan color. </constant> - <constant name="lightgoldenrod" value="Color( 0.98, 0.98, 0.82, 1 )"> + <constant name="LIGHT_GOLDENROD" value="Color( 0.98, 0.98, 0.82, 1 )"> Light goldenrod color. </constant> - <constant name="lightgray" value="Color( 0.83, 0.83, 0.83, 1 )"> + <constant name="LIGHT_GRAY" value="Color( 0.83, 0.83, 0.83, 1 )"> Light gray color. </constant> - <constant name="lightgreen" value="Color( 0.56, 0.93, 0.56, 1 )"> + <constant name="LIGHT_GREEN" value="Color( 0.56, 0.93, 0.56, 1 )"> Light green color. </constant> - <constant name="lightpink" value="Color( 1, 0.71, 0.76, 1 )"> + <constant name="LIGHT_PINK" value="Color( 1, 0.71, 0.76, 1 )"> Light pink color. </constant> - <constant name="lightsalmon" value="Color( 1, 0.63, 0.48, 1 )"> + <constant name="LIGHT_SALMON" value="Color( 1, 0.63, 0.48, 1 )"> Light salmon color. </constant> - <constant name="lightseagreen" value="Color( 0.13, 0.7, 0.67, 1 )"> + <constant name="LIGHT_SEA_GREEN" value="Color( 0.13, 0.7, 0.67, 1 )"> Light sea green color. </constant> - <constant name="lightskyblue" value="Color( 0.53, 0.81, 0.98, 1 )"> + <constant name="LIGHT_SKY_BLUE" value="Color( 0.53, 0.81, 0.98, 1 )"> Light sky blue color. </constant> - <constant name="lightslategray" value="Color( 0.47, 0.53, 0.6, 1 )"> + <constant name="LIGHT_SLATE_GRAY" value="Color( 0.47, 0.53, 0.6, 1 )"> Light slate gray color. </constant> - <constant name="lightsteelblue" value="Color( 0.69, 0.77, 0.87, 1 )"> + <constant name="LIGHT_STEEL_BLUE" value="Color( 0.69, 0.77, 0.87, 1 )"> Light steel blue color. </constant> - <constant name="lightyellow" value="Color( 1, 1, 0.88, 1 )"> + <constant name="LIGHT_YELLOW" value="Color( 1, 1, 0.88, 1 )"> Light yellow color. </constant> - <constant name="lime" value="Color( 0, 1, 0, 1 )"> + <constant name="LIME" value="Color( 0, 1, 0, 1 )"> Lime color. </constant> - <constant name="limegreen" value="Color( 0.2, 0.8, 0.2, 1 )"> + <constant name="LIME_GREEN" value="Color( 0.2, 0.8, 0.2, 1 )"> Lime green color. </constant> - <constant name="linen" value="Color( 0.98, 0.94, 0.9, 1 )"> + <constant name="LINEN" value="Color( 0.98, 0.94, 0.9, 1 )"> Linen color. </constant> - <constant name="magenta" value="Color( 1, 0, 1, 1 )"> + <constant name="MAGENTA" value="Color( 1, 0, 1, 1 )"> Magenta color. </constant> - <constant name="maroon" value="Color( 0.69, 0.19, 0.38, 1 )"> + <constant name="MAROON" value="Color( 0.69, 0.19, 0.38, 1 )"> Maroon color. </constant> - <constant name="mediumaquamarine" value="Color( 0.4, 0.8, 0.67, 1 )"> + <constant name="MEDIUM_AQUAMARINE" value="Color( 0.4, 0.8, 0.67, 1 )"> Medium aquamarine color. </constant> - <constant name="mediumblue" value="Color( 0, 0, 0.8, 1 )"> + <constant name="MEDIUM_BLUE" value="Color( 0, 0, 0.8, 1 )"> Medium blue color. </constant> - <constant name="mediumorchid" value="Color( 0.73, 0.33, 0.83, 1 )"> + <constant name="MEDIUM_ORCHID" value="Color( 0.73, 0.33, 0.83, 1 )"> Medium orchid color. </constant> - <constant name="mediumpurple" value="Color( 0.58, 0.44, 0.86, 1 )"> + <constant name="MEDIUM_PURPLE" value="Color( 0.58, 0.44, 0.86, 1 )"> Medium purple color. </constant> - <constant name="mediumseagreen" value="Color( 0.24, 0.7, 0.44, 1 )"> + <constant name="MEDIUM_SEA_GREEN" value="Color( 0.24, 0.7, 0.44, 1 )"> Medium sea green color. </constant> - <constant name="mediumslateblue" value="Color( 0.48, 0.41, 0.93, 1 )"> + <constant name="MEDIUM_SLATE_BLUE" value="Color( 0.48, 0.41, 0.93, 1 )"> Medium slate blue color. </constant> - <constant name="mediumspringgreen" value="Color( 0, 0.98, 0.6, 1 )"> + <constant name="MEDIUM_SPRING_GREEN" value="Color( 0, 0.98, 0.6, 1 )"> Medium spring green color. </constant> - <constant name="mediumturquoise" value="Color( 0.28, 0.82, 0.8, 1 )"> + <constant name="MEDIUM_TURQUOISE" value="Color( 0.28, 0.82, 0.8, 1 )"> Medium turquoise color. </constant> - <constant name="mediumvioletred" value="Color( 0.78, 0.08, 0.52, 1 )"> + <constant name="MEDIUM_VIOLET_RED" value="Color( 0.78, 0.08, 0.52, 1 )"> Medium violet red color. </constant> - <constant name="midnightblue" value="Color( 0.1, 0.1, 0.44, 1 )"> + <constant name="MIDNIGHT_BLUE" value="Color( 0.1, 0.1, 0.44, 1 )"> Midnight blue color. </constant> - <constant name="mintcream" value="Color( 0.96, 1, 0.98, 1 )"> + <constant name="MINT_CREAM" value="Color( 0.96, 1, 0.98, 1 )"> Mint cream color. </constant> - <constant name="mistyrose" value="Color( 1, 0.89, 0.88, 1 )"> + <constant name="MISTY_ROSE" value="Color( 1, 0.89, 0.88, 1 )"> Misty rose color. </constant> - <constant name="moccasin" value="Color( 1, 0.89, 0.71, 1 )"> + <constant name="MOCCASIN" value="Color( 1, 0.89, 0.71, 1 )"> Moccasin color. </constant> - <constant name="navajowhite" value="Color( 1, 0.87, 0.68, 1 )"> + <constant name="NAVAJO_WHITE" value="Color( 1, 0.87, 0.68, 1 )"> Navajo white color. </constant> - <constant name="navyblue" value="Color( 0, 0, 0.5, 1 )"> + <constant name="NAVY_BLUE" value="Color( 0, 0, 0.5, 1 )"> Navy blue color. </constant> - <constant name="oldlace" value="Color( 0.99, 0.96, 0.9, 1 )"> + <constant name="OLD_LACE" value="Color( 0.99, 0.96, 0.9, 1 )"> Old lace color. </constant> - <constant name="olive" value="Color( 0.5, 0.5, 0, 1 )"> + <constant name="OLIVE" value="Color( 0.5, 0.5, 0, 1 )"> Olive color. </constant> - <constant name="olivedrab" value="Color( 0.42, 0.56, 0.14, 1 )"> + <constant name="OLIVE_DRAB" value="Color( 0.42, 0.56, 0.14, 1 )"> Olive drab color. </constant> - <constant name="orange" value="Color( 1, 0.65, 0, 1 )"> + <constant name="ORANGE" value="Color( 1, 0.65, 0, 1 )"> Orange color. </constant> - <constant name="orangered" value="Color( 1, 0.27, 0, 1 )"> + <constant name="ORANGE_RED" value="Color( 1, 0.27, 0, 1 )"> Orange red color. </constant> - <constant name="orchid" value="Color( 0.85, 0.44, 0.84, 1 )"> + <constant name="ORCHID" value="Color( 0.85, 0.44, 0.84, 1 )"> Orchid color. </constant> - <constant name="palegoldenrod" value="Color( 0.93, 0.91, 0.67, 1 )"> + <constant name="PALE_GOLDENROD" value="Color( 0.93, 0.91, 0.67, 1 )"> Pale goldenrod color. </constant> - <constant name="palegreen" value="Color( 0.6, 0.98, 0.6, 1 )"> + <constant name="PALE_GREEN" value="Color( 0.6, 0.98, 0.6, 1 )"> Pale green color. </constant> - <constant name="paleturquoise" value="Color( 0.69, 0.93, 0.93, 1 )"> + <constant name="PALE_TURQUOISE" value="Color( 0.69, 0.93, 0.93, 1 )"> Pale turquoise color. </constant> - <constant name="palevioletred" value="Color( 0.86, 0.44, 0.58, 1 )"> + <constant name="PALE_VIOLET_RED" value="Color( 0.86, 0.44, 0.58, 1 )"> Pale violet red color. </constant> - <constant name="papayawhip" value="Color( 1, 0.94, 0.84, 1 )"> + <constant name="PAPAYA_WHIP" value="Color( 1, 0.94, 0.84, 1 )"> Papaya whip color. </constant> - <constant name="peachpuff" value="Color( 1, 0.85, 0.73, 1 )"> + <constant name="PEACH_PUFF" value="Color( 1, 0.85, 0.73, 1 )"> Peach puff color. </constant> - <constant name="peru" value="Color( 0.8, 0.52, 0.25, 1 )"> + <constant name="PERU" value="Color( 0.8, 0.52, 0.25, 1 )"> Peru color. </constant> - <constant name="pink" value="Color( 1, 0.75, 0.8, 1 )"> + <constant name="PINK" value="Color( 1, 0.75, 0.8, 1 )"> Pink color. </constant> - <constant name="plum" value="Color( 0.87, 0.63, 0.87, 1 )"> + <constant name="PLUM" value="Color( 0.87, 0.63, 0.87, 1 )"> Plum color. </constant> - <constant name="powderblue" value="Color( 0.69, 0.88, 0.9, 1 )"> + <constant name="POWDER_BLUE" value="Color( 0.69, 0.88, 0.9, 1 )"> Powder blue color. </constant> - <constant name="purple" value="Color( 0.63, 0.13, 0.94, 1 )"> + <constant name="PURPLE" value="Color( 0.63, 0.13, 0.94, 1 )"> Purple color. </constant> - <constant name="rebeccapurple" value="Color( 0.4, 0.2, 0.6, 1 )"> + <constant name="REBECCA_PURPLE" value="Color( 0.4, 0.2, 0.6, 1 )"> Rebecca purple color. </constant> - <constant name="red" value="Color( 1, 0, 0, 1 )"> + <constant name="RED" value="Color( 1, 0, 0, 1 )"> Red color. </constant> - <constant name="rosybrown" value="Color( 0.74, 0.56, 0.56, 1 )"> + <constant name="ROSY_BROWN" value="Color( 0.74, 0.56, 0.56, 1 )"> Rosy brown color. </constant> - <constant name="royalblue" value="Color( 0.25, 0.41, 0.88, 1 )"> + <constant name="ROYAL_BLUE" value="Color( 0.25, 0.41, 0.88, 1 )"> Royal blue color. </constant> - <constant name="saddlebrown" value="Color( 0.55, 0.27, 0.07, 1 )"> + <constant name="SADDLE_BROWN" value="Color( 0.55, 0.27, 0.07, 1 )"> Saddle brown color. </constant> - <constant name="salmon" value="Color( 0.98, 0.5, 0.45, 1 )"> + <constant name="SALMON" value="Color( 0.98, 0.5, 0.45, 1 )"> Salmon color. </constant> - <constant name="sandybrown" value="Color( 0.96, 0.64, 0.38, 1 )"> + <constant name="SANDY_BROWN" value="Color( 0.96, 0.64, 0.38, 1 )"> Sandy brown color. </constant> - <constant name="seagreen" value="Color( 0.18, 0.55, 0.34, 1 )"> + <constant name="SEA_GREEN" value="Color( 0.18, 0.55, 0.34, 1 )"> Sea green color. </constant> - <constant name="seashell" value="Color( 1, 0.96, 0.93, 1 )"> + <constant name="SEASHELL" value="Color( 1, 0.96, 0.93, 1 )"> Seashell color. </constant> - <constant name="sienna" value="Color( 0.63, 0.32, 0.18, 1 )"> + <constant name="SIENNA" value="Color( 0.63, 0.32, 0.18, 1 )"> Sienna color. </constant> - <constant name="silver" value="Color( 0.75, 0.75, 0.75, 1 )"> + <constant name="SILVER" value="Color( 0.75, 0.75, 0.75, 1 )"> Silver color. </constant> - <constant name="skyblue" value="Color( 0.53, 0.81, 0.92, 1 )"> + <constant name="SKY_BLUE" value="Color( 0.53, 0.81, 0.92, 1 )"> Sky blue color. </constant> - <constant name="slateblue" value="Color( 0.42, 0.35, 0.8, 1 )"> + <constant name="SLATE_BLUE" value="Color( 0.42, 0.35, 0.8, 1 )"> Slate blue color. </constant> - <constant name="slategray" value="Color( 0.44, 0.5, 0.56, 1 )"> + <constant name="SLATE_GRAY" value="Color( 0.44, 0.5, 0.56, 1 )"> Slate gray color. </constant> - <constant name="snow" value="Color( 1, 0.98, 0.98, 1 )"> + <constant name="SNOW" value="Color( 1, 0.98, 0.98, 1 )"> Snow color. </constant> - <constant name="springgreen" value="Color( 0, 1, 0.5, 1 )"> + <constant name="SPRING_GREEN" value="Color( 0, 1, 0.5, 1 )"> Spring green color. </constant> - <constant name="steelblue" value="Color( 0.27, 0.51, 0.71, 1 )"> + <constant name="STEEL_BLUE" value="Color( 0.27, 0.51, 0.71, 1 )"> Steel blue color. </constant> - <constant name="tan" value="Color( 0.82, 0.71, 0.55, 1 )"> + <constant name="TAN" value="Color( 0.82, 0.71, 0.55, 1 )"> Tan color. </constant> - <constant name="teal" value="Color( 0, 0.5, 0.5, 1 )"> + <constant name="TEAL" value="Color( 0, 0.5, 0.5, 1 )"> Teal color. </constant> - <constant name="thistle" value="Color( 0.85, 0.75, 0.85, 1 )"> + <constant name="THISTLE" value="Color( 0.85, 0.75, 0.85, 1 )"> Thistle color. </constant> - <constant name="tomato" value="Color( 1, 0.39, 0.28, 1 )"> + <constant name="TOMATO" value="Color( 1, 0.39, 0.28, 1 )"> Tomato color. </constant> - <constant name="transparent" value="Color( 1, 1, 1, 0 )"> - Transparent color (white with no alpha). + <constant name="TRANSPARENT" value="Color( 1, 1, 1, 0 )"> + Transparent color (white with zero alpha). </constant> - <constant name="turquoise" value="Color( 0.25, 0.88, 0.82, 1 )"> + <constant name="TURQUOISE" value="Color( 0.25, 0.88, 0.82, 1 )"> Turquoise color. </constant> - <constant name="violet" value="Color( 0.93, 0.51, 0.93, 1 )"> + <constant name="VIOLET" value="Color( 0.93, 0.51, 0.93, 1 )"> Violet color. </constant> - <constant name="webgray" value="Color( 0.5, 0.5, 0.5, 1 )"> + <constant name="WEB_GRAY" value="Color( 0.5, 0.5, 0.5, 1 )"> Web gray color. </constant> - <constant name="webgreen" value="Color( 0, 0.5, 0, 1 )"> + <constant name="WEB_GREEN" value="Color( 0, 0.5, 0, 1 )"> Web green color. </constant> - <constant name="webmaroon" value="Color( 0.5, 0, 0, 1 )"> + <constant name="WEB_MAROON" value="Color( 0.5, 0, 0, 1 )"> Web maroon color. </constant> - <constant name="webpurple" value="Color( 0.5, 0, 0.5, 1 )"> + <constant name="WEB_PURPLE" value="Color( 0.5, 0, 0.5, 1 )"> Web purple color. </constant> - <constant name="wheat" value="Color( 0.96, 0.87, 0.7, 1 )"> + <constant name="WHEAT" value="Color( 0.96, 0.87, 0.7, 1 )"> Wheat color. </constant> - <constant name="white" value="Color( 1, 1, 1, 1 )"> + <constant name="WHITE" value="Color( 1, 1, 1, 1 )"> White color. </constant> - <constant name="whitesmoke" value="Color( 0.96, 0.96, 0.96, 1 )"> + <constant name="WHITE_SMOKE" value="Color( 0.96, 0.96, 0.96, 1 )"> White smoke color. </constant> - <constant name="yellow" value="Color( 1, 1, 0, 1 )"> + <constant name="YELLOW" value="Color( 1, 1, 0, 1 )"> Yellow color. </constant> - <constant name="yellowgreen" value="Color( 0.6, 0.8, 0.2, 1 )"> + <constant name="YELLOW_GREEN" value="Color( 0.6, 0.8, 0.2, 1 )"> Yellow green color. </constant> </constants> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index aea3542867..fddfd27573 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -51,6 +51,9 @@ If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders. [b]Note:[/b] Cannot be enabled if raw mode is on. </member> + <member name="picker_shape" type="int" setter="set_picker_shape" getter="get_picker_shape" enum="ColorPicker.PickerShapeType" default="0"> + The shape of the color space view. See [enum PickerShapeType]. + </member> <member name="presets_enabled" type="bool" setter="set_presets_enabled" getter="are_presets_enabled" default="true"> If [code]true[/code], the "add preset" button is enabled. </member> @@ -86,11 +89,23 @@ </signal> </signals> <constants> + <constant name="SHAPE_HSV_RECTANGLE" value="0" enum="PickerShapeType"> + HSV Color Model rectangle color space. + </constant> + <constant name="SHAPE_HSV_WHEEL" value="1" enum="PickerShapeType"> + HSV Color Model rectangle color space with a wheel. + </constant> + <constant name="SHAPE_VHS_CIRCLE" value="2" enum="PickerShapeType"> + HSV Color Model circle color space. Use Saturation as a radius. + </constant> </constants> <theme_items> <theme_item name="add_preset" type="Texture2D"> The icon for the "Add Preset" button. </theme_item> + <theme_item name="bar_arrow" type="Texture2D"> + The texture for the arrow grabber. + </theme_item> <theme_item name="color_hue" type="Texture2D"> Custom texture for the hue selection slider on the right. </theme_item> @@ -107,6 +122,8 @@ <theme_item name="overbright_indicator" type="Texture2D"> The indicator used to signalize that the color value is outside the 0-1 range. </theme_item> + <theme_item name="picker_cursor" type="Texture2D"> + </theme_item> <theme_item name="preset_bg" type="Texture2D"> </theme_item> <theme_item name="screen_picker" type="Texture2D"> diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml index 3e83202472..b510905d1f 100644 --- a/doc/classes/ConcavePolygonShape3D.xml +++ b/doc/classes/ConcavePolygonShape3D.xml @@ -5,7 +5,7 @@ </brief_description> <description> Concave polygon shape resource, which can be set into a [PhysicsBody3D] or area. This shape is created by feeding a list of triangles. - Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [KinematicBody3D] or [RigidBody3D] with a mode other than Static. + Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidBody3D] with a mode other than Static. </description> <tutorials> <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> @@ -28,6 +28,11 @@ </description> </method> </methods> + <members> + <member name="backface_collision" type="bool" setter="set_backface_collision_enabled" getter="is_backface_collision_enabled" default="false"> + If set to [code]true[/code], collisions occur on both sides of the concave shape faces. Otherwise they occur only along the face normals. + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index da17d993e3..38948a2d6e 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -49,6 +49,12 @@ <tutorials> </tutorials> <methods> + <method name="clear"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="erase_section"> <return type="void"> </return> @@ -158,7 +164,7 @@ <argument index="0" name="data" type="String"> </argument> <description> - Parses the the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on. + Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index c5e820e9fe..9c61fca598 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -50,7 +50,7 @@ [gdscript] func _gui_input(event): if event is InputEventMouseButton: - if event.button_index == BUTTON_LEFT and event.pressed: + if event.button_index == MOUSE_BUTTON_LEFT and event.pressed: print("I've been clicked D:") [/gdscript] [csharp] @@ -150,7 +150,6 @@ </argument> <description> Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses. - [b]Note:[/b] Unlike other theme overrides, there is no way to undo a color override without manually assigning the previous color. [b]Example of overriding a label's color and resetting it later:[/b] [codeblocks] [gdscript] @@ -178,7 +177,7 @@ <argument index="1" name="constant" type="int"> </argument> <description> - Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. If the [code]constant[/code] is [code]0[/code], the override is cleared and the constant from assigned [Theme] is used. + Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. </description> </method> <method name="add_theme_font_override"> @@ -189,7 +188,7 @@ <argument index="1" name="font" type="Font"> </argument> <description> - Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. If [code]font[/code] is [code]null[/code] or invalid, the override is cleared and the font from assigned [Theme] is used. + Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. </description> </method> <method name="add_theme_font_size_override"> @@ -200,7 +199,7 @@ <argument index="1" name="font_size" type="int"> </argument> <description> - Overrides the font size with given [code]name[/code] in the [member theme] resource the control uses. If [code]font_size[/code] is [code]-1[/code], the override is cleared and the font size from assigned [Theme] is used. + Overrides the font size with given [code]name[/code] in the [member theme] resource the control uses. </description> </method> <method name="add_theme_icon_override"> @@ -211,7 +210,7 @@ <argument index="1" name="texture" type="Texture2D"> </argument> <description> - Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. If [code]icon[/code] is [code]null[/code] or invalid, the override is cleared and the icon from assigned [Theme] is used. + Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. </description> </method> <method name="add_theme_stylebox_override"> @@ -222,7 +221,7 @@ <argument index="1" name="stylebox" type="StyleBox"> </argument> <description> - Overrides the [StyleBox] with given [code]name[/code] in the [member theme] resource the control uses. If [code]stylebox[/code] is empty or invalid, the override is cleared and the [StyleBox] from assigned [Theme] is used. + Overrides the [StyleBox] with given [code]name[/code] in the [member theme] resource the control uses. [b]Example of modifying a property in a StyleBox by duplicating it:[/b] [codeblocks] [gdscript] @@ -463,10 +462,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. [codeblocks] [gdscript] func _ready(): @@ -486,10 +485,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_font" qualifiers="const"> @@ -497,10 +496,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_font_size" qualifiers="const"> @@ -508,10 +507,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_icon" qualifiers="const"> @@ -519,10 +518,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_theme_stylebox" qualifiers="const"> @@ -530,10 +529,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. + Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. </description> </method> <method name="get_tooltip" qualifiers="const"> @@ -594,10 +593,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_color_override" qualifiers="const"> @@ -614,10 +613,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_constant_override" qualifiers="const"> @@ -634,10 +633,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_font_override" qualifiers="const"> @@ -654,10 +653,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_font_size_override" qualifiers="const"> @@ -674,10 +673,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_icon_override" qualifiers="const"> @@ -694,10 +693,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_stylebox_override" qualifiers="const"> @@ -730,6 +729,60 @@ Give up the focus. No other control will be able to receive keyboard input. </description> </method> + <method name="remove_theme_color_override"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Removes a theme override for a [Color] with the given [code]name[/code]. + </description> + </method> + <method name="remove_theme_constant_override"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Removes a theme override for a constant with the given [code]name[/code]. + </description> + </method> + <method name="remove_theme_font_override"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Removes a theme override for a [Font] with the given [code]name[/code]. + </description> + </method> + <method name="remove_theme_font_size_override"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Removes a theme override for a font size with the given [code]name[/code]. + </description> + </method> + <method name="remove_theme_icon_override"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Removes a theme override for an icon with the given [code]name[/code]. + </description> + </method> + <method name="remove_theme_stylebox_override"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <description> + Removes a theme override for a [StyleBox] with the given [code]name[/code]. + </description> + </method> <method name="set_anchor"> <return type="void"> </return> @@ -1002,7 +1055,7 @@ Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience. </member> <member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor" default="0.0"> - Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience. + Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0"> The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals. @@ -1014,7 +1067,7 @@ Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [code]ui_left[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one. </member> <member name="focus_neighbor_right" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath("")"> - Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. + Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. </member> <member name="focus_neighbor_top" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath("")"> Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [code]ui_top[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. @@ -1120,7 +1173,12 @@ Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does. </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> - Changing this property replaces the current [Theme] resource this node and all its [Control] children use. + The [Theme] resource this node and all its [Control] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority. + </member> + <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="&"""> + The type name used by this [Control] to look up its own theme items. By default, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance). Setting this property gives the highest priority to the type of the specified name, then falls back on the class names. + [b]Note:[/b] To look up [Control]'s own items use various [code]get_theme_*[/code] methods without specifying [code]theme_type[/code]. + [b]Note:[/b] Theme items are looked for in the tree order, from branch to root, where each [Control] node is checked for its [member theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. </member> </members> <signals> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index 410c2262f9..26b3087b21 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -27,7 +27,7 @@ </argument> <description> Loads a key from [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded. - [b]Note[/b]: [code]path[/code] should should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise. + [b]Note[/b]: [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise. </description> </method> <method name="load_from_string"> @@ -50,7 +50,7 @@ </argument> <description> Saves a key to the given [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be saved. - [b]Note[/b]: [code]path[/code] should should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise. + [b]Note[/b]: [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise. </description> </method> <method name="save_to_string"> diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index 26872e1f8e..e47c420a3b 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -108,7 +108,7 @@ Returns the Y value for the point that would exist at the X position [code]offset[/code] along the curve. </description> </method> - <method name="interpolate_baked"> + <method name="interpolate_baked" qualifiers="const"> <return type="float"> </return> <argument index="0" name="offset" type="float"> diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml index ca36b2400c..14c35ae6d3 100644 --- a/doc/classes/Decal.xml +++ b/doc/classes/Decal.xml @@ -6,7 +6,7 @@ <description> [Decal]s are used to project a texture onto a [Mesh] in the scene. Use Decals to add detail to a scene without affecting the underlying [Mesh]. They are often used to add weathering to building, add dirt or mud to the ground, or add variety to props. Decals can be moved at any time, making them suitable for things like blob shadows or laser sight dots. They are made of an [AABB] and a group of [Texture2D]s specifying [Color], normal, ORM (ambient occlusion, roughness, metallic), and emission. Decals are projected within their [AABB] so altering the orientation of the Decal affects the direction in which they are projected. By default, Decals are projected down (i.e. from positive Y to negative Y). - The [Texture2D]s associated with the Decal are automatically stored in a texture atlas which is used for drawing the decals so all decals can be drawn at once. Godot uses clustered decals, meaning they are stored in cluster data and drawn when the mesh is drawn, they are not drawn as a postprocessing effect after. + The [Texture2D]s associated with the Decal are automatically stored in a texture atlas which is used for drawing the decals so all decals can be drawn at once. Godot uses clustered decals, meaning they are stored in cluster data and drawn when the mesh is drawn, they are not drawn as a post-processing effect after. </description> <tutorials> </tutorials> @@ -65,7 +65,7 @@ Blends the albedo [Color] of the decal with albedo [Color] of the underlying mesh. </member> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575"> - Specifies which [member VisualInstance3D.layers] this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you an ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them. + Specifies which [member VisualInstance3D.layers] this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you can ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them. </member> <member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="10.0"> Distance from the camera at which the Decal begins to fade away. diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index d3fcbc9f64..16c4348994 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -4,7 +4,7 @@ Dictionary type. </brief_description> <description> - Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements, even though this may not be reflected when printing the dictionary. In other programming languages, this data structure is sometimes referred to as an hash map or associative array. + Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements, even though this may not be reflected when printing the dictionary. In other programming languages, this data structure is sometimes referred to as a hash map or associative array. You can define a dictionary by placing a comma-separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code]. Erasing elements while iterating over them [b]is not supported[/b] and will result in undefined behavior. [b]Note:[/b] Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use [method duplicate]. @@ -206,7 +206,7 @@ Clear the dictionary, removing all key/value pairs. </description> </method> - <method name="duplicate"> + <method name="duplicate" qualifiers="const"> <return type="Dictionary"> </return> <argument index="0" name="deep" type="bool" default="false"> @@ -224,7 +224,7 @@ Erase a dictionary key/value pair by key. Returns [code]true[/code] if the given key was present in the dictionary, [code]false[/code] otherwise. Does not erase elements while iterating over the dictionary. </description> </method> - <method name="get"> + <method name="get" qualifiers="const"> <return type="Variant"> </return> <argument index="0" name="key" type="Variant"> @@ -235,7 +235,7 @@ Returns the current value for the specified key in the [Dictionary]. If the key does not exist, the method returns the value of the optional default argument, or [code]null[/code] if it is omitted. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="key" type="Variant"> @@ -260,16 +260,16 @@ This method (like the [code]in[/code] operator) will evaluate to [code]true[/code] as long as the key exists, even if the associated value is [code]null[/code]. </description> </method> - <method name="has_all"> + <method name="has_all" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="keys" type="Array"> </argument> <description> - Returns [code]true[/code] if the dictionary has all of the keys in the given array. + Returns [code]true[/code] if the dictionary has all the keys in the given array. </description> </method> - <method name="hash"> + <method name="hash" qualifiers="const"> <return type="int"> </return> <description> @@ -292,14 +292,14 @@ [b]Note:[/b] Dictionaries with the same keys/values but in a different order will have a different hash. </description> </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if the dictionary is empty. </description> </method> - <method name="keys"> + <method name="keys" qualifiers="const"> <return type="Array"> </return> <description> @@ -330,14 +330,14 @@ <description> </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> Returns the number of keys in the dictionary. </description> </method> - <method name="values"> + <method name="values" qualifiers="const"> <return type="Array"> </return> <description> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index 2d7292717d..2c61d723cd 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -6,6 +6,7 @@ <description> Directory type. It is used to manage directories and their content (not restricted to the project folder). When creating a new [Directory], it must be explicitly opened using [method open] before most methods can be used. However, [method file_exists] and [method dir_exists] can be used without opening a directory. If so, they use a path relative to [code]res://[/code]. + [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. Use [ResourceLoader] to access imported resources. Here is an example on how to iterate through the files of a directory: [codeblocks] [gdscript] @@ -125,7 +126,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not existed, the method returns an empty String. + On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not exist, the method returns an empty String. </description> </method> <method name="get_drive_count"> @@ -153,21 +154,21 @@ <method name="list_dir_begin"> <return type="int" enum="Error"> </return> - <argument index="0" name="skip_navigational" type="bool" default="false"> + <argument index="0" name="show_navigational" type="bool" default="false"> </argument> - <argument index="1" name="skip_hidden" type="bool" default="false"> + <argument index="1" name="show_hidden" type="bool" default="false"> </argument> <description> Initializes the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end]. - If [code]skip_navigational[/code] is [code]true[/code], [code].[/code] and [code]..[/code] are filtered out. - If [code]skip_hidden[/code] is [code]true[/code], hidden files are filtered out. + If [code]show_navigational[/code] is [code]true[/code], [code].[/code] and [code]..[/code] are included too. + If [code]show_hidden[/code] is [code]true[/code], hidden files are included too. </description> </method> <method name="list_dir_end"> <return type="void"> </return> <description> - Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter). + Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] does not matter). </description> </method> <method name="make_dir"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 91e90d051d..6c1cd37beb 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -469,46 +469,6 @@ <description> </description> </method> - <method name="native_video_is_playing" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="native_video_pause"> - <return type="void"> - </return> - <description> - </description> - </method> - <method name="native_video_play"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="volume" type="float"> - </argument> - <argument index="2" name="audio_track" type="String"> - </argument> - <argument index="3" name="subtitle_track" type="String"> - </argument> - <argument index="4" name="screen" type="int"> - </argument> - <description> - </description> - </method> - <method name="native_video_stop"> - <return type="void"> - </return> - <description> - </description> - </method> - <method name="native_video_unpause"> - <return type="void"> - </return> - <description> - </description> - </method> <method name="process_events"> <return type="void"> </return> @@ -1065,33 +1025,39 @@ </constant> <constant name="FEATURE_CUSTOM_CURSOR_SHAPE" value="8" enum="Feature"> </constant> - <constant name="FEATURE_NATIVE_VIDEO" value="9" enum="Feature"> + <constant name="FEATURE_NATIVE_DIALOG" value="9" enum="Feature"> </constant> - <constant name="FEATURE_NATIVE_DIALOG" value="10" enum="Feature"> + <constant name="FEATURE_CONSOLE_WINDOW" value="10" enum="Feature"> </constant> - <constant name="FEATURE_CONSOLE_WINDOW" value="11" enum="Feature"> + <constant name="FEATURE_IME" value="11" enum="Feature"> </constant> - <constant name="FEATURE_IME" value="12" enum="Feature"> + <constant name="FEATURE_WINDOW_TRANSPARENCY" value="12" enum="Feature"> </constant> - <constant name="FEATURE_WINDOW_TRANSPARENCY" value="13" enum="Feature"> + <constant name="FEATURE_HIDPI" value="13" enum="Feature"> </constant> - <constant name="FEATURE_HIDPI" value="14" enum="Feature"> + <constant name="FEATURE_ICON" value="14" enum="Feature"> </constant> - <constant name="FEATURE_ICON" value="15" enum="Feature"> + <constant name="FEATURE_NATIVE_ICON" value="15" enum="Feature"> </constant> - <constant name="FEATURE_NATIVE_ICON" value="16" enum="Feature"> + <constant name="FEATURE_ORIENTATION" value="16" enum="Feature"> </constant> - <constant name="FEATURE_ORIENTATION" value="17" enum="Feature"> - </constant> - <constant name="FEATURE_SWAP_BUFFERS" value="18" enum="Feature"> + <constant name="FEATURE_SWAP_BUFFERS" value="17" enum="Feature"> </constant> <constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode"> + Makes the mouse cursor visible if it is hidden. </constant> <constant name="MOUSE_MODE_HIDDEN" value="1" enum="MouseMode"> + Makes the mouse cursor hidden if it is visible. </constant> <constant name="MOUSE_MODE_CAPTURED" value="2" enum="MouseMode"> + Captures the mouse. The mouse will be hidden and its position locked at the center of the screen. + [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative]. </constant> <constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode"> + Confines the mouse cursor to the game window, and make it visible. + </constant> + <constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode"> + Confines the mouse cursor to the game window, and make it hidden. </constant> <constant name="SCREEN_OF_MAIN_WINDOW" value="-1"> </constant> diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml index b97933e582..9484d33252 100644 --- a/doc/classes/EditorDebuggerPlugin.xml +++ b/doc/classes/EditorDebuggerPlugin.xml @@ -38,7 +38,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code]. + Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code]. </description> </method> <method name="register_message_capture"> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 5461dccd27..3a045817c2 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -90,7 +90,7 @@ <argument index="0" name="resources" type="PackedStringArray"> </argument> <description> - Remitted if a resource is reimported. + Emitted if a resource is reimported. </description> </signal> <signal name="resources_reload"> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index aa64ab4043..663eb0ff5c 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -92,7 +92,7 @@ return new Godot.Collections.Array{new Godot.Collections.Dictionary{{"name", "myOption"}, {"defaultValue", false}}}; } - public override int Import(String sourceFile, String savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles) + public override int Import(String sourceFile, String savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles) { var file = new File(); if (file.Open(sourceFile, File.ModeFlags.Read) != Error.Ok) diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index 3cc624f49b..8204dc931e 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -4,12 +4,12 @@ Plugin for adding custom property editors on inspector. </brief_description> <description> - This plugins allows adding custom property editors to [EditorInspector]. + These plugins allow adding custom property editors to [EditorInspector]. Plugins are registered via [method EditorPlugin.add_inspector_plugin]. When an object is edited, the [method can_handle] function is called and must return [code]true[/code] if the object type is supported. If supported, the function [method parse_begin] will be called, allowing to place custom controls at the beginning of the class. Subsequently, the [method parse_category] and [method parse_property] are called for every category and property. They offer the ability to add custom controls to the inspector too. - Finally [method parse_end] will be called. + Finally, [method parse_end] will be called. On each of these calls, the "add" functions can be called. </description> <tutorials> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index b01af71852..3f324bf1a0 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -10,6 +10,15 @@ <tutorials> </tutorials> <methods> + <method name="edit_node"> + <return type="void"> + </return> + <argument index="0" name="node" type="Node"> + </argument> + <description> + Edits the given [Node]. The node will be also selected if it's inside the scene tree. + </description> + </method> <method name="edit_resource"> <return type="void"> </return> @@ -48,6 +57,20 @@ [b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically. </description> </method> + <method name="get_editor_paths"> + <return type="EditorPaths"> + </return> + <description> + </description> + </method> + <method name="get_editor_scale" qualifiers="const"> + <return type="float"> + </return> + <description> + Returns the actual scale of the editor UI ([code]1.0[/code] being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins. + [b]Note:[/b] This value is set via the [code]interface/editor/display_scale[/code] and [code]interface/editor/custom_display_scale[/code] editor settings. Editor must be restarted for changes to be properly applied. + </description> + </method> <method name="get_editor_settings"> <return type="EditorSettings"> </return> diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index 322cff4e43..34657a1c08 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -98,6 +98,13 @@ Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden. </description> </method> + <method name="get_gizmo_name" qualifiers="virtual"> + <return type="String"> + </return> + <description> + Override this method to provide the name that will appear in the gizmo visibility menu. + </description> + </method> <method name="get_handle_name" qualifiers="virtual"> <return type="String"> </return> @@ -131,13 +138,6 @@ Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable). </description> </method> - <method name="get_name" qualifiers="virtual"> - <return type="String"> - </return> - <description> - Override this method to provide the name that will appear in the gizmo visibility menu. - </description> - </method> <method name="get_priority" qualifiers="virtual"> <return type="int"> </return> @@ -170,7 +170,7 @@ <return type="bool"> </return> <description> - Override this method to define whether Node3D with this gizmo should be selecteble even when the gizmo is hidden. + Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden. </description> </method> <method name="redraw" qualifiers="virtual"> diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml new file mode 100644 index 0000000000..d0d785dbb8 --- /dev/null +++ b/doc/classes/EditorPaths.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorPaths" inherits="Object" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_cache_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_config_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_data_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_self_contained_file" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="is_self_contained" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index a24e4bbdc5..6c40b7aa9d 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -91,7 +91,8 @@ <argument index="0" name="plugin" type="EditorExportPlugin"> </argument> <description> - Registers a new export plugin. Export plugins are used when the project is being exported. See [EditorExportPlugin] for more information. + Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported. + See [method add_inspector_plugin] for an example of how to register a plugin. </description> </method> <method name="add_import_plugin"> @@ -100,6 +101,9 @@ <argument index="0" name="importer" type="EditorImportPlugin"> </argument> <description> + Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type. + [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_import_plugin] instead. + See [method add_inspector_plugin] for an example of how to register a plugin. </description> </method> <method name="add_inspector_plugin"> @@ -108,6 +112,20 @@ <argument index="0" name="plugin" type="EditorInspectorPlugin"> </argument> <description> + Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties. + [b]Note:[/b] Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior. + [codeblocks] + [gdscript] + const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd") + var inspector_plugin = MyInspectorPlugin.new() + + func _enter_tree(): + add_inspector_plugin(inspector_plugin) + + func _exit_tree(): + remove_inspector_plugin(inspector_plugin) + [/gdscript] + [/codeblocks] </description> </method> <method name="add_scene_import_plugin"> @@ -116,6 +134,7 @@ <argument index="0" name="scene_importer" type="EditorSceneImporter"> </argument> <description> + Registers a new [EditorSceneImporter]. Scene importers are used to import custom 3D asset formats as scenes. </description> </method> <method name="add_spatial_gizmo_plugin"> @@ -124,6 +143,8 @@ <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin"> </argument> <description> + Registers a new [EditorNode3DGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [Node3D]. + See [method add_inspector_plugin] for an example of how to register a plugin. </description> </method> <method name="add_tool_menu_item"> @@ -157,6 +178,16 @@ Registers a custom translation parser plugin for extracting translatable strings from custom files. </description> </method> + <method name="add_undo_redo_inspector_hook_callback"> + <return type="void"> + </return> + <argument index="0" name="callable" type="Callable"> + </argument> + <description> + Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified. + The callback should have 4 arguments: [Object] [code]undo_redo[/code], [Object] [code]modified_object[/code], [String] [code]property[/code] and [Variant] [code]new_value[/code]. They are, respectively, the [UndoRedo] object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take. + </description> + </method> <method name="apply_changes" qualifiers="virtual"> <return type="void"> </return> @@ -214,7 +245,7 @@ [gdscript] func forward_canvas_draw_over_viewport(overlay): # Draw a circle at cursor position. - overlay.draw_circle(overlay.get_local_mouse_position(), 64) + overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white) func forward_canvas_gui_input(event): if event is InputEventMouseMotion: @@ -561,7 +592,7 @@ <argument index="0" name="script" type="Script"> </argument> <description> - Removes the debugger plugin with given script fromm the Debugger. + Removes the debugger plugin with given script from the Debugger. </description> </method> <method name="remove_export_plugin"> @@ -570,6 +601,7 @@ <argument index="0" name="plugin" type="EditorExportPlugin"> </argument> <description> + Removes an export plugin registered by [method add_export_plugin]. </description> </method> <method name="remove_import_plugin"> @@ -578,6 +610,7 @@ <argument index="0" name="importer" type="EditorImportPlugin"> </argument> <description> + Removes an import plugin registered by [method add_import_plugin]. </description> </method> <method name="remove_inspector_plugin"> @@ -586,6 +619,7 @@ <argument index="0" name="plugin" type="EditorInspectorPlugin"> </argument> <description> + Removes an inspector plugin registered by [method add_import_plugin] </description> </method> <method name="remove_scene_import_plugin"> @@ -594,6 +628,7 @@ <argument index="0" name="scene_importer" type="EditorSceneImporter"> </argument> <description> + Removes a scene importer registered by [method add_scene_import_plugin]. </description> </method> <method name="remove_spatial_gizmo_plugin"> @@ -602,6 +637,7 @@ <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin"> </argument> <description> + Removes a gizmo plugin registered by [method add_spatial_gizmo_plugin]. </description> </method> <method name="remove_tool_menu_item"> @@ -619,7 +655,16 @@ <argument index="0" name="parser" type="EditorTranslationParserPlugin"> </argument> <description> - Removes a registered custom translation parser plugin. + Removes a custom translation parser plugin registered by [method add_translation_parser_plugin]. + </description> + </method> + <method name="remove_undo_redo_inspector_hook_callback"> + <return type="void"> + </return> + <argument index="0" name="callable" type="Callable"> + </argument> + <description> + Removes a callback previsously added by [method add_undo_redo_inspector_hook_callback]. </description> </method> <method name="save_external_data" qualifiers="virtual"> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index f568263ff8..fd9fae435b 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -25,7 +25,7 @@ </argument> <argument index="1" name="value" type="Variant"> </argument> - <argument index="2" name="field" type="StringName" default="@"""> + <argument index="2" name="field" type="StringName" default="&"""> </argument> <argument index="3" name="changing" type="bool" default="false"> </argument> diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml new file mode 100644 index 0000000000..30c73daa77 --- /dev/null +++ b/doc/classes/EditorResourcePicker.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorResourcePicker" inherits="HBoxContainer" version="4.0"> + <brief_description> + Godot editor's control for selecting [Resource] type properties. + </brief_description> + <description> + This [Control] node is used in the editor's Inspector dock to allow editing of [Resource] type properties. It provides options for creating, loading, saving and converting resources. Can be used with [EditorInspectorPlugin] to recreate the same behavior. + [b]Note:[/b] This [Control] does not include any editor for the resource, as editing is controlled by the Inspector dock itself or sub-Inspectors. + </description> + <tutorials> + </tutorials> + <methods> + <method name="can_drop_data_fw" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="position" type="Vector2"> + </argument> + <argument index="1" name="data" type="Variant"> + </argument> + <argument index="2" name="from" type="Control"> + </argument> + <description> + </description> + </method> + <method name="drop_data_fw"> + <return type="void"> + </return> + <argument index="0" name="position" type="Vector2"> + </argument> + <argument index="1" name="data" type="Variant"> + </argument> + <argument index="2" name="from" type="Control"> + </argument> + <description> + </description> + </method> + <method name="get_allowed_types" qualifiers="const"> + <return type="PackedStringArray"> + </return> + <description> + Returns a list of all allowed types and subtypes corresponding to the [member base_type]. If the [member base_type] is empty, an empty list is returned. + </description> + </method> + <method name="get_drag_data_fw"> + <return type="Variant"> + </return> + <argument index="0" name="position" type="Vector2"> + </argument> + <argument index="1" name="from" type="Control"> + </argument> + <description> + </description> + </method> + <method name="handle_menu_selected" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + This virtual method can be implemented to handle context menu items not handled by default. See [method set_create_options]. + </description> + </method> + <method name="set_create_options" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="menu_node" type="Object"> + </argument> + <description> + This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [code]menu_node[/code] is a reference to the [PopupMenu] node. + [b]Note:[/b] Implement [method handle_menu_selected] to handle these custom items. + </description> + </method> + <method name="set_toggle_pressed"> + <return type="void"> + </return> + <argument index="0" name="pressed" type="bool"> + </argument> + <description> + Sets the toggle mode state for the main button. Works only if [member toggle_mode] is set to [code]true[/code]. + </description> + </method> + </methods> + <members> + <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""""> + The base type of allowed resource types. Can be a comma-separated list of several options. + </member> + <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> + If [code]true[/code], the value can be selected and edited. + </member> + <member name="edited_resource" type="Resource" setter="set_edited_resource" getter="get_edited_resource"> + The edited resource value. + </member> + <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" default="false"> + If [code]true[/code], the main button with the resource preview works in the toggle mode. Use [method set_toggle_pressed] to manually set the state. + </member> + </members> + <signals> + <signal name="resource_changed"> + <argument index="0" name="resource" type="Resource"> + </argument> + <description> + Emitted when the value of the edited resource was changed. + </description> + </signal> + <signal name="resource_selected"> + <argument index="0" name="resource" type="Resource"> + </argument> + <description> + Emitted when the resource value was set and user clicked to edit it. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index 0c1d969518..3239a75ada 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -40,7 +40,8 @@ <argument index="3" name="userdata" type="Variant"> </argument> <description> - Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. + Queue the [code]resource[/code] being edited for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called. + [b]Note[/b]: If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null. </description> </method> <method name="queue_resource_preview"> @@ -55,7 +56,8 @@ <argument index="3" name="userdata" type="Variant"> </argument> <description> - Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. + Queue a resource file located at [code]path[/code] for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called. + [b]Note[/b]: If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null. </description> </method> <method name="remove_preview_generator"> diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml index db85b859e5..aa55a1653d 100644 --- a/doc/classes/EditorSceneImporter.xml +++ b/doc/classes/EditorSceneImporter.xml @@ -74,21 +74,11 @@ </constant> <constant name="IMPORT_ANIMATION" value="2"> </constant> - <constant name="IMPORT_ANIMATION_DETECT_LOOP" value="4"> + <constant name="IMPORT_FAIL_ON_MISSING_DEPENDENCIES" value="4"> </constant> - <constant name="IMPORT_ANIMATION_OPTIMIZE" value="8"> + <constant name="IMPORT_GENERATE_TANGENT_ARRAYS" value="8"> </constant> - <constant name="IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS" value="16"> - </constant> - <constant name="IMPORT_ANIMATION_KEEP_VALUE_TRACKS" value="32"> - </constant> - <constant name="IMPORT_GENERATE_TANGENT_ARRAYS" value="256"> - </constant> - <constant name="IMPORT_FAIL_ON_MISSING_DEPENDENCIES" value="512"> - </constant> - <constant name="IMPORT_MATERIALS_IN_INSTANCES" value="1024"> - </constant> - <constant name="IMPORT_USE_COMPRESSION" value="2048"> + <constant name="IMPORT_USE_NAMED_SKIN_BINDS" value="16"> </constant> </constants> </class> diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/EditorSceneImporterMesh.xml index 58b7104667..9daa3f16bc 100644 --- a/doc/classes/EditorSceneImporterMesh.xml +++ b/doc/classes/EditorSceneImporterMesh.xml @@ -60,9 +60,17 @@ <description> </description> </method> + <method name="get_lightmap_size_hint" qualifiers="const"> + <return type="Vector2i"> + </return> + <description> + </description> + </method> <method name="get_mesh"> <return type="ArrayMesh"> </return> + <argument index="0" name="arg0" type="Mesh"> + </argument> <description> </description> </method> @@ -150,6 +158,14 @@ <description> </description> </method> + <method name="set_lightmap_size_hint"> + <return type="void"> + </return> + <argument index="0" name="size" type="Vector2i"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"surfaces": [ ]}"> diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 5cddecffa8..d1cdc4e43e 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -62,13 +62,6 @@ Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]). </description> </method> - <method name="get_source_folder" qualifiers="const"> - <return type="String"> - </return> - <description> - Returns the resource folder the imported scene file is located in. - </description> - </method> <method name="post_import" qualifiers="virtual"> <return type="Object"> </return> diff --git a/doc/classes/EditorScriptPicker.xml b/doc/classes/EditorScriptPicker.xml new file mode 100644 index 0000000000..8334676d92 --- /dev/null +++ b/doc/classes/EditorScriptPicker.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorScriptPicker" inherits="EditorResourcePicker" version="4.0"> + <brief_description> + Godot editor's control for selecting the [code]script[/code] property of a [Node]. + </brief_description> + <description> + Similar to [EditorResourcePicker] this [Control] node is used in the editor's Inspector dock, but only to edit the [code]script[/code] property of a [Node]. Default options for creating new resources of all possible subtypes are replaced with dedicated buttons that open the "Attach Node Script" dialog. Can be used with [EditorInspectorPlugin] to recreate the same behavior. + [b]Note:[/b] You must set the [member script_owner] for the custom context menu items to work. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="script_owner" type="Node" setter="set_script_owner" getter="get_script_owner"> + The owner [Node] of the script property that holds the edited resource. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml index 1ff9744b70..63e89750c3 100644 --- a/doc/classes/EditorSelection.xml +++ b/doc/classes/EditorSelection.xml @@ -17,6 +17,7 @@ </argument> <description> Adds a node to the selection. + [b]Note:[/b] The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use [method EditorInterface.edit_node]. </description> </method> <method name="clear"> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 016d0128eb..e732223516 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -124,15 +124,6 @@ Returns the value of the setting specified by [code]name[/code]. This is equivalent to using [method Object.get] on the EditorSettings instance. </description> </method> - <method name="get_settings_dir" qualifiers="const"> - <return type="String"> - </return> - <description> - Gets the global settings path for the engine. Inside this path, you can find some standard paths such as: - [code]settings/tmp[/code] - Used for temporary storage of files - [code]settings/templates[/code] - Where export templates are located - </description> - </method> <method name="has_setting" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index 381f4fae04..935335943f 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorSpinSlider" inherits="Range" version="4.0"> <brief_description> + Godot editor's control for editing numeric values. </brief_description> <description> + This [Control] node is used in the editor's Inspector dock to allow editing of numeric values. Can be used with [EditorInspectorPlugin] to recreate the same behavior. </description> <tutorials> </tutorials> diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml index bb356c2183..0056b5ce16 100644 --- a/doc/classes/EditorVCSInterface.xml +++ b/doc/classes/EditorVCSInterface.xml @@ -38,7 +38,7 @@ <return type="Dictionary"> </return> <description> - Returns a [Dictionary] containing the path of the detected file change mapped to an integer signifying what kind of a change the corresponding file has experienced. + Returns a [Dictionary] containing the path of the detected file change mapped to an integer signifying what kind of change the corresponding file has experienced. The following integer values are being used to signify that the detected file is: - [code]0[/code]: New to the VCS working directory - [code]1[/code]: Modified diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 02b81ee9b7..1147b52102 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -156,13 +156,21 @@ </methods> <members> <member name="editor_hint" type="bool" setter="set_editor_hint" getter="is_editor_hint" default="true"> - If [code]true[/code], it is running inside the editor. Useful for tool scripts. + If [code]true[/code], the script is currently running inside the editor. This is useful for [code]@tool[/code] scripts to conditionally draw editor helpers, or prevent accidentally running "game" code that would affect the scene state while in the editor: + [codeblock] + if Engine.editor_hint: + draw_gizmos() + else: + simulate_physics() + [/codeblock] + See [url=https://docs.godotengine.org/en/latest/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information. + [b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] (e.g. when pressing [kbd]F5[/kbd]), use [method OS.has_feature] with the [code]"editor"[/code] argument instead. [code]OS.has_feature("editor")[/code] will evaluate to [code]true[/code] both when the code is running in the editor and when running the project from the editor, but it will evaluate to [code]false[/code] when the code is run from an exported project. </member> <member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second" default="60"> The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage. </member> <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> - Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. + Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. </member> <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0"> The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 821aa91d21..878535a08d 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -176,6 +176,8 @@ <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" enum="Environment.SDFGICascades" default="1"> </member> <member name="sdfgi_enabled" type="bool" setter="set_sdfgi_enabled" getter="is_sdfgi_enabled" default="false"> + If [code]true[/code], enables signed distance field global illumination. + [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. </member> <member name="sdfgi_energy" type="float" setter="set_sdfgi_energy" getter="get_sdfgi_energy" default="1.0"> </member> @@ -204,7 +206,7 @@ The depth tolerance for screen-space reflections. </member> <member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled" default="false"> - If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [GIProbe]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others. + If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [VoxelGI]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others. </member> <member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15"> The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). diff --git a/doc/classes/File.xml b/doc/classes/File.xml index e0781e807f..ea3b82dc54 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -61,7 +61,7 @@ </return> <description> Returns [code]true[/code] if the file cursor has read past the end of the file. - [b]Note:[/b] This function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_len] and [method get_position] to implement a custom logic. + [b]Note:[/b] This function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_length] and [method get_position] to implement a custom logic. </description> </method> <method name="file_exists" qualifiers="const"> @@ -121,10 +121,10 @@ <method name="get_buffer" qualifiers="const"> <return type="PackedByteArray"> </return> - <argument index="0" name="len" type="int"> + <argument index="0" name="length" type="int"> </argument> <description> - Returns next [code]len[/code] bytes of the file as a [PackedByteArray]. + Returns next [code]length[/code] bytes of the file as a [PackedByteArray]. </description> </method> <method name="get_csv_line" qualifiers="const"> @@ -158,7 +158,7 @@ Returns the next 32 bits from the file as a floating-point number. </description> </method> - <method name="get_len" qualifiers="const"> + <method name="get_length" qualifiers="const"> <return type="int"> </return> <description> @@ -275,6 +275,7 @@ </argument> <description> Opens a compressed file for reading or writing. + [b]Note:[/b] [method open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround. </description> </method> <method name="open_encrypted"> @@ -489,10 +490,10 @@ </method> </methods> <members> - <member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap" default="false"> + <member name="big_endian" type="bool" setter="set_big_endian" getter="is_big_endian" default="false"> If [code]true[/code], the file is read with big-endian [url=https://en.wikipedia.org/wiki/Endianness]endianness[/url]. If [code]false[/code], the file is read with little-endian endianness. If in doubt, leave this to [code]false[/code] as most files are written with little-endian endianness. - [b]Note:[/b] [member endian_swap] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written. - [b]Note:[/b] This is always reset to [code]false[/code] whenever you open the file. Therefore, you must set [member endian_swap] [i]after[/i] opening the file, not before. + [b]Note:[/b] [member big_endian] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written. + [b]Note:[/b] This is always reset to [code]false[/code] whenever you open the file. Therefore, you must set [member big_endian] [i]after[/i] opening the file, not before. </member> </members> <constants> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index ed437aefd5..966be0a981 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -133,6 +133,9 @@ </constant> </constants> <theme_items> + <theme_item name="back_folder" type="Texture2D"> + Custom icon for the back arrow. + </theme_item> <theme_item name="file" type="Texture2D"> Custom icon for files. </theme_item> @@ -148,6 +151,9 @@ <theme_item name="folder_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> The color modulation applied to the folder icon. </theme_item> + <theme_item name="forward_folder" type="Texture2D"> + Custom icon for the forward arrow. + </theme_item> <theme_item name="parent_folder" type="Texture2D"> Custom icon for the parent folder arrow. </theme_item> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 409e405551..20d5b6ce9b 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -175,7 +175,7 @@ </argument> <description> Returns the size of a character, optionally taking kerning into account if the next character is provided. - [b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. + [b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height. </description> </method> <method name="get_data" qualifiers="const"> @@ -247,7 +247,8 @@ <argument index="1" name="size" type="int" default="-1"> </argument> <description> - Returns the size size of a bounding box of a string, taking kerning and advance into account. + Returns the size of a bounding box of a string, taking kerning and advance into account. + [b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height]. See also [method draw_string]. </description> </method> diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index 6c54af05cd..e426c8fb36 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -391,7 +391,7 @@ If [code]true[/code], distance field hint is enabled. </member> <member name="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra spacing for each glyphs in pixels. + Extra spacing for each glyph in pixels. This can be a negative number to make the distance between glyphs smaller. </member> <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0"> diff --git a/doc/classes/GLTFAccessor.xml b/doc/classes/GLTFAccessor.xml deleted file mode 100644 index a1f596f7dd..0000000000 --- a/doc/classes/GLTFAccessor.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFAccessor" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="buffer_view" type="int" setter="set_buffer_view" getter="get_buffer_view" default="0"> - </member> - <member name="byte_offset" type="int" setter="set_byte_offset" getter="get_byte_offset" default="0"> - </member> - <member name="component_type" type="int" setter="set_component_type" getter="get_component_type" default="0"> - </member> - <member name="count" type="int" setter="set_count" getter="get_count" default="0"> - </member> - <member name="max" type="PackedFloat64Array" setter="set_max" getter="get_max" default="PackedFloat64Array( )"> - </member> - <member name="min" type="PackedFloat64Array" setter="set_min" getter="get_min" default="PackedFloat64Array( )"> - </member> - <member name="normalized" type="bool" setter="set_normalized" getter="get_normalized" default="false"> - </member> - <member name="sparse_count" type="int" setter="set_sparse_count" getter="get_sparse_count" default="0"> - </member> - <member name="sparse_indices_buffer_view" type="int" setter="set_sparse_indices_buffer_view" getter="get_sparse_indices_buffer_view" default="0"> - </member> - <member name="sparse_indices_byte_offset" type="int" setter="set_sparse_indices_byte_offset" getter="get_sparse_indices_byte_offset" default="0"> - </member> - <member name="sparse_indices_component_type" type="int" setter="set_sparse_indices_component_type" getter="get_sparse_indices_component_type" default="0"> - </member> - <member name="sparse_values_buffer_view" type="int" setter="set_sparse_values_buffer_view" getter="get_sparse_values_buffer_view" default="0"> - </member> - <member name="sparse_values_byte_offset" type="int" setter="set_sparse_values_byte_offset" getter="get_sparse_values_byte_offset" default="0"> - </member> - <member name="type" type="int" setter="set_type" getter="get_type" default="0"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/GLTFBufferView.xml b/doc/classes/GLTFBufferView.xml deleted file mode 100644 index edaad85e0a..0000000000 --- a/doc/classes/GLTFBufferView.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFBufferView" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="buffer" type="int" setter="set_buffer" getter="get_buffer" default="-1"> - </member> - <member name="byte_length" type="int" setter="set_byte_length" getter="get_byte_length" default="0"> - </member> - <member name="byte_offset" type="int" setter="set_byte_offset" getter="get_byte_offset" default="0"> - </member> - <member name="byte_stride" type="int" setter="set_byte_stride" getter="get_byte_stride" default="-1"> - </member> - <member name="indices" type="bool" setter="set_indices" getter="get_indices" default="false"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/GLTFCamera.xml b/doc/classes/GLTFCamera.xml deleted file mode 100644 index 0b95f2c802..0000000000 --- a/doc/classes/GLTFCamera.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFCamera" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="fov_size" type="float" setter="set_fov_size" getter="get_fov_size" default="75.0"> - </member> - <member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true"> - </member> - <member name="zfar" type="float" setter="set_zfar" getter="get_zfar" default="4000.0"> - </member> - <member name="znear" type="float" setter="set_znear" getter="get_znear" default="0.05"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/GLTFLight.xml b/doc/classes/GLTFLight.xml deleted file mode 100644 index bfeaf9a86e..0000000000 --- a/doc/classes/GLTFLight.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFLight" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> - </member> - <member name="inner_cone_angle" type="float" setter="set_inner_cone_angle" getter="get_inner_cone_angle" default="0.0"> - </member> - <member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="0.0"> - </member> - <member name="outer_cone_angle" type="float" setter="set_outer_cone_angle" getter="get_outer_cone_angle" default="0.0"> - </member> - <member name="range" type="float" setter="set_range" getter="get_range" default="0.0"> - </member> - <member name="type" type="String" setter="set_type" getter="get_type" default=""""> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/GLTFMesh.xml b/doc/classes/GLTFMesh.xml deleted file mode 100644 index 55f79d2c55..0000000000 --- a/doc/classes/GLTFMesh.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFMesh" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="blend_weights" type="PackedFloat32Array" setter="set_blend_weights" getter="get_blend_weights" default="PackedFloat32Array( )"> - </member> - <member name="mesh" type="EditorSceneImporterMesh" setter="set_mesh" getter="get_mesh"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/GLTFNode.xml b/doc/classes/GLTFNode.xml deleted file mode 100644 index 5b7d4fadec..0000000000 --- a/doc/classes/GLTFNode.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFNode" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="camera" type="int" setter="set_camera" getter="get_camera" default="-1"> - </member> - <member name="children" type="PackedInt32Array" setter="set_children" getter="get_children" default="PackedInt32Array( )"> - </member> - <member name="fake_joint_parent" type="int" setter="set_fake_joint_parent" getter="get_fake_joint_parent" default="-1"> - </member> - <member name="height" type="int" setter="set_height" getter="get_height" default="-1"> - </member> - <member name="joint" type="bool" setter="set_joint" getter="get_joint" default="false"> - </member> - <member name="light" type="int" setter="set_light" getter="get_light" default="-1"> - </member> - <member name="mesh" type="int" setter="set_mesh" getter="get_mesh" default="-1"> - </member> - <member name="parent" type="int" setter="set_parent" getter="get_parent" default="-1"> - </member> - <member name="rotation" type="Quat" setter="set_rotation" getter="get_rotation" default="Quat( 0, 0, 0, 1 )"> - </member> - <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )"> - </member> - <member name="skeleton" type="int" setter="set_skeleton" getter="get_skeleton" default="-1"> - </member> - <member name="skin" type="int" setter="set_skin" getter="get_skin" default="-1"> - </member> - <member name="translation" type="Vector3" setter="set_translation" getter="get_translation" default="Vector3( 0, 0, 0 )"> - </member> - <member name="xform" type="Transform" setter="set_xform" getter="get_xform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/GLTFSkeleton.xml b/doc/classes/GLTFSkeleton.xml deleted file mode 100644 index 9680c27705..0000000000 --- a/doc/classes/GLTFSkeleton.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFSkeleton" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_bone_attachment"> - <return type="BoneAttachment3D"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_bone_attachment_count"> - <return type="int"> - </return> - <description> - </description> - </method> - <method name="get_godot_bone_node"> - <return type="Dictionary"> - </return> - <description> - </description> - </method> - <method name="get_godot_skeleton"> - <return type="Skeleton3D"> - </return> - <description> - </description> - </method> - <method name="get_unique_names"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="set_godot_bone_node"> - <return type="void"> - </return> - <argument index="0" name="godot_bone_node" type="Dictionary"> - </argument> - <description> - </description> - </method> - <method name="set_unique_names"> - <return type="void"> - </return> - <argument index="0" name="unique_names" type="Array"> - </argument> - <description> - </description> - </method> - </methods> - <members> - <member name="joints" type="PackedInt32Array" setter="set_joints" getter="get_joints" default="PackedInt32Array( )"> - </member> - <member name="roots" type="PackedInt32Array" setter="set_roots" getter="get_roots" default="PackedInt32Array( )"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/GLTFSkin.xml b/doc/classes/GLTFSkin.xml deleted file mode 100644 index 5a80c7097a..0000000000 --- a/doc/classes/GLTFSkin.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFSkin" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_inverse_binds"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_joint_i_to_bone_i"> - <return type="Dictionary"> - </return> - <description> - </description> - </method> - <method name="get_joint_i_to_name"> - <return type="Dictionary"> - </return> - <description> - </description> - </method> - <method name="set_inverse_binds"> - <return type="void"> - </return> - <argument index="0" name="inverse_binds" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_joint_i_to_bone_i"> - <return type="void"> - </return> - <argument index="0" name="joint_i_to_bone_i" type="Dictionary"> - </argument> - <description> - </description> - </method> - <method name="set_joint_i_to_name"> - <return type="void"> - </return> - <argument index="0" name="joint_i_to_name" type="Dictionary"> - </argument> - <description> - </description> - </method> - </methods> - <members> - <member name="godot_skin" type="Skin" setter="set_godot_skin" getter="get_godot_skin"> - </member> - <member name="joints" type="PackedInt32Array" setter="set_joints" getter="get_joints" default="PackedInt32Array( )"> - </member> - <member name="joints_original" type="PackedInt32Array" setter="set_joints_original" getter="get_joints_original" default="PackedInt32Array( )"> - </member> - <member name="non_joints" type="PackedInt32Array" setter="set_non_joints" getter="get_non_joints" default="PackedInt32Array( )"> - </member> - <member name="roots" type="PackedInt32Array" setter="set_roots" getter="get_roots" default="PackedInt32Array( )"> - </member> - <member name="skeleton" type="int" setter="set_skeleton" getter="get_skeleton" default="-1"> - </member> - <member name="skin_root" type="int" setter="set_skin_root" getter="get_skin_root" default="-1"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/GLTFSpecGloss.xml b/doc/classes/GLTFSpecGloss.xml deleted file mode 100644 index 68cc7c845d..0000000000 --- a/doc/classes/GLTFSpecGloss.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFSpecGloss" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="diffuse_factor" type="Color" setter="set_diffuse_factor" getter="get_diffuse_factor" default="Color( 1, 1, 1, 1 )"> - </member> - <member name="diffuse_img" type="Image" setter="set_diffuse_img" getter="get_diffuse_img"> - </member> - <member name="gloss_factor" type="float" setter="set_gloss_factor" getter="get_gloss_factor" default="1.0"> - </member> - <member name="spec_gloss_img" type="Image" setter="set_spec_gloss_img" getter="get_spec_gloss_img"> - </member> - <member name="specular_factor" type="Color" setter="set_specular_factor" getter="get_specular_factor" default="Color( 1, 1, 1, 1 )"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/GLTFState.xml b/doc/classes/GLTFState.xml deleted file mode 100644 index a8e96ec8a9..0000000000 --- a/doc/classes/GLTFState.xml +++ /dev/null @@ -1,251 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFState" inherits="Resource" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_accessors"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_animation_player"> - <return type="AnimationPlayer"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_animation_players_count"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_animations"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_buffer_views"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_cameras"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_images"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_lights"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_materials"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_meshes"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_nodes"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_scene_node"> - <return type="Node"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - </description> - </method> - <method name="get_skeleton_to_node"> - <return type="Dictionary"> - </return> - <description> - </description> - </method> - <method name="get_skeletons"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_skins"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_textures"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="get_unique_names"> - <return type="Array"> - </return> - <description> - </description> - </method> - <method name="set_accessors"> - <return type="void"> - </return> - <argument index="0" name="accessors" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_animations"> - <return type="void"> - </return> - <argument index="0" name="animations" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_buffer_views"> - <return type="void"> - </return> - <argument index="0" name="buffer_views" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_cameras"> - <return type="void"> - </return> - <argument index="0" name="cameras" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_images"> - <return type="void"> - </return> - <argument index="0" name="images" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_lights"> - <return type="void"> - </return> - <argument index="0" name="lights" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_materials"> - <return type="void"> - </return> - <argument index="0" name="materials" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_meshes"> - <return type="void"> - </return> - <argument index="0" name="meshes" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_nodes"> - <return type="void"> - </return> - <argument index="0" name="nodes" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_skeleton_to_node"> - <return type="void"> - </return> - <argument index="0" name="skeleton_to_node" type="Dictionary"> - </argument> - <description> - </description> - </method> - <method name="set_skeletons"> - <return type="void"> - </return> - <argument index="0" name="skeletons" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_skins"> - <return type="void"> - </return> - <argument index="0" name="skins" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_textures"> - <return type="void"> - </return> - <argument index="0" name="textures" type="Array"> - </argument> - <description> - </description> - </method> - <method name="set_unique_names"> - <return type="void"> - </return> - <argument index="0" name="unique_names" type="Array"> - </argument> - <description> - </description> - </method> - </methods> - <members> - <member name="buffers" type="Array" setter="set_buffers" getter="get_buffers" default="[ ]"> - </member> - <member name="glb_data" type="PackedByteArray" setter="set_glb_data" getter="get_glb_data" default="PackedByteArray( )"> - </member> - <member name="json" type="Dictionary" setter="set_json" getter="get_json" default="{}"> - </member> - <member name="major_version" type="int" setter="set_major_version" getter="get_major_version" default="0"> - </member> - <member name="minor_version" type="int" setter="set_minor_version" getter="get_minor_version" default="0"> - </member> - <member name="root_nodes" type="Array" setter="set_root_nodes" getter="get_root_nodes" default="[ ]"> - </member> - <member name="scene_name" type="String" setter="set_scene_name" getter="get_scene_name" default=""""> - </member> - <member name="use_named_skin_binds" type="bool" setter="set_use_named_skin_binds" getter="get_use_named_skin_binds" default="false"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index ebe4e3b00d..ebd6d2b92c 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -31,7 +31,9 @@ <member name="amount" type="int" setter="set_amount" getter="get_amount" default="8"> Number of particles emitted in one emission cycle. </member> - <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="GPUParticles2D.DrawOrder" default="0"> + <member name="collision_base_size" type="float" setter="set_collision_base_size" getter="get_collision_base_size" default="1.0"> + </member> + <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="GPUParticles2D.DrawOrder" default="1"> Particle draw order. Uses [enum DrawOrder] values. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> @@ -40,7 +42,7 @@ <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0"> 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. </member> - <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0"> + <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="30"> 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" default="true"> @@ -70,6 +72,14 @@ <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> Particle texture. If [code]null[/code], particles will be squares. </member> + <member name="trail_enabled" type="bool" setter="set_trail_enabled" getter="is_trail_enabled" default="false"> + </member> + <member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3"> + </member> + <member name="trail_section_subdivisions" type="int" setter="set_trail_section_subdivisions" getter="get_trail_section_subdivisions" default="4"> + </member> + <member name="trail_sections" type="int" setter="set_trail_sections" getter="get_trail_sections" default="8"> + </member> <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2( -100, -100, 200, 200 )"> The [Rect2] that determines the node's region which needs to be visible on screen for the particle system to be active. Grow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The [Rect2] can be grown via code or with the [b]Particles → Generate Visibility Rect[/b] editor tool. @@ -82,5 +92,7 @@ <constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder"> Particles are drawn in order of remaining lifetime. </constant> + <constant name="DRAW_ORDER_REVERSE_LIFETIME" value="2" enum="DrawOrder"> + </constant> </constants> </class> diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index aea106af50..47bdd9d745 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -22,7 +22,7 @@ <method name="emit_particle"> <return type="void"> </return> - <argument index="0" name="xform" type="Transform"> + <argument index="0" name="xform" type="Transform3D"> </argument> <argument index="1" name="velocity" type="Vector3"> </argument> @@ -87,18 +87,22 @@ <member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes" default="1"> The number of draw passes when rendering particles. </member> + <member name="draw_skin" type="Skin" setter="set_skin" getter="get_skin"> + </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> If [code]true[/code], particles are being emitted. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0"> Time ratio between each emission. If [code]0[/code], particles are emitted continuously. If [code]1[/code], all particles are emitted simultaneously. </member> - <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0"> + <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="30"> 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" default="true"> If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> + <member name="interpolate" type="bool" setter="set_interpolate" getter="get_interpolate" default="true"> + </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> Amount of time each particle will exist. </member> @@ -122,6 +126,12 @@ </member> <member name="sub_emitter" type="NodePath" setter="set_sub_emitter" getter="get_sub_emitter" default="NodePath("")"> </member> + <member name="trail_enabled" type="bool" setter="set_trail_enabled" getter="is_trail_enabled" default="false"> + </member> + <member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3"> + </member> + <member name="transform_align" type="int" setter="set_transform_align" getter="get_transform_align" enum="GPUParticles3D.TransformAlign" default="0"> + </member> <member name="visibility_aabb" type="AABB" setter="set_visibility_aabb" getter="get_visibility_aabb" default="AABB( -4, -4, -4, 8, 8, 8 )"> The [AABB] that determines the node's region which needs to be visible on screen for the particle system to be active. Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [AABB] can be grown via code or with the [b]Particles → Generate AABB[/b] editor tool. @@ -134,7 +144,9 @@ <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"> + <constant name="DRAW_ORDER_REVERSE_LIFETIME" value="2" enum="DrawOrder"> + </constant> + <constant name="DRAW_ORDER_VIEW_DEPTH" value="3" enum="DrawOrder"> Particles are drawn in order of depth. </constant> <constant name="EMIT_FLAG_POSITION" value="1" enum="EmitFlags"> @@ -150,5 +162,13 @@ <constant name="MAX_DRAW_PASSES" value="4"> Maximum number of draw passes supported. </constant> + <constant name="TRANSFORM_ALIGN_DISABLED" value="0" enum="TransformAlign"> + </constant> + <constant name="TRANSFORM_ALIGN_Z_BILLBOARD" value="1" enum="TransformAlign"> + </constant> + <constant name="TRANSFORM_ALIGN_Y_TO_VELOCITY" value="2" enum="TransformAlign"> + </constant> + <constant name="TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY" value="3" enum="TransformAlign"> + </constant> </constants> </class> diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml index 2c0d9b54d1..13354ec19e 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -184,7 +184,7 @@ </argument> <description> Merges (combines) [code]polygon_a[/code] and [code]polygon_b[/code] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons. - The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. + The operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling [method is_polygon_clockwise]. </description> </method> <method name="offset_polygon"> diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml index d0b930defb..9f012008e3 100644 --- a/doc/classes/Geometry3D.xml +++ b/doc/classes/Geometry3D.xml @@ -129,7 +129,7 @@ <argument index="2" name="planes" type="Array"> </argument> <description> - Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty. + Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. Otherwise, returns an empty array. </description> </method> <method name="segment_intersects_cylinder"> diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index 631a30abab..b2c3bfc3ed 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -48,6 +48,8 @@ </member> <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="0"> </member> + <member name="ignore_occlusion_culling" type="bool" setter="set_ignore_occlusion_culling" getter="is_ignoring_occlusion_culling" default="false"> + </member> <member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="1.0"> </member> <member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0"> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 10afa4c339..b4536c0589 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -88,7 +88,7 @@ </return> <description> Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph. - Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of it's children use their [member CanvasItem.visible] property instead. + Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of its children, use their [member CanvasItem.visible] property instead. </description> </method> <method name="is_node_connected"> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 279c4c4c94..82ba45f11a 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -6,7 +6,7 @@ <description> A GraphNode is a container. Each GraphNode can have several input and output slots, sometimes referred to as ports, allowing connections between GraphNodes. To add a slot to GraphNode, add any [Control]-derived child node to it. After adding at least one child to GraphNode new sections will be automatically created in the Inspector called 'Slot'. When 'Slot' is expanded you will see list with index number for each slot. You can click on each of them to expand further. - In the Inspector you can enable (show) or disable (hide) slots. By default all slots are disabled so you may not see any slots on your GraphNode initially. You can assign a type to each slot. Only slots of the same type will be able to connect to each other. You can also assign colors to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input connections are on the left and output connections are on the right side of GraphNode. Only enabled slots are counted as connections. + In the Inspector you can enable (show) or disable (hide) slots. By default, all slots are disabled so you may not see any slots on your GraphNode initially. You can assign a type to each slot. Only slots of the same type will be able to connect to each other. You can also assign colors to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input connections are on the left and output connections are on the right side of GraphNode. Only enabled slots are counted as connections. </description> <tutorials> </tutorials> @@ -40,7 +40,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color of the input connection [code]idx[/code]. + Returns the [Color] of the input connection [code]idx[/code]. </description> </method> <method name="get_connection_input_count"> @@ -74,7 +74,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color of the output connection [code]idx[/code]. + Returns the [Color] of the output connection [code]idx[/code]. </description> </method> <method name="get_connection_output_count"> @@ -117,7 +117,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color set to [code]idx[/code] left (input) slot. + Returns the left (input) [Color] of the slot [code]idx[/code]. </description> </method> <method name="get_slot_color_right" qualifiers="const"> @@ -126,7 +126,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color set to [code]idx[/code] right (output) slot. + Returns the right (output) [Color] of the slot [code]idx[/code]. </description> </method> <method name="get_slot_type_left" qualifiers="const"> @@ -135,7 +135,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the (integer) type of left (input) [code]idx[/code] slot. + Returns the left (input) type of the slot [code]idx[/code]. </description> </method> <method name="get_slot_type_right" qualifiers="const"> @@ -144,7 +144,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the (integer) type of right (output) [code]idx[/code] slot. + Returns the right (output) type of the slot [code]idx[/code]. </description> </method> <method name="is_slot_enabled_left" qualifiers="const"> @@ -153,7 +153,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns [code]true[/code] if left (input) slot [code]idx[/code] is enabled, [code]false[/code] otherwise. + Returns [code]true[/code] if left (input) side of the slot [code]idx[/code] is enabled. </description> </method> <method name="is_slot_enabled_right" qualifiers="const"> @@ -162,7 +162,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns [code]true[/code] if right (output) slot [code]idx[/code] is enabled, [code]false[/code] otherwise. + Returns [code]true[/code] if right (output) side of the slot [code]idx[/code] is enabled. </description> </method> <method name="set_opentype_feature"> @@ -204,6 +204,73 @@ [code]color_left[/code]/[code]right[/code] is the tint of the port's icon on this side. [code]custom_left[/code]/[code]right[/code] is a custom texture for this side's port. [b]Note:[/b] This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode. + Individual properties can be set using one of the [code]set_slot_*[/code] methods. You must enable at least one side of the slot to do so. + </description> + </method> + <method name="set_slot_color_left"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="color_left" type="Color"> + </argument> + <description> + Sets the [Color] of the left (input) side of the slot [code]idx[/code] to [code]color_left[/code]. + </description> + </method> + <method name="set_slot_color_right"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="color_right" type="Color"> + </argument> + <description> + Sets the [Color] of the right (output) side of the slot [code]idx[/code] to [code]color_right[/code]. + </description> + </method> + <method name="set_slot_enabled_left"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="enable_left" type="bool"> + </argument> + <description> + Toggles the left (input) side of the slot [code]idx[/code]. If [code]enable_left[/code] is [code]true[/code], a port will appear on the left side and the slot will be able to be connected from this side. + </description> + </method> + <method name="set_slot_enabled_right"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="enable_right" type="bool"> + </argument> + <description> + Toggles the right (output) side of the slot [code]idx[/code]. If [code]enable_right[/code] is [code]true[/code], a port will appear on the right side and the slot will be able to be connected from this side. + </description> + </method> + <method name="set_slot_type_left"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="type_left" type="int"> + </argument> + <description> + Sets the left (input) type of the slot [code]idx[/code] to [code]type_left[/code]. + </description> + </method> + <method name="set_slot_type_right"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="type_right" type="int"> + </argument> + <description> + Sets the right (output) type of the slot [code]idx[/code] to [code]type_right[/code]. </description> </method> </methods> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 9ff682f79d..ddfcdf7724 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -4,7 +4,7 @@ Low-level hyper-text transfer protocol client. </brief_description> <description> - Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. [b]See the [HTTPRequest] node for an higher-level alternative.[/b] + Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. [b]See the [HTTPRequest] node for a higher-level alternative.[/b] [b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started. A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index a65f66c72a..25667d8f79 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -229,7 +229,7 @@ <member name="accept_gzip" type="bool" setter="set_accept_gzip" getter="is_accepting_gzip" default="true"> If [code]true[/code], this header will be added to each request: [code]Accept-Encoding: gzip, deflate[/code] telling servers that it's okay to compress response bodies. Any Response body declaring a [code]Content-Encoding[/code] of either [code]gzip[/code] or [code]deflate[/code] will then be automatically decompressed, and the uncompressed bytes will be delivered via [code]request_completed[/code]. - If the user has specified their own [code]Accept-Encoding[/code] header, then no header will be added regaurdless of [code]accept_gzip[/code]. + If the user has specified their own [code]Accept-Encoding[/code] header, then no header will be added regardless of [code]accept_gzip[/code]. If [code]false[/code] no header will be added, and no decompression will be performed on response bodies. The raw bytes of the response body will be returned via [code]request_completed[/code]. </member> <member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit" default="-1"> diff --git a/doc/classes/HeightMapShape3D.xml b/doc/classes/HeightMapShape3D.xml index 6d230bdab8..f6f2a27891 100644 --- a/doc/classes/HeightMapShape3D.xml +++ b/doc/classes/HeightMapShape3D.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="HeightMapShape3D" inherits="Shape3D" version="4.0"> <brief_description> - Height map shape for 3D physics (Bullet only). + Height map shape for 3D physics. </brief_description> <description> Height map shape resource, which can be added to a [PhysicsBody3D] or [Area3D]. diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml index 152f381a83..b3ce1abaeb 100644 --- a/doc/classes/IP.xml +++ b/doc/classes/IP.xml @@ -4,7 +4,7 @@ Internet protocol (IP) support functions such as DNS resolution. </brief_description> <description> - IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides DNS hostname resolution support, both blocking and threaded. + IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see [StreamPeerTCP] and [TCPServer]). IP provides DNS hostname resolution support, both blocking and threaded. </description> <tutorials> </tutorials> @@ -31,7 +31,7 @@ <return type="Array"> </return> <description> - Returns all of the user's current IPv4 and IPv6 addresses as an array. + Returns all the user's current IPv4 and IPv6 addresses as an array. </description> </method> <method name="get_local_interfaces" qualifiers="const"> @@ -59,6 +59,15 @@ Returns a queued hostname's IP address, given its queue [code]id[/code]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). </description> </method> + <method name="get_resolve_item_addresses" qualifiers="const"> + <return type="Array"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]). + </description> + </method> <method name="get_resolve_item_status" qualifiers="const"> <return type="int" enum="IP.ResolverStatus"> </return> @@ -79,6 +88,17 @@ Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [code]ip_type[/code]. </description> </method> + <method name="resolve_hostname_addresses"> + <return type="Array"> + </return> + <argument index="0" name="host" type="String"> + </argument> + <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> + </argument> + <description> + Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [code]ip_type[/code]. + </description> + </method> <method name="resolve_hostname_queue_item"> <return type="int"> </return> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index bad8127c03..91a07f66e0 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -186,7 +186,8 @@ <return type="int" enum="Error"> </return> <description> - Decompresses the image if it is compressed. Returns an error if decompress function is not available. + Decompresses the image if it is VRAM compressed in a supported format. Returns [constant OK] if the format is supported, otherwise [constant ERR_UNAVAILABLE]. + [b]Note:[/b] The following formats can be decompressed: DXT, RGTC, BPTC, PVRTC1. The formats ETC1 and ETC2 are not supported. </description> </method> <method name="detect_alpha" qualifiers="const"> @@ -240,7 +241,7 @@ <argument index="0" name="renormalize" type="bool" default="false"> </argument> <description> - Generates mipmaps for the image. Mipmaps are pre-calculated and lower resolution copies of the image. Mipmaps are automatically used if the image needs to be scaled down when rendered. This improves image quality and the performance of the rendering. Returns an error if the image is compressed, in a custom format or if the image's width/height is 0. + Generates mipmaps for the image. Mipmaps are precalculated and lower resolution copies of the image. Mipmaps are automatically used if the image needs to be scaled down when rendered. This improves image quality and the performance of the rendering. Returns an error if the image is compressed, in a custom format or if the image's width/height is 0. </description> </method> <method name="get_data" qualifiers="const"> @@ -560,7 +561,7 @@ </methods> <members> <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PackedByteArray( ),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> - Holds all of the image's color data in a given format. See [enum Format] constants. + Holds all the image's color data in a given format. See [enum Format] constants. </member> </members> <constants> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 2bea482bc1..5fef56e354 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -18,11 +18,11 @@ var texture = load("res://icon.png") $Sprite2D.texture = texture [/codeblock] - This is because images have to be imported as [StreamTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method. - But do note that the image data can still be retrieved from an imported texture as well using the [method Texture2D.get_data] method, which returns a copy of the data: + This is because images have to be imported as a [StreamTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method. + [b]Note:[/b] The image can be retrieved from an imported texture using the [method Texture2D.get_image] method, which returns a copy of the image: [codeblock] var texture = load("res://icon.png") - var image : Image = texture.get_data() + var image : Image = texture.get_image() [/codeblock] An [ImageTexture] is not meant to be operated from within the editor interface directly, and is mostly useful for rendering images on screen dynamically via code. If you need to generate images procedurally from within the editor, consider saving and importing images as custom texture resources implementing a new [EditorImportPlugin]. [b]Note:[/b] The maximum texture size is 16384×16384 pixels due to graphics hardware limitations. diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 1f872db6c6..ebfd32c5fb 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -49,7 +49,7 @@ <return type="Vector3"> </return> <description> - Returns the acceleration of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. + Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. Note this method returns an empty [Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. [b]Note:[/b] This method only works on iOS, Android, and UWP. On other platforms, it always returns [constant Vector3.ZERO]. </description> @@ -85,7 +85,7 @@ </argument> <description> Get axis input by specifying two actions, one negative and one positive. - This is a horthand for writing [code]Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")[/code]. + This is a shorthand for writing [code]Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")[/code]. </description> </method> <method name="get_connected_joypads"> @@ -106,7 +106,7 @@ <return type="Vector3"> </return> <description> - Returns the gravity of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. + Returns the gravity in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. [b]Note:[/b] This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. </description> </method> @@ -126,7 +126,7 @@ <argument index="1" name="axis" type="int"> </argument> <description> - Returns the current value of the joypad axis at given index (see [enum JoyAxisList]). + Returns the current value of the joypad axis at given index (see [enum JoyAxis]). </description> </method> <method name="get_joy_guid" qualifiers="const"> @@ -176,7 +176,7 @@ <return type="Vector3"> </return> <description> - Returns the the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. + Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. [b]Note:[/b] This method only works on Android, iOS and UWP. On other platforms, it always returns [constant Vector3.ZERO]. </description> </method> @@ -255,7 +255,7 @@ <argument index="1" name="button" type="int"> </argument> <description> - Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButtonList]). + Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButton]). </description> </method> <method name="is_joy_known"> @@ -273,7 +273,7 @@ <argument index="0" name="keycode" type="int"> </argument> <description> - Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum KeyList] constant. + Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum Key] constant. </description> </method> <method name="is_mouse_button_pressed" qualifiers="const"> @@ -282,7 +282,7 @@ <argument index="0" name="button" type="int"> </argument> <description> - Returns [code]true[/code] if you are pressing the mouse button specified with [enum ButtonList]. + Returns [code]true[/code] if you are pressing the mouse button specified with [enum MouseButton]. </description> </method> <method name="joy_connection_changed"> @@ -449,7 +449,10 @@ [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative]. </constant> <constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode"> - Makes the mouse cursor visible but confines it to the game window. + Confines the mouse cursor to the game window, and make it visible. + </constant> + <constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode"> + Confines the mouse cursor to the game window, and make it hidden. </constant> <constant name="CURSOR_ARROW" value="0" enum="CursorShape"> Arrow cursor. Standard, default pointing cursor. diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 1fe85a5ae8..42326f344f 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -14,14 +14,14 @@ <methods> </methods> <members> - <member name="action" type="StringName" setter="set_action" getter="get_action" default="@"""> + <member name="action" type="StringName" setter="set_action" getter="get_action" default="&"""> The action's name. Actions are accessed via this [String]. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the action's state is pressed. If [code]false[/code], the action's state is released. </member> <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> - The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is [code]false[/code]. The event strength allows faking analog joypad motion events, by precising how strongly is the joypad axis bent or pressed. + The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is [code]false[/code]. The event strength allows faking analog joypad motion events, by specifying how strongly the joypad axis is bent or pressed. </member> </members> <constants> diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml index 6ab4942f85..b1f4836f6e 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -13,7 +13,7 @@ </methods> <members> <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0"> - Button identifier. One of the [enum JoyButtonList] button constants. + Button identifier. One of the [enum JoyButton] button constants. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the button's state is pressed. If [code]false[/code], the button's state is released. diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml index 2d7787b568..39fdb14016 100644 --- a/doc/classes/InputEventJoypadMotion.xml +++ b/doc/classes/InputEventJoypadMotion.xml @@ -13,7 +13,7 @@ </methods> <members> <member name="axis" type="int" setter="set_axis" getter="get_axis" default="0"> - Axis identifier. Use one of the [enum JoyAxisList] axis constants. + Axis identifier. Use one of the [enum JoyAxis] axis constants. </member> <member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value" default="0.0"> Current position of the joystick on the given axis. The value ranges from [code]-1.0[/code] to [code]1.0[/code]. A value of [code]0[/code] means the axis is in its resting position. diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index fe91b9c13e..9f2b829823 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -32,11 +32,11 @@ If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down. </member> <member name="keycode" type="int" setter="set_keycode" getter="get_keycode" default="0"> - The key keycode, which corresponds to one of the [enum KeyList] constants. Represent key in the current keyboard layout. + The key keycode, which corresponds to one of the [enum Key] constants. Represent key in the current keyboard layout. To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey]. </member> <member name="physical_keycode" type="int" setter="set_physical_keycode" getter="get_physical_keycode" default="0"> - Key physical keycode, which corresponds to one of the [enum KeyList] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard. + Key physical keycode, which corresponds to one of the [enum Key] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard. To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey]. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index 31e82bbaed..e54c3224da 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -13,7 +13,7 @@ </methods> <members> <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0"> - The mouse button mask identifier, one of or a bitwise combination of the [enum ButtonList] button masks. + The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks. </member> <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2( 0, 0 )"> The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0. diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index d7b64a9a2d..be71b42567 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -13,9 +13,9 @@ </methods> <members> <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0"> - The mouse button identifier, one of the [enum ButtonList] button or button wheel constants. + The mouse button identifier, one of the [enum MouseButton] button or button wheel constants. </member> - <member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick" default="false"> + <member name="double_click" type="bool" setter="set_double_click" getter="is_double_click" default="false"> If [code]true[/code], the mouse button's state is a double-click. </member> <member name="factor" type="float" setter="set_factor" getter="get_factor" default="1.0"> diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml index dd782209e5..3beea7f9a0 100644 --- a/doc/classes/InputEventWithModifiers.xml +++ b/doc/classes/InputEventWithModifiers.xml @@ -12,23 +12,23 @@ <methods> </methods> <members> - <member name="alt" type="bool" setter="set_alt" getter="get_alt" default="false"> + <member name="alt_pressed" type="bool" setter="set_alt_pressed" getter="is_alt_pressed" default="false"> State of the [kbd]Alt[/kbd] modifier. </member> - <member name="command" type="bool" setter="set_command" getter="get_command" default="false"> + <member name="command_pressed" type="bool" setter="set_command_pressed" getter="is_command_pressed" default="false"> State of the [kbd]Cmd[/kbd] modifier. </member> - <member name="control" type="bool" setter="set_control" getter="get_control" default="false"> + <member name="ctrl_pressed" type="bool" setter="set_ctrl_pressed" getter="is_ctrl_pressed" default="false"> State of the [kbd]Ctrl[/kbd] modifier. </member> - <member name="meta" type="bool" setter="set_metakey" getter="get_metakey" default="false"> + <member name="meta_pressed" type="bool" setter="set_meta_pressed" getter="is_meta_pressed" default="false"> State of the [kbd]Meta[/kbd] modifier. </member> - <member name="shift" type="bool" setter="set_shift" getter="get_shift" default="false"> + <member name="shift_pressed" type="bool" setter="set_shift_pressed" getter="is_shift_pressed" default="false"> State of the [kbd]Shift[/kbd] modifier. </member> <member name="store_command" type="bool" setter="set_store_command" getter="is_storing_command" default="true"> - If [code]true[/code], pressing [kbd]Cmd[/kbd] on macOS or [kbd]Ctrl[/kbd] on all other platforms will both be serialized as [member command]. If [code]false[/code], those same keys will be serialized as [member meta] on macOS and [member control] on all other platforms. + If [code]true[/code], pressing [kbd]Cmd[/kbd] on macOS or [kbd]Ctrl[/kbd] on all other platforms will both be serialized as [member command_pressed]. If [code]false[/code], those same keys will be serialized as [member meta_pressed] on macOS and [member ctrl_pressed] on all other platforms. This aids with cross-platform compatibility when developing e.g. on Windows for macOS, or vice-versa. </member> </members> diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index c707a72ee8..c87e637ff5 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -11,6 +11,40 @@ <link title="Exporting for the Web: Calling JavaScript from script">https://docs.godotengine.org/en/latest/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script</link> </tutorials> <methods> + <method name="create_callback"> + <return type="JavaScriptObject"> + </return> + <argument index="0" name="callable" type="Callable"> + </argument> + <description> + Creates a reference to a [Callable] that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See [JavaScriptObject] for usage. + </description> + </method> + <method name="create_object" qualifiers="vararg"> + <return type="Variant"> + </return> + <argument index="0" name="object" type="String"> + </argument> + <description> + Creates a new JavaScript object using the [code]new[/code] constructor. The [code]object[/code] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage. + </description> + </method> + <method name="download_buffer"> + <return type="void"> + </return> + <argument index="0" name="buffer" type="PackedByteArray"> + </argument> + <argument index="1" name="name" type="String"> + </argument> + <argument index="2" name="mime" type="String" default=""application/octet-stream""> + </argument> + <description> + Prompts the user to download a file containing the specified [code]buffer[/code]. The file will have the given [code]name[/code] and [code]mime[/code] type. + [b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [code]name[/code]'s extension. + [b]Note:[/b] Browsers might block the download if [method download_buffer] is not being called from a user interaction (e.g. button click). + [b]Note:[/b] Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession. + </description> + </method> <method name="eval"> <return type="Variant"> </return> @@ -23,6 +57,15 @@ If [code]use_global_execution_context[/code] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment. </description> </method> + <method name="get_interface"> + <return type="JavaScriptObject"> + </return> + <argument index="0" name="interface" type="String"> + </argument> + <description> + Returns an interface to a JavaScript object that can be used by scripts. The [code]interface[/code] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml new file mode 100644 index 0000000000..a9e9c77e89 --- /dev/null +++ b/doc/classes/JavaScriptObject.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="JavaScriptObject" inherits="Reference" version="4.0"> + <brief_description> + A wrapper class for native JavaScript objects. + </brief_description> + <description> + JavaScriptObject is used to interact with JavaScript objects retrieved or created via [method JavaScript.get_interface], [method JavaScript.create_object], or [method JavaScript.create_callback]. + Example: + [codeblock] + extends Node + + var _my_js_callback = JavaScript.create_callback(self, "myCallback") # This reference must be kept + var console = JavaScript.get_interface("console") + + func _init(): + var buf = JavaScript.create_object("ArrayBuffer", 10) # new ArrayBuffer(10) + print(buf) # prints [JavaScriptObject:OBJECT_ID] + var uint8arr = JavaScript.create_object("Uint8Array", buf) # new Uint8Array(buf) + uint8arr[1] = 255 + prints(uint8arr[1], uint8arr.byteLength) # prints 255 10 + console.log(uint8arr) # prints in browser console "Uint8Array(10) [ 0, 255, 0, 0, 0, 0, 0, 0, 0, 0 ]" + + # Equivalent of JavaScript: Array.from(uint8arr).forEach(myCallback) + JavaScript.get_interface("Array").from(uint8arr).forEach(_my_js_callback) + + func myCallback(args): + # Will be called with the parameters passed to the "forEach" callback + # [0, 0, [JavaScriptObject:1173]] + # [255, 1, [JavaScriptObject:1173]] + # ... + # [0, 9, [JavaScriptObject:1180]] + print(args) + [/codeblock] + Note: Only available in the "HTML5" platform. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml deleted file mode 100644 index 476b64a336..0000000000 --- a/doc/classes/KinematicBody2D.xml +++ /dev/null @@ -1,173 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="KinematicBody2D" inherits="PhysicsBody2D" version="4.0"> - <brief_description> - Kinematic body 2D node. - </brief_description> - <description> - Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: - [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - [b]Kinematic characters:[/b] KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics. - </description> - <tutorials> - <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> - <link title="Using KinematicBody2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link> - <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> - <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link> - </tutorials> - <methods> - <method name="get_floor_normal" qualifiers="const"> - <return type="Vector2"> - </return> - <description> - Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. - </description> - </method> - <method name="get_floor_velocity" qualifiers="const"> - <return type="Vector2"> - </return> - <description> - Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. - </description> - </method> - <method name="get_slide_collision"> - <return type="KinematicCollision2D"> - </return> - <argument index="0" name="slide_idx" type="int"> - </argument> - <description> - Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). - [b]Example usage:[/b] - [codeblocks] - [gdscript] - for i in get_slide_count(): - var collision = get_slide_collision(i) - print("Collided with: ", collision.collider.name) - [/gdscript] - [csharp] - for (int i = 0; i < GetSlideCount(); i++) - { - KinematicCollision2D collision = GetSlideCollision(i); - GD.Print("Collided with: ", (collision.Collider as Node).Name); - } - [/csharp] - [/codeblocks] - </description> - </method> - <method name="get_slide_count" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. - </description> - </method> - <method name="is_on_ceiling" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code]. - </description> - </method> - <method name="is_on_floor" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code]. - </description> - </method> - <method name="is_on_wall" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code]. - </description> - </method> - <method name="move_and_collide"> - <return type="KinematicCollision2D"> - </return> - <argument index="0" name="rel_vec" type="Vector2"> - </argument> - <argument index="1" name="infinite_inertia" type="bool" default="true"> - </argument> - <argument index="2" name="exclude_raycast_shapes" type="bool" default="true"> - </argument> - <argument index="3" name="test_only" type="bool" default="false"> - </argument> - <description> - Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision. - If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. - </description> - </method> - <method name="move_and_slide"> - <return type="Vector2"> - </return> - <argument index="0" name="linear_velocity" type="Vector2"> - </argument> - <argument index="1" name="up_direction" type="Vector2" default="Vector2( 0, 0 )"> - </argument> - <argument index="2" name="stop_on_slope" type="bool" default="false"> - </argument> - <argument index="3" name="max_slides" type="int" default="4"> - </argument> - <argument index="4" name="floor_max_angle" type="float" default="0.785398"> - </argument> - <argument index="5" name="infinite_inertia" type="bool" default="true"> - </argument> - <description> - Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. - This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. - [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. - [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. - If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still. - If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. - [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. - If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody2D] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D]. - Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. - </description> - </method> - <method name="move_and_slide_with_snap"> - <return type="Vector2"> - </return> - <argument index="0" name="linear_velocity" type="Vector2"> - </argument> - <argument index="1" name="snap" type="Vector2"> - </argument> - <argument index="2" name="up_direction" type="Vector2" default="Vector2( 0, 0 )"> - </argument> - <argument index="3" name="stop_on_slope" type="bool" default="false"> - </argument> - <argument index="4" name="max_slides" type="int" default="4"> - </argument> - <argument index="5" name="floor_max_angle" type="float" default="0.785398"> - </argument> - <argument index="6" name="infinite_inertia" type="bool" default="true"> - </argument> - <description> - Moves the body while keeping it attached to slopes. Similar to [method move_and_slide]. - As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0)[/code] or by using [method move_and_slide] instead. - </description> - </method> - <method name="test_move"> - <return type="bool"> - </return> - <argument index="0" name="from" type="Transform2D"> - </argument> - <argument index="1" name="rel_vec" type="Vector2"> - </argument> - <argument index="2" name="infinite_inertia" type="bool" default="true"> - </argument> - <description> - Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. - </description> - </method> - </methods> - <members> - <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.08"> - If the body is at least this close to another body, this body will consider them to be colliding. - </member> - <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> - If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method move_and_collide] functions. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/KinematicBody3D.xml b/doc/classes/KinematicBody3D.xml deleted file mode 100644 index a21496de54..0000000000 --- a/doc/classes/KinematicBody3D.xml +++ /dev/null @@ -1,185 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="KinematicBody3D" inherits="PhysicsBody3D" version="4.0"> - <brief_description> - Kinematic body 3D node. - </brief_description> - <description> - Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: - [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - [b]Kinematic characters:[/b] KinematicBody3D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics. - </description> - <tutorials> - <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> - <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link> - <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> - <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> - <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> - </tutorials> - <methods> - <method name="get_axis_lock" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> - </argument> - <description> - Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member axis_lock_motion_x], [member axis_lock_motion_y] and [member axis_lock_motion_z]. - </description> - </method> - <method name="get_floor_normal" qualifiers="const"> - <return type="Vector3"> - </return> - <description> - Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. - </description> - </method> - <method name="get_floor_velocity" qualifiers="const"> - <return type="Vector3"> - </return> - <description> - Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. - </description> - </method> - <method name="get_slide_collision"> - <return type="KinematicCollision3D"> - </return> - <argument index="0" name="slide_idx" type="int"> - </argument> - <description> - Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). - </description> - </method> - <method name="get_slide_count" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. - </description> - </method> - <method name="is_on_ceiling" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code]. - </description> - </method> - <method name="is_on_floor" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code]. - </description> - </method> - <method name="is_on_wall" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide] or [method move_and_slide_with_snap]. Otherwise, returns [code]false[/code]. - </description> - </method> - <method name="move_and_collide"> - <return type="KinematicCollision3D"> - </return> - <argument index="0" name="rel_vec" type="Vector3"> - </argument> - <argument index="1" name="infinite_inertia" type="bool" default="true"> - </argument> - <argument index="2" name="exclude_raycast_shapes" type="bool" default="true"> - </argument> - <argument index="3" name="test_only" type="bool" default="false"> - </argument> - <description> - Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision. - If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. - </description> - </method> - <method name="move_and_slide"> - <return type="Vector3"> - </return> - <argument index="0" name="linear_velocity" type="Vector3"> - </argument> - <argument index="1" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )"> - </argument> - <argument index="2" name="stop_on_slope" type="bool" default="false"> - </argument> - <argument index="3" name="max_slides" type="int" default="4"> - </argument> - <argument index="4" name="floor_max_angle" type="float" default="0.785398"> - </argument> - <argument index="5" name="infinite_inertia" type="bool" default="true"> - </argument> - <description> - Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. - This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. - [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. - [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. - If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still. - If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. - [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. - If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody3D] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D]. - Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. - </description> - </method> - <method name="move_and_slide_with_snap"> - <return type="Vector3"> - </return> - <argument index="0" name="linear_velocity" type="Vector3"> - </argument> - <argument index="1" name="snap" type="Vector3"> - </argument> - <argument index="2" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )"> - </argument> - <argument index="3" name="stop_on_slope" type="bool" default="false"> - </argument> - <argument index="4" name="max_slides" type="int" default="4"> - </argument> - <argument index="5" name="floor_max_angle" type="float" default="0.785398"> - </argument> - <argument index="6" name="infinite_inertia" type="bool" default="true"> - </argument> - <description> - Moves the body while keeping it attached to slopes. Similar to [method move_and_slide]. - As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0, 0)[/code] or by using [method move_and_slide] instead. - </description> - </method> - <method name="set_axis_lock"> - <return type="void"> - </return> - <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> - </argument> - <argument index="1" name="lock" type="bool"> - </argument> - <description> - Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member axis_lock_motion_x], [member axis_lock_motion_y] and [member axis_lock_motion_z]. - </description> - </method> - <method name="test_move"> - <return type="bool"> - </return> - <argument index="0" name="from" type="Transform"> - </argument> - <argument index="1" name="rel_vec" type="Vector3"> - </argument> - <argument index="2" name="infinite_inertia" type="bool" default="true"> - </argument> - <description> - Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. - </description> - </method> - </methods> - <members> - <member name="axis_lock_motion_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's X axis movement. - </member> - <member name="axis_lock_motion_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's Y axis movement. - </member> - <member name="axis_lock_motion_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's Z axis movement. - </member> - <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001"> - If the body is at least this close to another body, this body will consider them to be colliding. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml index ec6e16e25a..8748f89618 100644 --- a/doc/classes/KinematicCollision2D.xml +++ b/doc/classes/KinematicCollision2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="KinematicCollision2D" inherits="Reference" version="4.0"> <brief_description> - Collision data for [KinematicBody2D] collisions. + Collision data for [method PhysicsBody2D.move_and_collide] collisions. </brief_description> <description> - Contains collision data for [KinematicBody2D] collisions. When a [KinematicBody2D] is moved using [method KinematicBody2D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned. + Contains collision data for [method PhysicsBody2D.move_and_collide] collisions. When a [PhysicsBody2D] is moved using [method PhysicsBody2D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a [KinematicCollision2D] object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. </description> <tutorials> diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml index f3248a9ca1..8eac15ebf4 100644 --- a/doc/classes/KinematicCollision3D.xml +++ b/doc/classes/KinematicCollision3D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="KinematicCollision3D" inherits="Reference" version="4.0"> <brief_description> - Collision data for [KinematicBody3D] collisions. + Collision data for [method PhysicsBody3D.move_and_collide] collisions. </brief_description> <description> - Contains collision data for [KinematicBody3D] collisions. When a [KinematicBody3D] is moved using [method KinematicBody3D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision3D object is returned. + Contains collision data for [method PhysicsBody3D.move_and_collide] collisions. When a [PhysicsBody3D] is moved using [method PhysicsBody3D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a [KinematicCollision3D] object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. </description> <tutorials> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 8574ff9836..76b9686393 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -32,7 +32,7 @@ </argument> <description> Returns the height of the line [code]line[/code]. - If [code]line[/code] is set to [code]-1[/code], returns biggest line height. + If [code]line[/code] is set to [code]-1[/code], returns the biggest line height. If there're no lines returns font size in pixels. </description> </method> diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml deleted file mode 100644 index a1d172e4b1..0000000000 --- a/doc/classes/LargeTexture.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="LargeTexture" inherits="Texture2D" version="4.0"> - <brief_description> - A [Texture2D] capable of storing many smaller textures with offsets. - </brief_description> - <description> - A [Texture2D] capable of storing many smaller textures with offsets. - You can dynamically add pieces ([Texture2D]s) to this [LargeTexture] using different offsets. - </description> - <tutorials> - </tutorials> - <methods> - <method name="add_piece"> - <return type="int"> - </return> - <argument index="0" name="ofs" type="Vector2"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> - <description> - Adds [code]texture[/code] to this [LargeTexture], starting on offset [code]ofs[/code]. - </description> - </method> - <method name="clear"> - <return type="void"> - </return> - <description> - Clears the [LargeTexture]. - </description> - </method> - <method name="get_piece_count" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the number of pieces currently in this [LargeTexture]. - </description> - </method> - <method name="get_piece_offset" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the offset of the piece with the index [code]idx[/code]. - </description> - </method> - <method name="get_piece_texture" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the [Texture2D] of the piece with the index [code]idx[/code]. - </description> - </method> - <method name="set_piece_offset"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="ofs" type="Vector2"> - </argument> - <description> - Sets the offset of the piece with the index [code]idx[/code] to [code]ofs[/code]. - </description> - </method> - <method name="set_piece_texture"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> - <description> - Sets the [Texture2D] of the piece with index [code]idx[/code] to [code]texture[/code]. - </description> - </method> - <method name="set_size"> - <return type="void"> - </return> - <argument index="0" name="size" type="Vector2"> - </argument> - <description> - Sets the size of this [LargeTexture]. - </description> - </method> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index 111473e098..42b9ed8ab4 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -52,13 +52,13 @@ The light's strength multiplier (this is not a physical unit). For [OmniLight3D] and [SpotLight3D], changing this value will only change the light color's intensity, not the light's radius. </member> <member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0"> - Secondary multiplier used with indirect light (light bounces). Used with [GIProbe]. + Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI]. </member> <member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false"> If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. </member> <member name="light_projector" type="Texture2D" setter="set_projector" getter="get_projector"> - [Texture2D] projected by light. [member shadow_enabled] must be on for the projector to work. Light projectors make the light appear as if it is shining through a colored but transparent object, almost like light shining through stained glass. + [Texture2D] projected by light. [member shadow_enabled] must be on for the projector to work. Light projectors make the light appear as if it is shining through a colored but transparent object, almost like light shining through stained-glass. </member> <member name="light_size" type="float" setter="set_param" getter="get_param" default="0.0"> The size of the light in Godot units. Only available for [OmniLight3D]s and [SpotLight3D]s. Increasing this value will make the light fade out slower and shadows appear blurrier. This can be used to simulate area lights to an extent. diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/LightmapGI.xml index 6fd08fc4e4..d7722a83b0 100644 --- a/doc/classes/BakedLightmap.xml +++ b/doc/classes/LightmapGI.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BakedLightmap" inherits="VisualInstance3D" version="4.0"> +<class name="LightmapGI" inherits="VisualInstance3D" version="4.0"> <brief_description> </brief_description> <description> @@ -21,17 +21,17 @@ </member> <member name="environment_custom_sky" type="Sky" setter="set_environment_custom_sky" getter="get_environment_custom_sky"> </member> - <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="BakedLightmap.EnvironmentMode" default="0"> + <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="LightmapGI.EnvironmentMode" default="0"> </member> - <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="BakedLightmap.GenerateProbes" default="0"> + <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="LightmapGI.GenerateProbes" default="0"> </member> <member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false"> </member> - <member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data"> + <member name="light_data" type="LightmapGIData" setter="set_light_data" getter="get_light_data"> </member> <member name="max_texture_size" type="int" setter="set_max_texture_size" getter="get_max_texture_size" default="16384"> </member> - <member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1"> + <member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="LightmapGI.BakeQuality" default="1"> </member> <member name="use_denoiser" type="bool" setter="set_use_denoiser" getter="is_using_denoiser" default="true"> </member> diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/LightmapGIData.xml index 904555c48e..3a37c6dcb7 100644 --- a/doc/classes/BakedLightmapData.xml +++ b/doc/classes/LightmapGIData.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BakedLightmapData" inherits="Resource" version="4.0"> +<class name="LightmapGIData" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 360f5c451e..7adf19632e 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -12,34 +12,25 @@ - [kbd]Ctrl + Z[/kbd]: Undo - [kbd]Ctrl + ~[/kbd]: Swap input direction. - [kbd]Ctrl + Shift + Z[/kbd]: Redo - - [kbd]Ctrl + U[/kbd]: Delete text from the cursor position to the beginning of the line - - [kbd]Ctrl + K[/kbd]: Delete text from the cursor position to the end of the line + - [kbd]Ctrl + U[/kbd]: Delete text from the caret position to the beginning of the line + - [kbd]Ctrl + K[/kbd]: Delete text from the caret position to the end of the line - [kbd]Ctrl + A[/kbd]: Select all text - - [kbd]Up Arrow[/kbd]/[kbd]Down Arrow[/kbd]: Move the cursor to the beginning/end of the line + - [kbd]Up Arrow[/kbd]/[kbd]Down Arrow[/kbd]: Move the caret to the beginning/end of the line On macOS, some extra keyboard shortcuts are available: - - [kbd]Ctrl + F[/kbd]: Same as [kbd]Right Arrow[/kbd], move the cursor one character right - - [kbd]Ctrl + B[/kbd]: Same as [kbd]Left Arrow[/kbd], move the cursor one character left - - [kbd]Ctrl + P[/kbd]: Same as [kbd]Up Arrow[/kbd], move the cursor to the previous line - - [kbd]Ctrl + N[/kbd]: Same as [kbd]Down Arrow[/kbd], move the cursor to the next line - - [kbd]Ctrl + D[/kbd]: Same as [kbd]Delete[/kbd], delete the character on the right side of cursor - - [kbd]Ctrl + H[/kbd]: Same as [kbd]Backspace[/kbd], delete the character on the left side of the cursor - - [kbd]Ctrl + A[/kbd]: Same as [kbd]Home[/kbd], move the cursor to the beginning of the line - - [kbd]Ctrl + E[/kbd]: Same as [kbd]End[/kbd], move the cursor to the end of the line - - [kbd]Cmd + Left Arrow[/kbd]: Same as [kbd]Home[/kbd], move the cursor to the beginning of the line - - [kbd]Cmd + Right Arrow[/kbd]: Same as [kbd]End[/kbd], move the cursor to the end of the line + - [kbd]Ctrl + F[/kbd]: Same as [kbd]Right Arrow[/kbd], move the caret one character right + - [kbd]Ctrl + B[/kbd]: Same as [kbd]Left Arrow[/kbd], move the caret one character left + - [kbd]Ctrl + P[/kbd]: Same as [kbd]Up Arrow[/kbd], move the caret to the previous line + - [kbd]Ctrl + N[/kbd]: Same as [kbd]Down Arrow[/kbd], move the caret to the next line + - [kbd]Ctrl + D[/kbd]: Same as [kbd]Delete[/kbd], delete the character on the right side of caret + - [kbd]Ctrl + H[/kbd]: Same as [kbd]Backspace[/kbd], delete the character on the left side of the caret + - [kbd]Ctrl + A[/kbd]: Same as [kbd]Home[/kbd], move the caret to the beginning of the line + - [kbd]Ctrl + E[/kbd]: Same as [kbd]End[/kbd], move the caret to the end of the line + - [kbd]Cmd + Left Arrow[/kbd]: Same as [kbd]Home[/kbd], move the caret to the beginning of the line + - [kbd]Cmd + Right Arrow[/kbd]: Same as [kbd]End[/kbd], move the caret to the end of the line </description> <tutorials> </tutorials> <methods> - <method name="append_at_cursor"> - <return type="void"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <description> - Adds [code]text[/code] after the cursor. If the resulting value is longer than [member max_length], nothing happens. - </description> - </method> <method name="clear"> <return type="void"> </return> @@ -54,11 +45,11 @@ Removes all OpenType features. </description> </method> - <method name="delete_char_at_cursor"> + <method name="delete_char_at_caret"> <return type="void"> </return> <description> - Deletes one character at the cursor's current position (equivalent to pressing [kbd]Delete[/kbd]). + Deletes one character at the caret's current position (equivalent to pressing [kbd]Delete[/kbd]). </description> </method> <method name="delete_text"> @@ -99,7 +90,16 @@ <return type="int"> </return> <description> - Returns the scroll offset due to [member caret_position], as a number of characters. + Returns the scroll offset due to [member caret_column], as a number of characters. + </description> + </method> + <method name="insert_text_at_caret"> + <return type="void"> + </return> + <argument index="0" name="text" type="String"> + </argument> + <description> + Inserts [code]text[/code] at the caret. If the resulting value is longer than [member max_length], nothing happens. </description> </method> <method name="menu_option"> @@ -159,21 +159,21 @@ <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0"> Text alignment as defined in the [enum Align] enum. </member> - <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false"> - If [code]true[/code], the caret (visual cursor) blinks. + <member name="caret_blink" type="bool" setter="set_caret_blink_enabled" getter="is_caret_blink_enabled" default="false"> + If [code]true[/code], the caret (text cursor) blinks. </member> - <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" default="0.65"> + <member name="caret_blink_speed" type="float" setter="set_caret_blink_speed" getter="get_caret_blink_speed" default="0.65"> Duration (in seconds) of a caret's blinking cycle. </member> - <member name="caret_force_displayed" type="bool" setter="cursor_set_force_displayed" getter="cursor_get_force_displayed" default="false"> + <member name="caret_column" type="int" setter="set_caret_column" getter="get_caret_column" default="0"> + The caret's column position inside the [LineEdit]. When set, the text may scroll to accommodate it. </member> - <member name="caret_mid_grapheme" type="bool" setter="set_mid_grapheme_caret_enabled" getter="get_mid_grapheme_caret_enabled" default="false"> + <member name="caret_force_displayed" type="bool" setter="set_caret_force_displayed" getter="is_caret_force_displayed" default="false"> + </member> + <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false"> Allow moving caret, selecting and removing the individual composite character components. Note: [kbd]Backspace[/kbd] is always removing individual composite character components. </member> - <member name="caret_position" type="int" setter="set_cursor_position" getter="get_cursor_position" default="0"> - The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it. - </member> <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled" default="false"> If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty, which can be used to clear the text quickly. </member> @@ -186,7 +186,7 @@ <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> If [code]false[/code], existing text cannot be modified and new text cannot be added. </member> - <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length" default="false"> + <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length_enabled" getter="is_expand_to_text_length_enabled" default="false"> If [code]true[/code], the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> @@ -276,7 +276,7 @@ Copies the selected text. </constant> <constant name="MENU_PASTE" value="2" enum="MenuItems"> - Pastes the clipboard text over the selected text (or at the cursor's position). + Pastes the clipboard text over the selected text (or at the caret's position). Non-printable escape characters are automatically stripped from the OS clipboard via [method String.strip_escapes]. </constant> <constant name="MENU_CLEAR" value="3" enum="MenuItems"> @@ -359,6 +359,9 @@ </constant> </constants> <theme_items> + <theme_item name="caret_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Color of the [LineEdit]'s caret (text cursor). + </theme_item> <theme_item name="clear" type="Texture2D"> Texture for the clear button. See [member clear_button_enabled]. </theme_item> @@ -368,9 +371,6 @@ <theme_item name="clear_button_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> Color used for the clear button when it's pressed. </theme_item> - <theme_item name="cursor_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> - Color of the [LineEdit]'s visual cursor (caret). - </theme_item> <theme_item name="focus" type="StyleBox"> Background used when [LineEdit] has GUI focus. </theme_item> diff --git a/doc/classes/Listener3D.xml b/doc/classes/Listener3D.xml index 998ea757ff..b2fcbe534d 100644 --- a/doc/classes/Listener3D.xml +++ b/doc/classes/Listener3D.xml @@ -18,10 +18,10 @@ </description> </method> <method name="get_listener_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> - Returns the listener's global orthonormalized [Transform]. + Returns the listener's global orthonormalized [Transform3D]. </description> </method> <method name="is_current" qualifiers="const"> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 481b737eee..7cbf9d3dfe 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -5,7 +5,7 @@ </brief_description> <description> Special button that brings up a [PopupMenu] when clicked. - New items can be created inside this [PopupMenu] using [code]get_popup().add_item("My Item Name")[/code]. You can also create them directly from the editor. To do so, select the [MenuButton] node, then in the toolbar at the top of the 2D editor, click [b]Items[/b] then click [b]Add[/b] in the popup. You will be able to give each items new properties. + New items can be created inside this [PopupMenu] using [code]get_popup().add_item("My Item Name")[/code]. You can also create them directly from the editor. To do so, select the [MenuButton] node, then in the toolbar at the top of the 2D editor, click [b]Items[/b] then click [b]Add[/b] in the popup. You will be able to give each item new properties. See also [BaseButton] which contains common properties and methods associated with this node. </description> <tutorials> diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index db7a3187f0..3c679047a0 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -15,7 +15,7 @@ mdt.create_from_surface(mesh, 0) for i in range(mdt.get_vertex_count()): var vertex = mdt.get_vertex(i) - # In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded. + # In this example we extend the mesh by one unit, which results in separated faces as it is flat shaded. vertex += mdt.get_vertex_normal(i) # Save your change. mdt.set_vertex(i, vertex) @@ -33,7 +33,7 @@ for (var i = 0; i < mdt.GetVertexCount(); i++) { Vector3 vertex = mdt.GetVertex(i); - // In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded. + // In this example we extend the mesh by one unit, which results in separated faces as it is flat shaded. vertex += mdt.GetVertexNormal(i); // Save your change. mdt.SetVertex(i, vertex); diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml index 82cd392cd3..b5ab296bd0 100644 --- a/doc/classes/MeshInstance3D.xml +++ b/doc/classes/MeshInstance3D.xml @@ -27,6 +27,13 @@ This helper creates a [MeshInstance3D] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing. </description> </method> + <method name="create_multiple_convex_collisions"> + <return type="void"> + </return> + <description> + This helper creates a [StaticBody3D] child node with multiple [ConvexPolygonShape3D] collision shapes calculated from the mesh geometry via convex decomposition. It's mainly used for testing. + </description> + </method> <method name="create_trimesh_collision"> <return type="void"> </return> @@ -43,7 +50,7 @@ Returns the [Material] that will be used by the [Mesh] when drawing. This can return the [member GeometryInstance3D.material_override], the surface override [Material] defined in this [MeshInstance3D], or the surface [Material] defined in the [Mesh]. For example, if [member GeometryInstance3D.material_override] is used, all surfaces will return the override material. </description> </method> - <method name="get_surface_material" qualifiers="const"> + <method name="get_surface_override_material" qualifiers="const"> <return type="Material"> </return> <argument index="0" name="surface" type="int"> @@ -52,14 +59,14 @@ Returns the override [Material] for the specified surface of the [Mesh] resource. </description> </method> - <method name="get_surface_material_count" qualifiers="const"> + <method name="get_surface_override_material_count" qualifiers="const"> <return type="int"> </return> <description> - Returns the number of surface materials. + Returns the number of surface override materials. This is equivalent to [method Mesh.get_surface_count]. </description> </method> - <method name="set_surface_material"> + <method name="set_surface_override_material"> <return type="void"> </return> <argument index="0" name="surface" type="int"> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index ad8bd6991d..b33bcc89e3 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -72,7 +72,7 @@ </description> </method> <method name="get_item_navmesh_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="id" type="int"> </argument> @@ -96,7 +96,7 @@ </argument> <description> Returns an item's collision shapes. - The array consists of each [Shape3D] followed by its [Transform]. + The array consists of each [Shape3D] followed by its [Transform3D]. </description> </method> <method name="get_last_unused_item_id" qualifiers="const"> @@ -154,7 +154,7 @@ </return> <argument index="0" name="id" type="int"> </argument> - <argument index="1" name="navmesh" type="Transform"> + <argument index="1" name="navmesh" type="Transform3D"> </argument> <description> Sets the transform to apply to the item's navigation mesh. @@ -180,7 +180,7 @@ </argument> <description> Sets an item's collision shapes. - The array should consist of [Shape3D] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY]. + The array should consist of [Shape3D] objects, each followed by a [Transform3D] that will be applied to it. For shapes that should not have a transform, use [constant Transform3D.IDENTITY]. </description> </method> </methods> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 6ebfc946dc..02628f4960 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -6,7 +6,7 @@ <description> MultiMesh provides low-level mesh instancing. Drawing thousands of [MeshInstance3D] nodes can be slow, since each object is submitted to the GPU then drawn individually. MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. - As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object). + As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always render (they are spatially indexed as one, for the whole object). Since instances may have any behavior, the AABB used for visibility must be provided by the user. </description> <tutorials> @@ -40,12 +40,12 @@ </description> </method> <method name="get_instance_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="instance" type="int"> </argument> <description> - Returns the [Transform] of a specific instance. + Returns the [Transform3D] of a specific instance. </description> </method> <method name="get_instance_transform_2d" qualifiers="const"> @@ -86,10 +86,10 @@ </return> <argument index="0" name="instance" type="int"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> - Sets the [Transform] for a specific instance. + Sets the [Transform3D] for a specific instance. </description> </method> <method name="set_instance_transform_2d"> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index c168695d61..b2be92dbbd 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -135,16 +135,16 @@ </signals> <constants> <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode"> - Used with [method Node.rpc_config] or [method Node.rset_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods. + Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods. </constant> <constant name="RPC_MODE_REMOTE" value="1" enum="RPCMode"> - Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets. + Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets. </constant> <constant name="RPC_MODE_MASTER" value="2" enum="RPCMode"> - Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network puppets, see [method Node.set_network_master]. + Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network puppets, see [method Node.set_network_master]. </constant> <constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode"> - Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master]. + Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master]. </constant> <constant name="RPC_MODE_REMOTESYNC" value="4" enum="RPCMode"> Behave like [constant RPC_MODE_REMOTE] but also make the call or property change locally. Analogous to the [code]remotesync[/code] keyword. diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml deleted file mode 100644 index abac29bdb7..0000000000 --- a/doc/classes/Navigation2D.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="Navigation2D" inherits="Node2D" version="4.0"> - <brief_description> - 2D navigation and pathfinding node. - </brief_description> - <description> - Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. These are automatically collected from child [NavigationRegion2D] nodes. - </description> - <tutorials> - <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link> - </tutorials> - <methods> - <method name="get_closest_point" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="to_point" type="Vector2"> - </argument> - <description> - Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. - </description> - </method> - <method name="get_closest_point_owner" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="to_point" type="Vector2"> - </argument> - <description> - Returns the owner region RID for the point returned by [method get_closest_point]. - </description> - </method> - <method name="get_rid" qualifiers="const"> - <return type="RID"> - </return> - <description> - </description> - </method> - <method name="get_simple_path" qualifiers="const"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="start" type="Vector2"> - </argument> - <argument index="1" name="end" type="Vector2"> - </argument> - <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 path is smoothed by merging path segments where possible. - </description> - </method> - </methods> - <members> - <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="10.0"> - </member> - <member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="100.0"> - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/Navigation3D.xml b/doc/classes/Navigation3D.xml deleted file mode 100644 index e7a4fe3c43..0000000000 --- a/doc/classes/Navigation3D.xml +++ /dev/null @@ -1,84 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="Navigation3D" inherits="Node3D" version="4.0"> - <brief_description> - Mesh-based navigation and pathfinding node. - </brief_description> - <description> - Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationRegion3D] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. - </description> - <tutorials> - <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> - </tutorials> - <methods> - <method name="get_closest_point" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="to_point" type="Vector3"> - </argument> - <description> - Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. - </description> - </method> - <method name="get_closest_point_normal" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="to_point" type="Vector3"> - </argument> - <description> - Returns the normal for the point returned by [method get_closest_point]. - </description> - </method> - <method name="get_closest_point_owner" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="to_point" type="Vector3"> - </argument> - <description> - Returns the owner region RID for the point returned by [method get_closest_point]. - </description> - </method> - <method name="get_closest_point_to_segment" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="start" type="Vector3"> - </argument> - <argument index="1" name="end" type="Vector3"> - </argument> - <argument index="2" name="use_collision" type="bool" default="false"> - </argument> - <description> - Returns the closest point between the navigation surface and the segment. - </description> - </method> - <method name="get_rid" qualifiers="const"> - <return type="RID"> - </return> - <description> - </description> - </method> - <method name="get_simple_path" qualifiers="const"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="start" type="Vector3"> - </argument> - <argument index="1" name="end" type="Vector3"> - </argument> - <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] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored. - </description> - </method> - </methods> - <members> - <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3"> - </member> - <member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="5.0"> - </member> - <member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" default="Vector3( 0, 1, 0 )"> - Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 5a9c31ef67..de81ae4d91 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -4,7 +4,7 @@ 2D Agent used in navigation for collision avoidance. </brief_description> <description> - 2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. This can be done by having the agent as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationAgent2D] is physics safe. + 2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent2D] is physics safe. </description> <tutorials> </tutorials> @@ -37,18 +37,17 @@ Returns which index the agent is currently on in the navigation path's [PackedVector2Array]. </description> </method> - <method name="get_navigation" qualifiers="const"> - <return type="Node"> + <method name="get_next_location"> + <return type="Vector2"> </return> <description> - Returns the [Navigation2D] node that the agent is using for its navigation system. + Returns a [Vector2] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. </description> </method> - <method name="get_next_location"> - <return type="Vector2"> + <method name="get_rid" qualifiers="const"> + <return type="RID"> </return> <description> - Returns a [Vector2] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. </description> </method> <method name="get_target_location" qualifiers="const"> @@ -79,15 +78,6 @@ Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. </description> </method> - <method name="set_navigation"> - <return type="void"> - </return> - <argument index="0" name="navigation" type="Node"> - </argument> - <description> - Sets the [Navigation2D] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation2D] node. - </description> - </method> <method name="set_target_location"> <return type="void"> </return> @@ -127,7 +117,7 @@ The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area. </member> <member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0"> - The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. + The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. </member> </members> <signals> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index f9df1d390b..8942a37774 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -4,7 +4,7 @@ 3D Agent used in navigation for collision avoidance. </brief_description> <description> - 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. This can be done by having the agent as a child of a [Navigation3D] node, or using [method set_navigation]. [NavigationAgent3D] is physics safe. + 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent3D] is physics safe. </description> <tutorials> </tutorials> @@ -37,18 +37,17 @@ Returns which index the agent is currently on in the navigation path's [PackedVector3Array]. </description> </method> - <method name="get_navigation" qualifiers="const"> - <return type="Node"> + <method name="get_next_location"> + <return type="Vector3"> </return> <description> - Returns the [Navigation3D] node that the agent is using for its navigation system. + Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent. </description> </method> - <method name="get_next_location"> - <return type="Vector3"> + <method name="get_rid" qualifiers="const"> + <return type="RID"> </return> <description> - Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent. </description> </method> <method name="get_target_location" qualifiers="const"> @@ -79,15 +78,6 @@ Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. </description> </method> - <method name="set_navigation"> - <return type="void"> - </return> - <argument index="0" name="navigation" type="Node"> - </argument> - <description> - Sets the [Navigation3D] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation3D] node. - </description> - </method> <method name="set_target_location"> <return type="void"> </return> @@ -133,7 +123,7 @@ The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area. </member> <member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="5.0"> - The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. + The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. </member> </members> <signals> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index dd7464ac0e..871c92798a 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -79,6 +79,7 @@ </methods> <members> <member name="agent/height" type="float" setter="set_agent_height" getter="get_agent_height" default="2.0"> + The minimum Y space needed for navigation to be generated. </member> <member name="agent/max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.9"> The maximum height difference between two areas for navigation to be generated between them. @@ -87,8 +88,10 @@ The maximum angle a slope can be at for navigation to be generated on it. </member> <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.6"> + Determines where the edge of a navigation mesh is. This way an agent will not overlap with another mesh or stand over nothing. </member> <member name="cell/height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.2"> + The height of a cell. </member> <member name="cell/size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3"> The size of cells in the [NavigationMesh]. @@ -111,7 +114,7 @@ The physics layers used to generate the [NavigationMesh]. </member> <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" default="0"> - What kind of geomerty is used to generate the [NavigationMesh]. + What kind of geometry is used to generate the [NavigationMesh]. </member> <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" default="0"> Which geometry is used to generate the [NavigationMesh]. diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml index ddd96975f1..2e94eb0bba 100644 --- a/doc/classes/NavigationObstacle2D.xml +++ b/doc/classes/NavigationObstacle2D.xml @@ -4,27 +4,11 @@ 2D Obstacle used in navigation for collision avoidance. </brief_description> <description> - 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationObstacle2D] is physics safe. + 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. [NavigationObstacle2D] is physics safe. </description> <tutorials> </tutorials> <methods> - <method name="get_navigation" qualifiers="const"> - <return type="Node"> - </return> - <description> - Returns the [Navigation2D] node that the obstacle is using for its navigation system. - </description> - </method> - <method name="set_navigation"> - <return type="void"> - </return> - <argument index="0" name="navigation" type="Node"> - </argument> - <description> - Sets the [Navigation2D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation2D] node. - </description> - </method> </methods> <constants> </constants> diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml index e01a40ed73..d7454a7bea 100644 --- a/doc/classes/NavigationObstacle3D.xml +++ b/doc/classes/NavigationObstacle3D.xml @@ -4,27 +4,11 @@ 3D Obstacle used in navigation for collision avoidance. </brief_description> <description> - 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation3D] node, or using [method set_navigation]. [NavigationObstacle3D] is physics safe. + 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. [NavigationObstacle3D] is physics safe. </description> <tutorials> </tutorials> <methods> - <method name="get_navigation" qualifiers="const"> - <return type="Node"> - </return> - <description> - Returns the [Navigation3D] node that the obstacle is using for its navigation system. - </description> - </method> - <method name="set_navigation"> - <return type="void"> - </return> - <argument index="0" name="navigation" type="Node"> - </argument> - <description> - Sets the [Navigation3D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation3D] node. - </description> - </method> </methods> <constants> </constants> diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml index aef114e1db..33a3f04c3d 100644 --- a/doc/classes/NavigationRegion2D.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -1,8 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="NavigationRegion2D" inherits="Node2D" version="4.0"> <brief_description> + A region of the 2D navigation map. </brief_description> <description> + A region of the navigation map. It tells the [NavigationServer2D] what can be navigated and what cannot, based on its [NavigationPolygon] resource. + Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer2D.map_set_edge_connection_margin]. + [b]Note:[/b] Overlapping two regions' polygons is not enough for connecting two regions. They must share a similar edge. </description> <tutorials> </tutorials> @@ -10,8 +14,13 @@ </methods> <members> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> + Determines if the [NavigationRegion2D] is enabled or disabled. + </member> + <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1"> + A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. </member> <member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon"> + The [NavigationPolygon] resource to use. </member> </members> <constants> diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index b70bfb6596..2904ba4200 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -4,7 +4,8 @@ A region of the navigation map. </brief_description> <description> - A region of the navigation map. It tells the [Navigation3D] node what can be navigated and what cannot, based on the [NavigationMesh] resource. This should be a child of a [Navigation3D] node (even not a direct child). + A region of the navigation map. It tells the [NavigationServer3D] what can be navigated and what cannot, based on its [NavigationMesh] resource. + Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer3D.map_set_edge_connection_margin]. </description> <tutorials> </tutorials> @@ -21,6 +22,9 @@ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> Determines if the [NavigationRegion3D] is enabled or disabled. </member> + <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1"> + A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. + </member> <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh"> The [NavigationMesh] resource to use. </member> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index 5f0b04487e..b0a57ed227 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -4,7 +4,12 @@ Server interface for low-level 2D navigation access </brief_description> <description> - NavigationServer2D is the server responsible for all 2D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. + NavigationServer2D is the server responsible for all 2D navigation. It handles several objects, namely maps, regions and agents. + Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex. + You may assign navigation layers to regions with [method NavigationServer2D.region_set_layers], which then can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. This allows allowing or forbidding some areas to 2D objects. + To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. + [b]Note:[/b] the collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. + This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. </description> <tutorials> <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link> @@ -207,8 +212,10 @@ </argument> <argument index="3" name="optimize" type="bool"> </argument> + <argument index="4" name="layers" type="int" default="1"> + </argument> <description> - Returns the navigation path to reach the destination from the origin, while avoiding static obstacles. + Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path. </description> </method> <method name="map_is_active" qualifiers="const"> @@ -260,6 +267,57 @@ Creates a new region. </description> </method> + <method name="region_get_connection_pathway_end" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="connection" type="int"> + </argument> + <description> + Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. + </description> + </method> + <method name="region_get_connection_pathway_start" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="connection" type="int"> + </argument> + <description> + Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. + </description> + </method> + <method name="region_get_connections_count" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <description> + Returns how many connections this [code]region[/code] has with other regions in the map. + </description> + </method> + <method name="region_get_layers" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <description> + Returns the region's layers. + </description> + </method> + <method name="region_set_layers" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="layers" type="int"> + </argument> + <description> + Set the region's layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]). + </description> + </method> <method name="region_set_map" qualifiers="const"> <return type="void"> </return> @@ -294,6 +352,15 @@ </description> </method> </methods> + <signals> + <signal name="map_changed"> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Emitted when a navigation map is updated, when a region moves or is modified. + </description> + </signal> + </signals> <constants> </constants> </class> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index 95890c4b4c..ef9efcb99c 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -4,7 +4,12 @@ Server interface for low-level 3D navigation access </brief_description> <description> - NavigationServer3D is the server responsible for all 3D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. + NavigationServer3D is the server responsible for all 3D navigation. It handles several objects, namely maps, regions and agents. + Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex. + You may assign navigation layers to regions with [method NavigationServer3D.region_set_layers], which then can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. This allows allowing or forbidding some areas to 3D objects. + To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. + [b]Note:[/b] the collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. + This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. </description> <tutorials> <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> @@ -219,7 +224,7 @@ <argument index="0" name="map" type="RID"> </argument> <description> - Returns the edge connection margin of the map. + Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions. </description> </method> <method name="map_get_path" qualifiers="const"> @@ -233,8 +238,10 @@ </argument> <argument index="3" name="optimize" type="bool"> </argument> + <argument index="4" name="layers" type="int" default="1"> + </argument> <description> - Returns the navigation path to reach the destination from the origin. + Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path. </description> </method> <method name="map_get_up" qualifiers="const"> @@ -285,7 +292,7 @@ <argument index="1" name="margin" type="float"> </argument> <description> - Set the map edge connection margein used to weld the compatible region edges. + Set the map edge connection margin used to weld the compatible region edges. </description> </method> <method name="map_set_up" qualifiers="const"> @@ -328,6 +335,57 @@ Creates a new region. </description> </method> + <method name="region_get_connection_pathway_end" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="connection" type="int"> + </argument> + <description> + Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. + </description> + </method> + <method name="region_get_connection_pathway_start" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="connection" type="int"> + </argument> + <description> + Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. + </description> + </method> + <method name="region_get_connections_count" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <description> + Returns how many connections this [code]region[/code] has with other regions in the map. + </description> + </method> + <method name="region_get_layers" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <description> + Returns the region's layers. + </description> + </method> + <method name="region_set_layers" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="layers" type="int"> + </argument> + <description> + Set the region's layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]). + </description> + </method> <method name="region_set_map" qualifiers="const"> <return type="void"> </return> @@ -355,7 +413,7 @@ </return> <argument index="0" name="region" type="RID"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> Sets the global transformation for the region. @@ -371,6 +429,15 @@ </description> </method> </methods> + <signals> + <signal name="map_changed"> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Emitted when a navigation map is updated, when a region moves or is modified. + </description> + </signal> + </signals> <constants> </constants> </class> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 7ee6860dfc..1300351e47 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -37,13 +37,13 @@ Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited]. </description> </method> - <method name="_get_configuration_warning" qualifiers="virtual"> - <return type="String"> + <method name="_get_configuration_warnings" qualifiers="virtual"> + <return type="String[]"> </return> <description> - The string returned from this method is displayed as a warning in the Scene Dock if the script that overrides it is a [code]tool[/code] script. - Returning an empty string produces no warning. - Call [method update_configuration_warning] when the warning needs to be updated for this node. + The elements in the array returned from this method are displayed as warnings in the Scene Dock if the script that overrides it is a [code]tool[/code] script. + Returning an empty array produces no warnings. + Call [method update_configuration_warnings] when the warnings need to be updated for this node. </description> </method> <method name="_input" qualifiers="virtual"> @@ -128,7 +128,7 @@ </argument> <description> Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node. - If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type. + If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type. [b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example: [codeblocks] [gdscript] @@ -158,8 +158,8 @@ <argument index="1" name="legible_unique_name" type="bool" default="false"> </argument> <description> - Adds a [code]sibling[/code] node to current's node parent, at the the same level as that node, right below it. - If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type. + Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it. + If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type. Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children. </description> </method> @@ -649,7 +649,7 @@ <argument index="0" name="method" type="StringName"> </argument> <description> - Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. See also [method rset] and [method rset_config] for properties. Returns an empty [Variant]. + Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns an empty [Variant]. [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [SceneTree]. You also need to keep track of the connection state, either by the [SceneTree] signals like [code]server_disconnected[/code] or by checking [code]SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED[/code]. </description> </method> @@ -658,33 +658,17 @@ </return> <argument index="0" name="method" type="StringName"> </argument> - <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode"> + <argument index="1" name="rpc_mode" type="int" enum="MultiplayerAPI.RPCMode"> </argument> - <description> - Changes the RPC mode for the given [code]method[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). See also [method rset] and [method rset_config] for properties. - </description> - </method> - <method name="rpc_id" qualifiers="vararg"> - <return type="Variant"> - </return> - <argument index="0" name="peer_id" type="int"> + <argument index="2" name="transfer_mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode" default="2"> </argument> - <argument index="1" name="method" type="StringName"> - </argument> - <description> - Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]. - </description> - </method> - <method name="rpc_unreliable" qualifiers="vararg"> - <return type="Variant"> - </return> - <argument index="0" name="method" type="StringName"> + <argument index="3" name="channel" type="int" default="0"> </argument> <description> - Sends a [method rpc] using an unreliable protocol. Returns an empty [Variant]. + Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum MultiplayerAPI.RPCMode] and [enum NetworkedMultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). </description> </method> - <method name="rpc_unreliable_id" qualifiers="vararg"> + <method name="rpc_id" qualifiers="vararg"> <return type="Variant"> </return> <argument index="0" name="peer_id" type="int"> @@ -692,66 +676,7 @@ <argument index="1" name="method" type="StringName"> </argument> <description> - Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]. - </description> - </method> - <method name="rset"> - <return type="void"> - </return> - <argument index="0" name="property" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> - <description> - Remotely changes a property's value on other peers (and locally). Behaviour depends on the RPC configuration for the given property, see [method rset_config]. See also [method rpc] for RPCs for methods, most information applies to this method as well. - </description> - </method> - <method name="rset_config"> - <return type="int"> - </return> - <argument index="0" name="property" type="StringName"> - </argument> - <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode"> - </argument> - <description> - Changes the RPC mode for the given [code]property[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, properties are not exposed to networking (and RPCs). See also [method rpc] and [method rpc_config] for methods. - </description> - </method> - <method name="rset_id"> - <return type="void"> - </return> - <argument index="0" name="peer_id" type="int"> - </argument> - <argument index="1" name="property" type="StringName"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> - <description> - Remotely changes the property's value on a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). - </description> - </method> - <method name="rset_unreliable"> - <return type="void"> - </return> - <argument index="0" name="property" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> - <description> - Remotely changes the property's value on other peers (and locally) using an unreliable protocol. - </description> - </method> - <method name="rset_unreliable_id"> - <return type="void"> - </return> - <argument index="0" name="peer_id" type="int"> - </argument> - <argument index="1" name="property" type="StringName"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> - <description> - Remotely changes property's value on a specific peer identified by [code]peer_id[/code] using an unreliable protocol (see [method NetworkedMultiplayerPeer.set_target_peer]). + Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]. </description> </method> <method name="set_display_folded"> @@ -856,12 +781,12 @@ Sets whether this is an instance load placeholder. See [InstancePlaceholder]. </description> </method> - <method name="update_configuration_warning"> + <method name="update_configuration_warnings"> <return type="void"> </return> <description> Updates the warning displayed for this node in the Scene Dock. - Use [method _get_configuration_warning] to setup the warning message to display. + Use [method _get_configuration_warnings] to setup the warning message to display. </description> </method> </methods> @@ -969,6 +894,12 @@ <constant name="NOTIFICATION_POST_ENTER_TREE" value="27"> Notification received when the node is ready, just before [constant NOTIFICATION_READY] is received. Unlike the latter, it's sent every time the node enters tree, instead of only once. </constant> + <constant name="NOTIFICATION_EDITOR_PRE_SAVE" value="9001"> + Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects. + </constant> + <constant name="NOTIFICATION_EDITOR_POST_SAVE" value="9002"> + Notification received right after the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects. + </constant> <constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002"> Notification received from the OS when the mouse enters the game window. Implemented on desktop and web platforms. diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index eed0ec8d7e..8ca945418c 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -150,11 +150,15 @@ <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform"> Local [Transform2D]. </member> + <member name="y_sort_enabled" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false"> + If [code]true[/code], child nodes with the lowest Y position are drawn before those with a higher Y position. If [code]false[/code], Y-sorting is disabled. Y-sorting only affects children that inherit from [CanvasItem]. + You can nest nodes with Y-sorting. Child Y-sorted nodes are sorted in the same space as the parent Y-sort. This feature allows you to organize a scene better or divide it into multiple ones without changing your scene tree. + </member> <member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative" default="true"> If [code]true[/code], the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5. </member> <member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0"> - Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. + Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between [constant RenderingServer.CANVAS_ITEM_Z_MIN] and [constant RenderingServer.CANVAS_ITEM_Z_MAX] (inclusive). </member> </members> <constants> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 5c29c0d48f..a6237708c6 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -4,7 +4,7 @@ Most basic 3D game object, parent of all 3D-related nodes. </brief_description> <description> - Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project. + Most basic 3D game object, with a 3D [Transform3D] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project. Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Node3D] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Node3D]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Node3D] object itself is referred to as object-local coordinate system. [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad]. </description> @@ -128,7 +128,7 @@ <return type="void"> </return> <description> - Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform]. + Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D]. </description> </method> <method name="rotate"> @@ -202,7 +202,7 @@ <return type="void"> </return> <description> - Reset all transformations for this node (sets its [Transform] to the identity matrix). + Reset all transformations for this node (sets its [Transform3D] to the identity matrix). </description> </method> <method name="set_ignore_transform_notification"> @@ -288,8 +288,11 @@ <member name="gizmo" type="Node3DGizmo" setter="set_gizmo" getter="get_gizmo"> The [Node3DGizmo] for this node. Used for example in [EditorNode3DGizmo] as custom visualization and editing handles in Editor. </member> - <member name="global_transform" type="Transform" setter="set_global_transform" getter="get_global_transform"> - World3D space (global) [Transform] of this node. + <member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform"> + World3D space (global) [Transform3D] of this node. + </member> + <member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3( 0, 0, 0 )"> + Local position or translation of this node relative to the parent. This is equivalent to [code]transform.origin[/code]. </member> <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation"> Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). @@ -304,11 +307,8 @@ <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false"> If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space. </member> - <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> - Local space [Transform] of this node, with respect to the parent node. - </member> - <member name="translation" type="Vector3" setter="set_translation" getter="get_translation" default="Vector3( 0, 0, 0 )"> - Local translation of this node. + <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + Local space [Transform3D] of this node, with respect to the parent node. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> If [code]true[/code], this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]). diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index 36835d9e94..817ccd5160 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -66,11 +66,11 @@ [/codeblock] </description> </method> - <method name="get_as_property_path"> + <method name="get_as_property_path" qualifiers="const"> <return type="NodePath"> </return> <description> - Returns a node path with a colon character ([code]:[/code]) prepended, transforming it to a pure property path with no node name (defaults to resolving from the from the current node). + Returns a node path with a colon character ([code]:[/code]) prepended, transforming it to a pure property path with no node name (defaults to resolving from the current node). [codeblocks] [gdscript] # This will be parsed as a node path to the "x" property in the "position" node. @@ -89,7 +89,7 @@ [/codeblocks] </description> </method> - <method name="get_concatenated_subnames"> + <method name="get_concatenated_subnames" qualifiers="const"> <return type="StringName"> </return> <description> @@ -106,7 +106,7 @@ [/codeblocks] </description> </method> - <method name="get_name"> + <method name="get_name" qualifiers="const"> <return type="StringName"> </return> <argument index="0" name="idx" type="int"> @@ -129,7 +129,7 @@ [/codeblocks] </description> </method> - <method name="get_name_count"> + <method name="get_name_count" qualifiers="const"> <return type="int"> </return> <description> @@ -137,7 +137,7 @@ For example, [code]"Path2D/PathFollow2D/Sprite2D"[/code] has 3 names. </description> </method> - <method name="get_subname"> + <method name="get_subname" qualifiers="const"> <return type="StringName"> </return> <argument index="0" name="idx" type="int"> @@ -158,7 +158,7 @@ [/codeblocks] </description> </method> - <method name="get_subname_count"> + <method name="get_subname_count" qualifiers="const"> <return type="int"> </return> <description> @@ -166,14 +166,14 @@ For example, [code]"Path2D/PathFollow2D/Sprite2D:texture:load_path"[/code] has 2 subnames. </description> </method> - <method name="is_absolute"> + <method name="is_absolute" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if the node path is absolute (as opposed to relative), which means that it starts with a slash character ([code]/[/code]). Absolute node paths can be used to access the root node ([code]"/root"[/code]) or autoloads (e.g. [code]"/global"[/code] if a "global" autoload was registered). </description> </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 057a2b8d1a..c755c73465 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -143,7 +143,7 @@ Returns the command-line arguments passed to the engine. Command-line arguments can be written in any form, including both [code]--key value[/code] and [code]--key=value[/code] forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments. You can also incorporate environment variables using the [method get_environment] method. - You can set [code]editor/main_run_args[/code] in the Project Settings to define command-line arguments to be passed by the editor when running the project. + You can set [member ProjectSettings.editor/run/main_run_args] to define command-line arguments to be passed by the editor when running the project. Here's a minimal example on how to parse command-line arguments into a dictionary using the [code]--key=value[/code] form for arguments: [codeblocks] [gdscript] @@ -221,6 +221,13 @@ Returns the path to the current engine executable. </description> </method> + <method name="get_external_data_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + On Android, returns the absolute directory path where user data can be written to external storage if available. On all other platforms, this will return the same location as [method get_user_data_dir]. + </description> + </method> <method name="get_granted_permissions" qualifiers="const"> <return type="PackedStringArray"> </return> @@ -244,9 +251,9 @@ </return> <description> Returns the host OS locale as a string of the form [code]language_Script_COUNTRY_VARIANT@extra[/code]. - [code]language[/code] - 2 or 3 letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url], in lower case. - [code]Script[/code] - optional, 4 letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case. - [code]COUNTRY[/code] - optional, 2 or 3 letter [url=https://en.wikipedia.org/wiki/ISO_3166-1]country code[/url], in upper case. + [code]language[/code] - 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url], in lower case. + [code]Script[/code] - optional, 4-letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case. + [code]COUNTRY[/code] - optional, 2 or 3-letter [url=https://en.wikipedia.org/wiki/ISO_3166-1]country code[/url], in upper case. [code]VARIANT[/code] - optional, language variant, region and sort order. Variant can have any number of underscored key words. [code]extra[/code] - optional, semicolon separated list of additional key words. Currency, calendar, sort order and numbering system information. </description> @@ -348,6 +355,7 @@ </return> <description> Returns a string that is unique to the device. + [b]Note:[/b] This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved prior to an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by [method get_unique_id] for security purposes. [b]Note:[/b] Returns an empty string on HTML5 and UWP, as this method isn't implemented on those platforms yet. </description> </method> @@ -355,8 +363,8 @@ <return type="float"> </return> <description> - Returns the current UNIX epoch timestamp. - [b]Important:[/b] This is the system clock that the user can manully set. [b]Never use[/b] this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. [b]Always use[/b] [method get_ticks_usec] or [method get_ticks_msec] for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease). + Returns the current UNIX epoch timestamp in seconds. + [b]Important:[/b] This is the system clock that the user can manually set. [b]Never use[/b] this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. [b]Always use[/b] [method get_ticks_usec] or [method get_ticks_msec] for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease). </description> </method> <method name="get_unix_time_from_datetime" qualifiers="const"> @@ -367,6 +375,7 @@ <description> Gets an epoch time value from a dictionary of time values. [code]datetime[/code] must be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], [code]second[/code]. + If the dictionary is empty [code]0[/code] is returned. If some keys are omitted, they default to the equivalent values for the UNIX epoch timestamp 0 (1970-01-01 at 00:00:00 UTC). You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight Savings Time ([code]dst[/code]), if present, is ignored. </description> </method> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index ad3ce8e93e..7da9c1ac38 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Object" version="4.0"> <brief_description> - Base class for all non built-in types. + Base class for all non-built-in types. </brief_description> <description> Every class which is not a built-in type inherits from this class. @@ -179,7 +179,7 @@ </argument> <description> Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. - [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommend modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below. + [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommended modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below. A signal can only be connected once to a [Callable]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. If the callable's target is destroyed in the game's lifecycle, the connection will be lost. [b]Examples with recommended syntax:[/b] diff --git a/doc/classes/Occluder3D.xml b/doc/classes/Occluder3D.xml new file mode 100644 index 0000000000..fc676c2b49 --- /dev/null +++ b/doc/classes/Occluder3D.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Occluder3D" inherits="Resource" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array( )"> + </member> + <member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array( )"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml new file mode 100644 index 0000000000..76b784d21d --- /dev/null +++ b/doc/classes/OccluderInstance3D.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="OccluderInstance3D" inherits="Node3D" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_bake_mask_bit" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="layer" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_bake_mask_bit"> + <return type="void"> + </return> + <argument index="0" name="layer" type="int"> + </argument> + <argument index="1" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="bake_mask" type="int" setter="set_bake_mask" getter="get_bake_mask" default="4294967295"> + </member> + <member name="occluder" type="Occluder3D" setter="set_occluder" getter="get_occluder"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/PHashTranslation.xml b/doc/classes/OptimizedTranslation.xml index 30194e9495..a5ca93c7ff 100644 --- a/doc/classes/PHashTranslation.xml +++ b/doc/classes/OptimizedTranslation.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PHashTranslation" inherits="Translation" version="4.0"> +<class name="OptimizedTranslation" inherits="Translation" version="4.0"> <brief_description> Optimized translation. </brief_description> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index 75fb7c1465..0652cf0aa1 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -52,7 +52,7 @@ Appends a [PackedByteArray] at the end of this array. </description> </method> - <method name="compress"> + <method name="compress" qualifiers="const"> <return type="PackedByteArray"> </return> <argument index="0" name="compression_mode" type="int" default="0"> @@ -61,7 +61,115 @@ Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> - <method name="decompress"> + <method name="decode_double" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_float" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_half" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_s16" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_s32" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_s64" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_s8" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_u16" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_u32" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_u64" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_u8" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="decode_var" qualifiers="const"> + <return type="Variant"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="allow_objects" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="decode_var_size" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="allow_objects" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="decompress" qualifiers="const"> <return type="PackedByteArray"> </return> <argument index="0" name="buffer_size" type="int"> @@ -72,7 +180,7 @@ Returns a new [PackedByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> - <method name="decompress_dynamic"> + <method name="decompress_dynamic" qualifiers="const"> <return type="PackedByteArray"> </return> <argument index="0" name="max_output_size" type="int"> @@ -81,7 +189,7 @@ </argument> <description> Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. [b]This method only accepts gzip and deflate compression modes.[/b] - This method is potentially slower than [code]decompress[/code], as it may have to re-allocate it's output buffer multiple times while decompressing, where as [code]decompress[/code] knows it's output buffer size from the beginning. + This method is potentially slower than [code]decompress[/code], as it may have to re-allocate its output buffer multiple times while decompressing, whereas [code]decompress[/code] knows it's output buffer size from the beginning. GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [code]max_output_size[/code]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned. </description> </method> @@ -92,28 +200,159 @@ Creates a copy of the array, and returns it. </description> </method> - <method name="get_string_from_ascii"> + <method name="encode_double"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="encode_float"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="encode_half"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="encode_s16"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + </description> + </method> + <method name="encode_s32"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + </description> + </method> + <method name="encode_s64"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + </description> + </method> + <method name="encode_s8"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + </description> + </method> + <method name="encode_u16"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + </description> + </method> + <method name="encode_u32"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + </description> + </method> + <method name="encode_u64"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + </description> + </method> + <method name="encode_u8"> + <return type="void"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + </description> + </method> + <method name="encode_var"> + <return type="int"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="value" type="Variant"> + </argument> + <argument index="2" name="allow_objects" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="int"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> + <method name="get_string_from_ascii" qualifiers="const"> <return type="String"> </return> <description> Converts ASCII/Latin-1 encoded array to [String]. Fast alternative to [method get_string_from_utf8] if the content is ASCII/Latin-1 only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method get_string_from_utf8]. </description> </method> - <method name="get_string_from_utf16"> + <method name="get_string_from_utf16" qualifiers="const"> <return type="String"> </return> <description> Converts UTF-16 encoded array to [String]. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string. </description> </method> - <method name="get_string_from_utf32"> + <method name="get_string_from_utf32" qualifiers="const"> <return type="String"> </return> <description> Converts UTF-32 encoded array to [String]. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string. </description> </method> - <method name="get_string_from_utf8"> + <method name="get_string_from_utf8" qualifiers="const"> <return type="String"> </return> <description> @@ -129,7 +368,17 @@ Returns [code]true[/code] if the array contains [code]value[/code]. </description> </method> - <method name="hex_encode"> + <method name="has_encoded_var" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="byte_offset" type="int"> + </argument> + <argument index="1" name="allow_objects" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="hex_encode" qualifiers="const"> <return type="String"> </return> <description> @@ -157,14 +406,7 @@ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> - <method name="invert"> - <return type="void"> - </return> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> @@ -230,6 +472,13 @@ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> + <method name="reverse"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> <method name="set"> <return type="void"> </return> @@ -241,7 +490,7 @@ Changes the byte at the given index. </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> @@ -255,7 +504,7 @@ Sorts the elements of the array in ascending order. </description> </method> - <method name="subarray"> + <method name="subarray" qualifiers="const"> <return type="PackedByteArray"> </return> <argument index="0" name="from" type="int"> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index 48d5822f7c..19cfcd7c87 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -59,6 +59,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="Color"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> @@ -79,14 +88,7 @@ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> - <method name="invert"> - <return type="void"> - </return> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> @@ -152,6 +154,13 @@ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> + <method name="reverse"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> <method name="set"> <return type="void"> </return> @@ -163,7 +172,7 @@ Changes the [Color] at the given index. </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> @@ -177,7 +186,7 @@ Sorts the elements of the array in ascending order. </description> </method> - <method name="subarray"> + <method name="subarray" qualifiers="const"> <return type="PackedColorArray"> </return> <argument index="0" name="from" type="int"> @@ -187,7 +196,7 @@ <description> </description> </method> - <method name="to_byte_array"> + <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray"> </return> <description> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index 6598828089..ab97c9a695 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="float"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> @@ -80,14 +89,7 @@ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> - <method name="invert"> - <return type="void"> - </return> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> @@ -118,6 +120,14 @@ <description> </description> </method> + <method name="operator []" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="push_back"> <return type="bool"> </return> @@ -145,6 +155,13 @@ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> + <method name="reverse"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> <method name="set"> <return type="void"> </return> @@ -156,7 +173,7 @@ Changes the float at the given index. </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> @@ -170,7 +187,7 @@ Sorts the elements of the array in ascending order. </description> </method> - <method name="subarray"> + <method name="subarray" qualifiers="const"> <return type="PackedFloat32Array"> </return> <argument index="0" name="from" type="int"> @@ -180,7 +197,7 @@ <description> </description> </method> - <method name="to_byte_array"> + <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray"> </return> <description> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index d116c6756b..ad20801b01 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="float"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> @@ -80,14 +89,7 @@ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> - <method name="invert"> - <return type="void"> - </return> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> @@ -153,6 +155,13 @@ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> + <method name="reverse"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> <method name="set"> <return type="void"> </return> @@ -164,7 +173,7 @@ Changes the float at the given index. </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> @@ -178,7 +187,7 @@ Sorts the elements of the array in ascending order. </description> </method> - <method name="subarray"> + <method name="subarray" qualifiers="const"> <return type="PackedFloat64Array"> </return> <argument index="0" name="from" type="int"> @@ -188,7 +197,7 @@ <description> </description> </method> - <method name="to_byte_array"> + <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray"> </return> <description> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index 2ac7a67b4b..ff4729082e 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="int"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> @@ -80,14 +89,7 @@ Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> - <method name="invert"> - <return type="void"> - </return> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> @@ -153,6 +155,13 @@ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> + <method name="reverse"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> <method name="set"> <return type="void"> </return> @@ -164,7 +173,7 @@ Changes the integer at the given index. </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> @@ -178,7 +187,7 @@ Sorts the elements of the array in ascending order. </description> </method> - <method name="subarray"> + <method name="subarray" qualifiers="const"> <return type="PackedInt32Array"> </return> <argument index="0" name="from" type="int"> @@ -188,7 +197,7 @@ <description> </description> </method> - <method name="to_byte_array"> + <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray"> </return> <description> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index a7b6bf0a0f..195b12b129 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="int"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> @@ -80,14 +89,7 @@ Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> - <method name="invert"> - <return type="void"> - </return> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> @@ -153,6 +155,13 @@ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> + <method name="reverse"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> <method name="set"> <return type="void"> </return> @@ -164,7 +173,7 @@ Changes the integer at the given index. </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> @@ -178,7 +187,7 @@ Sorts the elements of the array in ascending order. </description> </method> - <method name="subarray"> + <method name="subarray" qualifiers="const"> <return type="PackedInt64Array"> </return> <argument index="0" name="from" type="int"> @@ -188,7 +197,7 @@ <description> </description> </method> - <method name="to_byte_array"> + <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray"> </return> <description> diff --git a/doc/classes/PackedSceneGLTF.xml b/doc/classes/PackedSceneGLTF.xml deleted file mode 100644 index a04c6ef0b6..0000000000 --- a/doc/classes/PackedSceneGLTF.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="PackedSceneGLTF" inherits="PackedScene" version="4.0"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - <method name="export_gltf"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="node" type="Node"> - </argument> - <argument index="1" name="path" type="String"> - </argument> - <argument index="2" name="flags" type="int" default="0"> - </argument> - <argument index="3" name="bake_fps" type="float" default="1000.0"> - </argument> - <description> - </description> - </method> - <method name="import_gltf_scene"> - <return type="Node"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="flags" type="int" default="0"> - </argument> - <argument index="2" name="bake_fps" type="float" default="1000.0"> - </argument> - <argument index="3" name="state" type="GLTFState" default="null"> - </argument> - <description> - </description> - </method> - <method name="pack_gltf"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="flags" type="int" default="0"> - </argument> - <argument index="2" name="bake_fps" type="float" default="1000.0"> - </argument> - <argument index="3" name="state" type="GLTFState" default="null"> - </argument> - <description> - </description> - </method> - </methods> - <members> - <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" override="true" default="{"conn_count": 0,"conns": PackedInt32Array( ),"editable_instances": [ ],"names": PackedStringArray( ),"node_count": 0,"node_paths": [ ],"nodes": PackedInt32Array( ),"variants": [ ],"version": 2}" /> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index fb7ed2a906..22458832da 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="String"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> @@ -80,14 +89,7 @@ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> - <method name="invert"> - <return type="void"> - </return> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> @@ -153,6 +155,13 @@ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> + <method name="reverse"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> <method name="set"> <return type="void"> </return> @@ -164,7 +173,7 @@ Changes the [String] at the given index. </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> @@ -178,7 +187,7 @@ Sorts the elements of the array in ascending order. </description> </method> - <method name="subarray"> + <method name="subarray" qualifiers="const"> <return type="PackedStringArray"> </return> <argument index="0" name="from" type="int"> @@ -188,7 +197,7 @@ <description> </description> </method> - <method name="to_byte_array"> + <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray"> </return> <description> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index eb364ddb18..6c8791f988 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="Vector2"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> @@ -80,14 +89,7 @@ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> - <method name="invert"> - <return type="void"> - </return> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> @@ -161,6 +163,13 @@ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> + <method name="reverse"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> <method name="set"> <return type="void"> </return> @@ -172,7 +181,7 @@ Changes the [Vector2] at the given index. </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> @@ -186,7 +195,7 @@ Sorts the elements of the array in ascending order. </description> </method> - <method name="subarray"> + <method name="subarray" qualifiers="const"> <return type="PackedVector2Array"> </return> <argument index="0" name="from" type="int"> @@ -196,7 +205,7 @@ <description> </description> </method> - <method name="to_byte_array"> + <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray"> </return> <description> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 08ce187b5c..00ded39082 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -59,6 +59,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="Vector3"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> @@ -79,14 +88,7 @@ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> - <method name="invert"> - <return type="void"> - </return> - <description> - Reverses the order of the elements in the array. - </description> - </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> @@ -104,7 +106,7 @@ <method name="operator *" qualifiers="operator"> <return type="PackedVector3Array"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> @@ -160,6 +162,13 @@ Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> + <method name="reverse"> + <return type="void"> + </return> + <description> + Reverses the order of the elements in the array. + </description> + </method> <method name="set"> <return type="void"> </return> @@ -171,7 +180,7 @@ Changes the [Vector3] at the given index. </description> </method> - <method name="size"> + <method name="size" qualifiers="const"> <return type="int"> </return> <description> @@ -185,7 +194,7 @@ Sorts the elements of the array in ascending order. </description> </method> - <method name="subarray"> + <method name="subarray" qualifiers="const"> <return type="PackedVector3Array"> </return> <argument index="0" name="from" type="int"> @@ -195,7 +204,7 @@ <description> </description> </method> - <method name="to_byte_array"> + <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray"> </return> <description> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index d7cf6cc8c6..5d059ad3df 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -9,11 +9,27 @@ <tutorials> </tutorials> <methods> + <method name="bind"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="port" type="int"> + </argument> + <argument index="1" name="bind_address" type="String" default=""*""> + </argument> + <argument index="2" name="recv_buf_size" type="int" default="65536"> + </argument> + <description> + Binds this [PacketPeerUDP] to the specified [code]port[/code] and [code]address[/code] with a buffer size [code]recv_buf_size[/code], allowing it to receive incoming packets. + If [code]address[/code] is set to [code]"*"[/code] (default), the peer will be bound on all available addresses (both IPv4 and IPv6). + If [code]address[/code] is set to [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the peer will be bound to all available addresses matching that IP type. + If [code]address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only be bound to the interface with that addresses (or fail if no interface with the given address exists). + </description> + </method> <method name="close"> <return type="void"> </return> <description> - Closes the UDP socket the [PacketPeerUDP] is currently listening on. + Closes the [PacketPeerUDP]'s underlying UDP socket. </description> </method> <method name="connect_to_host"> @@ -28,6 +44,13 @@ [b]Note:[/b] Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like SSL or DTLS if you feel like your application is transferring sensitive information. </description> </method> + <method name="get_local_port" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the local port to which this peer is bound. + </description> + </method> <method name="get_packet_ip" qualifiers="const"> <return type="String"> </return> @@ -42,18 +65,18 @@ Returns the port of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]). </description> </method> - <method name="is_connected_to_host" qualifiers="const"> + <method name="is_bound" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if the UDP socket is open and has been connected to a remote address. See [method connect_to_host]. + Returns whether this [PacketPeerUDP] is bound to an address and can receive packets. </description> </method> - <method name="is_listening" qualifiers="const"> + <method name="is_connected_to_host" qualifiers="const"> <return type="bool"> </return> <description> - Returns whether this [PacketPeerUDP] is listening. + Returns [code]true[/code] if the UDP socket is open and has been connected to a remote address. See [method connect_to_host]. </description> </method> <method name="join_multicast_group"> @@ -80,22 +103,6 @@ Removes the interface identified by [code]interface_name[/code] from the multicast group specified by [code]multicast_address[/code]. </description> </method> - <method name="listen"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="port" type="int"> - </argument> - <argument index="1" name="bind_address" type="String" default=""*""> - </argument> - <argument index="2" name="recv_buf_size" type="int" default="65536"> - </argument> - <description> - Makes this [PacketPeerUDP] listen on the [code]port[/code] binding to [code]bind_address[/code] with a buffer size [code]recv_buf_size[/code]. - If [code]bind_address[/code] is set to [code]"*"[/code] (default), the peer will listen on all available addresses (both IPv4 and IPv6). - If [code]bind_address[/code] is set to [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the peer will listen on all available addresses matching that IP type. - If [code]bind_address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). - </description> - </method> <method name="set_broadcast_enabled"> <return type="void"> </return> @@ -122,7 +129,7 @@ <return type="int" enum="Error"> </return> <description> - Waits for a packet to arrive on the listening port. See [method listen]. + Waits for a packet to arrive on the bound address. See [method bind]. [b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this: [codeblocks] [gdscript] diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 85058cb9d4..3c364b621a 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -135,7 +135,7 @@ </member> <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0"> </member> - <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="true"> + <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="false"> </member> <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="0.0"> </member> @@ -181,7 +181,7 @@ The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE]. </member> <member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0"> - Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. + Amount of [member spread] along the Y axis. </member> <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )"> Gravity applied to every particle. @@ -251,7 +251,7 @@ Scale randomness ratio. </member> <member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0"> - Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes. + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. </member> <member name="sub_emitter_amount_at_end" type="int" setter="set_sub_emitter_amount_at_end" getter="get_sub_emitter_amount_at_end"> </member> diff --git a/doc/classes/PhysicalBone2D.xml b/doc/classes/PhysicalBone2D.xml new file mode 100644 index 0000000000..cea75bad52 --- /dev/null +++ b/doc/classes/PhysicalBone2D.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PhysicalBone2D" inherits="RigidBody2D" version="4.0"> + <brief_description> + A 2D node that can be used for physically aware bones in 2D. + </brief_description> + <description> + The [code]PhysicalBone2D[/code] node is a [RigidBody2D]-based node that can be used to make [Bone2D] nodes in a [Skeleton2D] react to physics. This node is very similar to the [PhysicalBone3D] node, just for 2D instead of 3D. + [b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes. + [b]Note:[/b] The PhysicalBone2D node does not automatically create a [Joint2D] node to keep [code]PhysicalBone2D[/code] nodes together. You will need to create these manually. For most cases, you want to use a [PinJoint2D] node. The [code]PhysicalBone2D[/code] node can automatically configure the [Joint2D] node once it's been created as a child node. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_joint" qualifiers="const"> + <return type="Joint2D"> + </return> + <description> + Returns the first [Joint2D] child node, if one exists. This is mainly a helper function to make it easier to get the [Joint2D] that the [code]PhysicalBone2D[/code] is autoconfiguring. + </description> + </method> + <method name="is_simulating_physics" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns a boolean that indicates whether the [code]PhysicalBone2D[/code] node is running and simulating using the Godot 2D physics engine. When [code]true[/code], the PhysicalBone2D node is using physics. + </description> + </method> + </methods> + <members> + <member name="auto_configure_joint" type="bool" setter="set_auto_configure_joint" getter="get_auto_configure_joint" default="true"> + If [code]true[/code], the [code]PhysicalBone2D[/code] node will automatically configure the first [Joint2D] child node. The automatic configuration is limited to setting up the node properties and positioning the [Joint2D]. + </member> + <member name="bone2d_index" type="int" setter="set_bone2d_index" getter="get_bone2d_index" default="-1"> + The index of the [Bone2D] node that this [code]PhysicalBone2D[/code] node is supposed to be simulating. + </member> + <member name="bone2d_nodepath" type="NodePath" setter="set_bone2d_nodepath" getter="get_bone2d_nodepath" default="NodePath("")"> + The [NodePath] to the [Bone2D] node that this [code]PhysicalBone2D[/code] node is supposed to be simulating. + </member> + <member name="follow_bone_when_simulating" type="bool" setter="set_follow_bone_when_simulating" getter="get_follow_bone_when_simulating" default="false"> + If [code]true[/code], the [code]PhysicalBone2D[/code] will keep the transform of the bone it is bound to when simulating physics. + </member> + <member name="simulate_physics" type="bool" setter="set_simulate_physics" getter="get_simulate_physics" default="false"> + If [code]true[/code], the [code]PhysicalBone2D[/code] will start simulating using physics. If [code]false[/code], the [code]PhysicalBone2D[/code] will follow the transform of the [Bone2D] node. + [b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index dcf24c1d32..5d15590a3f 100644 --- a/doc/classes/PhysicalBone3D.xml +++ b/doc/classes/PhysicalBone3D.xml @@ -25,14 +25,6 @@ <description> </description> </method> - <method name="get_axis_lock" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> - </argument> - <description> - </description> - </method> <method name="get_bone_id" qualifiers="const"> <return type="int"> </return> @@ -51,47 +43,19 @@ <description> </description> </method> - <method name="set_axis_lock"> - <return type="void"> - </return> - <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> - </argument> - <argument index="1" name="lock" type="bool"> - </argument> - <description> - </description> - </method> </methods> <members> <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0"> Damps the body's rotation if greater than [code]0[/code]. </member> - <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's rotation in the X axis. - </member> - <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's rotation in the Y axis. - </member> - <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's rotation in the Z axis. - </member> - <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's movement in the X axis. - </member> - <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's movement in the Y axis. - </member> - <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's movement in the Z axis. - </member> - <member name="body_offset" type="Transform" setter="set_body_offset" getter="get_body_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="body_offset" type="Transform3D" setter="set_body_offset" getter="get_body_offset" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> Sets the body's transform. </member> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0"> The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> - If [code]true[/code], the body is deactivated when there is no movement, so it will not take part in the simulation until it is awaken by an external force. + If [code]true[/code], the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0"> The body's friction, from [code]0[/code] (frictionless) to [code]1[/code] (max friction). @@ -99,7 +63,7 @@ <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. </member> - <member name="joint_offset" type="Transform" setter="set_joint_offset" getter="get_joint_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="joint_offset" type="Transform3D" setter="set_joint_offset" getter="get_joint_offset" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> Sets the joint's transform. </member> <member name="joint_rotation" type="Vector3" setter="set_joint_rotation" getter="get_joint_rotation"> diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml index 2e0f9c52f2..381371b973 100644 --- a/doc/classes/PhysicalSkyMaterial.xml +++ b/doc/classes/PhysicalSkyMaterial.xml @@ -23,22 +23,22 @@ Modulates the [Color] on the bottom half of the sky to represent the ground. </member> <member name="mie_coefficient" type="float" setter="set_mie_coefficient" getter="get_mie_coefficient" default="0.005"> - Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whiteish color around the sun and horizon. + Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whitish color around the sun and horizon. </member> <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color( 0.36, 0.56, 0.82, 1 )"> Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien looking planets. </member> <member name="mie_eccentricity" type="float" setter="set_mie_eccentricity" getter="get_mie_eccentricity" default="0.8"> - Controls the direction of the mie scattering. A value of [code]1[/code] means that when light hits a particle it passing through straight forward. A value of [code]-1[/code] means that all light is scatter backwards. + Controls the direction of the mie scattering. A value of [code]1[/code] means that when light hits a particle it's passing through straight forward. A value of [code]-1[/code] means that all light is scatter backwards. </member> <member name="night_sky" type="Texture2D" setter="set_night_sky" getter="get_night_sky"> [Texture2D] for the night sky. This is added to the sky, so if it is bright enough, it may be visible during the day. </member> <member name="rayleigh_coefficient" type="float" setter="set_rayleigh_coefficient" getter="get_rayleigh_coefficient" default="2.0"> - Controls the strength of the rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. + Controls the strength of the Rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. </member> <member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color( 0.056, 0.14, 0.3, 1 )"> - Controls the [Color] of the rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red [Color] results in a mars looking atmosphere with a corresponding blue sunset. + Controls the [Color] of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red [Color] results in a Mars looking atmosphere with a corresponding blue sunset. </member> <member name="sun_disk_scale" type="float" setter="set_sun_disk_scale" getter="get_sun_disk_scale" default="1.0"> Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth. diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 9c3c47afba..654b0fb668 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -26,22 +26,23 @@ Returns an array of nodes that were added as collision exceptions for this body. </description> </method> - <method name="get_collision_layer_bit" qualifiers="const"> - <return type="bool"> + <method name="move_and_collide"> + <return type="KinematicCollision2D"> </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="rel_vec" type="Vector2"> </argument> - <description> - Returns an individual bit on the [member collision_layer]. - </description> - </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> + <argument index="1" name="infinite_inertia" type="bool" default="true"> + </argument> + <argument index="2" name="exclude_raycast_shapes" type="bool" default="true"> + </argument> + <argument index="3" name="test_only" type="bool" default="false"> + </argument> + <argument index="4" name="safe_margin" type="float" default="0.08"> </argument> <description> - Returns an individual bit on the [member collision_mask]. + Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision. + If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. + [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details). </description> </method> <method name="remove_collision_exception_with"> @@ -53,38 +54,29 @@ Removes a body from the list of bodies that this body can't collide with. </description> </method> - <method name="set_collision_layer_bit"> - <return type="void"> + <method name="test_move"> + <return type="bool"> </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="from" type="Transform2D"> </argument> - <argument index="1" name="value" type="bool"> + <argument index="1" name="rel_vec" type="Vector2"> </argument> - <description> - Sets individual bits on the [member collision_layer] bitmask. Use this if you only need to change one layer's value. - </description> - </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> + <argument index="2" name="infinite_inertia" type="bool" default="true"> + </argument> + <argument index="3" name="exclude_raycast_shapes" type="bool" default="true"> + </argument> + <argument index="4" name="collision" type="KinematicCollision2D" default="null"> </argument> - <argument index="1" name="value" type="bool"> + <argument index="5" name="safe_margin" type="float" default="0.08"> </argument> <description> - Sets individual bits on the [member collision_mask] bitmask. Use this if you only need to change one layer's value. + Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. + [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision (should there be one). + [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details). </description> </method> </methods> <members> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The physics layers this area is in. - Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the [member collision_mask] property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this area scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - </member> <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" override="true" default="false" /> </members> <constants> diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml index 7de65603f9..1ec38000be 100644 --- a/doc/classes/PhysicsBody3D.xml +++ b/doc/classes/PhysicsBody3D.xml @@ -19,29 +19,39 @@ Adds a body to the list of bodies that this body can't collide with. </description> </method> - <method name="get_collision_exceptions"> - <return type="PhysicsBody3D[]"> + <method name="get_axis_lock" qualifiers="const"> + <return type="bool"> </return> + <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> + </argument> <description> - Returns an array of nodes that were added as collision exceptions for this body. + Returns [code]true[/code] if the specified linear or rotational [code]axis[/code] is locked. </description> </method> - <method name="get_collision_layer_bit" qualifiers="const"> - <return type="bool"> + <method name="get_collision_exceptions"> + <return type="PhysicsBody3D[]"> </return> - <argument index="0" name="bit" type="int"> - </argument> <description> - Returns an individual bit on the [member collision_layer]. + Returns an array of nodes that were added as collision exceptions for this body. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> + <method name="move_and_collide"> + <return type="KinematicCollision3D"> </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="rel_vec" type="Vector3"> + </argument> + <argument index="1" name="infinite_inertia" type="bool" default="true"> + </argument> + <argument index="2" name="exclude_raycast_shapes" type="bool" default="true"> + </argument> + <argument index="3" name="test_only" type="bool" default="false"> + </argument> + <argument index="4" name="safe_margin" type="float" default="0.001"> </argument> <description> - Returns an individual bit on the [member collision_mask]. + Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision. + If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. + [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details). </description> </method> <method name="remove_collision_exception_with"> @@ -53,37 +63,57 @@ Removes a body from the list of bodies that this body can't collide with. </description> </method> - <method name="set_collision_layer_bit"> + <method name="set_axis_lock"> <return type="void"> </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> </argument> - <argument index="1" name="value" type="bool"> + <argument index="1" name="lock" type="bool"> </argument> <description> - Sets individual bits on the [member collision_layer] bitmask. Use this if you only need to change one layer's value. + Locks or unlocks the specified linear or rotational [code]axis[/code] depending on the value of [code]lock[/code]. </description> </method> - <method name="set_collision_mask_bit"> - <return type="void"> + <method name="test_move"> + <return type="bool"> </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="from" type="Transform3D"> + </argument> + <argument index="1" name="rel_vec" type="Vector3"> + </argument> + <argument index="2" name="infinite_inertia" type="bool" default="true"> </argument> - <argument index="1" name="value" type="bool"> + <argument index="3" name="exclude_raycast_shapes" type="bool" default="true"> + </argument> + <argument index="4" name="collision" type="KinematicCollision3D" default="null"> + </argument> + <argument index="5" name="safe_margin" type="float" default="0.001"> </argument> <description> - Sets individual bits on the [member collision_mask] bitmask. Use this if you only need to change one layer's value. + Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. + [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision (should there be one). + [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details). </description> </method> </methods> <members> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The physics layers this area is in. - Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the [member collision_mask] property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's rotation in the X axis. + </member> + <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's rotation in the Y axis. + </member> + <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's rotation in the Z axis. + </member> + <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's linear movement in the X axis. + </member> + <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's linear movement in the Y axis. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this area scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's linear movement in the Z axis. </member> </members> <constants> diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml index dfc0ab909a..66ff16a3ce 100644 --- a/doc/classes/PhysicsDirectBodyState2D.xml +++ b/doc/classes/PhysicsDirectBodyState2D.xml @@ -4,7 +4,7 @@ Direct access object to a physics body in the [PhysicsServer2D]. </brief_description> <description> - Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces]. + Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces]. </description> <tutorials> <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml index eea681e696..7cb3a56338 100644 --- a/doc/classes/PhysicsDirectBodyState3D.xml +++ b/doc/classes/PhysicsDirectBodyState3D.xml @@ -4,7 +4,7 @@ Direct access object to a physics body in the [PhysicsServer3D]. </brief_description> <description> - Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces]. + Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces]. </description> <tutorials> </tutorials> @@ -214,7 +214,7 @@ <member name="total_linear_damp" type="float" setter="" getter="get_total_linear_damp"> The rate at which the body stops moving, if there are not any other forces moving it. </member> - <member name="transform" type="Transform" setter="set_transform" getter="get_transform"> + <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform"> The body's transformation matrix. </member> </members> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 1fa82adb7a..4c2abcb087 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -58,7 +58,7 @@ <return type="RID"> </return> <description> - Creates an [Area2D]. + Creates an [Area2D]. After creating an [Area2D] with this method, assign it to a space using [method area_set_space] to use the created [Area2D] in the physics world. </description> </method> <method name="area_get_canvas_instance_id" qualifiers="const"> @@ -659,11 +659,9 @@ </return> <argument index="0" name="body" type="RID"> </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="method" type="StringName"> + <argument index="1" name="callable" type="Callable"> </argument> - <argument index="3" name="userdata" type="Variant" default="null"> + <argument index="2" name="userdata" type="Variant" default="null"> </argument> <description> Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). @@ -1020,6 +1018,15 @@ Activates or deactivates the 2D physics engine. </description> </method> + <method name="set_collision_iterations"> + <return type="void"> + </return> + <argument index="0" name="iterations" type="int"> + </argument> + <description> + Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount, the more accurate the collisions, but with a performance loss. + </description> + </method> <method name="shape_get_data" qualifiers="const"> <return type="Variant"> </return> @@ -1200,16 +1207,16 @@ This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. </constant> <constant name="BODY_MODE_STATIC" value="0" enum="BodyMode"> - Constant for static bodies. + Constant for static bodies. In this mode, a body can be only moved by user code. </constant> <constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode"> - Constant for kinematic bodies. + Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. </constant> - <constant name="BODY_MODE_RIGID" value="2" enum="BodyMode"> - Constant for rigid bodies. + <constant name="BODY_MODE_DYNAMIC" value="2" enum="BodyMode"> + Constant for dynamic bodies. In this mode, a body can be pushed by other bodies and has forces applied. </constant> - <constant name="BODY_MODE_CHARACTER" value="3" enum="BodyMode"> - Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. + <constant name="BODY_MODE_DYNAMIC_LOCKED" value="3" enum="BodyMode"> + Constant for locked dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces. </constant> <constant name="BODY_PARAM_BOUNCE" value="0" enum="BodyParameter"> Constant to set/get a body's bounce factor. diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 9a7926e937..2972d5155c 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -16,7 +16,7 @@ </argument> <argument index="1" name="shape" type="RID"> </argument> - <argument index="2" name="transform" type="Transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <argument index="2" name="transform" type="Transform3D" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </argument> <argument index="3" name="disabled" type="bool" default="false"> </argument> @@ -92,7 +92,7 @@ </description> </method> <method name="area_get_shape_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="area" type="RID"> </argument> @@ -121,7 +121,7 @@ </description> </method> <method name="area_get_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="area" type="RID"> </argument> @@ -258,7 +258,7 @@ </argument> <argument index="1" name="shape_idx" type="int"> </argument> - <argument index="2" name="transform" type="Transform"> + <argument index="2" name="transform" type="Transform3D"> </argument> <description> Sets the transform matrix for an area shape. @@ -291,7 +291,7 @@ </return> <argument index="0" name="area" type="RID"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> Sets the transform matrix for an area. @@ -337,7 +337,7 @@ </argument> <argument index="1" name="shape" type="RID"> </argument> - <argument index="2" name="transform" type="Transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <argument index="2" name="transform" type="Transform3D" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </argument> <argument index="3" name="disabled" type="bool" default="false"> </argument> @@ -443,14 +443,6 @@ Returns the [PhysicsDirectBodyState3D] of the body. </description> </method> - <method name="body_get_kinematic_safe_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <description> - </description> - </method> <method name="body_get_max_contacts_reported" qualifiers="const"> <return type="int"> </return> @@ -510,7 +502,7 @@ </description> </method> <method name="body_get_shape_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="body" type="RID"> </argument> @@ -653,26 +645,14 @@ </return> <argument index="0" name="body" type="RID"> </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="method" type="StringName"> + <argument index="1" name="callable" type="Callable"> </argument> - <argument index="3" name="userdata" type="Variant" default="null"> + <argument index="2" name="userdata" type="Variant" default="null"> </argument> <description> Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). </description> </method> - <method name="body_set_kinematic_safe_margin"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="margin" type="float"> - </argument> - <description> - </description> - </method> <method name="body_set_max_contacts_reported"> <return type="void"> </return> @@ -762,7 +742,7 @@ </argument> <argument index="1" name="shape_idx" type="int"> </argument> - <argument index="2" name="transform" type="Transform"> + <argument index="2" name="transform" type="Transform3D"> </argument> <description> Sets the transform matrix for a body shape. @@ -1019,11 +999,11 @@ </argument> <argument index="1" name="body_A" type="RID"> </argument> - <argument index="2" name="local_ref_A" type="Transform"> + <argument index="2" name="local_ref_A" type="Transform3D"> </argument> <argument index="3" name="body_B" type="RID"> </argument> - <argument index="4" name="local_ref_B" type="Transform"> + <argument index="4" name="local_ref_B" type="Transform3D"> </argument> <description> </description> @@ -1035,11 +1015,11 @@ </argument> <argument index="1" name="body_A" type="RID"> </argument> - <argument index="2" name="local_ref_A" type="Transform"> + <argument index="2" name="local_ref_A" type="Transform3D"> </argument> <argument index="3" name="body_B" type="RID"> </argument> - <argument index="4" name="local_ref_B" type="Transform"> + <argument index="4" name="local_ref_B" type="Transform3D"> </argument> <description> </description> @@ -1051,11 +1031,11 @@ </argument> <argument index="1" name="body_A" type="RID"> </argument> - <argument index="2" name="hinge_A" type="Transform"> + <argument index="2" name="hinge_A" type="Transform3D"> </argument> <argument index="3" name="body_B" type="RID"> </argument> - <argument index="4" name="hinge_B" type="Transform"> + <argument index="4" name="hinge_B" type="Transform3D"> </argument> <description> </description> @@ -1083,11 +1063,11 @@ </argument> <argument index="1" name="body_A" type="RID"> </argument> - <argument index="2" name="local_ref_A" type="Transform"> + <argument index="2" name="local_ref_A" type="Transform3D"> </argument> <argument index="3" name="body_B" type="RID"> </argument> - <argument index="4" name="local_ref_B" type="Transform"> + <argument index="4" name="local_ref_B" type="Transform3D"> </argument> <description> </description> @@ -1241,6 +1221,14 @@ Gets a slider_joint parameter (see [enum SliderJointParam] constants). </description> </method> + <method name="soft_body_get_bounds" qualifiers="const"> + <return type="AABB"> + </return> + <argument index="0" name="body" type="RID"> + </argument> + <description> + </description> + </method> <method name="space_create"> <return type="RID"> </return> @@ -1543,7 +1531,10 @@ <constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType"> The [Shape3D] is a [HeightMapShape3D]. </constant> - <constant name="SHAPE_CUSTOM" value="9" enum="ShapeType"> + <constant name="SHAPE_SOFT_BODY" value="9" enum="ShapeType"> + The [Shape3D] is a [SoftBody3D]. + </constant> + <constant name="SHAPE_CUSTOM" value="10" enum="ShapeType"> This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. </constant> <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter"> @@ -1586,16 +1577,16 @@ This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. </constant> <constant name="BODY_MODE_STATIC" value="0" enum="BodyMode"> - Constant for static bodies. + Constant for static bodies. In this mode, a body can be only moved by user code. </constant> <constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode"> - Constant for kinematic bodies. + Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. </constant> - <constant name="BODY_MODE_RIGID" value="2" enum="BodyMode"> - Constant for rigid bodies. + <constant name="BODY_MODE_DYNAMIC" value="2" enum="BodyMode"> + Constant for dynamic bodies. In this mode, a body can be pushed by other bodies and has forces applied. </constant> - <constant name="BODY_MODE_CHARACTER" value="3" enum="BodyMode"> - Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. + <constant name="BODY_MODE_DYNAMIC_LOCKED" value="3" enum="BodyMode"> + Constant for locked dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces. </constant> <constant name="BODY_PARAM_BOUNCE" value="0" enum="BodyParameter"> Constant to set/get a body's bounce factor. diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml index 4b43ea66fc..79bc29057f 100644 --- a/doc/classes/PhysicsShapeQueryParameters3D.xml +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -60,7 +60,7 @@ [/csharp] [/codeblocks] </member> - <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> The queried shape's transform matrix. </member> </members> diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml index 42155a7f25..ed45149cdf 100644 --- a/doc/classes/PinJoint2D.xml +++ b/doc/classes/PinJoint2D.xml @@ -4,7 +4,7 @@ Pin joint for 2D shapes. </brief_description> <description> - Pin joint for 2D rigid bodies. It pins two bodies (rigid or static) together. + Pin joint for 2D rigid bodies. It pins two bodies (dynamic or static) together. </description> <tutorials> </tutorials> diff --git a/doc/classes/PinJoint3D.xml b/doc/classes/PinJoint3D.xml index 267ea38873..37a85e497f 100644 --- a/doc/classes/PinJoint3D.xml +++ b/doc/classes/PinJoint3D.xml @@ -4,7 +4,7 @@ Pin joint for 3D PhysicsBodies. </brief_description> <description> - Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. See also [Generic6DOFJoint3D]. + Pin joint for 3D rigid bodies. It pins 2 bodies (dynamic or static) together. See also [Generic6DOFJoint3D]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index ed96f753c2..2342f00631 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -76,14 +76,14 @@ Creates a plane from the three points, given in clockwise order. </description> </method> - <method name="center"> + <method name="center" qualifiers="const"> <return type="Vector3"> </return> <description> Returns the center of the plane. </description> </method> - <method name="distance_to"> + <method name="distance_to" qualifiers="const"> <return type="float"> </return> <argument index="0" name="point" type="Vector3"> @@ -92,7 +92,7 @@ Returns the shortest distance from the plane to the position [code]point[/code]. </description> </method> - <method name="has_point"> + <method name="has_point" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="point" type="Vector3"> @@ -103,7 +103,7 @@ Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]epsilon[/code] threshold. </description> </method> - <method name="intersect_3"> + <method name="intersect_3" qualifiers="const"> <return type="Variant"> </return> <argument index="0" name="b" type="Plane"> @@ -114,7 +114,7 @@ Returns the intersection point of the three planes [code]b[/code], [code]c[/code] and this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> - <method name="intersects_ray"> + <method name="intersects_ray" qualifiers="const"> <return type="Variant"> </return> <argument index="0" name="from" type="Vector3"> @@ -125,7 +125,7 @@ Returns the intersection point of a ray consisting of the position [code]from[/code] and the direction normal [code]dir[/code] with this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> - <method name="intersects_segment"> + <method name="intersects_segment" qualifiers="const"> <return type="Variant"> </return> <argument index="0" name="from" type="Vector3"> @@ -136,7 +136,7 @@ Returns the intersection point of a segment from position [code]begin[/code] to position [code]end[/code] with this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="to_plane" type="Plane"> @@ -145,7 +145,7 @@ Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> - <method name="is_point_over"> + <method name="is_point_over" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="plane" type="Vector3"> @@ -154,7 +154,7 @@ Returns [code]true[/code] if [code]point[/code] is located above the plane. </description> </method> - <method name="normalized"> + <method name="normalized" qualifiers="const"> <return type="Plane"> </return> <description> @@ -189,7 +189,7 @@ <description> </description> </method> - <method name="project"> + <method name="project" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="point" type="Vector3"> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 51ec509a14..418785222e 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -565,7 +565,7 @@ <argument index="1" name="state" type="int"> </argument> <description> - Sets the state of an multistate item. See [method add_multistate_item] for details. + Sets the state of a multistate item. See [method add_multistate_item] for details. </description> </method> <method name="set_item_opentype_feature"> @@ -664,13 +664,13 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Cycle to the next state of an multistate item. See [method add_multistate_item] for details. + Cycle to the next state of a multistate item. See [method add_multistate_item] for details. </description> </method> </methods> <members> <member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="true"> - If [code]true[/code], allows to navigate [PopupMenu] with letter keys. + If [code]true[/code], allows navigating [PopupMenu] with letter keys. </member> <member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection" default="true"> If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button is selected. diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index 25943f6d47..3892633654 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -31,7 +31,7 @@ </methods> <members> <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )"> - 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. + Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. </member> <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false"> If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index a1e5e60b4a..efd4793b4c 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -6,7 +6,8 @@ <description> Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog. - [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. + [b]Feature tags:[/b] Project settings can be overridden for specific platforms and configurations (debug, release, ...) using [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url]. + [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations. </description> <tutorials> <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> @@ -169,6 +170,7 @@ </return> <description> Saves the configuration to the [code]project.godot[/code] file. + [b]Note:[/b] This method is intended to be used by editor plugins, as modified [ProjectSettings] can't be loaded back in the running app. If you want to change project settings in exported projects, use [method save_custom] to save [code]override.cfg[/code] file. </description> </method> <method name="save_custom"> @@ -177,7 +179,7 @@ <argument index="0" name="file" type="String"> </argument> <description> - Saves the configuration to a custom file. The file extension must be [code].godot[/code] (to save in text-based [ConfigFile] format) or [code].binary[/code] (to save in binary format). + Saves the configuration to a custom file. The file extension must be [code].godot[/code] (to save in text-based [ConfigFile] format) or [code].binary[/code] (to save in binary format). You can also save [code]override.cfg[/code] file, which is also text, but can be used in exported projects unlike other formats. </description> </method> <method name="set_initial_value"> @@ -254,8 +256,8 @@ [b]Note:[/b] Changing this value will also change the user data folder's path if [member application/config/use_custom_user_dir] is [code]false[/code]. After renaming the project, you will no longer be able to access existing data in [code]user://[/code] unless you rename the old folder to match the new project name. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] in the documentation for more information. </member> <member name="application/config/project_settings_override" type="String" setter="" getter="" default=""""> - Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. - [b]Note:[/b] Regardless of this setting's value, [code]res://override.cfg[/code] will still be read to override the project settings (see this class' description at the top). + Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. See "Overriding" in the [ProjectSettings] class description at the top for more information. + [b]Note:[/b] Regardless of this setting's value, [code]res://override.cfg[/code] will still be read to override the project settings. </member> <member name="application/config/use_custom_user_dir" type="bool" setter="" getter="" default="false"> If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code]. @@ -442,7 +444,7 @@ <member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0"> Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging. If [member display/window/vsync/use_vsync] is enabled, it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. - This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non real-time rendering of static frames, or test the project under lag conditions. + This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non-real-time rendering of static frames, or test the project under lag conditions. </member> <member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024"> Maximum call stack allowed for debugging GDScript. @@ -468,7 +470,7 @@ <member name="debug/shapes/collision/max_contacts_displayed" type="int" setter="" getter="" default="10000"> Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu. </member> - <member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color( 0, 0.6, 0.7, 0.5 )"> + <member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color( 0, 0.6, 0.7, 0.42 )"> Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. </member> <member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color( 1, 0.7, 0.1, 0.4 )"> @@ -487,13 +489,14 @@ Position offset for tooltips, relative to the mouse cursor's hotspot. </member> <member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="false"> - If [code]true[/code], allows HiDPI display on Windows and macOS. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there. + If [code]true[/code], allows HiDPI display on Windows, macOS, and the HTML5 platform. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there. </member> <member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true"> If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms. </member> - <member name="display/window/handheld/orientation" type="String" setter="" getter="" default=""landscape""> - Default orientation on mobile devices. + <member name="display/window/handheld/orientation" type="int" setter="" getter="" default="0"> + The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values. + [b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/width] and [member display/window/size/height] accordingly. </member> <member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true"> If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button. @@ -540,7 +543,15 @@ <member name="editor/node_naming/name_num_separator" type="int" setter="" getter="" default="0"> What to use to separate node name from number. This is mostly an editor setting. </member> - <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( "gd", "shader" )"> + <member name="editor/run/main_run_args" type="String" setter="" getter="" default=""""> + The command-line arguments to append to Godot's own command line when running the project. This doesn't affect the editor itself. + It is possible to make another executable run Godot by using the [code]%command%[/code] placeholder. The placeholder will be replaced with Godot's own command line. Program-specific arguments should be placed [i]before[/i] the placeholder, whereas Godot-specific arguments should be placed [i]after[/i] the placeholder. + For example, this can be used to force the project to run on the dedicated GPU in a NVIDIA Optimus system on Linux: + [codeblock] + prime-run %command% + [/codeblock] + </member> + <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( "gd", "gdshader" )"> Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. </member> <member name="editor/script/templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> @@ -692,6 +703,8 @@ </member> <member name="input/ui_text_completion_query" type="Dictionary" setter="" getter=""> </member> + <member name="input/ui_text_completion_replace" type="Dictionary" setter="" getter=""> + </member> <member name="input/ui_text_dedent" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_delete" type="Dictionary" setter="" getter=""> @@ -722,6 +735,10 @@ </member> <member name="input/ui_text_select_all" type="Dictionary" setter="" getter=""> </member> + <member name="input/ui_text_select_word_under_caret" type="Dictionary" setter="" getter=""> + If no selection is currently active, selects the word currently under the caret in text fields. If a selection is currently active, deselects the current selection. + [b]Note:[/b] Currently, this is only implemented in [TextEdit], not [LineEdit]. + </member> <member name="input/ui_text_toggle_insert_mode" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_undo" type="Dictionary" setter="" getter=""> @@ -733,7 +750,7 @@ <member name="input_devices/pen_tablet/driver" type="String" setter="" getter=""> Specifies the tablet driver to use. If left empty, the default driver will be used. </member> - <member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter=""> + <member name="input_devices/pen_tablet/driver.Windows" type="String" setter="" getter=""> Override for [member input_devices/pen_tablet/driver] on Windows. </member> <member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true"> @@ -748,6 +765,11 @@ <member name="internationalization/locale/fallback" type="String" setter="" getter="" default=""en""> The locale to fall back to if a translation isn't available in a given language. If left empty, [code]en[/code] (English) will be used. </member> + <member name="internationalization/locale/include_text_server_data" type="bool" setter="" getter="" default="false"> + If [code]true[/code], text server break iteration rule sets, dictionaries and other optional data are included in the exported project. + [b]Note:[/b] "ICU / HarfBuzz / Graphite" text server data includes dictionaries for Burmese, Chinese, Japanese, Khmer, Lao and Thai as well as Unicode Standard Annex #29 and Unicode Standard Annex #14 word and line breaking rules. Data is about 4 MB large. + [b]Note:[/b] "Fallback" text server does not use additional data. + </member> <member name="internationalization/locale/test" type="String" setter="" getter="" default=""""> If non-empty, this locale will be used when running the project from the editor. </member> @@ -757,6 +779,66 @@ <member name="internationalization/rendering/text_driver" type="String" setter="" getter="" default=""""> Specifies the [TextServer] to use. If left empty, the default will be used. </member> + <member name="layer_names/2d_navigation/layer_0" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 0. If left empty, the layer will display as "Layer 0". + </member> + <member name="layer_names/2d_navigation/layer_1" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1". + </member> + <member name="layer_names/2d_navigation/layer_10" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 10. If left empty, the layer will display as "Layer 10". + </member> + <member name="layer_names/2d_navigation/layer_11" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 11. If left empty, the layer will display as "Layer 11". + </member> + <member name="layer_names/2d_navigation/layer_12" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 12. If left empty, the layer will display as "Layer 12". + </member> + <member name="layer_names/2d_navigation/layer_13" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 13. If left empty, the layer will display as "Layer 13". + </member> + <member name="layer_names/2d_navigation/layer_14" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 14. If left empty, the layer will display as "Layer 14". + </member> + <member name="layer_names/2d_navigation/layer_15" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 15. If left empty, the layer will display as "Layer 15". + </member> + <member name="layer_names/2d_navigation/layer_16" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 16. If left empty, the layer will display as "Layer 16". + </member> + <member name="layer_names/2d_navigation/layer_17" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 17. If left empty, the layer will display as "Layer 17". + </member> + <member name="layer_names/2d_navigation/layer_18" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 18. If left empty, the layer will display as "Layer 18". + </member> + <member name="layer_names/2d_navigation/layer_19" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 19. If left empty, the layer will display as "Layer 19". + </member> + <member name="layer_names/2d_navigation/layer_2" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 2. If left empty, the layer will display as "Layer 2". + </member> + <member name="layer_names/2d_navigation/layer_3" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 3. If left empty, the layer will display as "Layer 3". + </member> + <member name="layer_names/2d_navigation/layer_4" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 4. If left empty, the layer will display as "Layer 4". + </member> + <member name="layer_names/2d_navigation/layer_5" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 5. If left empty, the layer will display as "Layer 5". + </member> + <member name="layer_names/2d_navigation/layer_6" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 6. If left empty, the layer will display as "Layer 6". + </member> + <member name="layer_names/2d_navigation/layer_7" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 7. If left empty, the layer will display as "Layer 7". + </member> + <member name="layer_names/2d_navigation/layer_8" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 8. If left empty, the layer will display as "Layer 8". + </member> + <member name="layer_names/2d_navigation/layer_9" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 9. If left empty, the layer will display as "Layer 9". + </member> <member name="layer_names/2d_physics/layer_0" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 0. If left empty, the layer will display as "Layer 0". </member> @@ -877,6 +959,66 @@ <member name="layer_names/2d_render/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 2D render layer 9. If left empty, the layer will display as "Layer 9". </member> + <member name="layer_names/3d_navigation/layer_0" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 0. If left empty, the layer will display as "Layer 0". + </member> + <member name="layer_names/3d_navigation/layer_1" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 1. If left empty, the layer will display as "Layer 1". + </member> + <member name="layer_names/3d_navigation/layer_10" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 10. If left empty, the layer will display as "Layer 10". + </member> + <member name="layer_names/3d_navigation/layer_11" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 11. If left empty, the layer will display as "Layer 11". + </member> + <member name="layer_names/3d_navigation/layer_12" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 12. If left empty, the layer will display as "Layer 12". + </member> + <member name="layer_names/3d_navigation/layer_13" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 13. If left empty, the layer will display as "Layer 13". + </member> + <member name="layer_names/3d_navigation/layer_14" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 14. If left empty, the layer will display as "Layer 14". + </member> + <member name="layer_names/3d_navigation/layer_15" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 15. If left empty, the layer will display as "Layer 15". + </member> + <member name="layer_names/3d_navigation/layer_16" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 16. If left empty, the layer will display as "Layer 16". + </member> + <member name="layer_names/3d_navigation/layer_17" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 17. If left empty, the layer will display as "Layer 17". + </member> + <member name="layer_names/3d_navigation/layer_18" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 18. If left empty, the layer will display as "Layer 18". + </member> + <member name="layer_names/3d_navigation/layer_19" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 19. If left empty, the layer will display as "Layer 19". + </member> + <member name="layer_names/3d_navigation/layer_2" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 2. If left empty, the layer will display as "Layer 2". + </member> + <member name="layer_names/3d_navigation/layer_3" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 3. If left empty, the layer will display as "Layer 3". + </member> + <member name="layer_names/3d_navigation/layer_4" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 4. If left empty, the layer will display as "Layer 4". + </member> + <member name="layer_names/3d_navigation/layer_5" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 5. If left empty, the layer will display as "Layer 5". + </member> + <member name="layer_names/3d_navigation/layer_6" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 6. If left empty, the layer will display as "Layer 6". + </member> + <member name="layer_names/3d_navigation/layer_7" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 7. If left empty, the layer will display as "Layer 7". + </member> + <member name="layer_names/3d_navigation/layer_8" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 8. If left empty, the layer will display as "Layer 8". + </member> + <member name="layer_names/3d_navigation/layer_9" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 9. If left empty, the layer will display as "Layer 9". + </member> <member name="layer_names/3d_physics/layer_0" type="String" setter="" getter="" default=""""> Optional name for the 3D physics layer 0. If left empty, the layer will display as "Layer 0". </member> @@ -997,8 +1139,6 @@ <member name="layer_names/3d_render/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 3D render layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="memory/limits/command_queue/multithreading_queue_size_kb" type="int" setter="" getter="" default="256"> - </member> <member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter="" default="4096"> Godot uses a message queue to defer some function calls. If you run out of space on it (you will see an error), you can increase the size here. </member> @@ -1019,6 +1159,18 @@ </member> <member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0"> </member> + <member name="navigation/2d/default_cell_size" type="int" setter="" getter="" default="10"> + Default cell size for 2D navigation maps. See [method NavigationServer2D.map_set_cell_size]. + </member> + <member name="navigation/2d/default_edge_connection_margin" type="int" setter="" getter="" default="5"> + Default edge connection margin for 2D navigation maps. See [method NavigationServer2D.map_set_edge_connection_margin]. + </member> + <member name="navigation/3d/default_cell_size" type="float" setter="" getter="" default="0.3"> + Default cell size for 3D navigation maps. See [method NavigationServer3D.map_set_cell_size]. + </member> + <member name="navigation/3d/default_edge_connection_margin" type="float" setter="" getter="" default="0.3"> + Default edge connection margin for 3D navigation maps. See [method NavigationServer3D.map_set_edge_connection_margin]. + </member> <member name="network/limits/debugger/max_chars_per_second" type="int" setter="" getter="" default="32768"> Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> @@ -1050,27 +1202,21 @@ The CA certificates bundle to use for SSL connections. If this is set to a non-empty value, this will [i]override[/i] Godot's default [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]Mozilla certificate bundle[/url]. If left empty, the default certificate bundle will be used. If in doubt, leave this setting empty. </member> - <member name="physics/2d/bp_hash_table_size" type="int" setter="" getter="" default="4096"> - Size of the hash table used for the broad-phase 2D hash grid algorithm. - </member> - <member name="physics/2d/cell_size" type="int" setter="" getter="" default="128"> - Cell size used for the broad-phase 2D hash grid algorithm (in pixels). - </member> <member name="physics/2d/default_angular_damp" type="float" setter="" getter="" default="1.0"> The default angular damp in 2D. [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> - <member name="physics/2d/default_gravity" type="int" setter="" getter="" default="98"> - The default gravity strength in 2D. + <member name="physics/2d/default_gravity" type="float" setter="" getter="" default="980.0"> + The default gravity strength in 2D (in pixels per second squared). [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample: [codeblocks] [gdscript] - # Set the default gravity strength to 98. - PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY, 98) + # Set the default gravity strength to 980. + PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY, 980) [/gdscript] [csharp] - // Set the default gravity strength to 98. - PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.Gravity, 98); + // Set the default gravity strength to 980. + PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.Gravity, 980); [/csharp] [/codeblocks] </member> @@ -1092,9 +1238,6 @@ The default linear damp in 2D. [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> - <member name="physics/2d/large_object_surface_threshold_in_cells" type="int" setter="" getter="" default="512"> - Threshold defining the surface size that constitutes a large object with regard to cells in the broad-phase 2D hash grid algorithm. - </member> <member name="physics/2d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> Sets which physics engine to use for 2D physics. "DEFAULT" and "GodotPhysics2D" are the same, as there is currently no alternative 2D physics server implemented. @@ -1116,7 +1259,7 @@ [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/3d/default_gravity" type="float" setter="" getter="" default="9.8"> - The default gravity strength in 3D. + The default gravity strength in 3D (in meters per second squared). [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample: [codeblocks] [gdscript] @@ -1217,10 +1360,6 @@ [b]FIXME:[/b] No longer valid after DisplayServer split: In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time. </member> - <member name="rendering/driver/rd_renderer/use_low_end_renderer" type="bool" setter="" getter="" default="false"> - </member> - <member name="rendering/driver/rd_renderer/use_low_end_renderer.mobile" type="bool" setter="" getter="" default="true"> - </member> <member name="rendering/driver/threads/thread_model" type="int" setter="" getter="" default="1"> Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter. </member> @@ -1280,18 +1419,16 @@ </member> <member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false"> </member> - <member name="rendering/global_illumination/gi_probes/anisotropic" type="bool" setter="" getter="" default="false"> - If [code]true[/code], take additional samples when rendering objects affected by a [GIProbe] to reduce artifacts from only sampling in one direction. - </member> - <member name="rendering/global_illumination/gi_probes/quality" type="int" setter="" getter="" default="1"> - Sets the number of cone samples taken when rendering objects affected by [GIProbe]s. - </member> <member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="4"> </member> <member name="rendering/global_illumination/sdfgi/frames_to_update_lights" type="int" setter="" getter="" default="2"> </member> <member name="rendering/global_illumination/sdfgi/probe_ray_count" type="int" setter="" getter="" default="1"> </member> + <member name="rendering/global_illumination/voxel_gi/anisotropic" type="bool" setter="" getter="" default="false"> + </member> + <member name="rendering/global_illumination/voxel_gi/quality" type="int" setter="" getter="" default="1"> + </member> <member name="rendering/lightmapping/bake_performance/max_rays_per_pass" type="int" setter="" getter="" default="32"> </member> <member name="rendering/lightmapping/bake_performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64"> @@ -1330,6 +1467,12 @@ </member> <member name="rendering/mesh_lod/lod_change/threshold_pixels" type="float" setter="" getter="" default="1.0"> </member> + <member name="rendering/occlusion_culling/bvh_build_quality" type="int" setter="" getter="" default="2"> + </member> + <member name="rendering/occlusion_culling/occlusion_rays_per_thread" type="int" setter="" getter="" default="512"> + </member> + <member name="rendering/occlusion_culling/use_occlusion_culling" type="bool" setter="" getter="" default="false"> + </member> <member name="rendering/reflections/reflection_atlas/reflection_count" type="int" setter="" getter="" default="64"> Number of cubemaps to store in the reflection atlas. The number of [ReflectionProbe]s in a scene will be limited by this amount. A higher number requires more VRAM. </member> @@ -1357,6 +1500,16 @@ <member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false"> Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support. </member> + <member name="rendering/shader_compiler/shader_cache/compress" type="bool" setter="" getter="" default="true"> + </member> + <member name="rendering/shader_compiler/shader_cache/enabled" type="bool" setter="" getter="" default="true"> + </member> + <member name="rendering/shader_compiler/shader_cache/strip_debug" type="bool" setter="" getter="" default="false"> + </member> + <member name="rendering/shader_compiler/shader_cache/strip_debug.release" type="bool" setter="" getter="" default="true"> + </member> + <member name="rendering/shader_compiler/shader_cache/use_zstd_compression" type="bool" setter="" getter="" default="true"> + </member> <member name="rendering/shading/overrides/force_blinn_over_ggx" type="bool" setter="" getter="" default="false"> If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model. </member> @@ -1438,6 +1591,10 @@ </member> <member name="rendering/vulkan/descriptor_pools/max_descriptors_per_pool" type="int" setter="" getter="" default="64"> </member> + <member name="rendering/vulkan/rendering/back_end" type="int" setter="" getter="" default="0"> + </member> + <member name="rendering/vulkan/rendering/back_end.mobile" type="int" setter="" getter="" default="1"> + </member> <member name="rendering/vulkan/staging_buffer/block_size_kb" type="int" setter="" getter="" default="256"> </member> <member name="rendering/vulkan/staging_buffer/max_size_mb" type="int" setter="" getter="" default="128"> diff --git a/doc/classes/Quat.xml b/doc/classes/Quaternion.xml index ef83ae7fb9..678fb0d44d 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quaternion.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Quat" version="4.0"> +<class name="Quaternion" version="4.0"> <brief_description> Quaternion. </brief_description> <description> A unit quaternion used for representing 3D rotations. Quaternions need to be normalized to be used for rotation. - It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quat only stores rotation. + It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quaternion only stores rotation. Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. </description> <tutorials> @@ -13,24 +13,24 @@ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> - <method name="Quat" qualifiers="constructor"> - <return type="Quat"> + <method name="Quaternion" qualifiers="constructor"> + <return type="Quaternion"> </return> <description> Constructs a default-initialized quaternion with all components set to [code]0[/code]. </description> </method> - <method name="Quat" qualifiers="constructor"> - <return type="Quat"> + <method name="Quaternion" qualifiers="constructor"> + <return type="Quaternion"> </return> - <argument index="0" name="from" type="Quat"> + <argument index="0" name="from" type="Quaternion"> </argument> <description> - Constructs a [Quat] as a copy of the given [Quat]. + Constructs a [Quaternion] as a copy of the given [Quaternion]. </description> </method> - <method name="Quat" qualifiers="constructor"> - <return type="Quat"> + <method name="Quaternion" qualifiers="constructor"> + <return type="Quaternion"> </return> <argument index="0" name="arc_from" type="Vector3"> </argument> @@ -39,8 +39,8 @@ <description> </description> </method> - <method name="Quat" qualifiers="constructor"> - <return type="Quat"> + <method name="Quaternion" qualifiers="constructor"> + <return type="Quaternion"> </return> <argument index="0" name="axis" type="Vector3"> </argument> @@ -50,8 +50,8 @@ Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. </description> </method> - <method name="Quat" qualifiers="constructor"> - <return type="Quat"> + <method name="Quaternion" qualifiers="constructor"> + <return type="Quaternion"> </return> <argument index="0" name="euler" type="Vector3"> </argument> @@ -59,8 +59,8 @@ Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). </description> </method> - <method name="Quat" qualifiers="constructor"> - <return type="Quat"> + <method name="Quaternion" qualifiers="constructor"> + <return type="Quaternion"> </return> <argument index="0" name="from" type="Basis"> </argument> @@ -68,8 +68,8 @@ Constructs a quaternion from the given [Basis]. </description> </method> - <method name="Quat" qualifiers="constructor"> - <return type="Quat"> + <method name="Quaternion" qualifiers="constructor"> + <return type="Quaternion"> </return> <argument index="0" name="x" type="float"> </argument> @@ -83,14 +83,14 @@ Constructs a quaternion defined by the given values. </description> </method> - <method name="cubic_slerp"> - <return type="Quat"> + <method name="cubic_slerp" qualifiers="const"> + <return type="Quaternion"> </return> - <argument index="0" name="b" type="Quat"> + <argument index="0" name="b" type="Quaternion"> </argument> - <argument index="1" name="pre_a" type="Quat"> + <argument index="1" name="pre_a" type="Quaternion"> </argument> - <argument index="2" name="post_b" type="Quat"> + <argument index="2" name="post_b" type="Quaternion"> </argument> <argument index="3" name="weight" type="float"> </argument> @@ -98,61 +98,61 @@ Performs a cubic spherical interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code]. </description> </method> - <method name="dot"> + <method name="dot" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="with" type="Quat"> + <argument index="0" name="with" type="Quaternion"> </argument> <description> Returns the dot product of two quaternions. </description> </method> - <method name="get_euler"> + <method name="get_euler" qualifiers="const"> <return type="Vector3"> </return> <description> Returns Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). </description> </method> - <method name="inverse"> - <return type="Quat"> + <method name="inverse" qualifiers="const"> + <return type="Quaternion"> </return> <description> Returns the inverse of the quaternion. </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="to" type="Quat"> + <argument index="0" name="to" type="Quaternion"> </argument> <description> - Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. + Returns [code]true[/code] if this quaternion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> - <method name="is_normalized"> + <method name="is_normalized" qualifiers="const"> <return type="bool"> </return> <description> Returns whether the quaternion is normalized or not. </description> </method> - <method name="length"> + <method name="length" qualifiers="const"> <return type="float"> </return> <description> Returns the length of the quaternion. </description> </method> - <method name="length_squared"> + <method name="length_squared" qualifiers="const"> <return type="float"> </return> <description> Returns the length of the quaternion, squared. </description> </method> - <method name="normalized"> - <return type="Quat"> + <method name="normalized" qualifiers="const"> + <return type="Quaternion"> </return> <description> Returns a copy of the quaternion, normalized to unit length. @@ -161,15 +161,15 @@ <method name="operator !=" qualifiers="operator"> <return type="bool"> </return> - <argument index="0" name="right" type="Quat"> + <argument index="0" name="right" type="Quaternion"> </argument> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> - <argument index="0" name="right" type="Quat"> + <argument index="0" name="right" type="Quaternion"> </argument> <description> </description> @@ -183,7 +183,7 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> <argument index="0" name="right" type="float"> </argument> @@ -191,7 +191,7 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> <argument index="0" name="right" type="int"> </argument> @@ -199,35 +199,35 @@ </description> </method> <method name="operator +" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> - <argument index="0" name="right" type="Quat"> + <argument index="0" name="right" type="Quaternion"> </argument> <description> </description> </method> <method name="operator -" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> <description> </description> </method> <method name="operator -" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> - <argument index="0" name="right" type="Quat"> + <argument index="0" name="right" type="Quaternion"> </argument> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> <argument index="0" name="right" type="float"> </argument> @@ -235,7 +235,7 @@ </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> <argument index="0" name="right" type="int"> </argument> @@ -245,7 +245,7 @@ <method name="operator ==" qualifiers="operator"> <return type="bool"> </return> - <argument index="0" name="right" type="Quat"> + <argument index="0" name="right" type="Quaternion"> </argument> <description> </description> @@ -258,10 +258,10 @@ <description> </description> </method> - <method name="slerp"> - <return type="Quat"> + <method name="slerp" qualifiers="const"> + <return type="Quaternion"> </return> - <argument index="0" name="to" type="Quat"> + <argument index="0" name="to" type="Quaternion"> </argument> <argument index="1" name="weight" type="float"> </argument> @@ -270,10 +270,10 @@ [b]Note:[/b] Both quaternions must be normalized. </description> </method> - <method name="slerpni"> - <return type="Quat"> + <method name="slerpni" qualifiers="const"> + <return type="Quaternion"> </return> - <argument index="0" name="to" type="Quat"> + <argument index="0" name="to" type="Quaternion"> </argument> <argument index="1" name="weight" type="float"> </argument> @@ -301,7 +301,7 @@ </member> </members> <constants> - <constant name="IDENTITY" value="Quat( 0, 0, 0, 1 )"> + <constant name="IDENTITY" value="Quaternion( 0, 0, 0, 1 )"> The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change. </constant> </constants> diff --git a/doc/classes/RDShaderFile.xml b/doc/classes/RDShaderFile.xml index 14e70d53ea..346a97a1c0 100644 --- a/doc/classes/RDShaderFile.xml +++ b/doc/classes/RDShaderFile.xml @@ -10,7 +10,7 @@ <method name="get_bytecode" qualifiers="const"> <return type="RDShaderBytecode"> </return> - <argument index="0" name="version" type="StringName" default="@"""> + <argument index="0" name="version" type="StringName" default="&"""> </argument> <description> </description> @@ -26,7 +26,7 @@ </return> <argument index="0" name="bytecode" type="RDShaderBytecode"> </argument> - <argument index="1" name="version" type="StringName" default="@"""> + <argument index="1" name="version" type="StringName" default="&"""> </argument> <description> </description> diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index 0ee34d4194..e686a4b8fd 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -25,7 +25,7 @@ Constructs a [RID] as a copy of the given [RID]. </description> </method> - <method name="get_id"> + <method name="get_id" qualifiers="const"> <return type="int"> </return> <description> diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 681cfcd4ce..443890438f 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -136,11 +136,11 @@ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> - <member name="debug_shape_custom_color" type="Color" setter="set_debug_shape__custom_color" getter="get_debug_shape_custom_color" default="Color( 0.0, 0.0, 0.0 )"> + <member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color( 0, 0, 0, 1 )"> The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [RayCast3D] is colliding with something. If set to [code]Color(0.0, 0.0, 0.0)[/code] (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used. </member> - <member name="debug_shape_thickness" type="int" setter="set_debug_shape_thickness" getter="get_debug_shape_thickness" default="1"> + <member name="debug_shape_thickness" type="float" setter="set_debug_shape_thickness" getter="get_debug_shape_thickness" default="2.0"> If set to [code]1[/code], a line is used as the debug shape. Otherwise, a truncated pyramid is drawn to represent the [RayCast3D]. Requires [b]Visible Collision Shapes[/b] to be enabled in the [b]Debug[/b] menu for the debug shape to be visible at run-time. </member> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 5d7ff39587..352a18e326 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -65,14 +65,14 @@ Constructs a [Rect2] by x, y, width, and height. </description> </method> - <method name="abs"> + <method name="abs" qualifiers="const"> <return type="Rect2"> </return> <description> Returns a [Rect2] with equivalent position and area, modified so that the top-left corner is the origin and [code]width[/code] and [code]height[/code] are positive. </description> </method> - <method name="encloses"> + <method name="encloses" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="b" type="Rect2"> @@ -81,7 +81,7 @@ Returns [code]true[/code] if this [Rect2] completely encloses another one. </description> </method> - <method name="expand"> + <method name="expand" qualifiers="const"> <return type="Rect2"> </return> <argument index="0" name="to" type="Vector2"> @@ -90,14 +90,14 @@ Returns this [Rect2] expanded to include a given point. </description> </method> - <method name="get_area"> + <method name="get_area" qualifiers="const"> <return type="float"> </return> <description> Returns the area of the [Rect2]. </description> </method> - <method name="grow"> + <method name="grow" qualifiers="const"> <return type="Rect2"> </return> <argument index="0" name="amount" type="float"> @@ -106,7 +106,7 @@ Returns a copy of the [Rect2] grown by the specified [code]amount[/code] on all sides. </description> </method> - <method name="grow_individual"> + <method name="grow_individual" qualifiers="const"> <return type="Rect2"> </return> <argument index="0" name="left" type="float"> @@ -121,7 +121,7 @@ Returns a copy of the [Rect2] grown by the specified amount on each side individually. </description> </method> - <method name="grow_side"> + <method name="grow_side" qualifiers="const"> <return type="Rect2"> </return> <argument index="0" name="side" type="int"> @@ -132,14 +132,14 @@ Returns a copy of the [Rect2] grown by the specified [code]amount[/code] on the specified [enum Side]. </description> </method> - <method name="has_no_area"> + <method name="has_no_area" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if the [Rect2] is flat or empty. </description> </method> - <method name="has_point"> + <method name="has_point" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="point" type="Vector2"> @@ -148,7 +148,7 @@ Returns [code]true[/code] if the [Rect2] contains a point. </description> </method> - <method name="intersection"> + <method name="intersection" qualifiers="const"> <return type="Rect2"> </return> <argument index="0" name="b" type="Rect2"> @@ -158,7 +158,7 @@ If the rectangles do not intersect, an empty [Rect2] is returned. </description> </method> - <method name="intersects"> + <method name="intersects" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="b" type="Rect2"> @@ -170,7 +170,7 @@ If [code]include_borders[/code] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection. </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="rect" type="Rect2"> @@ -179,7 +179,7 @@ Returns [code]true[/code] if this [Rect2] and [code]rect[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> - <method name="merge"> + <method name="merge" qualifiers="const"> <return type="Rect2"> </return> <argument index="0" name="b" type="Rect2"> @@ -221,7 +221,7 @@ Beginning corner. Typically has values lower than [member end]. </member> <member name="size" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> - Size from [member position] to [member end]. Typically all components are positive. + Size from [member position] to [member end]. Typically, all components are positive. If the size is negative, you can use [method abs] to fix it. </member> </members> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index e581ccdb11..84bef9b406 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -63,14 +63,14 @@ Constructs a [Rect2i] by x, y, width, and height. </description> </method> - <method name="abs"> + <method name="abs" qualifiers="const"> <return type="Rect2i"> </return> <description> Returns a [Rect2i] with equivalent position and area, modified so that the top-left corner is the origin and [code]width[/code] and [code]height[/code] are positive. </description> </method> - <method name="encloses"> + <method name="encloses" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="b" type="Rect2i"> @@ -79,7 +79,7 @@ Returns [code]true[/code] if this [Rect2i] completely encloses another one. </description> </method> - <method name="expand"> + <method name="expand" qualifiers="const"> <return type="Rect2i"> </return> <argument index="0" name="to" type="Vector2i"> @@ -88,14 +88,14 @@ Returns this [Rect2i] expanded to include a given point. </description> </method> - <method name="get_area"> + <method name="get_area" qualifiers="const"> <return type="int"> </return> <description> Returns the area of the [Rect2i]. </description> </method> - <method name="grow"> + <method name="grow" qualifiers="const"> <return type="Rect2i"> </return> <argument index="0" name="amount" type="int"> @@ -104,7 +104,7 @@ Returns a copy of the [Rect2i] grown by the specified [code]amount[/code] on all sides. </description> </method> - <method name="grow_individual"> + <method name="grow_individual" qualifiers="const"> <return type="Rect2i"> </return> <argument index="0" name="left" type="int"> @@ -119,7 +119,7 @@ Returns a copy of the [Rect2i] grown by the specified amount on each side individually. </description> </method> - <method name="grow_side"> + <method name="grow_side" qualifiers="const"> <return type="Rect2i"> </return> <argument index="0" name="side" type="int"> @@ -130,14 +130,14 @@ Returns a copy of the [Rect2i] grown by the specified [code]amount[/code] on the specified [enum Side]. </description> </method> - <method name="has_no_area"> + <method name="has_no_area" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if the [Rect2i] is flat or empty. </description> </method> - <method name="has_point"> + <method name="has_point" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="point" type="Vector2i"> @@ -146,7 +146,7 @@ Returns [code]true[/code] if the [Rect2i] contains a point. </description> </method> - <method name="intersection"> + <method name="intersection" qualifiers="const"> <return type="Rect2i"> </return> <argument index="0" name="b" type="Rect2i"> @@ -156,7 +156,7 @@ If the rectangles do not intersect, an empty [Rect2i] is returned. </description> </method> - <method name="intersects"> + <method name="intersects" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="b" type="Rect2i"> @@ -166,7 +166,7 @@ If [code]include_borders[/code] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection. </description> </method> - <method name="merge"> + <method name="merge" qualifiers="const"> <return type="Rect2i"> </return> <argument index="0" name="b" type="Rect2i"> @@ -200,7 +200,7 @@ Beginning corner. Typically has values lower than [member end]. </member> <member name="size" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )"> - Size from [member position] to [member end]. Typically all components are positive. + Size from [member position] to [member end]. Typically, all components are positive. If the size is negative, you can use [method abs] to fix it. </member> </members> diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index cd08778c89..13df17cd22 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -5,7 +5,7 @@ </brief_description> <description> Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses. - The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [GIProbe]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them. + The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [VoxelGI]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them. </description> <tutorials> <link title="Reflection probes">https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link> diff --git a/doc/classes/RemoteTransform3D.xml b/doc/classes/RemoteTransform3D.xml index bd3da2aea9..453177496f 100644 --- a/doc/classes/RemoteTransform3D.xml +++ b/doc/classes/RemoteTransform3D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RemoteTransform3D" inherits="Node3D" version="4.0"> <brief_description> - RemoteTransform3D pushes its own [Transform] to another [Node3D] derived Node in the scene. + RemoteTransform3D pushes its own [Transform3D] to another [Node3D] derived Node in the scene. </brief_description> <description> - RemoteTransform3D pushes its own [Transform] to another [Node3D] derived Node (called the remote node) in the scene. + RemoteTransform3D pushes its own [Transform3D] to another [Node3D] derived Node (called the remote node) in the scene. It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. </description> <tutorials> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index d2b95fda20..ba19176788 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -10,7 +10,7 @@ Resources are created using the [code]*_create[/code] functions. All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas]. In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the rendering server from a running game, the scenario can be accessed from the scene tree from any [Node3D] node with [method Node3D.get_world_3d]. Otherwise, a scenario can be created with [method scenario_create]. - Similarly in 2D, a canvas is needed to draw all canvas items. + Similarly, in 2D, a canvas is needed to draw all canvas items. In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible. In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. </description> @@ -130,10 +130,10 @@ </return> <argument index="0" name="camera" type="RID"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> - Sets [Transform] of camera. + Sets [Transform3D] of camera. </description> </method> <method name="camera_set_use_vertical_aspect"> @@ -1292,7 +1292,7 @@ <argument index="1" name="margin" type="float"> </argument> <description> - Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance3D.extra_cull_margin]. + Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance3D.extra_cull_margin]. </description> </method> <method name="instance_set_layer_mask"> @@ -1317,7 +1317,7 @@ Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. </description> </method> - <method name="instance_set_surface_material"> + <method name="instance_set_surface_override_material"> <return type="void"> </return> <argument index="0" name="instance" type="RID"> @@ -1327,7 +1327,7 @@ <argument index="2" name="material" type="RID"> </argument> <description> - Sets the material of a specific surface. Equivalent to [method MeshInstance3D.set_surface_material]. + Sets the override material of a specific surface. Equivalent to [method MeshInstance3D.set_surface_override_material]. </description> </method> <method name="instance_set_transform"> @@ -1335,7 +1335,7 @@ </return> <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> Sets the world space transform of the instance. Equivalent to [member Node3D.transform]. @@ -1520,7 +1520,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light3D.shadow_reverse_cull_face]. + If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light3D.shadow_reverse_cull_face]. </description> </method> <method name="light_set_shadow"> @@ -1894,14 +1894,14 @@ </description> </method> <method name="multimesh_instance_get_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="multimesh" type="RID"> </argument> <argument index="1" name="index" type="int"> </argument> <description> - Returns the [Transform] of the specified instance. + Returns the [Transform3D] of the specified instance. </description> </method> <method name="multimesh_instance_get_transform_2d" qualifiers="const"> @@ -1948,10 +1948,10 @@ </argument> <argument index="1" name="index" type="int"> </argument> - <argument index="2" name="transform" type="Transform"> + <argument index="2" name="transform" type="Transform3D"> </argument> <description> - Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. + Sets the [Transform3D] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. </description> </method> <method name="multimesh_instance_set_transform_2d"> @@ -1999,6 +1999,24 @@ Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count]. </description> </method> + <method name="occluder_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="occluder_set_mesh"> + <return type="void"> + </return> + <argument index="0" name="arg0" type="RID"> + </argument> + <argument index="1" name="arg1" type="PackedVector3Array"> + </argument> + <argument index="2" name="arg2" type="PackedInt32Array"> + </argument> + <description> + </description> + </method> <method name="omni_light_create"> <return type="RID"> </return> @@ -2124,10 +2142,10 @@ </return> <argument index="0" name="particles" type="RID"> </argument> - <argument index="1" name="transform" type="Transform"> + <argument index="1" name="transform" type="Transform3D"> </argument> <description> - Sets the [Transform] that will be used by the particles when they first emit. + Sets the [Transform3D] that will be used by the particles when they first emit. </description> </method> <method name="particles_set_emitting"> @@ -2204,7 +2222,7 @@ <argument index="1" name="time" type="float"> </argument> <description> - Sets the preprocess time for the particles animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member GPUParticles3D.preprocess]. + Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member GPUParticles3D.preprocess]. </description> </method> <method name="particles_set_process_material"> @@ -2412,6 +2430,16 @@ The scenario is the 3D world that all the visual instances exist in. </description> </method> + <method name="scenario_set_camera_effects"> + <return type="void"> + </return> + <argument index="0" name="scenario" type="RID"> + </argument> + <argument index="1" name="effects" type="RID"> + </argument> + <description> + </description> + </method> <method name="scenario_set_debug"> <return type="void"> </return> @@ -2562,14 +2590,14 @@ </description> </method> <method name="skeleton_bone_get_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="skeleton" type="RID"> </argument> <argument index="1" name="bone" type="int"> </argument> <description> - Returns the [Transform] set for a specific bone of this skeleton. + Returns the [Transform3D] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_get_transform_2d" qualifiers="const"> @@ -2590,10 +2618,10 @@ </argument> <argument index="1" name="bone" type="int"> </argument> - <argument index="2" name="transform" type="Transform"> + <argument index="2" name="transform" type="Transform3D"> </argument> <description> - Sets the [Transform] for a specific bone of this skeleton. + Sets the [Transform3D] for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform_2d"> @@ -2897,6 +2925,22 @@ Sets the anti-aliasing mode. See [enum ViewportMSAA] for options. </description> </method> + <method name="viewport_set_occlusion_culling_build_quality"> + <return type="void"> + </return> + <argument index="0" name="quality" type="int" enum="RenderingServer.ViewportOcclusionCullingBuildQuality"> + </argument> + <description> + </description> + </method> + <method name="viewport_set_occlusion_rays_per_thread"> + <return type="void"> + </return> + <argument index="0" name="rays_per_thread" type="int"> + </argument> + <description> + </description> + </method> <method name="viewport_set_parent_viewport"> <return type="void"> </return> @@ -3002,6 +3046,16 @@ <description> </description> </method> + <method name="viewport_set_use_occlusion_culling"> + <return type="void"> + </return> + <argument index="0" name="viewport" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + </description> + </method> <method name="viewport_set_use_xr"> <return type="void"> </return> @@ -3213,7 +3267,7 @@ Use [Transform2D] to store MultiMesh transform. </constant> <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> - Use [Transform] to store MultiMesh transform. + Use [Transform3D] to store MultiMesh transform. </constant> <constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType"> Is a directional (sun) light. @@ -3334,7 +3388,7 @@ <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder"> Sort particles based on their lifetime. </constant> - <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder"> + <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="3" enum="ParticlesDrawOrder"> Sort particles based on their distance to the camera. </constant> <constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode"> @@ -3423,14 +3477,14 @@ <constant name="VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER" value="5" enum="ViewportDebugDraw"> Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects. </constant> - <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_ALBEDO" value="6" enum="ViewportDebugDraw"> - Objects are displayed with only the albedo value from [GIProbe]s. + <constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO" value="6" enum="ViewportDebugDraw"> + Objects are displayed with only the albedo value from [VoxelGI]s. </constant> - <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_LIGHTING" value="7" enum="ViewportDebugDraw"> - Objects are displayed with only the lighting value from [GIProbe]s. + <constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING" value="7" enum="ViewportDebugDraw"> + Objects are displayed with only the lighting value from [VoxelGI]s. </constant> - <constant name="VIEWPORT_DEBUG_DRAW_GI_PROBE_EMISSION" value="8" enum="ViewportDebugDraw"> - Objects are displayed with only the emission color from [GIProbe]s. + <constant name="VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION" value="8" enum="ViewportDebugDraw"> + Objects are displayed with only the emission color from [VoxelGI]s. </constant> <constant name="VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="ViewportDebugDraw"> Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport]. @@ -3454,6 +3508,8 @@ </constant> <constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="17" enum="ViewportDebugDraw"> </constant> + <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="23" enum="ViewportDebugDraw"> + </constant> <constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode"> Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant Sky.PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/reflections/sky_reflections/ggx_samples]. </constant> @@ -3606,6 +3662,12 @@ <constant name="SCENARIO_DEBUG_SHADELESS" value="3" enum="ScenarioDebugMode"> Draw all objects without shading. Equivalent to setting all objects shaders to [code]unshaded[/code]. </constant> + <constant name="VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW" value="0" enum="ViewportOcclusionCullingBuildQuality"> + </constant> + <constant name="VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM" value="1" enum="ViewportOcclusionCullingBuildQuality"> + </constant> + <constant name="VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH" value="2" enum="ViewportOcclusionCullingBuildQuality"> + </constant> <constant name="INSTANCE_NONE" value="0" enum="InstanceType"> The instance does not have a type. </constant> @@ -3632,13 +3694,15 @@ <constant name="INSTANCE_DECAL" value="8" enum="InstanceType"> The instance is a decal. </constant> - <constant name="INSTANCE_GI_PROBE" value="9" enum="InstanceType"> - The instance is a GI probe. + <constant name="INSTANCE_VOXEL_GI" value="9" enum="InstanceType"> + The instance is a VoxelGI. </constant> <constant name="INSTANCE_LIGHTMAP" value="10" enum="InstanceType"> The instance is a lightmap. </constant> - <constant name="INSTANCE_MAX" value="11" enum="InstanceType"> + <constant name="INSTANCE_OCCLUDER" value="11" enum="InstanceType"> + </constant> + <constant name="INSTANCE_MAX" value="12" enum="InstanceType"> Represents the size of the [enum InstanceType] enum. </constant> <constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType"> @@ -3653,7 +3717,9 @@ <constant name="INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="2" enum="InstanceFlags"> When set, manually requests to draw geometry on next frame. </constant> - <constant name="INSTANCE_FLAG_MAX" value="3" enum="InstanceFlags"> + <constant name="INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING" value="3" enum="InstanceFlags"> + </constant> + <constant name="INSTANCE_FLAG_MAX" value="4" enum="InstanceFlags"> Represents the size of the [enum InstanceFlags] enum. </constant> <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting"> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 2548f8d911..75736798fd 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -27,6 +27,7 @@ <description> Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources. [b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared. + [b]Note:[/b] When duplicating a resource, only [code]export[/code]ed properties are copied. Other properties will be set to their default value in the new resource. </description> </method> <method name="emit_changed"> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index 2683156ec5..9943f644cf 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -6,7 +6,7 @@ <description> 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]. - [b]Note:[/b] 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] ([StreamTexture2D]) first, so they can be loaded with better efficiency on the graphics card. + [b]Note:[/b] 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 on 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] ([StreamTexture2D]) first, so they can be loaded with better efficiency on the graphics card. </description> <tutorials> </tutorials> diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index ecde5754f9..437b0ce730 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -49,7 +49,7 @@ 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]). + Save as big endian (see [member File.big_endian]). </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. diff --git a/doc/classes/RibbonTrailMesh.xml b/doc/classes/RibbonTrailMesh.xml new file mode 100644 index 0000000000..771f2e444b --- /dev/null +++ b/doc/classes/RibbonTrailMesh.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="RibbonTrailMesh" inherits="PrimitiveMesh" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="curve" type="Curve" setter="set_curve" getter="get_curve"> + </member> + <member name="section_length" type="float" setter="set_section_length" getter="get_section_length" default="0.2"> + </member> + <member name="section_segments" type="int" setter="set_section_segments" getter="get_section_segments" default="3"> + </member> + <member name="sections" type="int" setter="set_sections" getter="get_sections" default="5"> + </member> + <member name="shape" type="int" setter="set_shape" getter="get_shape" enum="RibbonTrailMesh.Shape" default="1"> + </member> + <member name="size" type="float" setter="set_size" getter="get_size" default="1.0"> + </member> + </members> + <constants> + <constant name="SHAPE_FLAT" value="0" enum="Shape"> + </constant> + <constant name="SHAPE_CROSS" value="1" enum="Shape"> + </constant> + </constants> +</class> diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 6b27c77f26..237317daf1 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -4,8 +4,8 @@ A body that is controlled by the 2D physics engine. </brief_description> <description> - This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. - A RigidBody2D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic. + This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. + A RigidBody2D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic. [b]Note:[/b] You should not change a RigidBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime. If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See [member custom_integrator]. @@ -100,21 +100,6 @@ Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. </description> </method> - <method name="test_motion"> - <return type="bool"> - </return> - <argument index="0" name="motion" type="Vector2"> - </argument> - <argument index="1" name="infinite_inertia" type="bool" default="true"> - </argument> - <argument index="2" name="margin" type="float" default="0.08"> - </argument> - <argument index="3" name="result" type="PhysicsTestMotionResult2D" default="null"> - </argument> - <description> - Returns [code]true[/code] if a collision would result from moving in the given vector. [code]margin[/code] increases the size of the shapes involved in the collision detection, and [code]result[/code] is an object of type [PhysicsTestMotionResult2D], which contains additional information about the collision (should there be one). - </description> - </method> </methods> <members> <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0"> @@ -132,7 +117,6 @@ </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping]. - [b]Note:[/b] A RigidBody2D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member sleeping] property to [code]true[/code]. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]. @@ -193,7 +177,7 @@ </description> </signal> <signal name="body_shape_entered"> - <argument index="0" name="body_id" type="int"> + <argument index="0" name="body_rid" type="RID"> </argument> <argument index="1" name="body" type="Node"> </argument> @@ -210,7 +194,7 @@ </description> </signal> <signal name="body_shape_exited"> - <argument index="0" name="body_id" type="int"> + <argument index="0" name="body_rid" type="RID"> </argument> <argument index="1" name="body" type="Node"> </argument> @@ -234,17 +218,17 @@ </signal> </signals> <constants> - <constant name="MODE_RIGID" value="0" enum="Mode"> - Rigid mode. The body behaves as a physical object. It collides with other bodies and responds to forces applied to it. This is the default mode. + <constant name="MODE_DYNAMIC" value="0" enum="Mode"> + Dynamic body mode. This is the default mode of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code. </constant> <constant name="MODE_STATIC" value="1" enum="Mode"> - Static mode. The body behaves like a [StaticBody2D] and does not move. + Static body mode. The body behaves like a [StaticBody2D], and must be moved by code. </constant> - <constant name="MODE_CHARACTER" value="2" enum="Mode"> - Character mode. Similar to [constant MODE_RIGID], but the body can not rotate. + <constant name="MODE_DYNAMIC_LOCKED" value="2" enum="Mode"> + Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate. </constant> <constant name="MODE_KINEMATIC" value="3" enum="Mode"> - Kinematic mode. The body behaves like a [KinematicBody2D], and must be moved by code. + Kinematic body mode. The body behaves like a [StaticBody2D] with [member StaticBody2D.kinematic_motion] enabled, and must be moved by user code. </constant> <constant name="CCD_MODE_DISABLED" value="0" enum="CCDMode"> Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml index 1c6c8852a9..e3349169ff 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidBody3D.xml @@ -5,7 +5,7 @@ </brief_description> <description> This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. - A RigidBody3D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic. + A RigidBody3D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic. [b]Note:[/b] Don't change a RigidBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator]. With Bullet physics (the default), the center of mass is the RigidBody3D center. With GodotPhysics, the center of mass is the average of the [CollisionShape3D] centers. @@ -86,15 +86,6 @@ Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the [code]impulse[/code] vector passed. </description> </method> - <method name="get_axis_lock" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> - </argument> - <description> - Returns [code]true[/code] if the specified linear or rotational axis is locked. - </description> - </method> <method name="get_colliding_bodies" qualifiers="const"> <return type="Array"> </return> @@ -103,24 +94,13 @@ [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> - <method name="get_inverse_inertia_tensor"> + <method name="get_inverse_inertia_tensor" qualifiers="const"> <return type="Basis"> </return> <description> Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D]. </description> </method> - <method name="set_axis_lock"> - <return type="void"> - </return> - <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> - </argument> - <argument index="1" name="lock" type="bool"> - </argument> - <description> - Locks the specified linear or rotational axis. - </description> - </method> <method name="set_axis_velocity"> <return type="void"> </return> @@ -139,27 +119,8 @@ <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3( 0, 0, 0 )"> RigidBody3D's rotational velocity. </member> - <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's rotation in the X axis. - </member> - <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's rotation in the Y axis. - </member> - <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's rotation in the Z axis. - </member> - <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's movement in the X axis. - </member> - <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's movement in the Y axis. - </member> - <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> - Lock the body's movement in the Z axis. - </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping]. - [b]Note:[/b] A RigidBody3D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member sleeping] property to [code]true[/code]. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. See also [member contacts_reported]. @@ -217,7 +178,7 @@ </description> </signal> <signal name="body_shape_entered"> - <argument index="0" name="body_id" type="int"> + <argument index="0" name="body_rid" type="RID"> </argument> <argument index="1" name="body" type="Node"> </argument> @@ -235,7 +196,7 @@ </description> </signal> <signal name="body_shape_exited"> - <argument index="0" name="body_id" type="int"> + <argument index="0" name="body_rid" type="RID"> </argument> <argument index="1" name="body" type="Node"> </argument> @@ -260,17 +221,17 @@ </signal> </signals> <constants> - <constant name="MODE_RIGID" value="0" enum="Mode"> - Rigid body mode. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code. + <constant name="MODE_DYNAMIC" value="0" enum="Mode"> + Dynamic body mode. This is the default mode of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code. </constant> <constant name="MODE_STATIC" value="1" enum="Mode"> - Static mode. The body behaves like a [StaticBody3D], and can only move by user code. + Static body mode. The body behaves like a [StaticBody3D], and can only move by user code. </constant> - <constant name="MODE_CHARACTER" value="2" enum="Mode"> - Character body mode. This behaves like a rigid body, but can not rotate. + <constant name="MODE_DYNAMIC_LOCKED" value="2" enum="Mode"> + Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate. </constant> <constant name="MODE_KINEMATIC" value="3" enum="Mode"> - Kinematic body mode. The body behaves like a [KinematicBody3D], and can only move by user code. + Kinematic body mode. The body behaves like a [StaticBody3D] with [member StaticBody3D.kinematic_motion] enabled, and can only move by user code. </constant> </constants> </class> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 72a42202c7..7a15153fc2 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -5,7 +5,7 @@ </brief_description> <description> As one of the most important classes, the [SceneTree] manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. - You can also use the [SceneTree] to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. a "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. + You can also use the [SceneTree] to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. an "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. [SceneTree] is the default [MainLoop] implementation used by scenes, and is thus in charge of the game loop. </description> <tutorials> @@ -21,7 +21,8 @@ <argument index="1" name="method" type="StringName"> </argument> <description> - Calls [code]method[/code] on each member of the given group. + Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. + [b]Note:[/b] [method call_group] will always call methods with an one-frame delay, in a way similar to [method Object.call_deferred]. To call methods immediately, use [method call_group_flags] with the [constant GROUP_CALL_REALTIME] flag. </description> </method> <method name="call_group_flags" qualifiers="vararg"> @@ -34,7 +35,8 @@ <argument index="2" name="method" type="StringName"> </argument> <description> - Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. + Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. + [b]Note:[/b] Group call flags are used to control the method calling behavior. If the [constant GROUP_CALL_REALTIME] flag is present in the [code]flags[/code] argument, methods will be called immediately. If this flag isn't present in [code]flags[/code], methods will be called with a one-frame delay in a way similar to [method call_group]. </description> </method> <method name="change_scene"> @@ -88,6 +90,14 @@ The timer will be automatically freed after its time elapses. </description> </method> + <method name="get_first_node_in_group"> + <return type="Node"> + </return> + <argument index="0" name="group" type="StringName"> + </argument> + <description> + </description> + </method> <method name="get_frame" qualifiers="const"> <return type="int"> </return> @@ -197,6 +207,7 @@ Quits the application at the end of the current iteration. Argument [code]exit_code[/code] can optionally be given (defaulting to 0) to customize the exit status code. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive). + [b]Note:[/b] On iOS this method doesn't work. Instead, as recommended by the iOS Human Interface Guidelines, the user is expected to close apps via the Home button. </description> </method> <method name="reload_current_scene"> diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml index ee498de302..e5c4c32450 100644 --- a/doc/classes/ScriptEditorBase.xml +++ b/doc/classes/ScriptEditorBase.xml @@ -18,6 +18,13 @@ Adds a [EditorSyntaxHighlighter] to the open script. </description> </method> + <method name="get_base_editor" qualifiers="const"> + <return type="Control"> + </return> + <description> + Returns the underlying [Control] used for editing scripts. This can be either [CodeEdit] (for text scripts) or [GraphEdit] (for visual scripts). + </description> + </method> </methods> <signals> <signal name="edited_script_changed"> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 9c5634f43a..60f3106b4b 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -11,6 +11,15 @@ <tutorials> </tutorials> <methods> + <method name="ensure_control_visible"> + <return type="void"> + </return> + <argument index="0" name="control" type="Control"> + </argument> + <description> + Ensures the given [code]control[/code] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus]. + </description> + </method> <method name="get_h_scrollbar"> <return type="HScrollBar"> </return> @@ -39,12 +48,18 @@ <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" default="true"> If [code]true[/code], enables horizontal scrolling. </member> + <member name="scroll_horizontal_visible" type="bool" setter="set_h_scroll_visible" getter="is_h_scroll_visible" default="true"> + If [code]false[/code], hides the horizontal scrollbar. + </member> <member name="scroll_vertical" type="int" setter="set_v_scroll" getter="get_v_scroll" default="0"> The current vertical scroll value. </member> <member name="scroll_vertical_enabled" type="bool" setter="set_enable_v_scroll" getter="is_v_scroll_enabled" default="true"> If [code]true[/code], enables vertical scrolling. </member> + <member name="scroll_vertical_visible" type="bool" setter="set_v_scroll_visible" getter="is_v_scroll_visible" default="true"> + If [code]false[/code], hides the vertical scrollbar. + </member> </members> <signals> <signal name="scroll_ended"> diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml index f3e62175c6..b5f70132d7 100644 --- a/doc/classes/Shape3D.xml +++ b/doc/classes/Shape3D.xml @@ -10,11 +10,18 @@ <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <methods> + <method name="get_debug_mesh"> + <return type="ArrayMesh"> + </return> + <description> + Returns the [ArrayMesh] used to draw the debug collision for this [Shape3D]. + </description> + </method> </methods> <members> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04"> The collision margin for the shape. Used in Bullet Physics only. - Collision margins allows collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp. + Collision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp. </member> </members> <constants> diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml index b7a2258fc1..84efc974c0 100644 --- a/doc/classes/Signal.xml +++ b/doc/classes/Signal.xml @@ -57,42 +57,42 @@ Disconnects this signal from the specified [Callable]. </description> </method> - <method name="emit" qualifiers="vararg"> + <method name="emit" qualifiers="vararg const"> <return type="void"> </return> <description> Emits this signal to all connected objects. </description> </method> - <method name="get_connections"> + <method name="get_connections" qualifiers="const"> <return type="Array"> </return> <description> Returns the list of [Callable]s connected to this signal. </description> </method> - <method name="get_name"> + <method name="get_name" qualifiers="const"> <return type="StringName"> </return> <description> Returns the name of this signal. </description> </method> - <method name="get_object"> + <method name="get_object" qualifiers="const"> <return type="Object"> </return> <description> Returns the object emitting this signal. </description> </method> - <method name="get_object_id"> + <method name="get_object_id" qualifiers="const"> <return type="int"> </return> <description> Returns the ID of the object emitting this signal (see [method Object.get_instance_id]). </description> </method> - <method name="is_connected"> + <method name="is_connected" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="callable" type="Callable"> @@ -101,7 +101,7 @@ Returns [code]true[/code] if the specified [Callable] is connected to this signal. </description> </method> - <method name="is_null"> + <method name="is_null" qualifiers="const"> <return type="bool"> </return> <description> diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml index 0ddbac9ba4..6665a4a9f6 100644 --- a/doc/classes/Skeleton2D.xml +++ b/doc/classes/Skeleton2D.xml @@ -10,6 +10,17 @@ <link title="2D skeletons">https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link> </tutorials> <methods> + <method name="execute_modifications"> + <return type="void"> + </return> + <argument index="0" name="delta" type="float"> + </argument> + <argument index="1" name="execution_mode" type="int"> + </argument> + <description> + Executes all the modifications on the [SkeletonModificationStack2D], if the Skeleton3D has one assigned. + </description> + </method> <method name="get_bone"> <return type="Bone2D"> </return> @@ -26,6 +37,22 @@ Returns the number of [Bone2D] nodes in the node hierarchy parented by Skeleton2D. </description> </method> + <method name="get_bone_local_pose_override"> + <return type="Transform2D"> + </return> + <argument index="0" name="bone_idx" type="int"> + </argument> + <description> + Returns the local pose override transform for [code]bone_idx[/code]. + </description> + </method> + <method name="get_modification_stack" qualifiers="const"> + <return type="SkeletonModificationStack2D"> + </return> + <description> + Returns the [SkeletonModificationStack2D] attached to this skeleton, if one exists. + </description> + </method> <method name="get_skeleton" qualifiers="const"> <return type="RID"> </return> @@ -33,10 +60,37 @@ Returns the [RID] of a Skeleton2D instance. </description> </method> + <method name="set_bone_local_pose_override"> + <return type="void"> + </return> + <argument index="0" name="bone_idx" type="int"> + </argument> + <argument index="1" name="override_pose" type="Transform2D"> + </argument> + <argument index="2" name="strength" type="float"> + </argument> + <argument index="3" name="persistent" type="bool"> + </argument> + <description> + Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. + [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + [b]Note:[/b] The pose transform needs to be a local transform relative to the [Bone2D] node at [code]bone_idx[/code]! + </description> + </method> + <method name="set_modification_stack"> + <return type="void"> + </return> + <argument index="0" name="modification_stack" type="SkeletonModificationStack2D"> + </argument> + <description> + Sets the [SkeletonModificationStack2D] attached to this skeleton. + </description> + </method> </methods> <signals> <signal name="bone_setup_changed"> <description> + Emitted when the [Bone2D] setup attached to this skeletons changes. This is primarily used internally within the skeleton. </description> </signal> </signals> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index fe2cc1f5ad..d8b35ad272 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -22,21 +22,10 @@ Adds a bone, with name [code]name[/code]. [method get_bone_count] will become the bone index. </description> </method> - <method name="bind_child_node_to_bone"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="node" type="Node"> - </argument> - <description> - [i]Deprecated soon.[/i] - </description> - </method> <method name="bone_transform_to_world_transform"> - <return type="Transform"> + <return type="Transform3D"> </return> - <argument index="0" name="bone_transform" type="Transform"> + <argument index="0" name="bone_transform" type="Transform3D"> </argument> <description> Takes the given bone pose/transform and converts it to a world transform, relative to the [Skeleton3D] node. @@ -74,7 +63,7 @@ </description> </method> <method name="get_bone_custom_pose" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bone_idx" type="int"> </argument> @@ -83,7 +72,7 @@ </description> </method> <method name="get_bone_global_pose" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bone_idx" type="int"> </argument> @@ -91,6 +80,15 @@ Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. </description> </method> + <method name="get_bone_global_pose_no_override" qualifiers="const"> + <return type="Transform3D"> + </return> + <argument index="0" name="bone_idx" type="int"> + </argument> + <description> + Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. + </description> + </method> <method name="get_bone_name" qualifiers="const"> <return type="String"> </return> @@ -111,7 +109,7 @@ </description> </method> <method name="get_bone_pose" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bone_idx" type="int"> </argument> @@ -126,7 +124,7 @@ </description> </method> <method name="get_bone_rest" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bone_idx" type="int"> </argument> @@ -134,15 +132,6 @@ Returns the rest transform for a bone [code]bone_idx[/code]. </description> </method> - <method name="get_bound_child_nodes_to_bone" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <description> - [i]Deprecated soon.[/i] - </description> - </method> <method name="is_bone_rest_disabled" qualifiers="const"> <return type="bool"> </return> @@ -210,7 +199,7 @@ </return> <argument index="0" name="bone_idx" type="int"> </argument> - <argument index="1" name="custom_pose" type="Transform"> + <argument index="1" name="custom_pose" type="Transform3D"> </argument> <description> Sets the custom pose transform, [code]custom_pose[/code], for the bone at [code]bone_idx[/code]. This pose is an addition to the bone rest pose. @@ -233,7 +222,7 @@ </return> <argument index="0" name="bone_idx" type="int"> </argument> - <argument index="1" name="pose" type="Transform"> + <argument index="1" name="pose" type="Transform3D"> </argument> <argument index="2" name="amount" type="float"> </argument> @@ -245,6 +234,16 @@ [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> + <method name="set_bone_name"> + <return type="void"> + </return> + <argument index="0" name="bone_idx" type="int"> + </argument> + <argument index="1" name="name" type="String"> + </argument> + <description> + </description> + </method> <method name="set_bone_parent"> <return type="void"> </return> @@ -262,7 +261,7 @@ </return> <argument index="0" name="bone_idx" type="int"> </argument> - <argument index="1" name="pose" type="Transform"> + <argument index="1" name="pose" type="Transform3D"> </argument> <description> Sets the pose transform for bone [code]bone_idx[/code]. @@ -274,36 +273,25 @@ </return> <argument index="0" name="bone_idx" type="int"> </argument> - <argument index="1" name="rest" type="Transform"> + <argument index="1" name="rest" type="Transform3D"> </argument> <description> Sets the rest transform for bone [code]bone_idx[/code]. </description> </method> - <method name="unbind_child_node_from_bone"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="node" type="Node"> - </argument> - <description> - [i]Deprecated soon.[/i] - </description> - </method> <method name="unparent_bone_and_rest"> <return type="void"> </return> <argument index="0" name="bone_idx" type="int"> </argument> <description> - Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of it's parent prior to being reset. + Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of its parent prior to being reset. </description> </method> <method name="world_transform_to_bone_transform"> - <return type="Transform"> + <return type="Transform3D"> </return> - <argument index="0" name="world_transform" type="Transform"> + <argument index="0" name="world_transform" type="Transform3D"> </argument> <description> Takes the given world transform, relative to the [Skeleton3D], and converts it to a bone pose/transform. diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml index 5193109447..dccc45d0ec 100644 --- a/doc/classes/SkeletonIK3D.xml +++ b/doc/classes/SkeletonIK3D.xml @@ -46,13 +46,13 @@ </member> <member name="override_tip_basis" type="bool" setter="set_override_tip_basis" getter="is_override_tip_basis" default="true"> </member> - <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="@"""> + <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="&"""> </member> - <member name="target" type="Transform" setter="set_target_transform" getter="get_target_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="target" type="Transform3D" setter="set_target_transform" getter="get_target_transform" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> <member name="target_node" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> </member> - <member name="tip_bone" type="StringName" setter="set_tip_bone" getter="get_tip_bone" default="@"""> + <member name="tip_bone" type="StringName" setter="set_tip_bone" getter="get_tip_bone" default="&"""> </member> <member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet" default="false"> </member> diff --git a/doc/classes/SkeletonModification2D.xml b/doc/classes/SkeletonModification2D.xml new file mode 100644 index 0000000000..8596dac76e --- /dev/null +++ b/doc/classes/SkeletonModification2D.xml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification2D" inherits="Resource" version="4.0"> + <brief_description> + A resource that operates on [Bone2D] nodes in a [Skeleton2D]. + </brief_description> + <description> + This resource provides an interface that can be expanded so code that operates on [Bone2D] nodes in a [Skeleton2D] can be mixed and matched together to create complex interactions. + This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses. + </description> + <tutorials> + </tutorials> + <methods> + <method name="_draw_editor_gizmo" qualifiers="virtual"> + <return type="void"> + </return> + <description> + Used for drawing [b]editor-only[/b] modification gizmos. This function will only be called in the Godot editor and can be overriden to draw custom gizmos. + [b]Note:[/b] You will need to use the Skeleton2D from [method SkeletonModificationStack2D.get_skeleton] and it's draw functions, as the [SkeletonModification2D] resource cannot draw on its own. + </description> + </method> + <method name="_execute" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="delta" type="float"> + </argument> + <description> + Executes the given modification. This is where the modification performs whatever function it is designed to do. + </description> + </method> + <method name="_setup_modification" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="modification_stack" type="SkeletonModificationStack2D"> + </argument> + <description> + Called when the modification is setup. This is where the modification performs initialization. + </description> + </method> + <method name="clamp_angle"> + <return type="float"> + </return> + <argument index="0" name="angle" type="float"> + </argument> + <argument index="1" name="min" type="float"> + </argument> + <argument index="2" name="max" type="float"> + </argument> + <argument index="3" name="invert" type="bool"> + </argument> + <description> + Takes a angle and clamps it so it is within the passed-in [code]min[/code] and [code]max[/code] range. [code]invert[/code] will inversely clamp the angle, clamping it to the range outside of the given bounds. + </description> + </method> + <method name="get_editor_draw_gizmo" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos. + </description> + </method> + <method name="get_is_setup" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns whether this modification has been successfully setup or not. + </description> + </method> + <method name="get_modification_stack"> + <return type="SkeletonModificationStack2D"> + </return> + <description> + Returns the [SkeletonModificationStack2D] that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on. + </description> + </method> + <method name="set_editor_draw_gizmo"> + <return type="void"> + </return> + <argument index="0" name="draw_gizmo" type="bool"> + </argument> + <description> + Sets whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos. + </description> + </method> + <method name="set_is_setup"> + <return type="void"> + </return> + <argument index="0" name="is_setup" type="bool"> + </argument> + <description> + Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack2D] the modification is bound to should handle setting the modification up. + </description> + </method> + </methods> + <members> + <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="true"> + If [code]true[/code], the modification's [method _execute] function will be called by the [SkeletonModificationStack2D]. + </member> + <member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0"> + The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml new file mode 100644 index 0000000000..014d366a42 --- /dev/null +++ b/doc/classes/SkeletonModification2DCCDIK.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification2DCCDIK" inherits="SkeletonModification2D" version="4.0"> + <brief_description> + A modification that uses CCDIK to manipulate a series of bones to reach a target in 2D. + </brief_description> + <description> + This [SkeletonModification2D] uses an algorithm called [b]C[/b]yclic [b]C[/b]oordinate [b]D[/b]escent [b]I[/b]nverse [b]K[/b]inematics, or CCDIK, to maniuplate a chain of bones in a [Skeleton2D] so it reaches a defined target. + CCDIK works by rotating a set of bones, typically called a "bone chain", on a single axis. Each bone is rotated to face the target from the tip (by default), which over a chain of bones allow it to rotate properly to reach the target. Because the bones only rotate on a single axis, CCDIK [i]can[/i] look more robotic than other IK solvers. + [b]Note:[/b] The CCDIK modifier has [code]ccdik_joints[/code], which are the data objects that hold the data for each joint in the CCDIK chain. This is different from a bone! CCDIK joints hold the data needed for each bone in the bone chain used by CCDIK. + CCDIK also fully supports angle constraints, allowing for more control over how a solution is met. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_ccdik_joint_bone2d_node" qualifiers="const"> + <return type="NodePath"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_ccdik_joint_bone_index" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the index of the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_ccdik_joint_constraint_angle_invert" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_angle_invert] for details. + </description> + </method> + <method name="get_ccdik_joint_constraint_angle_max" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the maximum angle constraint for the joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_ccdik_joint_constraint_angle_min" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the minimum angle constraint for the joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_ccdik_joint_enable_constraint" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled. + </description> + </method> + <method name="get_ccdik_joint_rotate_from_joint" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns whether the joint at [code]joint_idx[/code] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. The default is to rotate from the tip. + </description> + </method> + <method name="set_ccdik_joint_bone2d_node"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="bone2d_nodepath" type="NodePath"> + </argument> + <description> + Sets the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_ccdik_joint_bone_index"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="bone_idx" type="int"> + </argument> + <description> + Sets the bone index, [code]bone_index[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the CCDIK joint based on data provided by the linked skeleton. + </description> + </method> + <method name="set_ccdik_joint_constraint_angle_invert"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="invert" type="bool"> + </argument> + <description> + Sets whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. + An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. + </description> + </method> + <method name="set_ccdik_joint_constraint_angle_max"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="angle_max" type="float"> + </argument> + <description> + Sets the maximum angle constraint for the joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_ccdik_joint_constraint_angle_min"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="angle_min" type="float"> + </argument> + <description> + Sets the minimum angle constraint for the joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_ccdik_joint_enable_constraint"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="enable_constraint" type="bool"> + </argument> + <description> + Determines whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled. When [code]true[/code], constraints will be enabled and taken into account when solving. + </description> + </method> + <method name="set_ccdik_joint_rotate_from_joint"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="rotate_from_joint" type="bool"> + </argument> + <description> + Sets whether the joint at [code]joint_idx[/code] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. + </description> + </method> + </methods> + <members> + <member name="ccdik_data_chain_length" type="int" setter="set_ccdik_data_chain_length" getter="get_ccdik_data_chain_length" default="0"> + The amount of CCDIK joints in the CCDIK modification. + </member> + <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> + The NodePath to the node that is the target for the CCDIK modification. This node is what the CCDIK chain will attempt to rotate the bone chain to. + </member> + <member name="tip_nodepath" type="NodePath" setter="set_tip_node" getter="get_tip_node" default="NodePath("")"> + The end position of the CCDIK chain. Typically, this should be a child of a [Bone2D] node attached to the final [Bone2D] in the CCDIK chain. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification2DFABRIK.xml b/doc/classes/SkeletonModification2DFABRIK.xml new file mode 100644 index 0000000000..62ab34b06f --- /dev/null +++ b/doc/classes/SkeletonModification2DFABRIK.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification2DFABRIK" inherits="SkeletonModification2D" version="4.0"> + <brief_description> + A modification that uses FABRIK to manipulate a series of [Bone2D] nodes to reach a target. + </brief_description> + <description> + This [SkeletonModification2D] uses an algorithm called [b]F[/b]orward [b]A[/b]nd [b]B[/b]ackward [b]R[/b]eaching [b]I[/b]nverse [b]K[/b]inematics, or FABRIK, to rotate a bone chain so that it reaches a target. + FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other. + Because of how FABRIK works, it often gives more natural results than those seen in [SkeletonModification2DCCDIK]. FABRIK also supports angle constraints, which are fully taken into account when solving. + [b]Note:[/b] The FABRIK modifier has [code]fabrik_joints[/code], which are the data objects that hold the data for each joint in the FABRIK chain. This is different from [Bone2D] nodes! FABRIK joints hold the data needed for each [Bone2D] in the bone chain used by FABRIK. + To help control how the FABRIK joints move, a magnet vector can be passed, which can nudge the bones in a certain direction prior to solving, giving a level of control over the final result. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_fabrik_joint_bone2d_node" qualifiers="const"> + <return type="NodePath"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_fabrik_joint_bone_index" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the index of the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_fabrik_joint_magnet_position" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the magnet position vector for the joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_fabrik_joint_use_target_rotation" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns whether the joint is using the target's rotation rather than allowing FABRIK to rotate the joint. This option only applies to the tip/final joint in the chain. + </description> + </method> + <method name="set_fabrik_joint_bone2d_node"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="bone2d_nodepath" type="NodePath"> + </argument> + <description> + Sets the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_fabrik_joint_bone_index"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="bone_idx" type="int"> + </argument> + <description> + Sets the bone index, [code]bone_index[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the FABRIK joint based on data provided by the linked skeleton. + </description> + </method> + <method name="set_fabrik_joint_magnet_position"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="magnet_position" type="Vector2"> + </argument> + <description> + Sets the magnet position vector for the joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_fabrik_joint_use_target_rotation"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="use_target_rotation" type="bool"> + </argument> + <description> + Sets whether the joint at [code]joint_idx[/code] will use the target node's rotation rather than letting FABRIK rotate the node. + [b]Note:[/b] This option only works for the tip/final joint in the chain. For all other nodes, this option will be ignored. + </description> + </method> + </methods> + <members> + <member name="fabrik_data_chain_length" type="int" setter="set_fabrik_data_chain_length" getter="get_fabrik_data_chain_length" default="0"> + The amount of FABRIK joints in the FABRIK modification. + </member> + <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> + The NodePath to the node that is the target for the FABRIK modification. This node is what the FABRIK chain will attempt to rotate the bone chain to. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification2DJiggle.xml b/doc/classes/SkeletonModification2DJiggle.xml new file mode 100644 index 0000000000..7f8cf2d4d9 --- /dev/null +++ b/doc/classes/SkeletonModification2DJiggle.xml @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification2DJiggle" inherits="SkeletonModification2D" version="4.0"> + <brief_description> + A modification that jiggles [Bone2D] nodes as they move towards a target. + </brief_description> + <description> + This modification moves a series of bones, typically called a bone chain, towards a target. What makes this modification special is that it calculates the velocity and acceleration for each bone in the bone chain, and runs a very light physics-like calculation using the inputted values. This allows the bones to overshoot the target and "jiggle" around. It can be configured to act more like a spring, or sway around like cloth might. + This modification is useful for adding additional motion to things like hair, the edges of clothing, and more. It has several settings to that allow control over how the joint moves when the target moves. + [b]Note:[/b] The Jiggle modifier has [code]jiggle_joints[/code], which are the data objects that hold the data for each joint in the Jiggle chain. This is different from than [Bone2D] nodes! Jiggle joints hold the data needed for each [Bone2D] in the bone chain used by the Jiggle modification. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_collision_mask" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the collision mask used by the Jiggle modifier when collisions are enabled. + </description> + </method> + <method name="get_jiggle_joint_bone2d_node" qualifiers="const"> + <return type="NodePath"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_jiggle_joint_bone_index" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the index of the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_jiggle_joint_damping" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the amount of damping of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_jiggle_joint_gravity" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns a [Vector2] representing the amount of gravity the Jiggle joint at [code]joint_idx[/code] is influenced by. + </description> + </method> + <method name="get_jiggle_joint_mass" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the amount of mass of the jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_jiggle_joint_override" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is overriding the default Jiggle joint data defined in the modification. + </description> + </method> + <method name="get_jiggle_joint_stiffness" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the stiffness of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_jiggle_joint_use_gravity" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is using gravity or not. + </description> + </method> + <method name="get_use_colliders" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns whether the jiggle modifier is taking physics colliders into account when solving. + </description> + </method> + <method name="set_collision_mask"> + <return type="void"> + </return> + <argument index="0" name="collision_mask" type="int"> + </argument> + <description> + Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account. + </description> + </method> + <method name="set_jiggle_joint_bone2d_node"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="bone2d_node" type="NodePath"> + </argument> + <description> + Sets the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_jiggle_joint_bone_index"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="bone_idx" type="int"> + </argument> + <description> + Sets the bone index, [code]bone_index[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the Jiggle joint based on data provided by the linked skeleton. + </description> + </method> + <method name="set_jiggle_joint_damping"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="damping" type="float"> + </argument> + <description> + Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_jiggle_joint_gravity"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="gravity" type="Vector2"> + </argument> + <description> + Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_jiggle_joint_mass"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="mass" type="float"> + </argument> + <description> + Sets the of mass of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_jiggle_joint_override"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="override" type="bool"> + </argument> + <description> + Sets whether the Jiggle joint at [code]joint_idx[/code] should override the default Jiggle joint settings. Setting this to [code]true[/code] will make the joint use its own settings rather than the default ones attached to the modification. + </description> + </method> + <method name="set_jiggle_joint_stiffness"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="stiffness" type="float"> + </argument> + <description> + Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_jiggle_joint_use_gravity"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="use_gravity" type="bool"> + </argument> + <description> + Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity. + </description> + </method> + <method name="set_use_colliders"> + <return type="void"> + </return> + <argument index="0" name="use_colliders" type="bool"> + </argument> + <description> + If [code]true[/code], the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects. + </description> + </method> + </methods> + <members> + <member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.75"> + The default amount of dampening applied to the Jiggle joints, if they are not overriden. Higher values lead to more of the calculated velocity being applied. + </member> + <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 6 )"> + The default amount of gravity applied to the Jiggle joints, if they are not overriden. + </member> + <member name="jiggle_data_chain_length" type="int" setter="set_jiggle_data_chain_length" getter="get_jiggle_data_chain_length" default="0"> + The amount of Jiggle joints in the Jiggle modification. + </member> + <member name="mass" type="float" setter="set_mass" getter="get_mass" default="0.75"> + The default amount of mass assigned to the Jiggle joints, if they are not overriden. Higher values lead to faster movements and more overshooting. + </member> + <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness" default="3.0"> + The default amount of stiffness assigned to the Jiggle joints, if they are not overriden. Higher values act more like springs, quickly moving into the correct position. + </member> + <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> + The NodePath to the node that is the target for the Jiggle modification. This node is what the Jiggle chain will attempt to rotate the bone chain to. + </member> + <member name="use_gravity" type="bool" setter="set_use_gravity" getter="get_use_gravity" default="false"> + Whether the gravity vector, [member gravity], should be applied to the Jiggle joints, assuming they are not overriding the default settings. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification2DLookAt.xml b/doc/classes/SkeletonModification2DLookAt.xml new file mode 100644 index 0000000000..b0fa0e5a01 --- /dev/null +++ b/doc/classes/SkeletonModification2DLookAt.xml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification2DLookAt" inherits="SkeletonModification2D" version="4.0"> + <brief_description> + A modification that rotates a [Bone2D] node to look at a target. + </brief_description> + <description> + This [SkeletonModification2D] rotates a bone to look a target. This is extremely helpful for moving character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_additional_rotation" qualifiers="const"> + <return type="float"> + </return> + <description> + Returns the amount of additional rotation that is applied after the LookAt modification executes. + </description> + </method> + <method name="get_constraint_angle_invert" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns whether the constraints to this modification are inverted or not. + </description> + </method> + <method name="get_constraint_angle_max" qualifiers="const"> + <return type="float"> + </return> + <description> + Returns the constraint's maximum allowed angle. + </description> + </method> + <method name="get_constraint_angle_min" qualifiers="const"> + <return type="float"> + </return> + <description> + Returns the constraint's minimum allowed angle. + </description> + </method> + <method name="get_enable_constraint" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the LookAt modification is using constraints. + </description> + </method> + <method name="set_additional_rotation"> + <return type="void"> + </return> + <argument index="0" name="rotation" type="float"> + </argument> + <description> + Sets the amount of additional rotation that is to be applied after executing the modification. This allows for offsetting the results by the inputted rotation amount. + </description> + </method> + <method name="set_constraint_angle_invert"> + <return type="void"> + </return> + <argument index="0" name="invert" type="bool"> + </argument> + <description> + When [code]true[/code], the modification will use an inverted joint constraint. + An inverted joint constraint only constraints the [Bone2D] to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. + </description> + </method> + <method name="set_constraint_angle_max"> + <return type="void"> + </return> + <argument index="0" name="angle_max" type="float"> + </argument> + <description> + Sets the constraint's maximum allowed angle. + </description> + </method> + <method name="set_constraint_angle_min"> + <return type="void"> + </return> + <argument index="0" name="angle_min" type="float"> + </argument> + <description> + Sets the constraint's minimum allowed angle. + </description> + </method> + <method name="set_enable_constraint"> + <return type="void"> + </return> + <argument index="0" name="enable_constraint" type="bool"> + </argument> + <description> + Sets whether this modification will use constraints or not. When [code]true[/code], constraints will be applied when solving the LookAt modification. + </description> + </method> + </methods> + <members> + <member name="bone2d_node" type="NodePath" setter="set_bone2d_node" getter="get_bone2d_node" default="NodePath("")"> + The [Bone2D] node that the modification will operate on. + </member> + <member name="bone_index" type="int" setter="set_bone_index" getter="get_bone_index" default="-1"> + The index of the [Bone2D] node that the modification will oeprate on. + </member> + <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> + The NodePath to the node that is the target for the LookAt modification. This node is what the modification will rotate the [Bone2D] to. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml new file mode 100644 index 0000000000..d8aaf09a8e --- /dev/null +++ b/doc/classes/SkeletonModification2DPhysicalBones.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification2DPhysicalBones" inherits="SkeletonModification2D" version="4.0"> + <brief_description> + A modification that applies the transforms of [PhysicalBone2D] nodes to [Bone2D] nodes. + </brief_description> + <description> + This modification takes the transforms of [PhysicalBone2D] nodes and applies them to [Bone2D] nodes. This allows the [Bone2D] nodes to react to physics thanks to the linked [PhysicalBone2D] nodes. + </description> + <tutorials> + </tutorials> + <methods> + <method name="fetch_physical_bones"> + <return type="void"> + </return> + <description> + Empties the list of [PhysicalBone2D] nodes and populates it will all [PhysicalBone2D] nodes that are children of the [Skeleton2D]. + </description> + </method> + <method name="get_physical_bone_node" qualifiers="const"> + <return type="NodePath"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <description> + Returns the [PhysicalBone2D] node at [code]joint_idx[/code]. + </description> + </method> + <method name="set_physical_bone_node"> + <return type="void"> + </return> + <argument index="0" name="joint_idx" type="int"> + </argument> + <argument index="1" name="physicalbone2d_node" type="NodePath"> + </argument> + <description> + Sets the [PhysicalBone2D] node at [code]joint_idx[/code]. + [b]Note:[/b] This is just the index used for this modification, not the bone index used in the [Skeleton2D]. + </description> + </method> + <method name="start_simulation"> + <return type="void"> + </return> + <argument index="0" name="bones" type="StringName[]" default="[ ]"> + </argument> + <description> + Tell the [PhysicalBone2D] nodes to start simulating and interacting with the physics world. + Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to start simulating. + </description> + </method> + <method name="stop_simulation"> + <return type="void"> + </return> + <argument index="0" name="bones" type="StringName[]" default="[ ]"> + </argument> + <description> + Tell the [PhysicalBone2D] nodes to stop simulating and interacting with the physics world. + Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to stop simulating. + </description> + </method> + </methods> + <members> + <member name="physical_bone_chain_length" type="int" setter="set_physical_bone_chain_length" getter="get_physical_bone_chain_length" default="0"> + The amount of [PhysicalBone2D] nodes linked in this modification. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification2DStackHolder.xml b/doc/classes/SkeletonModification2DStackHolder.xml new file mode 100644 index 0000000000..313cf81482 --- /dev/null +++ b/doc/classes/SkeletonModification2DStackHolder.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification2DStackHolder" inherits="SkeletonModification2D" version="4.0"> + <brief_description> + A modification that holds and executes a [SkeletonModificationStack2D]. + </brief_description> + <description> + This [SkeletonModification2D] holds a reference to a [SkeletonModificationStack2D], allowing you to use multiple modification stacks on a single [Skeleton2D]. + [b]Note:[/b] The modifications in the held [SkeletonModificationStack2D] will only be executed if their execution mode matches the execution mode of the SkeletonModification2DStackHolder. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_held_modification_stack" qualifiers="const"> + <return type="SkeletonModificationStack2D"> + </return> + <description> + Returns the [SkeletonModificationStack2D] that this modification is holding. + </description> + </method> + <method name="set_held_modification_stack"> + <return type="void"> + </return> + <argument index="0" name="held_modification_stack" type="SkeletonModificationStack2D"> + </argument> + <description> + Sets the [SkeletonModificationStack2D] that this modification is holding. This modification stack will then be executed when this modification is executed. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification2DTwoBoneIK.xml b/doc/classes/SkeletonModification2DTwoBoneIK.xml new file mode 100644 index 0000000000..554515556b --- /dev/null +++ b/doc/classes/SkeletonModification2DTwoBoneIK.xml @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification2DTwoBoneIK" inherits="SkeletonModification2D" version="4.0"> + <brief_description> + A modification that rotates two bones using the law of cosigns to reach the target. + </brief_description> + <description> + This [SkeletonModification2D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three verticies of the triangle. Because the algorithm works by making a triangle, it can only opperate on two bones. + TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification2DFABRIK], but gives similar, natural looking results. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_joint_one_bone2d_node" qualifiers="const"> + <return type="NodePath"> + </return> + <description> + Returns the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_joint_one_bone_idx" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_joint_two_bone2d_node" qualifiers="const"> + <return type="NodePath"> + </return> + <description> + Returns the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_joint_two_bone_idx" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification. + </description> + </method> + <method name="set_joint_one_bone2d_node"> + <return type="void"> + </return> + <argument index="0" name="bone2d_node" type="NodePath"> + </argument> + <description> + Sets the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification. + </description> + </method> + <method name="set_joint_one_bone_idx"> + <return type="void"> + </return> + <argument index="0" name="bone_idx" type="int"> + </argument> + <description> + Sets the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification. + </description> + </method> + <method name="set_joint_two_bone2d_node"> + <return type="void"> + </return> + <argument index="0" name="bone2d_node" type="NodePath"> + </argument> + <description> + Sets the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification. + </description> + </method> + <method name="set_joint_two_bone_idx"> + <return type="void"> + </return> + <argument index="0" name="bone_idx" type="int"> + </argument> + <description> + Sets the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification. + </description> + </method> + </methods> + <members> + <member name="flip_bend_direction" type="bool" setter="set_flip_bend_direction" getter="get_flip_bend_direction" default="false"> + If [code]true[/code], the bones in the modification will blend outward as opposed to inwards when contracting. If [code]false[/code], the bones will bend inwards when contracting. + </member> + <member name="target_maximum_distance" type="float" setter="set_target_maximum_distance" getter="get_target_maximum_distance" default="0.0"> + The maximum distance the target can be at. If the target is farther than this distance, the modification will solve as if it's at this maximum distance. When set to [code]0[/code], the modification will solve without distance constraints. + </member> + <member name="target_minimum_distance" type="float" setter="set_target_minimum_distance" getter="get_target_minimum_distance" default="0.0"> + The minimum distance the target can be at. If the target is closer than this distance, the modification will solve as if it's at this minimum distance. When set to [code]0[/code], the modification will solve without distance constraints. + </member> + <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> + The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will use when bending the [Bone2D] nodes. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml new file mode 100644 index 0000000000..35b899fe08 --- /dev/null +++ b/doc/classes/SkeletonModificationStack2D.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModificationStack2D" inherits="Resource" version="4.0"> + <brief_description> + A resource that holds a stack of [SkeletonModification2D]s. + </brief_description> + <description> + This resource is used by the Skeleton and holds a stack of [SkeletonModification2D]s. + This controls the order of the modifications and how they are applied. Modification order is especially important for full-body IK setups, as you need to execute the modifications in the correct order to get the desired results. For example, you want to execute a modification on the spine [i]before[/i] the arms on a humanoid skeleton. + This resource also controls how strongly all of the modifications are applied to the [Skeleton2D]. + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_modification"> + <return type="void"> + </return> + <argument index="0" name="modification" type="SkeletonModification2D"> + </argument> + <description> + Adds the passed-in [SkeletonModification2D] to the stack. + </description> + </method> + <method name="delete_modification"> + <return type="void"> + </return> + <argument index="0" name="mod_idx" type="int"> + </argument> + <description> + Deletes the [SkeletonModification2D] at the index position [code]mod_idx[/code], if it exists. + </description> + </method> + <method name="enable_all_modifications"> + <return type="void"> + </return> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + Enables all [SkeletonModification2D]s in the stack. + </description> + </method> + <method name="execute"> + <return type="void"> + </return> + <argument index="0" name="delta" type="float"> + </argument> + <argument index="1" name="execution_mode" type="int"> + </argument> + <description> + Executes all of the [SkeletonModification2D]s in the stack that use the same execution mode as the passed-in [code]execution_mode[/code], starting from index [code]0[/code] to [member modification_count]. + [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results. + </description> + </method> + <method name="get_is_setup" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns a boolean that indiciates whether the modification stack is setup and can execute. + </description> + </method> + <method name="get_modification" qualifiers="const"> + <return type="SkeletonModification2D"> + </return> + <argument index="0" name="mod_idx" type="int"> + </argument> + <description> + Returns the [SkeletonModification2D] at the passed-in index, [code]mod_idx[/code]. + </description> + </method> + <method name="get_skeleton" qualifiers="const"> + <return type="Skeleton2D"> + </return> + <description> + Returns the [Skeleton2D] node that the SkeletonModificationStack2D is bound to. + </description> + </method> + <method name="set_modification"> + <return type="void"> + </return> + <argument index="0" name="mod_idx" type="int"> + </argument> + <argument index="1" name="modification" type="SkeletonModification2D"> + </argument> + <description> + Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code]. + </description> + </method> + <method name="setup"> + <return type="void"> + </return> + <description> + Sets up the modification stack so it can execute. This function should be called by [Skeleton2D] and shouldn't be manually called unless you know what you are doing. + </description> + </method> + </methods> + <members> + <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="false"> + If [code]true[/code], the modification's in the stack will be called. This is handled automatically through the [Skeleton2D] node. + </member> + <member name="modification_count" type="int" setter="set_modification_count" getter="get_modification_count" default="0"> + The number of modifications in the stack. + </member> + <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> + The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the [Skeleton2D] [Bone2D] poses. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml index e22feb42f0..f409b6c80c 100644 --- a/doc/classes/Skin.xml +++ b/doc/classes/Skin.xml @@ -12,7 +12,7 @@ </return> <argument index="0" name="bone" type="int"> </argument> - <argument index="1" name="pose" type="Transform"> + <argument index="1" name="pose" type="Transform3D"> </argument> <description> </description> @@ -46,7 +46,7 @@ </description> </method> <method name="get_bind_pose" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="bind_index" type="int"> </argument> @@ -86,7 +86,7 @@ </return> <argument index="0" name="bind_index" type="int"> </argument> - <argument index="1" name="pose" type="Transform"> + <argument index="1" name="pose" type="Transform3D"> </argument> <description> </description> diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml index 04e201e1bd..7999ad774d 100644 --- a/doc/classes/SoftBody3D.xml +++ b/doc/classes/SoftBody3D.xml @@ -44,6 +44,12 @@ Returns an individual bit on the collision mask. </description> </method> + <method name="get_physics_rid" qualifiers="const"> + <return type="RID"> + </return> + <description> + </description> + </method> <method name="remove_collision_exception_with"> <return type="void"> </return> @@ -77,8 +83,6 @@ </method> </methods> <members> - <member name="angular_stiffness" type="float" setter="set_angular_stiffness" getter="get_angular_stiffness" default="0.0"> - </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The physics layers this SoftBody3D is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. @@ -87,30 +91,26 @@ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The physics layers this SoftBody3D scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> - <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.0"> + <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01"> </member> <member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0"> </member> - <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.0"> + <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5"> </member> <member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath("")"> [NodePath] to a [CollisionObject3D] this SoftBody3D should avoid clipping. </member> - <member name="pose_matching_coefficient" type="float" setter="set_pose_matching_coefficient" getter="get_pose_matching_coefficient" default="0.0"> - </member> <member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient" default="0.0"> </member> <member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true"> If [code]true[/code], the [SoftBody3D] will respond to [RayCast3D]s. </member> - <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="0"> + <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5"> Increasing this value will improve the resulting simulation, but can affect performance. Use with care. </member> - <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="0.0"> + <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0"> The SoftBody3D's mass. </member> - <member name="volume_stiffness" type="float" setter="set_volume_stiffness" getter="get_volume_stiffness" default="0.0"> - </member> </members> <constants> </constants> diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml index e4df753674..c320adb1be 100644 --- a/doc/classes/Sprite2D.xml +++ b/doc/classes/Sprite2D.xml @@ -18,7 +18,7 @@ [codeblocks] [gdscript] func _input(event): - if event is InputEventMouseButton and event.pressed and event.button_index == BUTTON_LEFT: + if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT: if get_rect().has_point(to_local(event.position)): print("A click!") [/gdscript] @@ -64,7 +64,7 @@ <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1. </member> - <member name="frame_coords" type="Vector2" setter="set_frame_coords" getter="get_frame_coords" default="Vector2( 0, 0 )"> + <member name="frame_coords" type="Vector2i" setter="set_frame_coords" getter="get_frame_coords" default="Vector2i( 0, 0 )"> Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member hframes] or [member vframes] must be greater than 1. </member> <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> @@ -73,10 +73,10 @@ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The texture's drawing offset. </member> - <member name="region_enabled" type="bool" setter="set_region" getter="is_region" default="false"> + <member name="region_enabled" type="bool" setter="set_region_enabled" getter="is_region_enabled" default="false"> If [code]true[/code], texture is cut from a larger atlas texture. See [member region_rect]. </member> - <member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled" default="false"> + <member name="region_filter_clip_enabled" type="bool" setter="set_region_filter_clip_enabled" getter="is_region_filter_clip_enabled" default="false"> If [code]true[/code], the outermost pixels get blurred out. [member region_enabled] must be [code]true[/code]. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index f9b947fa3d..a7d61a6bab 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -14,13 +14,13 @@ <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1. </member> - <member name="frame_coords" type="Vector2" setter="set_frame_coords" getter="get_frame_coords" default="Vector2( 0, 0 )"> + <member name="frame_coords" type="Vector2i" setter="set_frame_coords" getter="get_frame_coords" default="Vector2i( 0, 0 )"> Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member hframes] or [member vframes] must be greater than 1. </member> <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> The number of columns in the sprite sheet. </member> - <member name="region_enabled" type="bool" setter="set_region" getter="is_region" default="false"> + <member name="region_enabled" type="bool" setter="set_region_enabled" getter="is_region_enabled" default="false"> If [code]true[/code], texture will be cut from a larger atlas texture. See [member region_rect]. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 078520a095..06b9c2b042 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -73,7 +73,7 @@ The texture's drawing offset. </member> <member name="opacity" type="float" setter="set_opacity" getter="get_opacity" default="1.0"> - The objects visibility on a scale from [code]0[/code] fully invisible to [code]1[/code] fully visible. + The objects' visibility on a scale from [code]0[/code] fully invisible to [code]1[/code] fully visible. </member> <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01"> The size of one pixel's width on the sprite to scale it in 3D. diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index 2a5c1ea6f4..298339d5fc 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -4,8 +4,11 @@ Static body for 2D physics. </brief_description> <description> - Static body for 2D physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms. - Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt). + Static body for 2D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody2D], they don't consume any CPU resources as long as they don't move. + They however have extra functionalities to move and affect other bodies: + [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). + [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path. + [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path. </description> <tutorials> </tutorials> @@ -13,10 +16,14 @@ </methods> <members> <member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0"> - The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating. + The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating. </member> <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2( 0, 0 )"> - The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving. + The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving. + </member> + <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false"> + If [code]true[/code], the body will act the same as a [RigidBody2D] in [constant RigidBody2D.MODE_KINEMATIC] mode. + When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml index 63a15cbe1d..5ffbb71522 100644 --- a/doc/classes/StaticBody3D.xml +++ b/doc/classes/StaticBody3D.xml @@ -4,8 +4,11 @@ Static body for 3D physics. </brief_description> <description> - Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move. - Additionally, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). + Static body for 3D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move. + They however have extra functionalities to move and affect other bodies: + [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). + [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path. + [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path. </description> <tutorials> <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> @@ -16,10 +19,14 @@ </methods> <members> <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3( 0, 0, 0 )"> - The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. + The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating. </member> <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3( 0, 0, 0 )"> - The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. + The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving. + </member> + <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false"> + If [code]true[/code], the body will act the same as a [RigidBody3D] in [constant RigidBody3D.MODE_KINEMATIC] mode. + When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index a1b858acf6..f120103916 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -4,7 +4,7 @@ Abstraction and base class for stream-based protocols. </brief_description> <description> - StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or UNIX sockets). It provides an API for sending and receiving data through streams as raw data or strings. + StreamPeer is an abstraction and base class for stream-based protocols (such as TCP). It provides an API for sending and receiving data through streams as raw data or strings. </description> <tutorials> </tutorials> diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml index bb85d94bf9..7b7c1d7426 100644 --- a/doc/classes/StreamPeerTCP.xml +++ b/doc/classes/StreamPeerTCP.xml @@ -9,6 +9,18 @@ <tutorials> </tutorials> <methods> + <method name="bind"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="port" type="int"> + </argument> + <argument index="1" name="host" type="String" default=""*""> + </argument> + <description> + Opens the TCP socket, and binds it to the specified local address. + This method is generally not needed, and only used to force the subsequent call to [method connect_to_host] to use the specified [code]host[/code] and [code]port[/code] as source address. This can be desired in some NAT punchthrough techniques, or when forcing the source network interface. + </description> + </method> <method name="connect_to_host"> <return type="int" enum="Error"> </return> @@ -17,7 +29,7 @@ <argument index="1" name="port" type="int"> </argument> <description> - Connects to the specified [code]host:port[/code] pair. A hostname will be resolved if valid. Returns [constant OK] on success or [constant FAILED] on failure. + Connects to the specified [code]host:port[/code] pair. A hostname will be resolved if valid. Returns [constant OK] on success. </description> </method> <method name="disconnect_from_host"> @@ -41,6 +53,13 @@ Returns the port of this peer. </description> </method> + <method name="get_local_port" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the local port to which this peer is bound. + </description> + </method> <method name="get_status"> <return type="int" enum="StreamPeerTCP.Status"> </return> @@ -61,8 +80,8 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - Disables Nagle's algorithm to improve latency for small packets. - [b]Note:[/b] For applications that send large packets or need to transfer a lot of data, this can decrease the total available bandwidth. + If [code]enabled[/code] is [code]true[/code], packets will be sent immediately. If [code]enabled[/code] is [code]false[/code] (the default), packet transfers will be delayed and combined using [url=https://en.wikipedia.org/wiki/Nagle%27s_algorithm]Nagle's algorithm[/url]. + [b]Note:[/b] It's recommended to leave this disabled for applications that send large packets or need to transfer a lot of data, as enabling this can decrease the total available bandwidth. </description> </method> </methods> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index a90bcd9eb7..a81defa16c 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -44,7 +44,7 @@ Constructs a new String from the given [StringName]. </description> </method> - <method name="begins_with"> + <method name="begins_with" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="text" type="String"> @@ -53,14 +53,14 @@ Returns [code]true[/code] if the string begins with the given string. </description> </method> - <method name="bigrams"> + <method name="bigrams" qualifiers="const"> <return type="PackedStringArray"> </return> <description> Returns the bigrams (pairs of consecutive letters) of this string. </description> </method> - <method name="bin_to_int"> + <method name="bin_to_int" qualifiers="const"> <return type="int"> </return> <description> @@ -77,14 +77,14 @@ [/codeblocks] </description> </method> - <method name="c_escape"> + <method name="c_escape" qualifiers="const"> <return type="String"> </return> <description> Returns a copy of the string with special characters escaped using the C language standard. </description> </method> - <method name="c_unescape"> + <method name="c_unescape" qualifiers="const"> <return type="String"> </return> <description> @@ -92,14 +92,14 @@ [b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\uXXXX[/code] escape sequence. </description> </method> - <method name="capitalize"> + <method name="capitalize" qualifiers="const"> <return type="String"> </return> <description> Changes the case of some letters. Replaces underscores with spaces, adds spaces before in-word uppercase characters, converts all letters to lowercase, then capitalizes the first letter and every letter following a space character. For [code]capitalize camelCase mixed_with_underscores[/code], it will return [code]Capitalize Camel Case Mixed With Underscores[/code]. </description> </method> - <method name="casecmp_to"> + <method name="casecmp_to" qualifiers="const"> <return type="int"> </return> <argument index="0" name="to" type="String"> @@ -111,7 +111,15 @@ To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method naturalnocasecmp_to]. </description> </method> - <method name="count"> + <method name="chr" qualifiers="static"> + <return type="String"> + </return> + <argument index="0" name="char" type="int"> + </argument> + <description> + </description> + </method> + <method name="count" qualifiers="const"> <return type="int"> </return> <argument index="0" name="what" type="String"> @@ -124,7 +132,7 @@ Returns the number of occurrences of substring [code]what[/code] between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used. </description> </method> - <method name="countn"> + <method name="countn" qualifiers="const"> <return type="int"> </return> <argument index="0" name="what" type="String"> @@ -137,14 +145,14 @@ Returns the number of occurrences of substring [code]what[/code] (ignoring case) between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used. </description> </method> - <method name="dedent"> + <method name="dedent" qualifiers="const"> <return type="String"> </return> <description> Returns a copy of the string with indentation (leading tabs and spaces) removed. </description> </method> - <method name="ends_with"> + <method name="ends_with" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="text" type="String"> @@ -153,7 +161,7 @@ Returns [code]true[/code] if the string ends with the given string. </description> </method> - <method name="find"> + <method name="find" qualifiers="const"> <return type="int"> </return> <argument index="0" name="what" type="String"> @@ -174,7 +182,7 @@ [/codeblocks] </description> </method> - <method name="findn"> + <method name="findn" qualifiers="const"> <return type="int"> </return> <argument index="0" name="what" type="String"> @@ -185,7 +193,7 @@ Returns the index of the [b]first[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string. </description> </method> - <method name="format"> + <method name="format" qualifiers="const"> <return type="String"> </return> <argument index="0" name="values" type="Variant"> @@ -196,42 +204,42 @@ Formats the string by replacing all occurrences of [code]placeholder[/code] with [code]values[/code]. </description> </method> - <method name="get_base_dir"> + <method name="get_base_dir" qualifiers="const"> <return type="String"> </return> <description> If the string is a valid file path, returns the base directory name. </description> </method> - <method name="get_basename"> + <method name="get_basename" qualifiers="const"> <return type="String"> </return> <description> If the string is a valid file path, returns the full file path without the extension. </description> </method> - <method name="get_extension"> + <method name="get_extension" qualifiers="const"> <return type="String"> </return> <description> If the string is a valid file path, returns the extension. </description> </method> - <method name="get_file"> + <method name="get_file" qualifiers="const"> <return type="String"> </return> <description> If the string is a valid file path, returns the filename. </description> </method> - <method name="hash"> + <method name="hash" qualifiers="const"> <return type="int"> </return> <description> Hashes the string and returns a 32-bit integer. </description> </method> - <method name="hex_to_int"> + <method name="hex_to_int" qualifiers="const"> <return type="int"> </return> <description> @@ -248,7 +256,15 @@ [/codeblocks] </description> </method> - <method name="insert"> + <method name="humanize_size" qualifiers="static"> + <return type="String"> + </return> + <argument index="0" name="size" type="int"> + </argument> + <description> + </description> + </method> + <method name="insert" qualifiers="const"> <return type="String"> </return> <argument index="0" name="position" type="int"> @@ -259,28 +275,28 @@ Returns a copy of the string with the substring [code]what[/code] inserted at the given position. </description> </method> - <method name="is_abs_path"> + <method name="is_abs_path" qualifiers="const"> <return type="bool"> </return> <description> If the string is a path to a file or directory, returns [code]true[/code] if the path is absolute. </description> </method> - <method name="is_empty"> + <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if the length of the string equals [code]0[/code]. </description> </method> - <method name="is_rel_path"> + <method name="is_rel_path" qualifiers="const"> <return type="bool"> </return> <description> If the string is a path to a file or directory, returns [code]true[/code] if the path is relative. </description> </method> - <method name="is_subsequence_of"> + <method name="is_subsequence_of" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="text" type="String"> @@ -289,7 +305,7 @@ Returns [code]true[/code] if this string is a subsequence of the given string. </description> </method> - <method name="is_subsequence_ofi"> + <method name="is_subsequence_ofi" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="text" type="String"> @@ -298,7 +314,7 @@ Returns [code]true[/code] if this string is a subsequence of the given string, without considering case. </description> </method> - <method name="is_valid_filename"> + <method name="is_valid_filename" qualifiers="const"> <return type="bool"> </return> <description> @@ -306,14 +322,14 @@ [code]: / \ ? * " | % < >[/code] </description> </method> - <method name="is_valid_float"> + <method name="is_valid_float" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if this string contains a valid float. </description> </method> - <method name="is_valid_hex_number"> + <method name="is_valid_hex_number" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="with_prefix" type="bool" default="false"> @@ -322,35 +338,35 @@ Returns [code]true[/code] if this string contains a valid hexadecimal number. If [code]with_prefix[/code] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code]. </description> </method> - <method name="is_valid_html_color"> + <method name="is_valid_html_color" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if this string contains a valid color in hexadecimal HTML notation. Other HTML notations such as named colors or [code]hsl()[/code] colors aren't considered valid by this method and will return [code]false[/code]. </description> </method> - <method name="is_valid_identifier"> + <method name="is_valid_identifier" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores ([code]_[/code]) and the first character may not be a digit. </description> </method> - <method name="is_valid_integer"> + <method name="is_valid_integer" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if this string contains a valid integer. </description> </method> - <method name="is_valid_ip_address"> + <method name="is_valid_ip_address" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if this string contains only a well-formatted IPv4 or IPv6 address. This method considers [url=https://en.wikipedia.org/wiki/Reserved_IP_addresses]reserved IP addresses[/url] such as [code]0.0.0.0[/code] as valid. </description> </method> - <method name="join"> + <method name="join" qualifiers="const"> <return type="String"> </return> <argument index="0" name="parts" type="PackedStringArray"> @@ -368,30 +384,35 @@ [/codeblocks] </description> </method> - <method name="json_escape"> + <method name="json_escape" qualifiers="const"> <return type="String"> </return> <description> Returns a copy of the string with special characters escaped using the JSON standard. </description> </method> - <method name="left"> + <method name="left" qualifiers="const"> <return type="String"> </return> <argument index="0" name="position" type="int"> </argument> <description> - Returns a number of characters from the left of the string. + Returns a number of characters from the left of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length. + Examples: + [codeblock] + print("sample text".left(3)) #prints "sam" + print("sample text".left(-3)) #prints "sample t" + [/codeblock] </description> </method> - <method name="length"> + <method name="length" qualifiers="const"> <return type="int"> </return> <description> Returns the string's amount of characters. </description> </method> - <method name="lpad"> + <method name="lpad" qualifiers="const"> <return type="String"> </return> <argument index="0" name="min_length" type="int"> @@ -402,7 +423,7 @@ Formats a string to be at least [code]min_length[/code] long by adding [code]character[/code]s to the left of the string. </description> </method> - <method name="lstrip"> + <method name="lstrip" qualifiers="const"> <return type="String"> </return> <argument index="0" name="chars" type="String"> @@ -412,7 +433,7 @@ [b]Note:[/b] The [code]chars[/code] is not a prefix. See [method trim_prefix] method that will remove a single prefix string rather than a set of characters. </description> </method> - <method name="match"> + <method name="match" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="expr" type="String"> @@ -421,7 +442,7 @@ Does a simple case-sensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). </description> </method> - <method name="matchn"> + <method name="matchn" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="expr" type="String"> @@ -430,21 +451,21 @@ Does a simple case-insensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). </description> </method> - <method name="md5_buffer"> + <method name="md5_buffer" qualifiers="const"> <return type="PackedByteArray"> </return> <description> Returns the MD5 hash of the string as an array of bytes. </description> </method> - <method name="md5_text"> + <method name="md5_text" qualifiers="const"> <return type="String"> </return> <description> Returns the MD5 hash of the string as a string. </description> </method> - <method name="naturalnocasecmp_to"> + <method name="naturalnocasecmp_to" qualifiers="const"> <return type="int"> </return> <argument index="0" name="to" type="String"> @@ -457,7 +478,7 @@ To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method casecmp_to]. </description> </method> - <method name="nocasecmp_to"> + <method name="nocasecmp_to" qualifiers="const"> <return type="int"> </return> <argument index="0" name="to" type="String"> @@ -469,6 +490,24 @@ To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to] and [method naturalnocasecmp_to]. </description> </method> + <method name="num" qualifiers="static"> + <return type="String"> + </return> + <argument index="0" name="number" type="float"> + </argument> + <argument index="1" name="decimals" type="int" default="-1"> + </argument> + <description> + </description> + </method> + <method name="num_scientific" qualifiers="static"> + <return type="String"> + </return> + <argument index="0" name="number" type="float"> + </argument> + <description> + </description> + </method> <method name="operator !=" qualifiers="operator"> <return type="bool"> </return> @@ -549,7 +588,7 @@ <description> </description> </method> - <method name="pad_decimals"> + <method name="pad_decimals" qualifiers="const"> <return type="String"> </return> <argument index="0" name="digits" type="int"> @@ -558,7 +597,7 @@ Formats a number to have an exact number of [code]digits[/code] after the decimal point. </description> </method> - <method name="pad_zeros"> + <method name="pad_zeros" qualifiers="const"> <return type="String"> </return> <argument index="0" name="digits" type="int"> @@ -567,7 +606,7 @@ Formats a number to have an exact number of [code]digits[/code] before the decimal point. </description> </method> - <method name="plus_file"> + <method name="plus_file" qualifiers="const"> <return type="String"> </return> <argument index="0" name="file" type="String"> @@ -576,7 +615,7 @@ If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code]. </description> </method> - <method name="repeat"> + <method name="repeat" qualifiers="const"> <return type="String"> </return> <argument index="0" name="count" type="int"> @@ -585,7 +624,7 @@ Returns original string repeated a number of times. The number of repetitions is given by the argument. </description> </method> - <method name="replace"> + <method name="replace" qualifiers="const"> <return type="String"> </return> <argument index="0" name="what" type="String"> @@ -596,7 +635,7 @@ Replaces occurrences of a case-sensitive substring with the given one inside the string. </description> </method> - <method name="replacen"> + <method name="replacen" qualifiers="const"> <return type="String"> </return> <argument index="0" name="what" type="String"> @@ -607,7 +646,7 @@ Replaces occurrences of a case-insensitive substring with the given one inside the string. </description> </method> - <method name="rfind"> + <method name="rfind" qualifiers="const"> <return type="int"> </return> <argument index="0" name="what" type="String"> @@ -618,7 +657,7 @@ Returns the index of the [b]last[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string. </description> </method> - <method name="rfindn"> + <method name="rfindn" qualifiers="const"> <return type="int"> </return> <argument index="0" name="what" type="String"> @@ -629,16 +668,21 @@ Returns the index of the [b]last[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string. </description> </method> - <method name="right"> + <method name="right" qualifiers="const"> <return type="String"> </return> <argument index="0" name="position" type="int"> </argument> <description> - Returns the right side of the string from a given position. + Returns a number of characters from the right of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length. + Examples: + [codeblock] + print("sample text".right(3)) #prints "ext" + print("sample text".right(-3)) #prints "ple text" + [/codeblock] </description> </method> - <method name="rpad"> + <method name="rpad" qualifiers="const"> <return type="String"> </return> <argument index="0" name="min_length" type="int"> @@ -649,7 +693,7 @@ Formats a string to be at least [code]min_length[/code] long by adding [code]character[/code]s to the right of the string. </description> </method> - <method name="rsplit"> + <method name="rsplit" qualifiers="const"> <return type="PackedStringArray"> </return> <argument index="0" name="delimiter" type="String"> @@ -677,7 +721,7 @@ [/codeblocks] </description> </method> - <method name="rstrip"> + <method name="rstrip" qualifiers="const"> <return type="String"> </return> <argument index="0" name="chars" type="String"> @@ -687,35 +731,35 @@ [b]Note:[/b] The [code]chars[/code] is not a suffix. See [method trim_suffix] method that will remove a single suffix string rather than a set of characters. </description> </method> - <method name="sha1_buffer"> + <method name="sha1_buffer" qualifiers="const"> <return type="PackedByteArray"> </return> <description> Returns the SHA-1 hash of the string as an array of bytes. </description> </method> - <method name="sha1_text"> + <method name="sha1_text" qualifiers="const"> <return type="String"> </return> <description> Returns the SHA-1 hash of the string as a string. </description> </method> - <method name="sha256_buffer"> + <method name="sha256_buffer" qualifiers="const"> <return type="PackedByteArray"> </return> <description> Returns the SHA-256 hash of the string as an array of bytes. </description> </method> - <method name="sha256_text"> + <method name="sha256_text" qualifiers="const"> <return type="String"> </return> <description> Returns the SHA-256 hash of the string as a string. </description> </method> - <method name="similarity"> + <method name="similarity" qualifiers="const"> <return type="float"> </return> <argument index="0" name="text" type="String"> @@ -724,7 +768,7 @@ Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar. </description> </method> - <method name="split"> + <method name="split" qualifiers="const"> <return type="PackedStringArray"> </return> <argument index="0" name="delimiter" type="String"> @@ -755,7 +799,7 @@ If you need to split strings with more complex rules, use the [RegEx] class instead. </description> </method> - <method name="split_floats"> + <method name="split_floats" qualifiers="const"> <return type="PackedFloat32Array"> </return> <argument index="0" name="delimiter" type="String"> @@ -767,7 +811,7 @@ For example, [code]"1,2.5,3"[/code] will return [code][1,2.5,3][/code] if split by [code]","[/code]. </description> </method> - <method name="strip_edges"> + <method name="strip_edges" qualifiers="const"> <return type="String"> </return> <argument index="0" name="left" type="bool" default="true"> @@ -778,14 +822,14 @@ Returns a copy of the string stripped of any non-printable character (including tabulations, spaces and line breaks) at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. </description> </method> - <method name="strip_escapes"> + <method name="strip_escapes" qualifiers="const"> <return type="String"> </return> <description> Returns a copy of the string stripped of any escape character. These include all non-printable control characters of the first page of the ASCII table (< 32), such as tabulation ([code]\t[/code] in C) and newline ([code]\n[/code] and [code]\r[/code]) characters, but not spaces. </description> </method> - <method name="substr"> + <method name="substr" qualifiers="const"> <return type="String"> </return> <argument index="0" name="from" type="int"> @@ -796,63 +840,63 @@ Returns part of the string from the position [code]from[/code] with length [code]len[/code]. Argument [code]len[/code] is optional and using [code]-1[/code] will return remaining characters from given position. </description> </method> - <method name="to_ascii_buffer"> + <method name="to_ascii_buffer" qualifiers="const"> <return type="PackedByteArray"> </return> <description> Converts the String (which is a character array) to ASCII/Latin-1 encoded [PackedByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8_buffer], as this method assumes that all the characters in the String are ASCII/Latin-1 characters, unsupported characters are replaced with spaces. </description> </method> - <method name="to_float"> + <method name="to_float" qualifiers="const"> <return type="float"> </return> <description> Converts a string containing a decimal number into a [code]float[/code]. </description> </method> - <method name="to_int"> + <method name="to_int" qualifiers="const"> <return type="int"> </return> <description> Converts a string containing an integer number into an [code]int[/code]. </description> </method> - <method name="to_lower"> + <method name="to_lower" qualifiers="const"> <return type="String"> </return> <description> Returns the string converted to lowercase. </description> </method> - <method name="to_upper"> + <method name="to_upper" qualifiers="const"> <return type="String"> </return> <description> Returns the string converted to uppercase. </description> </method> - <method name="to_utf16_buffer"> + <method name="to_utf16_buffer" qualifiers="const"> <return type="PackedByteArray"> </return> <description> Converts the String (which is an array of characters) to UTF-16 encoded [PackedByteArray] (which is an array of bytes). </description> </method> - <method name="to_utf32_buffer"> + <method name="to_utf32_buffer" qualifiers="const"> <return type="PackedByteArray"> </return> <description> Converts the String (which is an array of characters) to UTF-32 encoded [PackedByteArray] (which is an array of bytes). </description> </method> - <method name="to_utf8_buffer"> + <method name="to_utf8_buffer" qualifiers="const"> <return type="PackedByteArray"> </return> <description> Converts the String (which is an array of characters) to UTF-8 encode [PackedByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii_buffer], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii_buffer]. </description> </method> - <method name="trim_prefix"> + <method name="trim_prefix" qualifiers="const"> <return type="String"> </return> <argument index="0" name="prefix" type="String"> @@ -861,7 +905,7 @@ Removes a given string from the start if it starts with it or leaves the string unchanged. </description> </method> - <method name="trim_suffix"> + <method name="trim_suffix" qualifiers="const"> <return type="String"> </return> <argument index="0" name="suffix" type="String"> @@ -870,7 +914,7 @@ Removes a given string from the end if it ends with it or leaves the string unchanged. </description> </method> - <method name="unicode_at"> + <method name="unicode_at" qualifiers="const"> <return type="int"> </return> <argument index="0" name="at" type="int"> @@ -879,7 +923,7 @@ Returns the character code at position [code]at[/code]. </description> </method> - <method name="uri_decode"> + <method name="uri_decode" qualifiers="const"> <return type="String"> </return> <description> @@ -894,7 +938,7 @@ [/codeblocks] </description> </method> - <method name="uri_encode"> + <method name="uri_encode" qualifiers="const"> <return type="String"> </return> <description> @@ -909,7 +953,14 @@ [/codeblocks] </description> </method> - <method name="xml_escape"> + <method name="validate_node_name" qualifiers="const"> + <return type="String"> + </return> + <description> + Removes any characters from the string that are prohibited in [Node] names ([code].[/code] [code]:[/code] [code]@[/code] [code]/[/code] [code]"[/code]). + </description> + </method> + <method name="xml_escape" qualifiers="const"> <return type="String"> </return> <argument index="0" name="escape_quotes" type="bool" default="false"> @@ -918,7 +969,7 @@ Returns a copy of the string with special characters escaped using the XML standard. If [code]escape_quotes[/code] is [code]true[/code], the single quote ([code]'[/code]) and double quote ([code]"[/code]) characters are also escaped. </description> </method> - <method name="xml_unescape"> + <method name="xml_unescape" qualifiers="const"> <return type="String"> </return> <description> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index af0074f080..be32f6a234 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -4,7 +4,7 @@ An optimized string type for unique names. </brief_description> <description> - [StringName]s are immutable strings designed for general-purpose represention of unique names. [StringName] ensures that only one instance of a given name exists (so two [StringName]s with the same value are the same object). Comparing them is much faster than with regular [String]s, because only the pointers are compared, not the whole strings. + [StringName]s are immutable strings designed for general-purpose representation of unique names. [StringName] ensures that only one instance of a given name exists (so two [StringName]s with the same value are the same object). Comparing them is much faster than with regular [String]s, because only the pointers are compared, not the whole strings. </description> <tutorials> </tutorials> diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml index 376082f417..f54f22d6fa 100644 --- a/doc/classes/SubViewport.xml +++ b/doc/classes/SubViewport.xml @@ -25,7 +25,7 @@ <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="SubViewport.UpdateMode" default="2"> The update mode when the sub-viewport is used as a render target. </member> - <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 0, 0 )"> + <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i( 512, 512 )"> The width and height of the sub-viewport. </member> <member name="size_2d_override" type="Vector2i" setter="set_size_2d_override" getter="get_size_2d_override" default="Vector2i( 0, 0 )"> @@ -34,9 +34,6 @@ <member name="size_2d_override_stretch" type="bool" setter="set_size_2d_override_stretch" getter="is_size_2d_override_stretch_enabled" default="false"> If [code]true[/code], the 2D size override affects stretch as well. </member> - <member name="xr" type="bool" setter="set_use_xr" getter="is_using_xr" default="false"> - If [code]true[/code], the sub-viewport will be used in AR/VR process. - </member> </members> <constants> <constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode"> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index d145b4ce97..d434f5c2c9 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -76,10 +76,10 @@ </argument> <argument index="1" name="surface" type="int"> </argument> - <argument index="2" name="transform" type="Transform"> + <argument index="2" name="transform" type="Transform3D"> </argument> <description> - Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform]. + Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform3D]. </description> </method> <method name="begin"> @@ -189,6 +189,12 @@ <description> </description> </method> + <method name="get_primitive" qualifiers="const"> + <return type="int" enum="Mesh.PrimitiveType"> + </return> + <description> + </description> + </method> <method name="get_skin_weight_count" qualifiers="const"> <return type="int" enum="SurfaceTool.SkinWeightCount"> </return> @@ -199,7 +205,7 @@ <return type="void"> </return> <description> - Shrinks the vertex array by creating an index array (avoids reusing vertices). + Shrinks the vertex array by creating an index array. This can improve performance by avoiding vertex reuse. </description> </method> <method name="optimize_indices_for_cache"> @@ -214,7 +220,7 @@ <argument index="0" name="bones" type="PackedInt32Array"> </argument> <description> - Specifies an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers. + Specifies an array of bones to use for the [i]next[/i] vertex. [code]bones[/code] must contain 4 integers. </description> </method> <method name="set_color"> @@ -223,7 +229,7 @@ <argument index="0" name="color" type="Color"> </argument> <description> - Specifies a [Color] for the next vertex to use. + Specifies a [Color] to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. [b]Note:[/b] The material must have [member BaseMaterial3D.vertex_color_use_as_albedo] enabled for the vertex color to be visible. </description> </method> @@ -262,7 +268,7 @@ <argument index="0" name="normal" type="Vector3"> </argument> <description> - Specifies a normal for the next vertex to use. + Specifies a normal to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> </method> <method name="set_skin_weight_count"> @@ -288,7 +294,7 @@ <argument index="0" name="tangent" type="Plane"> </argument> <description> - Specifies a tangent for the next vertex to use. + Specifies a tangent to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> </method> <method name="set_uv"> @@ -297,7 +303,7 @@ <argument index="0" name="uv" type="Vector2"> </argument> <description> - Specifies a set of UV coordinates to use for the next vertex. + Specifies a set of UV coordinates to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> </method> <method name="set_uv2"> @@ -306,7 +312,7 @@ <argument index="0" name="uv2" type="Vector2"> </argument> <description> - Specifies an optional second set of UV coordinates to use for the next vertex. + Specifies an optional second set of UV coordinates to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> </method> <method name="set_weights"> @@ -315,7 +321,7 @@ <argument index="0" name="weights" type="PackedFloat32Array"> </argument> <description> - Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values. + Specifies weight values to use for the [i]next[/i] vertex. [code]weights[/code] must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> </method> </methods> diff --git a/doc/classes/TCP_Server.xml b/doc/classes/TCPServer.xml index 72e9ca923d..28f06ad3ae 100644 --- a/doc/classes/TCP_Server.xml +++ b/doc/classes/TCPServer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TCP_Server" inherits="Reference" version="4.0"> +<class name="TCPServer" inherits="Reference" version="4.0"> <brief_description> A TCP server. </brief_description> @@ -9,6 +9,13 @@ <tutorials> </tutorials> <methods> + <method name="get_local_port" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the local port this server is listening to. + </description> + </method> <method name="is_connection_available" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index df9680bf28..d784585e20 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -254,6 +254,9 @@ </method> </methods> <members> + <member name="clip_tabs" type="bool" setter="set_clip_tabs" getter="get_clip_tabs" default="true"> + If [code]true[/code], tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible. + </member> <member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" default="0"> Select tab at index [code]tab_idx[/code]. </member> @@ -261,7 +264,7 @@ If [code]true[/code], tabs can be rearranged with mouse drag. </member> <member name="scrolling_enabled" type="bool" setter="set_scrolling_enabled" getter="get_scrolling_enabled" default="true"> - if [code]true[/code], the mouse's scroll wheel cab be used to navigate the scroll view. + if [code]true[/code], the mouse's scroll wheel can be used to navigate the scroll view. </member> <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="Tabs.TabAlign" default="1"> The alignment of all tabs. See [enum TabAlign] for details. @@ -386,8 +389,6 @@ <theme_item name="outline_size" type="int" default="0"> The size of the tab text outline. </theme_item> - <theme_item name="panel" type="StyleBox"> - </theme_item> <theme_item name="tab_disabled" type="StyleBox"> The style of disabled tabs. </theme_item> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 6232a4e146..74811318dc 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -5,6 +5,7 @@ </brief_description> <description> TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo. + [b]Note:[/b] When holding down [kbd]Alt[/kbd], the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor. </description> <tutorials> </tutorials> @@ -127,6 +128,13 @@ Folds the given line, if possible (see [method can_fold]). </description> </method> + <method name="get_caret_draw_pos" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Gets the caret pixel draw poistion. + </description> + </method> <method name="get_gutter_count" qualifiers="const"> <return type="int"> </return> @@ -166,6 +174,15 @@ Returns the text of a specific line. </description> </method> + <method name="get_line_background_color"> + <return type="Color"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Returns the current background color of the line. [code]Color(0, 0, 0, 0)[/code] is returned if no color is set. + </description> + </method> <method name="get_line_count" qualifiers="const"> <return type="int"> </return> @@ -282,6 +299,13 @@ Returns the selection end line. </description> </method> + <method name="get_visible_line_count" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the number of visible lines, including wrapped text. + </description> + </method> <method name="get_word_under_cursor" qualifiers="const"> <return type="String"> </return> @@ -298,6 +322,13 @@ Insert the specified text at the cursor position. </description> </method> + <method name="is_caret_visible" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the caret is visible on the screen. + </description> + </method> <method name="is_folded" qualifiers="const"> <return type="bool"> </return> @@ -412,7 +443,7 @@ [/gdscript] [csharp] int[] result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0); - if (result.Length > 0) + if (result.Length > 0) { // Result found. int lineNumber = result[(int)TextEdit.SearchResult.Line]; @@ -540,6 +571,17 @@ If [code]true[/code], hides the line of the specified index. </description> </method> + <method name="set_line_background_color"> + <return type="void"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <description> + Sets the current background color of the line. Set to [code]Color(0, 0, 0, 0)[/code] for no color. + </description> + </method> <method name="set_line_gutter_clickable"> <return type="void"> </return> @@ -714,10 +756,10 @@ If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. </member> <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> - If there is a horizontal scrollbar this determines the current horizontal scroll value in pixels. + If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels. </member> <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0"> - If there is a vertical scrollbar this determines the current vertical scroll value in line numbers, starting at 0 for the top line. + If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line. </member> <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true"> If [code]true[/code], text can be selected. @@ -784,10 +826,6 @@ <description> </description> </signal> - <signal name="request_completion"> - <description> - </description> - </signal> <signal name="symbol_lookup"> <argument index="0" name="symbol" type="String"> </argument> @@ -936,24 +974,6 @@ </theme_item> <theme_item name="code_folding_color" type="Color" default="Color( 0.8, 0.8, 0.8, 0.8 )"> </theme_item> - <theme_item name="completion" type="StyleBox"> - </theme_item> - <theme_item name="completion_background_color" type="Color" default="Color( 0.17, 0.16, 0.2, 1 )"> - </theme_item> - <theme_item name="completion_existing_color" type="Color" default="Color( 0.87, 0.87, 0.87, 0.13 )"> - </theme_item> - <theme_item name="completion_font_color" type="Color" default="Color( 0.67, 0.67, 0.67, 1 )"> - </theme_item> - <theme_item name="completion_lines" type="int" default="7"> - </theme_item> - <theme_item name="completion_max_width" type="int" default="50"> - </theme_item> - <theme_item name="completion_scroll_color" type="Color" default="Color( 1, 1, 1, 1 )"> - </theme_item> - <theme_item name="completion_scroll_width" type="int" default="3"> - </theme_item> - <theme_item name="completion_selected_color" type="Color" default="Color( 0.26, 0.26, 0.27, 1 )"> - </theme_item> <theme_item name="current_line_color" type="Color" default="Color( 0.25, 0.25, 0.26, 0.8 )"> Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled. </theme_item> @@ -979,9 +999,6 @@ <theme_item name="line_spacing" type="int" default="4"> Sets the spacing between the lines. </theme_item> - <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )"> - Sets the [Color] of marked text. - </theme_item> <theme_item name="normal" type="StyleBox"> Sets the [StyleBox] of this [TextEdit]. </theme_item> diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index 99eb8b81d4..8df53b8423 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -145,7 +145,7 @@ <argument index="4" name="dc_color" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <description> - Draw outilines of all lines of the text and drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. + Draw outlines of all lines of the text and drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. </description> </method> <method name="get_dropcap_lines" qualifiers="const"> @@ -289,6 +289,20 @@ Returns the size of the bounding box of the paragraph. </description> </method> + <method name="get_spacing_bottom" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns extra spacing at the bottom of the line. See [member Font.extra_spacing_bottom]. + </description> + </method> + <method name="get_spacing_top" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns extra spacing at the top of the line. See [member Font.extra_spacing_top]. + </description> + </method> <method name="hit_test" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 5635ec2be0..9a96d8699c 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -258,6 +258,22 @@ Returns advance of the glyph. </description> </method> + <method name="font_get_glyph_contours" qualifiers="const"> + <return type="Dictionary"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="size" type="int"> + </argument> + <argument index="2" name="index" type="int"> + </argument> + <description> + Returns outline contours of the glyph in a Dictionary. + [code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values. + [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour. + [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled. + </description> + </method> <method name="font_get_glyph_index" qualifiers="const"> <return type="int"> </return> @@ -359,7 +375,7 @@ <argument index="0" name="font" type="RID"> </argument> <description> - Returns extra spacing for each glyphs in pixels. + Returns extra spacing for each glyph in pixels. </description> </method> <method name="font_get_spacing_space" qualifiers="const"> @@ -368,7 +384,7 @@ <argument index="0" name="font" type="RID"> </argument> <description> - Sets extra spacing for each glyphs in pixels. + Sets extra spacing for each glyph in pixels. </description> </method> <method name="font_get_supported_chars" qualifiers="const"> @@ -960,7 +976,7 @@ </argument> <description> Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters. - Note: If set to [code]false[/code], nothing is displayed in place of invalid characters. + Note: If set to [code]false[/code], nothing is displayed in place of invalid characters. </description> </method> <method name="shaped_text_get_range" qualifiers="const"> @@ -1301,5 +1317,14 @@ <constant name="FEATURE_USE_SUPPORT_DATA" value="128" enum="Feature"> TextServer require external data file for some features. </constant> + <constant name="CONTOUR_CURVE_TAG_ON" value="1" enum="ContourPointTag"> + Contour point is on the curve. + </constant> + <constant name="CONTOUR_CURVE_TAG_OFF_CONIC" value="0" enum="ContourPointTag"> + Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc. + </constant> + <constant name="CONTOUR_CURVE_TAG_OFF_CUBIC" value="2" enum="ContourPointTag"> + Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc. + </constant> </constants> </class> diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml index 2270b95c63..c33f32c9e4 100644 --- a/doc/classes/Texture2D.xml +++ b/doc/classes/Texture2D.xml @@ -63,18 +63,18 @@ Draws a part of the texture using a [CanvasItem] with the [RenderingServer] API. </description> </method> - <method name="get_data" qualifiers="const"> - <return type="Image"> + <method name="get_height" qualifiers="const"> + <return type="int"> </return> <description> - Returns an [Image] that is a copy of data from this [Texture2D]. [Image]s can be accessed and manipulated directly. + Returns the texture height. </description> </method> - <method name="get_height" qualifiers="const"> - <return type="int"> + <method name="get_image" qualifiers="const"> + <return type="Image"> </return> <description> - Returns the texture height. + Returns an [Image] that is a copy of data from this [Texture2D]. [Image]s can be accessed and manipulated directly. </description> </method> <method name="get_size" qualifiers="const"> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 9f976838e9..7448697df3 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -23,10 +23,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the [Color] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the [Color] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_constant"> @@ -34,10 +34,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the constant at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the constant at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_font"> @@ -45,10 +45,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the [Font] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_font_size"> @@ -56,10 +56,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the font size [code]name[/code] if the theme has [code]node_type[/code]. + Clears the font size [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_icon"> @@ -67,10 +67,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears the icon at [code]name[/code] if the theme has [code]node_type[/code]. + Clears the icon at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_stylebox"> @@ -78,10 +78,23 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Clears [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code]. + Clears [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code]. + </description> + </method> + <method name="clear_theme_item"> + <return type="void"> + </return> + <argument index="0" name="data_type" type="int" enum="Theme.DataType"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <argument index="2" name="theme_type" type="StringName"> + </argument> + <description> + Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="copy_default_theme"> @@ -105,19 +118,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the [Color] at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]node_type[/code]. + Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_color_type_list" qualifiers="const"> @@ -132,19 +145,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the constant at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]node_type[/code]. + Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_constant_type_list" qualifiers="const"> @@ -159,19 +172,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the [Font] at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]node_type[/code]. + Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size" qualifiers="const"> @@ -179,19 +192,26 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the font size at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]node_type[/code]. + Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]theme_type[/code]. + </description> + </method> + <method name="get_font_size_type_list" qualifiers="const"> + <return type="PackedStringArray"> + </return> + <description> + Returns all the font size types as a [PackedStringArray] filled with unique type names, for use in [method get_font_size] and/or [method get_font_size_list]. </description> </method> <method name="get_font_type_list" qualifiers="const"> @@ -206,19 +226,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]node_type[/code]. + Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_icon_type_list" qualifiers="const"> @@ -233,21 +253,21 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns the [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code]. - Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list]. + Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code]. + Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="node_type" type="String"> + <argument index="0" name="theme_type" type="String"> </argument> <description> - Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]node_type[/code]. - Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list]. + Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]theme_type[/code]. + Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list]. </description> </method> <method name="get_stylebox_type_list" qualifiers="const"> @@ -257,6 +277,41 @@ Returns all the [StyleBox] types as a [PackedStringArray] filled with unique type names, for use in [method get_stylebox] and/or [method get_stylebox_list]. </description> </method> + <method name="get_theme_item" qualifiers="const"> + <return type="Variant"> + </return> + <argument index="0" name="data_type" type="int" enum="Theme.DataType"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <argument index="2" name="theme_type" type="StringName"> + </argument> + <description> + Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code]. + Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. + </description> + </method> + <method name="get_theme_item_list" qualifiers="const"> + <return type="PackedStringArray"> + </return> + <argument index="0" name="data_type" type="int" enum="Theme.DataType"> + </argument> + <argument index="1" name="theme_type" type="String"> + </argument> + <description> + Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]theme_type[/code]. + Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. + </description> + </method> + <method name="get_theme_item_type_list" qualifiers="const"> + <return type="PackedStringArray"> + </return> + <argument index="0" name="data_type" type="int" enum="Theme.DataType"> + </argument> + <description> + Returns all the theme items of [code]data_type[/code] types as a [PackedStringArray] filled with unique type names, for use in [method get_theme_item], [method get_theme_item_list] or data type specific methods. + </description> + </method> <method name="get_type_list" qualifiers="const"> <return type="PackedStringArray"> </return> @@ -269,11 +324,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_constant" qualifiers="const"> @@ -281,11 +336,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if constant with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_font" qualifiers="const"> @@ -293,11 +348,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_font_size" qualifiers="const"> @@ -305,11 +360,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if font size with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_icon" qualifiers="const"> @@ -317,11 +372,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_stylebox" qualifiers="const"> @@ -329,11 +384,118 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> + </argument> + <description> + Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. + </description> + </method> + <method name="has_theme_item" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="data_type" type="int" enum="Theme.DataType"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <argument index="2" name="theme_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]node_type[/code]. - Returns [code]false[/code] if the theme does not have [code]node_type[/code]. + Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. + </description> + </method> + <method name="rename_color"> + <return type="void"> + </return> + <argument index="0" name="old_name" type="StringName"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <argument index="2" name="theme_type" type="StringName"> + </argument> + <description> + Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. + </description> + </method> + <method name="rename_constant"> + <return type="void"> + </return> + <argument index="0" name="old_name" type="StringName"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <argument index="2" name="theme_type" type="StringName"> + </argument> + <description> + Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. + </description> + </method> + <method name="rename_font"> + <return type="void"> + </return> + <argument index="0" name="old_name" type="StringName"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <argument index="2" name="theme_type" type="StringName"> + </argument> + <description> + Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. + </description> + </method> + <method name="rename_font_size"> + <return type="void"> + </return> + <argument index="0" name="old_name" type="StringName"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <argument index="2" name="theme_type" type="StringName"> + </argument> + <description> + Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. + </description> + </method> + <method name="rename_icon"> + <return type="void"> + </return> + <argument index="0" name="old_name" type="StringName"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <argument index="2" name="theme_type" type="StringName"> + </argument> + <description> + Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. + </description> + </method> + <method name="rename_stylebox"> + <return type="void"> + </return> + <argument index="0" name="old_name" type="StringName"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <argument index="2" name="theme_type" type="StringName"> + </argument> + <description> + Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. + </description> + </method> + <method name="rename_theme_item"> + <return type="void"> + </return> + <argument index="0" name="data_type" type="int" enum="Theme.DataType"> + </argument> + <argument index="1" name="old_name" type="StringName"> + </argument> + <argument index="2" name="name" type="StringName"> + </argument> + <argument index="3" name="theme_type" type="StringName"> + </argument> + <description> + Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="set_color"> @@ -341,13 +503,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="color" type="Color"> </argument> <description> - Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]node_type[/code]. - Does nothing if the theme does not have [code]node_type[/code]. + Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_constant"> @@ -355,13 +517,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="constant" type="int"> </argument> <description> - Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]node_type[/code]. - Does nothing if the theme does not have [code]node_type[/code]. + Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_font"> @@ -369,13 +531,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="font" type="Font"> </argument> <description> - Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]node_type[/code]. - Does nothing if the theme does not have [code]node_type[/code]. + Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_font_size"> @@ -383,13 +545,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="font_size" type="int"> </argument> <description> - Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]node_type[/code]. - Does nothing if the theme does not have [code]node_type[/code]. + Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_icon"> @@ -397,13 +559,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="texture" type="Texture2D"> </argument> <description> - Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]node_type[/code]. - Does nothing if the theme does not have [code]node_type[/code]. + Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_stylebox"> @@ -411,13 +573,30 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="node_type" type="StringName"> + <argument index="1" name="theme_type" type="StringName"> </argument> <argument index="2" name="texture" type="StyleBox"> </argument> <description> - Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]node_type[/code]. - Does nothing if the theme does not have [code]node_type[/code]. + Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]theme_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. + </description> + </method> + <method name="set_theme_item"> + <return type="void"> + </return> + <argument index="0" name="data_type" type="int" enum="Theme.DataType"> + </argument> + <argument index="1" name="name" type="StringName"> + </argument> + <argument index="2" name="theme_type" type="StringName"> + </argument> + <argument index="3" name="value" type="Variant"> + </argument> + <description> + Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]theme_type[/code]. + Does nothing if the [code]value[/code] type does not match [code]data_type[/code]. + Creates [code]theme_type[/code] if the theme does not have it. </description> </method> </methods> @@ -430,5 +609,26 @@ </member> </members> <constants> + <constant name="DATA_TYPE_COLOR" value="0" enum="DataType"> + Theme's [Color] item type. + </constant> + <constant name="DATA_TYPE_CONSTANT" value="1" enum="DataType"> + Theme's constant item type. + </constant> + <constant name="DATA_TYPE_FONT" value="2" enum="DataType"> + Theme's [Font] item type. + </constant> + <constant name="DATA_TYPE_FONT_SIZE" value="3" enum="DataType"> + Theme's font size item type. + </constant> + <constant name="DATA_TYPE_ICON" value="4" enum="DataType"> + Theme's icon [Texture2D] item type. + </constant> + <constant name="DATA_TYPE_STYLEBOX" value="5" enum="DataType"> + Theme's [StyleBox] item type. + </constant> + <constant name="DATA_TYPE_MAX" value="6" enum="DataType"> + Maximum value for the DataType enum. + </constant> </constants> </class> diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml new file mode 100644 index 0000000000..efcbdf2e95 --- /dev/null +++ b/doc/classes/TileData.xml @@ -0,0 +1,245 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TileData" inherits="Object" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_collision_shape"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_collision_shape_one_way_margin" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_collision_shape_shape" qualifiers="const"> + <return type="Shape2D"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_collision_shapes_count" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_custom_data" qualifiers="const"> + <return type="Variant"> + </return> + <argument index="0" name="layer_name" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_custom_data_by_layer_id" qualifiers="const"> + <return type="Variant"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_navigation_polygon" qualifiers="const"> + <return type="NavigationPolygon"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_occluder" qualifiers="const"> + <return type="OccluderPolygon2D"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_peering_bit_terrain" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor"> + </argument> + <description> + </description> + </method> + <method name="is_collision_shape_one_way" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <description> + </description> + </method> + <method name="remove_collision_shape"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_collision_shape_one_way"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <argument index="2" name="one_way" type="bool"> + </argument> + <description> + </description> + </method> + <method name="set_collision_shape_one_way_margin"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <argument index="2" name="one_way_margin" type="float"> + </argument> + <description> + </description> + </method> + <method name="set_collision_shape_shape"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shape_index" type="int"> + </argument> + <argument index="2" name="shape" type="Shape2D"> + </argument> + <description> + </description> + </method> + <method name="set_collision_shapes_count"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="shapes_count" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_custom_data"> + <return type="void"> + </return> + <argument index="0" name="layer_name" type="String"> + </argument> + <argument index="1" name="value" type="Variant"> + </argument> + <description> + </description> + </method> + <method name="set_custom_data_by_layer_id"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="value" type="Variant"> + </argument> + <description> + </description> + </method> + <method name="set_navigation_polygon"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="navigation_polygon" type="NavigationPolygon"> + </argument> + <description> + </description> + </method> + <method name="set_occluder"> + <return type="void"> + </return> + <argument index="0" name="layer_id" type="int"> + </argument> + <argument index="1" name="occluder_polygon" type="OccluderPolygon2D"> + </argument> + <description> + </description> + </method> + <method name="set_peering_bit_terrain"> + <return type="void"> + </return> + <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor"> + </argument> + <argument index="1" name="terrain" type="int"> + </argument> + <description> + </description> + </method> + <method name="tile_get_material" qualifiers="const"> + <return type="ShaderMaterial"> + </return> + <description> + </description> + </method> + <method name="tile_set_material"> + <return type="void"> + </return> + <argument index="0" name="material" type="ShaderMaterial"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="flip_h" type="bool" setter="set_flip_h" getter="get_flip_h" default="false"> + </member> + <member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false"> + </member> + <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> + </member> + <member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0"> + </member> + <member name="terrain_set" type="int" setter="set_terrain_set" getter="get_terrain_set" default="-1"> + </member> + <member name="texture_offset" type="Vector2i" setter="set_texture_offset" getter="get_texture_offset" default="Vector2i( 0, 0 )"> + </member> + <member name="transpose" type="bool" setter="set_transpose" getter="get_transpose" default="false"> + </member> + <member name="y_sort_origin" type="int" setter="set_y_sort_origin" getter="get_y_sort_origin" default="0"> + </member> + <member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0"> + </member> + </members> + <signals> + <signal name="changed"> + <description> + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index c0ee004ca6..93d5dd8037 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -31,53 +31,46 @@ Clears cells that do not exist in the tileset. </description> </method> - <method name="get_cell" qualifiers="const"> + <method name="get_cell_alternative_tile" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> + <argument index="0" name="coords" type="Vector2i"> </argument> <description> - Returns the tile index of the given cell. If no tile exists in the cell, returns [constant INVALID_CELL]. </description> </method> - <method name="get_cell_autotile_coord" qualifiers="const"> - <return type="Vector2"> + <method name="get_cell_atlas_coords" qualifiers="const"> + <return type="Vector2i"> </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> + <argument index="0" name="coords" type="Vector2i"> </argument> <description> - Returns the coordinate (subtile column and row) of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling. </description> </method> - <method name="get_cellv" qualifiers="const"> + <method name="get_cell_source_id" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="position" type="Vector2"> + <argument index="0" name="coords" type="Vector2i"> </argument> <description> - Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns [constant INVALID_CELL]. </description> </method> - <method name="get_collision_layer_bit" qualifiers="const"> - <return type="bool"> + <method name="get_neighbor_cell" qualifiers="const"> + <return type="Vector2i"> </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="coords" type="Vector2i"> + </argument> + <argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor"> </argument> <description> - Returns [code]true[/code] if the given collision layer bit is set. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> + <method name="get_surrounding_tiles"> + <return type="Vector2i[]"> </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="coords" type="Vector2i"> </argument> <description> - Returns [code]true[/code] if the given collision mask bit is set. </description> </method> <method name="get_used_cells" qualifiers="const"> @@ -87,15 +80,6 @@ Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]). </description> </method> - <method name="get_used_cells_by_index" qualifiers="const"> - <return type="Vector2i[]"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <description> - Returns an array of all cells with the given tile [code]index[/code]. - </description> - </method> <method name="get_used_rect"> <return type="Rect2"> </return> @@ -103,155 +87,28 @@ Returns a rectangle enclosing the used (non-empty) tiles of the map. </description> </method> - <method name="is_cell_transposed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <description> - Returns [code]true[/code] if the given cell is transposed, i.e. the X and Y axes are swapped. - </description> - </method> - <method name="is_cell_x_flipped" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <description> - Returns [code]true[/code] if the given cell is flipped in the X axis. - </description> - </method> - <method name="is_cell_y_flipped" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <description> - Returns [code]true[/code] if the given cell is flipped in the Y axis. - </description> - </method> <method name="map_to_world" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="map_position" type="Vector2"> - </argument> - <argument index="1" name="ignore_half_ofs" type="bool" default="false"> + <argument index="0" name="map_position" type="Vector2i"> </argument> <description> Returns the local position corresponding to the given tilemap (grid-based) coordinates. - Optionally, the tilemap's half offset can be ignored. </description> </method> <method name="set_cell"> <return type="void"> </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <argument index="2" name="tile" type="int"> - </argument> - <argument index="3" name="flip_x" type="bool" default="false"> - </argument> - <argument index="4" name="flip_y" type="bool" default="false"> - </argument> - <argument index="5" name="transpose" type="bool" default="false"> - </argument> - <argument index="6" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )"> - </argument> - <description> - Sets the tile index for the cell given by a Vector2. - An index of [code]-1[/code] clears the cell. - Optionally, the tile can also be flipped, transposed, or given autotile coordinates. The autotile coordinate refers to the column and row of the subtile. - [b]Note:[/b] Data such as navigation polygons and collision shapes are not immediately updated for performance reasons. - If you need these to be immediately updated, you can call [method update_dirty_quadrants]. - Overriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed: - [codeblocks] - [gdscript] - func set_cell(x, y, tile, flip_x=false, flip_y=false, transpose=false, autotile_coord=Vector2()) - # Write your custom logic here. - # To call the default method: - .set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord) - [/gdscript] - [csharp] - public void SetCell(int x, int y, int tile, bool flipX = false, bool flipY = false, bool transpose = false, Vector2 autotileCoord = new Vector2()) - { - // Write your custom logic here. - // To call the default method: - base.SetCell(x, y, tile, flipX, flipY, transpose, autotileCoord); - } - [/csharp] - [/codeblocks] - </description> - </method> - <method name="set_cellv"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="tile" type="int"> - </argument> - <argument index="2" name="flip_x" type="bool" default="false"> - </argument> - <argument index="3" name="flip_y" type="bool" default="false"> - </argument> - <argument index="4" name="transpose" type="bool" default="false"> - </argument> - <description> - Sets the tile index for the given cell. - An index of [code]-1[/code] clears the cell. - Optionally, the tile can also be flipped or transposed. - [b]Note:[/b] Data such as navigation polygons and collision shapes are not immediately updated for performance reasons. - If you need these to be immediately updated, you can call [method update_dirty_quadrants]. - </description> - </method> - <method name="set_collision_layer_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> - <description> - Sets the given collision layer bit. - </description> - </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> + <argument index="0" name="coords" type="Vector2i"> </argument> - <argument index="1" name="value" type="bool"> + <argument index="1" name="source_id" type="int" default="-1"> </argument> - <description> - Sets the given collision mask bit. - </description> - </method> - <method name="update_bitmask_area"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <description> - Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based X and Y coordinates. - </description> - </method> - <method name="update_bitmask_region"> - <return type="void"> - </return> - <argument index="0" name="start" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )"> </argument> - <argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="3" name="alternative_tile" type="int" default="-1"> </argument> <description> - Applies autotiling rules to the cells in the given region (specified by grid-based X and Y coordinates). - Calling with invalid (or missing) parameters applies autotiling rules for the entire tilemap. + Sets the tile index for the cell given by a Vector2i. </description> </method> <method name="update_dirty_quadrants"> @@ -262,7 +119,7 @@ </description> </method> <method name="world_to_map" qualifiers="const"> - <return type="Vector2"> + <return type="Vector2i"> </return> <argument index="0" name="world_position" type="Vector2"> </argument> @@ -272,107 +129,30 @@ </method> </methods> <members> - <member name="cell_clip_uv" type="bool" setter="set_clip_uv" getter="get_clip_uv" default="false"> - If [code]true[/code], the cell's UVs will be clipped. - </member> - <member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" default="Transform2D( 64, 0, 0, 64, 0, 0 )"> - The custom [Transform2D] to be applied to the TileMap's cells. - </member> - <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" enum="TileMap.HalfOffset" default="2"> - Amount to offset alternating tiles. See [enum HalfOffset] for possible values. - </member> <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" default="16"> The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. </member> - <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" default="Vector2( 64, 64 )"> - The TileMap's cell size. - </member> - <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" enum="TileMap.TileOrigin" default="0"> - Position for tile origin. See [enum TileOrigin] for possible values. - </member> - <member name="cell_y_sort" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false"> - If [code]true[/code], the TileMap's direct children will be drawn in order of their Y coordinate. - </member> - <member name="centered_textures" type="bool" setter="set_centered_textures" getter="is_centered_textures_enabled" default="false"> - If [code]true[/code], the textures will be centered in the middle of each tile. This is useful for certain isometric or top-down modes when textures are made larger or smaller than the tiles (e.g. to avoid flickering on tile edges). The offset is still applied, but from the center of the tile. If used, [member compatibility_mode] is ignored. - If [code]false[/code], the texture position start in the top-left corner unless [member compatibility_mode] is enabled. - </member> - <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0"> - Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). - </member> - <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="1.0"> - Friction value for static body collisions (see [code]collision_use_kinematic[/code]). - </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The collision layer(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The collision mask(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - </member> - <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" default="false"> - If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body. - </member> - <member name="collision_use_parent" type="bool" setter="set_collision_use_parent" getter="get_collision_use_parent" default="false"> - If [code]true[/code], this tilemap's collision shape will be added to the collision shape of the parent. The parent has to be a [CollisionObject2D]. + <member name="show_collision" type="int" setter="set_collision_visibility_mode" getter="get_collision_visibility_mode" enum="TileMap.VisibilityMode" default="0"> </member> - <member name="compatibility_mode" type="bool" setter="set_compatibility_mode" getter="is_compatibility_mode_enabled" default="false"> - If [code]true[/code], the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing [code]flip_h[/code], [code]flip_v[/code] and [code]transpose[/code] tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles. - If [code]false[/code], the textures do not move when doing [code]flip_h[/code], [code]flip_v[/code] operations if no offset is used, nor when changing the tile origin. - The compatibility mode doesn't work with the [member centered_textures] option, because displacing textures with the [member cell_tile_origin] option or in irregular tiles is not relevant when centering those textures. - </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="TileMap.Mode" default="0"> - The TileMap orientation mode. See [enum Mode] for possible values. - </member> - <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1"> - The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s). + <member name="show_navigation" type="int" setter="set_navigation_visibility_mode" getter="get_navigation_visibility_mode" enum="TileMap.VisibilityMode" default="0"> </member> <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset"> The assigned [TileSet]. </member> </members> <signals> - <signal name="settings_changed"> + <signal name="changed"> <description> - Emitted when a tilemap setting has changed. + Emitted when the [TileSet] of this TileMap changes. </description> </signal> </signals> <constants> - <constant name="INVALID_CELL" value="-1"> - Returned when a cell doesn't exist. - </constant> - <constant name="MODE_SQUARE" value="0" enum="Mode"> - Orthogonal orientation mode. - </constant> - <constant name="MODE_ISOMETRIC" value="1" enum="Mode"> - Isometric orientation mode. - </constant> - <constant name="MODE_CUSTOM" value="2" enum="Mode"> - Custom orientation mode. - </constant> - <constant name="HALF_OFFSET_X" value="0" enum="HalfOffset"> - Half offset on the X coordinate. - </constant> - <constant name="HALF_OFFSET_Y" value="1" enum="HalfOffset"> - Half offset on the Y coordinate. - </constant> - <constant name="HALF_OFFSET_DISABLED" value="2" enum="HalfOffset"> - Half offset disabled. - </constant> - <constant name="HALF_OFFSET_NEGATIVE_X" value="3" enum="HalfOffset"> - Half offset on the X coordinate (negative). - </constant> - <constant name="HALF_OFFSET_NEGATIVE_Y" value="4" enum="HalfOffset"> - Half offset on the Y coordinate (negative). - </constant> - <constant name="TILE_ORIGIN_TOP_LEFT" value="0" enum="TileOrigin"> - Tile origin at its top-left corner. + <constant name="VISIBILITY_MODE_DEFAULT" value="0" enum="VisibilityMode"> </constant> - <constant name="TILE_ORIGIN_CENTER" value="1" enum="TileOrigin"> - Tile origin at its center. + <constant name="VISIBILITY_MODE_FORCE_HIDE" value="2" enum="VisibilityMode"> </constant> - <constant name="TILE_ORIGIN_BOTTOM_LEFT" value="2" enum="TileOrigin"> - Tile origin at its bottom-left corner. + <constant name="VISIBILITY_MODE_FORCE_SHOW" value="1" enum="VisibilityMode"> </constant> </constants> </class> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index adc5880c71..2015b1f1cd 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -17,752 +17,350 @@ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <methods> - <method name="_forward_atlas_subtile_selection" qualifiers="virtual"> - <return type="Vector2"> - </return> - <argument index="0" name="atlastile_id" type="int"> - </argument> - <argument index="1" name="tilemap" type="Object"> - </argument> - <argument index="2" name="tile_location" type="Vector2"> - </argument> - <description> - </description> - </method> - <method name="_forward_subtile_selection" qualifiers="virtual"> - <return type="Vector2"> - </return> - <argument index="0" name="autotile_id" type="int"> - </argument> - <argument index="1" name="bitmask" type="int"> - </argument> - <argument index="2" name="tilemap" type="Object"> - </argument> - <argument index="3" name="tile_location" type="Vector2"> - </argument> - <description> - </description> - </method> - <method name="_is_tile_bound" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="drawn_id" type="int"> - </argument> - <argument index="1" name="neighbor_id" type="int"> - </argument> - <description> - Determines when the auto-tiler should consider two different auto-tile IDs to be bound together. - [b]Note:[/b] [code]neighbor_id[/code] will be [code]-1[/code] ([constant TileMap.INVALID_CELL]) when checking a tile against an empty neighbor tile. - </description> - </method> - <method name="autotile_clear_bitmask_map"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Clears all bitmask information of the autotile. - </description> - </method> - <method name="autotile_get_bitmask"> + <method name="add_source"> <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> + <argument index="0" name="atlas_source_id_override" type="TileSetSource"> </argument> - <description> - Returns the bitmask of the subtile from an autotile given its coordinates. - The value is the sum of the values in [enum AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right). - </description> - </method> - <method name="autotile_get_bitmask_mode" qualifiers="const"> - <return type="int" enum="TileSet.BitmaskMode"> - </return> - <argument index="0" name="id" type="int"> + <argument index="1" name="arg1" type="int" default="-1"> </argument> <description> - Returns the [enum BitmaskMode] of the autotile. </description> </method> - <method name="autotile_get_icon_coordinate" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates. - The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor. - </description> - </method> - <method name="autotile_get_light_occluder" qualifiers="const"> - <return type="OccluderPolygon2D"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> - <description> - Returns the light occluder of the subtile from an atlas/autotile given its coordinates. - </description> - </method> - <method name="autotile_get_navigation_polygon" qualifiers="const"> - <return type="NavigationPolygon"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> - <description> - Returns the navigation polygon of the subtile from an atlas/autotile given its coordinates. - </description> - </method> - <method name="autotile_get_size" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the size of the subtiles in an atlas/autotile. - </description> - </method> - <method name="autotile_get_spacing" qualifiers="const"> + <method name="get_navigation_layer_layers" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> <description> - Returns the spacing between subtiles of the atlas/autotile. </description> </method> - <method name="autotile_get_subtile_priority"> + <method name="get_next_source_id" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> <description> - Returns the priority of the subtile from an autotile given its coordinates. - When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked. </description> </method> - <method name="autotile_get_z_index"> + <method name="get_occlusion_layer_light_mask" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> + <argument index="0" name="arg0" type="int"> </argument> <description> - Returns the drawing index of the subtile from an atlas/autotile given its coordinates. </description> </method> - <method name="autotile_set_bitmask"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="bitmask" type="Vector2"> - </argument> - <argument index="2" name="flag" type="int"> - </argument> - <description> - Sets the bitmask of the subtile from an autotile given its coordinates. - The value is the sum of the values in [enum AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right). - </description> - </method> - <method name="autotile_set_bitmask_mode"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="mode" type="int" enum="TileSet.BitmaskMode"> - </argument> - <description> - Sets the [enum BitmaskMode] of the autotile. - </description> - </method> - <method name="autotile_set_icon_coordinate"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> - <description> - Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates. - The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor. - </description> - </method> - <method name="autotile_set_light_occluder"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="light_occluder" type="OccluderPolygon2D"> - </argument> - <argument index="2" name="coord" type="Vector2"> - </argument> - <description> - Sets the light occluder of the subtile from an atlas/autotile given its coordinates. - </description> - </method> - <method name="autotile_set_navigation_polygon"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="navigation_polygon" type="NavigationPolygon"> - </argument> - <argument index="2" name="coord" type="Vector2"> - </argument> - <description> - Sets the navigation polygon of the subtile from an atlas/autotile given its coordinates. - </description> - </method> - <method name="autotile_set_size"> - <return type="void"> + <method name="get_occlusion_layer_sdf_collision" qualifiers="const"> + <return type="bool"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="size" type="Vector2"> + <argument index="0" name="arg0" type="int"> </argument> <description> - Sets the size of the subtiles in an atlas/autotile. </description> </method> - <method name="autotile_set_spacing"> - <return type="void"> + <method name="get_physics_layer_collision_layer" qualifiers="const"> + <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="spacing" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> <description> - Sets the spacing between subtiles of the atlas/autotile. </description> </method> - <method name="autotile_set_subtile_priority"> - <return type="void"> + <method name="get_physics_layer_collision_mask" qualifiers="const"> + <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> - <argument index="2" name="priority" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> <description> - Sets the priority of the subtile from an autotile given its coordinates. - When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked. </description> </method> - <method name="autotile_set_z_index"> - <return type="void"> + <method name="get_physics_layer_physics_material" qualifiers="const"> + <return type="PhysicsMaterial"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="coord" type="Vector2"> - </argument> - <argument index="2" name="z_index" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> <description> - Sets the drawing index of the subtile from an atlas/autotile given its coordinates. </description> </method> - <method name="clear"> - <return type="void"> + <method name="get_source" qualifiers="const"> + <return type="TileSetSource"> </return> - <description> - Clears all tiles. - </description> - </method> - <method name="create_tile"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="index" type="int"> </argument> <description> - Creates a new tile with the given ID. </description> </method> - <method name="find_tile_by_name" qualifiers="const"> + <method name="get_source_count" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="name" type="String"> - </argument> <description> - Returns the first tile matching the given name. </description> </method> - <method name="get_last_unused_tile_id" qualifiers="const"> + <method name="get_source_id" qualifiers="const"> <return type="int"> </return> - <description> - Returns the ID following the last currently used ID, useful when creating a new tile. - </description> - </method> - <method name="get_tiles_ids" qualifiers="const"> - <return type="Array"> - </return> - <description> - Returns an array of all currently used tile IDs. - </description> - </method> - <method name="remove_tile"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="index" type="int"> </argument> <description> - Removes the given tile ID. </description> </method> - <method name="tile_add_shape"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape" type="Shape2D"> - </argument> - <argument index="2" name="shape_transform" type="Transform2D"> - </argument> - <argument index="3" name="one_way" type="bool" default="false"> - </argument> - <argument index="4" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )"> - </argument> - <description> - Adds a shape to the tile. - </description> - </method> - <method name="tile_get_light_occluder" qualifiers="const"> - <return type="OccluderPolygon2D"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's light occluder. - </description> - </method> - <method name="tile_get_material" qualifiers="const"> - <return type="ShaderMaterial"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's material. - </description> - </method> - <method name="tile_get_modulate" qualifiers="const"> + <method name="get_terrain_color" qualifiers="const"> <return type="Color"> </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's modulation color. - </description> - </method> - <method name="tile_get_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's name. - </description> - </method> - <method name="tile_get_navigation_polygon" qualifiers="const"> - <return type="NavigationPolygon"> - </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <description> - Returns the navigation polygon of the tile. - </description> - </method> - <method name="tile_get_navigation_polygon_offset" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> + <argument index="1" name="terrain_index" type="int"> </argument> <description> - Returns the offset of the tile's navigation polygon. </description> </method> - <method name="tile_get_occluder_offset" qualifiers="const"> - <return type="Vector2"> + <method name="get_terrain_name" qualifiers="const"> + <return type="String"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <description> - Returns the offset of the tile's light occluder. - </description> - </method> - <method name="tile_get_region" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="id" type="int"> + <argument index="1" name="terrain_index" type="int"> </argument> <description> - Returns the tile sub-region in the texture. </description> </method> - <method name="tile_get_shape" qualifiers="const"> - <return type="Shape2D"> + <method name="get_terrain_set_mode" qualifiers="const"> + <return type="int" enum="TileSet.TerrainMode"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> <description> - Returns a tile's given shape. </description> </method> - <method name="tile_get_shape_count" qualifiers="const"> + <method name="get_terrains_count" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the number of shapes assigned to a tile. - </description> - </method> - <method name="tile_get_shape_offset" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> <description> - Returns the offset of a tile's shape. </description> </method> - <method name="tile_get_shape_one_way" qualifiers="const"> + <method name="has_source" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> - <description> - Returns the one-way collision value of a tile's shape. - </description> - </method> - <method name="tile_get_shape_one_way_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> - <description> - </description> - </method> - <method name="tile_get_shape_transform" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> - <description> - Returns the [Transform2D] of a tile's shape. - </description> - </method> - <method name="tile_get_shapes" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns an array of dictionaries describing the tile's shapes. - [b]Dictionary structure in the array returned by this method:[/b] - [codeblock] - { - "autotile_coord": Vector2, - "one_way": bool, - "one_way_margin": int, - "shape": CollisionShape2D, - "shape_transform": Transform2D, - } - [/codeblock] - </description> - </method> - <method name="tile_get_texture" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's texture. - </description> - </method> - <method name="tile_get_texture_offset" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the texture offset of the tile. - </description> - </method> - <method name="tile_get_tile_mode" qualifiers="const"> - <return type="int" enum="TileSet.TileMode"> - </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="index" type="int"> </argument> <description> - Returns the tile's [enum TileMode]. </description> </method> - <method name="tile_get_z_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <description> - Returns the tile's Z index (drawing layer). - </description> - </method> - <method name="tile_set_light_occluder"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="light_occluder" type="OccluderPolygon2D"> - </argument> - <description> - Sets a light occluder for the tile. - </description> - </method> - <method name="tile_set_material"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="material" type="ShaderMaterial"> - </argument> - <description> - Sets the tile's material. - </description> - </method> - <method name="tile_set_modulate"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <description> - Sets the tile's modulation color. - </description> - </method> - <method name="tile_set_name"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="name" type="String"> - </argument> - <description> - Sets the tile's name. - </description> - </method> - <method name="tile_set_navigation_polygon"> + <method name="remove_source"> <return type="void"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="navigation_polygon" type="NavigationPolygon"> + <argument index="0" name="source_id" type="int"> </argument> <description> - Sets the tile's navigation polygon. </description> </method> - <method name="tile_set_navigation_polygon_offset"> + <method name="set_navigation_layer_layers"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="1" name="navigation_polygon_offset" type="Vector2"> + <argument index="1" name="layers" type="int"> </argument> <description> - Sets an offset for the tile's navigation polygon. </description> </method> - <method name="tile_set_occluder_offset"> + <method name="set_occlusion_layer_light_mask"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="1" name="occluder_offset" type="Vector2"> + <argument index="1" name="light_mask" type="int"> </argument> <description> - Sets an offset for the tile's light occluder. </description> </method> - <method name="tile_set_region"> + <method name="set_occlusion_layer_sdf_collision"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="1" name="region" type="Rect2"> + <argument index="1" name="sdf_collision" type="int"> </argument> <description> - Sets the tile's sub-region in the texture. This is common in texture atlases. </description> </method> - <method name="tile_set_shape"> + <method name="set_physics_layer_collision_layer"> <return type="void"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="2" name="shape" type="Shape2D"> + <argument index="1" name="layer" type="int"> </argument> <description> - Sets a shape for the tile, enabling collision. </description> </method> - <method name="tile_set_shape_offset"> + <method name="set_physics_layer_collision_mask"> <return type="void"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="2" name="shape_offset" type="Vector2"> + <argument index="1" name="mask" type="int"> </argument> <description> - Sets the offset of a tile's shape. </description> </method> - <method name="tile_set_shape_one_way"> + <method name="set_physics_layer_physics_material"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="layer_index" type="int"> </argument> - <argument index="1" name="shape_id" type="int"> - </argument> - <argument index="2" name="one_way" type="bool"> + <argument index="1" name="physics_material" type="PhysicsMaterial"> </argument> <description> - Enables one-way collision on a tile's shape. </description> </method> - <method name="tile_set_shape_one_way_margin"> + <method name="set_source_id"> <return type="void"> </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="0" name="source_id" type="int"> </argument> - <argument index="2" name="one_way" type="float"> + <argument index="1" name="arg1" type="int"> </argument> <description> </description> </method> - <method name="tile_set_shape_transform"> + <method name="set_terrain_color"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <argument index="1" name="shape_id" type="int"> + <argument index="1" name="terrain_index" type="int"> </argument> - <argument index="2" name="shape_transform" type="Transform2D"> + <argument index="2" name="color" type="Color"> </argument> <description> - Sets a [Transform2D] on a tile's shape. </description> </method> - <method name="tile_set_shapes"> + <method name="set_terrain_name"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <argument index="1" name="shapes" type="Array"> - </argument> - <description> - Sets an array of shapes for the tile, enabling collision. - </description> - </method> - <method name="tile_set_texture"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> - <description> - Sets the tile's texture. - </description> - </method> - <method name="tile_set_texture_offset"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> + <argument index="1" name="terrain_index" type="int"> </argument> - <argument index="1" name="texture_offset" type="Vector2"> + <argument index="2" name="name" type="String"> </argument> <description> - Sets the tile's texture offset. </description> </method> - <method name="tile_set_tile_mode"> + <method name="set_terrain_set_mode"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <argument index="1" name="tilemode" type="int" enum="TileSet.TileMode"> + <argument index="1" name="mode" type="int" enum="TileSet.TerrainMode"> </argument> <description> - Sets the tile's [enum TileMode]. </description> </method> - <method name="tile_set_z_index"> + <method name="set_terrains_count"> <return type="void"> </return> - <argument index="0" name="id" type="int"> + <argument index="0" name="terrain_set" type="int"> </argument> - <argument index="1" name="z_index" type="int"> + <argument index="1" name="terrains_count" type="int"> </argument> <description> - Sets the tile's drawing index. </description> </method> </methods> + <members> + <member name="custom_data_layers_count" type="int" setter="set_custom_data_layers_count" getter="get_custom_data_layers_count" default="0"> + </member> + <member name="navigation_layers_count" type="int" setter="set_navigation_layers_count" getter="get_navigation_layers_count" default="0"> + </member> + <member name="occlusion_layers_count" type="int" setter="set_occlusion_layers_count" getter="get_occlusion_layers_count" default="0"> + </member> + <member name="physics_layers_count" type="int" setter="set_physics_layers_count" getter="get_physics_layers_count" default="0"> + </member> + <member name="terrains_sets_count" type="int" setter="set_terrain_sets_count" getter="get_terrain_sets_count" default="0"> + </member> + <member name="tile_layout" type="int" setter="set_tile_layout" getter="get_tile_layout" enum="TileSet.TileLayout" default="0"> + </member> + <member name="tile_offset_axis" type="int" setter="set_tile_offset_axis" getter="get_tile_offset_axis" enum="TileSet.TileOffsetAxis" default="0"> + </member> + <member name="tile_shape" type="int" setter="set_tile_shape" getter="get_tile_shape" enum="TileSet.TileShape" default="0"> + </member> + <member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i( 16, 16 )"> + </member> + <member name="tile_skew" type="Vector2" setter="set_tile_skew" getter="get_tile_skew" default="Vector2( 0, 0 )"> + </member> + <member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false"> + </member> + <member name="y_sorting" type="bool" setter="set_y_sorting" getter="is_y_sorting" default="false"> + </member> + </members> <constants> - <constant name="BITMASK_2X2" value="0" enum="BitmaskMode"> + <constant name="TILE_SHAPE_SQUARE" value="0" enum="TileShape"> + Orthogonal orientation mode. + </constant> + <constant name="TILE_SHAPE_ISOMETRIC" value="1" enum="TileShape"> + Isometric orientation mode. + </constant> + <constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape"> + </constant> + <constant name="TILE_SHAPE_HEXAGON" value="3" enum="TileShape"> + Hexagon orientation mode. + </constant> + <constant name="TILE_LAYOUT_STACKED" value="0" enum="TileLayout"> + </constant> + <constant name="TILE_LAYOUT_STACKED_OFFSET" value="1" enum="TileLayout"> + </constant> + <constant name="TILE_LAYOUT_STAIRS_RIGHT" value="2" enum="TileLayout"> + </constant> + <constant name="TILE_LAYOUT_STAIRS_DOWN" value="3" enum="TileLayout"> + </constant> + <constant name="TILE_LAYOUT_DIAMOND_RIGHT" value="4" enum="TileLayout"> + </constant> + <constant name="TILE_LAYOUT_DIAMOND_DOWN" value="5" enum="TileLayout"> + </constant> + <constant name="TILE_OFFSET_AXIS_HORIZONTAL" value="0" enum="TileOffsetAxis"> + </constant> + <constant name="TILE_OFFSET_AXIS_VERTICAL" value="1" enum="TileOffsetAxis"> + </constant> + <constant name="TileSet::CELL_NEIGHBOR_RIGHT_SIDE" value="0" enum="CellNeighbor"> + </constant> + <constant name="TileSet::CELL_NEIGHBOR_RIGHT_CORNER" value="1" enum="CellNeighbor"> + </constant> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE" value="2" enum="CellNeighbor"> + </constant> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER" value="3" enum="CellNeighbor"> + </constant> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_SIDE" value="4" enum="CellNeighbor"> </constant> - <constant name="BITMASK_3X3_MINIMAL" value="1" enum="BitmaskMode"> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_CORNER" value="5" enum="CellNeighbor"> </constant> - <constant name="BITMASK_3X3" value="2" enum="BitmaskMode"> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_SIDE" value="6" enum="CellNeighbor"> </constant> - <constant name="BIND_TOPLEFT" value="1" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_CORNER" value="7" enum="CellNeighbor"> </constant> - <constant name="BIND_TOP" value="2" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_LEFT_SIDE" value="8" enum="CellNeighbor"> </constant> - <constant name="BIND_TOPRIGHT" value="4" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_LEFT_CORNER" value="9" enum="CellNeighbor"> </constant> - <constant name="BIND_LEFT" value="8" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_LEFT_SIDE" value="10" enum="CellNeighbor"> </constant> - <constant name="BIND_CENTER" value="16" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_LEFT_CORNER" value="11" enum="CellNeighbor"> </constant> - <constant name="BIND_RIGHT" value="32" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_SIDE" value="12" enum="CellNeighbor"> </constant> - <constant name="BIND_BOTTOMLEFT" value="64" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_CORNER" value="13" enum="CellNeighbor"> </constant> - <constant name="BIND_BOTTOM" value="128" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_RIGHT_SIDE" value="14" enum="CellNeighbor"> </constant> - <constant name="BIND_BOTTOMRIGHT" value="256" enum="AutotileBindings"> + <constant name="TileSet::CELL_NEIGHBOR_TOP_RIGHT_CORNER" value="15" enum="CellNeighbor"> </constant> - <constant name="SINGLE_TILE" value="0" enum="TileMode"> + <constant name="TERRAIN_MODE_MATCH_CORNERS_AND_SIDES" value="0" enum="TerrainMode"> </constant> - <constant name="AUTO_TILE" value="1" enum="TileMode"> + <constant name="TERRAIN_MODE_MATCH_CORNERS" value="1" enum="TerrainMode"> </constant> - <constant name="ATLAS_TILE" value="2" enum="TileMode"> + <constant name="TERRAIN_MODE_MATCH_SIDES" value="2" enum="TerrainMode"> </constant> </constants> </class> diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml new file mode 100644 index 0000000000..a7a304ca27 --- /dev/null +++ b/doc/classes/TileSetAtlasSource.xml @@ -0,0 +1,207 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TileSetAtlasSource" inherits="TileSetSource" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="can_move_tile_in_atlas" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )"> + </argument> + <argument index="2" name="new_size" type="Vector2i" default="Vector2i( -1, -1 )"> + </argument> + <description> + </description> + </method> + <method name="clear_tiles_outside_texture"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="create_alternative_tile"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="alternative_id_override" type="int" default="-1"> + </argument> + <description> + </description> + </method> + <method name="create_tile"> + <return type="void"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="size" type="Vector2i" default="Vector2i( 1, 1 )"> + </argument> + <description> + </description> + </method> + <method name="get_alternative_tile_id" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_alternative_tiles_count" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_atlas_grid_size" qualifiers="const"> + <return type="Vector2i"> + </return> + <description> + </description> + </method> + <method name="get_next_alternative_tile_id" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_tile_at_coords" qualifiers="const"> + <return type="Vector2i"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_tile_data" qualifiers="const"> + <return type="Object"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_tile_id" qualifiers="const"> + <return type="Vector2i"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_tile_size_in_atlas" qualifiers="const"> + <return type="Vector2i"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_tile_texture_region" qualifiers="const"> + <return type="Rect2i"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_tiles_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="has_alternative_tile" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="alternative_tile" type="int"> + </argument> + <description> + </description> + </method> + <method name="has_tile" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="has_tiles_outside_texture"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="move_tile_in_atlas"> + <return type="void"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i( -1, -1 )"> + </argument> + <argument index="2" name="new_size" type="Vector2i" default="Vector2i( -1, -1 )"> + </argument> + <description> + </description> + </method> + <method name="remove_alternative_tile"> + <return type="void"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="alternative_tile" type="int"> + </argument> + <description> + </description> + </method> + <method name="remove_tile"> + <return type="void"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="set_alternative_tile_id"> + <return type="void"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="alternative_tile" type="int"> + </argument> + <argument index="2" name="new_id" type="int"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="margins" type="Vector2i" setter="set_margins" getter="get_margins" default="Vector2i( 0, 0 )"> + </member> + <member name="separation" type="Vector2i" setter="set_separation" getter="get_separation" default="Vector2i( 0, 0 )"> + </member> + <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> + </member> + <member name="tile_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i( 16, 16 )"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/TileSetScenesCollectionSource.xml b/doc/classes/TileSetScenesCollectionSource.xml new file mode 100644 index 0000000000..1a00eb51c0 --- /dev/null +++ b/doc/classes/TileSetScenesCollectionSource.xml @@ -0,0 +1,155 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TileSetScenesCollectionSource" inherits="TileSetSource" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="create_scene_tile"> + <return type="int"> + </return> + <argument index="0" name="packed_scene" type="PackedScene"> + </argument> + <argument index="1" name="id_override" type="int" default="-1"> + </argument> + <description> + </description> + </method> + <method name="get_alternative_tile_id" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_alternative_tiles_count" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="get_next_scene_tile_id" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_scene_tile_display_placeholder" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_scene_tile_id"> + <return type="int"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_scene_tile_scene" qualifiers="const"> + <return type="PackedScene"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_scene_tiles_count"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_tile_id" qualifiers="const"> + <return type="Vector2i"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_tiles_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="has_alternative_tile" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <argument index="1" name="alternative_tile" type="int"> + </argument> + <description> + </description> + </method> + <method name="has_scene_tile_id"> + <return type="bool"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="has_tile" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="atlas_coords" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="remove_scene_tile"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_scene_tile_display_placeholder"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="display_placeholder" type="bool"> + </argument> + <description> + </description> + </method> + <method name="set_scene_tile_id"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="new_id" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_scene_tile_scene"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="packed_scene" type="PackedScene"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/GLTFDocument.xml b/doc/classes/TileSetSource.xml index 04c40dd752..6a3029bb3f 100644 --- a/doc/classes/GLTFDocument.xml +++ b/doc/classes/TileSetSource.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFDocument" inherits="Resource" version="4.0"> +<class name="TileSetSource" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index 5265e75429..807d8033c1 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -5,7 +5,7 @@ </brief_description> <description> Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. - [b]Note:[/b] To create an one-shot timer without instantiating a node, use [method SceneTree.create_timer]. + [b]Note:[/b] To create a one-shot timer without instantiating a node, use [method SceneTree.create_timer]. </description> <tutorials> <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 406774cbfe..0dbf95376a 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -18,7 +18,7 @@ <return type="Transform2D"> </return> <description> - Constructs a default-initialized [Transform] set to [constant IDENTITY]. + Constructs a default-initialized [Transform2D] set to [constant IDENTITY]. </description> </method> <method name="Transform2D" qualifiers="constructor"> @@ -54,14 +54,14 @@ Constructs the transform from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three column vectors). </description> </method> - <method name="affine_inverse"> + <method name="affine_inverse" qualifiers="const"> <return type="Transform2D"> </return> <description> Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation. </description> </method> - <method name="basis_xform"> + <method name="basis_xform" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="v" type="Vector2"> @@ -71,7 +71,7 @@ This method does not account for translation (the origin vector). </description> </method> - <method name="basis_xform_inv"> + <method name="basis_xform_inv" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="v" type="Vector2"> @@ -81,28 +81,28 @@ This method does not account for translation (the origin vector). </description> </method> - <method name="get_origin"> + <method name="get_origin" qualifiers="const"> <return type="Vector2"> </return> <description> Returns the transform's origin (translation). </description> </method> - <method name="get_rotation"> + <method name="get_rotation" qualifiers="const"> <return type="float"> </return> <description> Returns the transform's rotation (in radians). </description> </method> - <method name="get_scale"> + <method name="get_scale" qualifiers="const"> <return type="Vector2"> </return> <description> Returns the scale. </description> </method> - <method name="interpolate_with"> + <method name="interpolate_with" qualifiers="const"> <return type="Transform2D"> </return> <argument index="0" name="xform" type="Transform2D"> @@ -113,14 +113,14 @@ Returns a transform interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0). </description> </method> - <method name="inverse"> + <method name="inverse" qualifiers="const"> <return type="Transform2D"> </return> <description> Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling). </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="xform" type="Transform2D"> @@ -129,6 +129,16 @@ Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> + <method name="looking_at" qualifiers="const"> + <return type="Transform2D"> + </return> + <argument index="0" name="target" type="Vector2" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> + </argument> + <description> + Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the [code]target[/code] position. + Operations take place in global space. + </description> + </method> <method name="operator !=" qualifiers="operator"> <return type="bool"> </return> @@ -138,33 +148,33 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2"> + <return type="PackedVector2Array"> </return> - <argument index="0" name="right" type="Vector2"> + <argument index="0" name="right" type="PackedVector2Array"> </argument> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Rect2"> + <return type="Transform2D"> </return> - <argument index="0" name="right" type="Rect2"> + <argument index="0" name="right" type="Transform2D"> </argument> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Transform2D"> + <return type="Rect2"> </return> - <argument index="0" name="right" type="Transform2D"> + <argument index="0" name="right" type="Rect2"> </argument> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="PackedVector2Array"> + <return type="Vector2"> </return> - <argument index="0" name="right" type="PackedVector2Array"> + <argument index="0" name="right" type="Vector2"> </argument> <description> </description> @@ -185,14 +195,14 @@ <description> </description> </method> - <method name="orthonormalized"> + <method name="orthonormalized" qualifiers="const"> <return type="Transform2D"> </return> <description> Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1). </description> </method> - <method name="rotated"> + <method name="rotated" qualifiers="const"> <return type="Transform2D"> </return> <argument index="0" name="phi" type="float"> @@ -201,7 +211,7 @@ Rotates the transform by the given angle (in radians), using matrix multiplication. </description> </method> - <method name="scaled"> + <method name="scaled" qualifiers="const"> <return type="Transform2D"> </return> <argument index="0" name="scale" type="Vector2"> @@ -210,7 +220,16 @@ Scales the transform by the given scale factor, using matrix multiplication. </description> </method> - <method name="translated"> + <method name="set_rotation"> + <return type="void"> + </return> + <argument index="0" name="rotation" type="float"> + </argument> + <description> + Sets the transform's rotation (in radians). + </description> + </method> + <method name="translated" qualifiers="const"> <return type="Transform2D"> </return> <argument index="0" name="offset" type="Vector2"> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform3D.xml index d75b81eece..0d49255523 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Transform" version="4.0"> +<class name="Transform3D" version="4.0"> <brief_description> 3D transformation (3×4 matrix). </brief_description> @@ -16,35 +16,35 @@ <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link> </tutorials> <methods> - <method name="Transform" qualifiers="constructor"> - <return type="Transform"> + <method name="Transform3D" qualifiers="constructor"> + <return type="Transform3D"> </return> <description> - Constructs a default-initialized [Transform] set to [constant IDENTITY]. + Constructs a default-initialized [Transform3D] set to [constant IDENTITY]. </description> </method> - <method name="Transform" qualifiers="constructor"> - <return type="Transform"> + <method name="Transform3D" qualifiers="constructor"> + <return type="Transform3D"> </return> - <argument index="0" name="from" type="Transform"> + <argument index="0" name="from" type="Transform3D"> </argument> <description> - Constructs a [Transform] as a copy of the given [Transform]. + Constructs a [Transform3D] as a copy of the given [Transform3D]. </description> </method> - <method name="Transform" qualifiers="constructor"> - <return type="Transform"> + <method name="Transform3D" qualifiers="constructor"> + <return type="Transform3D"> </return> <argument index="0" name="basis" type="Basis"> </argument> <argument index="1" name="origin" type="Vector3"> </argument> <description> - Constructs a Transform from a [Basis] and [Vector3]. + Constructs a Transform3D from a [Basis] and [Vector3]. </description> </method> - <method name="Transform" qualifiers="constructor"> - <return type="Transform"> + <method name="Transform3D" qualifiers="constructor"> + <return type="Transform3D"> </return> <argument index="0" name="x_axis" type="Vector3"> </argument> @@ -55,45 +55,45 @@ <argument index="3" name="origin" type="Vector3"> </argument> <description> - Constructs a Transform from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). + Constructs a Transform3D from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). </description> </method> - <method name="affine_inverse"> - <return type="Transform"> + <method name="affine_inverse" qualifiers="const"> + <return type="Transform3D"> </return> <description> Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation. </description> </method> - <method name="interpolate_with"> - <return type="Transform"> + <method name="interpolate_with" qualifiers="const"> + <return type="Transform3D"> </return> - <argument index="0" name="xform" type="Transform"> + <argument index="0" name="xform" type="Transform3D"> </argument> <argument index="1" name="weight" type="float"> </argument> <description> - Interpolates the transform to other Transform by weight amount (on the range of 0.0 to 1.0). + Interpolates the transform to other Transform3D by weight amount (on the range of 0.0 to 1.0). </description> </method> - <method name="inverse"> - <return type="Transform"> + <method name="inverse" qualifiers="const"> + <return type="Transform3D"> </return> <description> Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="xform" type="Transform"> + <argument index="0" name="xform" type="Transform3D"> </argument> <description> Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> - <method name="looking_at"> - <return type="Transform"> + <method name="looking_at" qualifiers="const"> + <return type="Transform3D"> </return> <argument index="0" name="target" type="Vector3"> </argument> @@ -108,7 +108,7 @@ <method name="operator !=" qualifiers="operator"> <return type="bool"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> @@ -122,9 +122,9 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Transform"> + <return type="Transform3D"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> @@ -148,20 +148,20 @@ <method name="operator ==" qualifiers="operator"> <return type="bool"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> </method> - <method name="orthonormalized"> - <return type="Transform"> + <method name="orthonormalized" qualifiers="const"> + <return type="Transform3D"> </return> <description> Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors. </description> </method> - <method name="rotated"> - <return type="Transform"> + <method name="rotated" qualifiers="const"> + <return type="Transform3D"> </return> <argument index="0" name="axis" type="Vector3"> </argument> @@ -171,8 +171,8 @@ Rotates the transform around the given axis by the given angle (in radians), using matrix multiplication. The axis must be a normalized vector. </description> </method> - <method name="scaled"> - <return type="Transform"> + <method name="scaled" qualifiers="const"> + <return type="Transform3D"> </return> <argument index="0" name="scale" type="Vector3"> </argument> @@ -180,8 +180,8 @@ Scales basis and origin of the transform by the given scale factor, using matrix multiplication. </description> </method> - <method name="translated"> - <return type="Transform"> + <method name="translated" qualifiers="const"> + <return type="Transform3D"> </return> <argument index="0" name="offset" type="Vector3"> </argument> @@ -200,17 +200,17 @@ </member> </members> <constants> - <constant name="IDENTITY" value="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> - [Transform] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation. + <constant name="IDENTITY" value="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + [Transform3D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation. </constant> - <constant name="FLIP_X" value="Transform( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> - [Transform] with mirroring applied perpendicular to the YZ plane. + <constant name="FLIP_X" value="Transform3D( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + [Transform3D] with mirroring applied perpendicular to the YZ plane. </constant> - <constant name="FLIP_Y" value="Transform( 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0 )"> - [Transform] with mirroring applied perpendicular to the XZ plane. + <constant name="FLIP_Y" value="Transform3D( 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0 )"> + [Transform3D] with mirroring applied perpendicular to the XZ plane. </constant> - <constant name="FLIP_Z" value="Transform( 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0 )"> - [Transform] with mirroring applied perpendicular to the XY plane. + <constant name="FLIP_Z" value="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0 )"> + [Transform3D] with mirroring applied perpendicular to the XY plane. </constant> </constants> </class> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index a09f1bf470..c31467c67e 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -30,7 +30,7 @@ } [/csharp] [/codeblocks] - To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree]. + To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_first_child] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree]. </description> <tutorials> </tutorials> @@ -533,6 +533,12 @@ <theme_item name="checked" type="Texture2D"> The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked. </theme_item> + <theme_item name="children_hl_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> + The [Color] of the relationship lines between the selected [TreeItem] and its children. + </theme_item> + <theme_item name="children_hl_line_width" type="int" default="1"> + The width of the relationship lines between the selected [TreeItem] and its children. + </theme_item> <theme_item name="cursor" type="StyleBox"> [StyleBox] used for the cursor, when the [Tree] is being focused. </theme_item> @@ -587,8 +593,20 @@ <theme_item name="outline_size" type="int" default="0"> The size of the text outline. </theme_item> + <theme_item name="parent_hl_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> + The [Color] of the relationship lines between the selected [TreeItem] and its parents. + </theme_item> + <theme_item name="parent_hl_line_margin" type="int" default="0"> + The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected. + </theme_item> + <theme_item name="parent_hl_line_width" type="int" default="1"> + The width of the relationship lines between the selected [TreeItem] and its parents. + </theme_item> <theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> - [Color] of the relationship lines. + The default [Color] of the relationship lines. + </theme_item> + <theme_item name="relationship_line_width" type="int" default="1"> + The default width of the relationship lines. </theme_item> <theme_item name="scroll_border" type="int" default="4"> The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging. diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index fd157e5eb9..0256d83fea 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -63,6 +63,16 @@ Removes all OpenType features. </description> </method> + <method name="create_child"> + <return type="TreeItem"> + </return> + <argument index="0" name="idx" type="int" default="-1"> + </argument> + <description> + Creates an item and adds it as a child. + The new item will be inserted as position [code]idx[/code] (the default value [code]-1[/code] means the last position), or it will be the last child if [code]idx[/code] is higher than the child count. + </description> + </method> <method name="deselect"> <return type="void"> </return> @@ -123,11 +133,28 @@ Returns the column's cell mode. </description> </method> - <method name="get_children"> + <method name="get_child"> <return type="TreeItem"> </return> + <argument index="0" name="idx" type="int"> + </argument> <description> - Returns the TreeItem's first child item or a null object if there is none. + Returns a child item by its index (see [method get_child_count]). This method is often used for iterating all children of an item. + Negative indices access the children from the last one. + </description> + </method> + <method name="get_child_count"> + <return type="int"> + </return> + <description> + Returns the number of child items. + </description> + </method> + <method name="get_children"> + <return type="Array"> + </return> + <description> + Returns an array of references to the item's children. </description> </method> <method name="get_custom_bg_color" qualifiers="const"> @@ -148,6 +175,14 @@ Returns the custom color of column [code]column[/code]. </description> </method> + <method name="get_custom_font" qualifiers="const"> + <return type="Font"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <description> + </description> + </method> <method name="get_expand_right" qualifiers="const"> <return type="bool"> </return> @@ -157,6 +192,13 @@ Returns [code]true[/code] if [code]expand_right[/code] is set. </description> </method> + <method name="get_first_child"> + <return type="TreeItem"> + </return> + <description> + Returns the TreeItem's first child. + </description> + </method> <method name="get_icon" qualifiers="const"> <return type="Texture2D"> </return> @@ -193,6 +235,13 @@ Returns the icon [Texture2D] region as [Rect2]. </description> </method> + <method name="get_index"> + <return type="int"> + </return> + <description> + Returns the node's order in the tree. For example, if called on the first child item the position is [code]0[/code]. + </description> + </method> <method name="get_language" qualifiers="const"> <return type="String"> </return> @@ -342,6 +391,13 @@ Returns the given column's tooltip. </description> </method> + <method name="get_tree"> + <return type="Tree"> + </return> + <description> + Returns the [Tree] that owns this TreeItem. + </description> + </method> <method name="is_button_disabled" qualifiers="const"> <return type="bool"> </return> @@ -397,18 +453,24 @@ Returns [code]true[/code] if column [code]column[/code] is selected. </description> </method> - <method name="move_to_bottom"> + <method name="move_after"> <return type="void"> </return> + <argument index="0" name="item" type="Object"> + </argument> <description> - Moves this TreeItem to the bottom in the [Tree] hierarchy. + Moves this TreeItem right after the given [code]item[/code]. + [b]Note:[/b] You can't move to the root or move the root. </description> </method> - <method name="move_to_top"> + <method name="move_before"> <return type="void"> </return> + <argument index="0" name="item" type="Object"> + </argument> <description> - Moves this TreeItem to the top in the [Tree] hierarchy. + Moves this TreeItem right before the given [code]item[/code]. + [b]Note:[/b] You can't move to the root or move the root. </description> </method> <method name="remove_child"> @@ -525,6 +587,16 @@ The [code]callback[/code] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2]. </description> </method> + <method name="set_custom_font"> + <return type="void"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <argument index="1" name="font" type="Font"> + </argument> + <description> + </description> + </method> <method name="set_editable"> <return type="void"> </return> @@ -741,6 +813,12 @@ Sets the given column's tooltip text. </description> </method> + <method name="uncollapse_tree"> + <return type="void"> + </return> + <description> + </description> + </method> </methods> <members> <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed"> diff --git a/doc/classes/TubeTrailMesh.xml b/doc/classes/TubeTrailMesh.xml new file mode 100644 index 0000000000..2782791a62 --- /dev/null +++ b/doc/classes/TubeTrailMesh.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TubeTrailMesh" inherits="PrimitiveMesh" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="curve" type="Curve" setter="set_curve" getter="get_curve"> + </member> + <member name="radial_steps" type="int" setter="set_radial_steps" getter="get_radial_steps" default="8"> + </member> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + </member> + <member name="section_length" type="float" setter="set_section_length" getter="get_section_length" default="0.2"> + </member> + <member name="section_rings" type="int" setter="set_section_rings" getter="get_section_rings" default="3"> + </member> + <member name="sections" type="int" setter="set_sections" getter="get_sections" default="5"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index b32bb1e2d9..00cca40093 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -23,7 +23,7 @@ tween.Start(); [/csharp] [/codeblocks] - Many methods require a property name, such as [code]"position"[/code] above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (eg. [code]position:x[/code]), where it would only apply to that particular component. + Many methods require a property name, such as [code]"position"[/code] above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (e.g. [code]position:x[/code]), where it would only apply to that particular component. Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url] </description> diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml index 0fc00f67f8..6f3ccb8a17 100644 --- a/doc/classes/UDPServer.xml +++ b/doc/classes/UDPServer.xml @@ -123,6 +123,13 @@ <tutorials> </tutorials> <methods> + <method name="get_local_port" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the local port this server is listening to. + </description> + </method> <method name="is_connection_available" qualifiers="const"> <return type="bool"> </return> @@ -145,7 +152,7 @@ <argument index="1" name="bind_address" type="String" default=""*""> </argument> <description> - Starts the server by opening a UDP socket listening on the given port. You can optionally specify a [code]bind_address[/code] to only listen for packets sent to that address. See also [method PacketPeerUDP.listen]. + Starts the server by opening a UDP socket listening on the given port. You can optionally specify a [code]bind_address[/code] to only listen for packets sent to that address. See also [method PacketPeerUDP.bind]. </description> </method> <method name="poll"> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index a0330de4fa..aba6183124 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -186,7 +186,7 @@ <return type="int"> </return> <description> - Return how many element are in the history. + Return how many elements are in the history. </description> </method> <method name="get_version" qualifiers="const"> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 4159a38d96..1390a5e45b 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -53,14 +53,14 @@ Constructs a new [Vector2] from the given [code]x[/code] and [code]y[/code]. </description> </method> - <method name="abs"> + <method name="abs" qualifiers="const"> <return type="Vector2"> </return> <description> Returns a new vector with all components in absolute values (i.e. positive). </description> </method> - <method name="angle"> + <method name="angle" qualifiers="const"> <return type="float"> </return> <description> @@ -69,7 +69,7 @@ Equivalent to the result of [method @GlobalScope.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code]. </description> </method> - <method name="angle_to"> + <method name="angle_to" qualifiers="const"> <return type="float"> </return> <argument index="0" name="to" type="Vector2"> @@ -78,7 +78,7 @@ Returns the angle to the given vector, in radians. </description> </method> - <method name="angle_to_point"> + <method name="angle_to_point" qualifiers="const"> <return type="float"> </return> <argument index="0" name="to" type="Vector2"> @@ -87,14 +87,14 @@ Returns the angle between the line connecting the two points and the X axis, in radians. </description> </method> - <method name="aspect"> + <method name="aspect" qualifiers="const"> <return type="float"> </return> <description> Returns the aspect ratio of this vector, the ratio of [member x] to [member y]. </description> </method> - <method name="bounce"> + <method name="bounce" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="n" type="Vector2"> @@ -103,23 +103,25 @@ Returns the vector "bounced off" from a plane defined by the given normal. </description> </method> - <method name="ceil"> + <method name="ceil" qualifiers="const"> <return type="Vector2"> </return> <description> Returns the vector with all components rounded up (towards positive infinity). </description> </method> - <method name="clamped"> + <method name="clamp" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="length" type="float"> + <argument index="0" name="min" type="Vector2"> + </argument> + <argument index="1" name="max" type="Vector2"> </argument> <description> - Returns the vector with a maximum length by limiting its length to [code]length[/code]. + Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. </description> </method> - <method name="cross"> + <method name="cross" qualifiers="const"> <return type="float"> </return> <argument index="0" name="with" type="Vector2"> @@ -128,7 +130,7 @@ Returns the cross product of this vector and [code]with[/code]. </description> </method> - <method name="cubic_interpolate"> + <method name="cubic_interpolate" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="b" type="Vector2"> @@ -143,7 +145,7 @@ Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> - <method name="direction_to"> + <method name="direction_to" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="b" type="Vector2"> @@ -152,7 +154,7 @@ Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code]. </description> </method> - <method name="distance_squared_to"> + <method name="distance_squared_to" qualifiers="const"> <return type="float"> </return> <argument index="0" name="to" type="Vector2"> @@ -162,7 +164,7 @@ This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> - <method name="distance_to"> + <method name="distance_to" qualifiers="const"> <return type="float"> </return> <argument index="0" name="to" type="Vector2"> @@ -171,7 +173,7 @@ Returns the distance between this vector and [code]to[/code]. </description> </method> - <method name="dot"> + <method name="dot" qualifiers="const"> <return type="float"> </return> <argument index="0" name="with" type="Vector2"> @@ -183,14 +185,14 @@ [b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code]. </description> </method> - <method name="floor"> + <method name="floor" qualifiers="const"> <return type="Vector2"> </return> <description> Returns the vector with all components rounded down (towards negative infinity). </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="to" type="Vector2"> @@ -199,21 +201,21 @@ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> - <method name="is_normalized"> + <method name="is_normalized" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise. </description> </method> - <method name="length"> + <method name="length" qualifiers="const"> <return type="float"> </return> <description> Returns the length (magnitude) of this vector. </description> </method> - <method name="length_squared"> + <method name="length_squared" qualifiers="const"> <return type="float"> </return> <description> @@ -221,7 +223,7 @@ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> - <method name="lerp"> + <method name="lerp" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="to" type="Vector2"> @@ -229,10 +231,19 @@ <argument index="1" name="weight" type="float"> </argument> <description> - Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + </description> + </method> + <method name="limit_length" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="length" type="float" default="1.0"> + </argument> + <description> + Returns the vector with a maximum length by limiting its length to [code]length[/code]. </description> </method> - <method name="move_toward"> + <method name="move_toward" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="to" type="Vector2"> @@ -243,7 +254,7 @@ Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount. </description> </method> - <method name="normalized"> + <method name="normalized" qualifiers="const"> <return type="Vector2"> </return> <description> @@ -390,14 +401,14 @@ <description> </description> </method> - <method name="orthogonal"> + <method name="orthogonal" qualifiers="const"> <return type="Vector2"> </return> <description> Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length. </description> </method> - <method name="posmod"> + <method name="posmod" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="mod" type="float"> @@ -406,7 +417,7 @@ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code]. </description> </method> - <method name="posmodv"> + <method name="posmodv" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="modv" type="Vector2"> @@ -415,7 +426,7 @@ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components. </description> </method> - <method name="project"> + <method name="project" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="b" type="Vector2"> @@ -424,7 +435,7 @@ Returns the vector projected onto the vector [code]b[/code]. </description> </method> - <method name="reflect"> + <method name="reflect" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="n" type="Vector2"> @@ -433,7 +444,7 @@ Returns the vector reflected from a plane defined by the given normal. </description> </method> - <method name="rotated"> + <method name="rotated" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="phi" type="float"> @@ -442,21 +453,21 @@ Returns the vector rotated by [code]phi[/code] radians. See also [method @GlobalScope.deg2rad]. </description> </method> - <method name="round"> + <method name="round" qualifiers="const"> <return type="Vector2"> </return> <description> Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. </description> </method> - <method name="sign"> + <method name="sign" qualifiers="const"> <return type="Vector2"> </return> <description> Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. </description> </method> - <method name="slerp"> + <method name="slerp" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="to" type="Vector2"> @@ -464,11 +475,11 @@ <argument index="1" name="weight" type="float"> </argument> <description> - Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. [b]Note:[/b] Both vectors must be normalized. </description> </method> - <method name="slide"> + <method name="slide" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="n" type="Vector2"> @@ -477,7 +488,7 @@ Returns this vector slid along a plane defined by the given normal. </description> </method> - <method name="snapped"> + <method name="snapped" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="step" type="Vector2"> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index a4ea5c2742..6efb52b712 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -50,20 +50,31 @@ Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code]. </description> </method> - <method name="abs"> + <method name="abs" qualifiers="const"> <return type="Vector2i"> </return> <description> Returns a new vector with all components in absolute values (i.e. positive). </description> </method> - <method name="aspect"> + <method name="aspect" qualifiers="const"> <return type="float"> </return> <description> Returns the ratio of [member x] to [member y]. </description> </method> + <method name="clamp" qualifiers="const"> + <return type="Vector2i"> + </return> + <argument index="0" name="min" type="Vector2i"> + </argument> + <argument index="1" name="max" type="Vector2i"> + </argument> + <description> + Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. + </description> + </method> <method name="operator !=" qualifiers="operator"> <return type="bool"> </return> @@ -212,7 +223,7 @@ <description> </description> </method> - <method name="sign"> + <method name="sign" qualifiers="const"> <return type="Vector2i"> </return> <description> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index ea80b7c248..b6effd441b 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -55,14 +55,14 @@ Returns a [Vector3] with the given components. </description> </method> - <method name="abs"> + <method name="abs" qualifiers="const"> <return type="Vector3"> </return> <description> Returns a new vector with all components in absolute values (i.e. positive). </description> </method> - <method name="angle_to"> + <method name="angle_to" qualifiers="const"> <return type="float"> </return> <argument index="0" name="to" type="Vector3"> @@ -71,7 +71,7 @@ Returns the unsigned minimum angle to the given vector, in radians. </description> </method> - <method name="bounce"> + <method name="bounce" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="n" type="Vector3"> @@ -80,14 +80,25 @@ Returns the vector "bounced off" from a plane defined by the given normal. </description> </method> - <method name="ceil"> + <method name="ceil" qualifiers="const"> <return type="Vector3"> </return> <description> Returns a new vector with all components rounded up (towards positive infinity). </description> </method> - <method name="cross"> + <method name="clamp" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="min" type="Vector3"> + </argument> + <argument index="1" name="max" type="Vector3"> + </argument> + <description> + Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. + </description> + </method> + <method name="cross" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="with" type="Vector3"> @@ -96,7 +107,7 @@ Returns the cross product of this vector and [code]b[/code]. </description> </method> - <method name="cubic_interpolate"> + <method name="cubic_interpolate" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="b" type="Vector3"> @@ -111,7 +122,7 @@ Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> - <method name="direction_to"> + <method name="direction_to" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="b" type="Vector3"> @@ -120,7 +131,7 @@ Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code]. </description> </method> - <method name="distance_squared_to"> + <method name="distance_squared_to" qualifiers="const"> <return type="float"> </return> <argument index="0" name="b" type="Vector3"> @@ -130,7 +141,7 @@ This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> - <method name="distance_to"> + <method name="distance_to" qualifiers="const"> <return type="float"> </return> <argument index="0" name="b" type="Vector3"> @@ -139,7 +150,7 @@ Returns the distance between this vector and [code]b[/code]. </description> </method> - <method name="dot"> + <method name="dot" qualifiers="const"> <return type="float"> </return> <argument index="0" name="with" type="Vector3"> @@ -151,21 +162,21 @@ [b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code]. </description> </method> - <method name="floor"> + <method name="floor" qualifiers="const"> <return type="Vector3"> </return> <description> Returns a new vector with all components rounded down (towards negative infinity). </description> </method> - <method name="inverse"> + <method name="inverse" qualifiers="const"> <return type="Vector3"> </return> <description> Returns the inverse of the vector. This is the same as [code]Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )[/code]. </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="to" type="Vector3"> @@ -174,21 +185,21 @@ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> - <method name="is_normalized"> + <method name="is_normalized" qualifiers="const"> <return type="bool"> </return> <description> Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise. </description> </method> - <method name="length"> + <method name="length" qualifiers="const"> <return type="float"> </return> <description> Returns the length (magnitude) of this vector. </description> </method> - <method name="length_squared"> + <method name="length_squared" qualifiers="const"> <return type="float"> </return> <description> @@ -196,7 +207,7 @@ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> - <method name="lerp"> + <method name="lerp" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="to" type="Vector3"> @@ -204,24 +215,33 @@ <argument index="1" name="weight" type="float"> </argument> <description> - Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + </description> + </method> + <method name="limit_length" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="length" type="float" default="1.0"> + </argument> + <description> + Returns the vector with a maximum length by limiting its length to [code]length[/code]. </description> </method> - <method name="max_axis"> + <method name="max_axis" qualifiers="const"> <return type="int"> </return> <description> Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> - <method name="min_axis"> + <method name="min_axis" qualifiers="const"> <return type="int"> </return> <description> Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> - <method name="move_toward"> + <method name="move_toward" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="to" type="Vector3"> @@ -232,7 +252,7 @@ Moves this vector toward [code]to[/code] by the fixed [code]delta[/code] amount. </description> </method> - <method name="normalized"> + <method name="normalized" qualifiers="const"> <return type="Vector3"> </return> <description> @@ -266,7 +286,7 @@ <method name="operator *" qualifiers="operator"> <return type="Vector3"> </return> - <argument index="0" name="right" type="Quat"> + <argument index="0" name="right" type="Quaternion"> </argument> <description> </description> @@ -274,7 +294,7 @@ <method name="operator *" qualifiers="operator"> <return type="Vector3"> </return> - <argument index="0" name="right" type="Transform"> + <argument index="0" name="right" type="Transform3D"> </argument> <description> </description> @@ -395,7 +415,7 @@ <description> </description> </method> - <method name="outer"> + <method name="outer" qualifiers="const"> <return type="Basis"> </return> <argument index="0" name="with" type="Vector3"> @@ -404,7 +424,7 @@ Returns the outer product with [code]b[/code]. </description> </method> - <method name="posmod"> + <method name="posmod" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="mod" type="float"> @@ -413,7 +433,7 @@ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code]. </description> </method> - <method name="posmodv"> + <method name="posmodv" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="modv" type="Vector3"> @@ -422,7 +442,7 @@ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components. </description> </method> - <method name="project"> + <method name="project" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="b" type="Vector3"> @@ -431,7 +451,7 @@ Returns this vector projected onto another vector [code]b[/code]. </description> </method> - <method name="reflect"> + <method name="reflect" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="n" type="Vector3"> @@ -440,7 +460,7 @@ Returns this vector reflected from a plane defined by the given normal. </description> </method> - <method name="rotated"> + <method name="rotated" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="by_axis" type="Vector3"> @@ -451,21 +471,21 @@ Rotates this vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector. </description> </method> - <method name="round"> + <method name="round" qualifiers="const"> <return type="Vector3"> </return> <description> Returns this vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. </description> </method> - <method name="sign"> + <method name="sign" qualifiers="const"> <return type="Vector3"> </return> <description> Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. </description> </method> - <method name="signed_angle_to"> + <method name="signed_angle_to" qualifiers="const"> <return type="float"> </return> <argument index="0" name="to" type="Vector3"> @@ -476,7 +496,7 @@ Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the [code]axis[/code]. </description> </method> - <method name="slerp"> + <method name="slerp" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="to" type="Vector3"> @@ -484,11 +504,11 @@ <argument index="1" name="weight" type="float"> </argument> <description> - Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. [b]Note:[/b] Both vectors must be normalized. </description> </method> - <method name="slide"> + <method name="slide" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="n" type="Vector3"> @@ -497,7 +517,7 @@ Returns this vector slid along a plane defined by the given normal. </description> </method> - <method name="snapped"> + <method name="snapped" qualifiers="const"> <return type="Vector3"> </return> <argument index="0" name="step" type="Vector3"> @@ -506,7 +526,7 @@ Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals. </description> </method> - <method name="to_diagonal_matrix"> + <method name="to_diagonal_matrix" qualifiers="const"> <return type="Basis"> </return> <description> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index a1ae2aceab..6e8a34b692 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -52,20 +52,31 @@ Returns a [Vector3i] with the given components. </description> </method> - <method name="abs"> + <method name="abs" qualifiers="const"> <return type="Vector3i"> </return> <description> </description> </method> - <method name="max_axis"> + <method name="clamp" qualifiers="const"> + <return type="Vector3i"> + </return> + <argument index="0" name="min" type="Vector3i"> + </argument> + <argument index="1" name="max" type="Vector3i"> + </argument> + <description> + Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. + </description> + </method> + <method name="max_axis" qualifiers="const"> <return type="int"> </return> <description> Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> - <method name="min_axis"> + <method name="min_axis" qualifiers="const"> <return type="int"> </return> <description> @@ -220,7 +231,7 @@ <description> </description> </method> - <method name="sign"> + <method name="sign" qualifiers="const"> <return type="Vector3i"> </return> <description> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index b2ab356b0d..12558ebbbc 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -60,7 +60,7 @@ <member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec" default="500"> Amount of time in milliseconds to store in buffer while playing. </member> - <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@"Master""> + <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&"Master""> Audio bus to use for sound playback. </member> <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="true"> @@ -74,6 +74,7 @@ </member> <member name="stream_position" type="float" setter="set_stream_position" getter="get_stream_position"> The current position of the stream, in seconds. + [b]Note:[/b] Changing this value won't have any effect as seeking is not implemented yet, except in video formats implemented by a GDNative add-on. </member> <member name="volume" type="float" setter="set_volume" getter="get_volume"> Audio volume as a linear value. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 8120ae539e..7f05b14765 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -80,9 +80,9 @@ </return> <description> Returns the viewport's texture. - [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_data] to flip it back, for example: + [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_image] to flip it back, for example: [codeblock] - var img = get_viewport().get_texture().get_data() + var img = get_viewport().get_texture().get_image() img.flip_y() [/codeblock] </description> @@ -267,6 +267,11 @@ </member> <member name="use_debanding" type="bool" setter="set_use_debanding" getter="is_using_debanding" default="false"> </member> + <member name="use_occlusion_culling" type="bool" setter="set_use_occlusion_culling" getter="is_using_occlusion_culling" default="false"> + </member> + <member name="use_xr" type="bool" setter="set_use_xr" getter="is_using_xr" default="false"> + If [code]true[/code], the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset. + </member> <member name="world_2d" type="World2D" setter="set_world_2d" getter="get_world_2d"> The custom [World2D] which can be used as 2D environment source. </member> @@ -377,14 +382,14 @@ </constant> <constant name="DEBUG_DRAW_NORMAL_BUFFER" value="5" enum="DebugDraw"> </constant> - <constant name="DEBUG_DRAW_GI_PROBE_ALBEDO" value="6" enum="DebugDraw"> - Objects are displayed with only the albedo value from [GIProbe]s. + <constant name="DEBUG_DRAW_VOXEL_GI_ALBEDO" value="6" enum="DebugDraw"> + Objects are displayed with only the albedo value from [VoxelGI]s. </constant> - <constant name="DEBUG_DRAW_GI_PROBE_LIGHTING" value="7" enum="DebugDraw"> - Objects are displayed with only the lighting value from [GIProbe]s. + <constant name="DEBUG_DRAW_VOXEL_GI_LIGHTING" value="7" enum="DebugDraw"> + Objects are displayed with only the lighting value from [VoxelGI]s. </constant> - <constant name="DEBUG_DRAW_GI_PROBE_EMISSION" value="8" enum="DebugDraw"> - Objects are displayed with only the emission color from [GIProbe]s. + <constant name="DEBUG_DRAW_VOXEL_GI_EMISSION" value="8" enum="DebugDraw"> + Objects are displayed with only the emission color from [VoxelGI]s. </constant> <constant name="DEBUG_DRAW_SHADOW_ATLAS" value="9" enum="DebugDraw"> Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport]. @@ -419,6 +424,8 @@ </constant> <constant name="DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="22" enum="DebugDraw"> </constant> + <constant name="DEBUG_DRAW_OCCLUDERS" value="23" enum="DebugDraw"> + </constant> <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter"> The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. </constant> diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 01d569d9c8..2a12254b71 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -44,7 +44,7 @@ </return> <description> Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance3D]. - Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform]. See also [method get_aabb]. + Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform3D]. See also [method get_aabb]. </description> </method> <method name="set_base"> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index c29c30289a..775ac88eff 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -222,13 +222,19 @@ <constant name="TYPE_LIGHT" value="2" enum="Type"> A shader for light calculations. </constant> - <constant name="TYPE_EMIT" value="3" enum="Type"> + <constant name="TYPE_START" value="3" enum="Type"> </constant> <constant name="TYPE_PROCESS" value="4" enum="Type"> </constant> - <constant name="TYPE_END" value="5" enum="Type"> + <constant name="TYPE_COLLIDE" value="5" enum="Type"> </constant> - <constant name="TYPE_MAX" value="6" enum="Type"> + <constant name="TYPE_START_CUSTOM" value="6" enum="Type"> + </constant> + <constant name="TYPE_PROCESS_CUSTOM" value="7" enum="Type"> + </constant> + <constant name="TYPE_SKY" value="8" enum="Type"> + </constant> + <constant name="TYPE_MAX" value="9" enum="Type"> Represents the size of the [enum Type] enum. </constant> <constant name="NODE_ID_INVALID" value="-1"> diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 6327ab534f..9a74f2322e 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -9,6 +9,13 @@ <link title="VisualShaders">https://docs.godotengine.org/en/latest/tutorials/shading/visual_shaders.html</link> </tutorials> <methods> + <method name="clear_default_input_values"> + <return type="void"> + </return> + <description> + Clears the default input ports value. + </description> + </method> <method name="get_default_input_values" qualifiers="const"> <return type="Array"> </return> @@ -25,6 +32,15 @@ Returns the default value of the input [code]port[/code]. </description> </method> + <method name="remove_input_port_default_value"> + <return type="void"> + </return> + <argument index="0" name="port" type="int"> + </argument> + <description> + Removes the default value of the input [code]port[/code]. + </description> + </method> <method name="set_default_input_values"> <return type="void"> </return> diff --git a/doc/classes/VisualShaderNodeBillboard.xml b/doc/classes/VisualShaderNodeBillboard.xml new file mode 100644 index 0000000000..53bcfa7b5c --- /dev/null +++ b/doc/classes/VisualShaderNodeBillboard.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeBillboard" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A node that controls how the object faces the camera to be used within the visual shader graph. + </brief_description> + <description> + The output port of this node needs to be connected to [code]Model View Matrix[/code] port of [VisualShaderNodeOutput]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="billboard_type" type="int" setter="set_billboard_type" getter="get_billboard_type" enum="VisualShaderNodeBillboard.BillboardType" default="1"> + Controls how the object faces the camera. See [enum BillboardType]. + </member> + <member name="keep_scale" type="bool" setter="set_keep_scale_enabled" getter="is_keep_scale_enabled" default="false"> + If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. + </member> + </members> + <constants> + <constant name="BILLBOARD_TYPE_DISABLED" value="0" enum="BillboardType"> + Billboarding is disabled and the node does nothing. + </constant> + <constant name="BILLBOARD_TYPE_ENABLED" value="1" enum="BillboardType"> + A standard billboarding algorithm is enabled. + </constant> + <constant name="BILLBOARD_TYPE_FIXED_Y" value="2" enum="BillboardType"> + A billboarding algorithm to rotate around Y-axis is enabled. + </constant> + <constant name="BILLBOARD_TYPE_PARTICLES" value="3" enum="BillboardType"> + A billboarding algorithm designed to use on particles is enabled. + </constant> + <constant name="BILLBOARD_TYPE_MAX" value="4" enum="BillboardType"> + Represents the size of the [enum BillboardType] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeComment.xml b/doc/classes/VisualShaderNodeComment.xml new file mode 100644 index 0000000000..8970e2fabb --- /dev/null +++ b/doc/classes/VisualShaderNodeComment.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeComment" inherits="VisualShaderNodeResizableBase" version="4.0"> + <brief_description> + A comment node to be placed on visual shader graph. + </brief_description> + <description> + A resizable rectangular area with changeable [member title] and [member description] used for better organizing of other visual shader nodes. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="description" type="String" setter="set_description" getter="get_description" default=""""> + An additional description which placed below the title. + </member> + <member name="title" type="String" setter="set_title" getter="get_title" default=""Comment""> + A title of the node. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 59b501660a..17fc2f8c4d 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -20,7 +20,7 @@ <return type="String"> </return> <description> - Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may looks like [code]"MyGame/MyFunctions/Noise"[/code]. + Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may look like [code]"MyGame/MyFunctions/Noise"[/code]. Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category. </description> </method> diff --git a/doc/classes/VisualShaderNodeDeterminant.xml b/doc/classes/VisualShaderNodeDeterminant.xml index 72be31872d..06b05addfa 100644 --- a/doc/classes/VisualShaderNodeDeterminant.xml +++ b/doc/classes/VisualShaderNodeDeterminant.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeDeterminant" inherits="VisualShaderNode" version="4.0"> <brief_description> - Calculates the determinant of a [Transform] within the visual shader graph. + Calculates the determinant of a [Transform3D] within the visual shader graph. </brief_description> <description> - Translates to [code]deteminant(x)[/code] in the shader language. + Translates to [code]determinant(x)[/code] in the shader language. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeExpression.xml b/doc/classes/VisualShaderNodeExpression.xml index f571edaab3..c2cbf41f45 100644 --- a/doc/classes/VisualShaderNodeExpression.xml +++ b/doc/classes/VisualShaderNodeExpression.xml @@ -5,7 +5,7 @@ </brief_description> <description> Custom Godot Shading Language expression, with a custom amount of input and output ports. - The provided code is directly injected into the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), so it cannot be used to to declare functions, varyings, uniforms, or global constants. See [VisualShaderNodeGlobalExpression] for such global definitions. + The provided code is directly injected into the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), so it cannot be used to declare functions, varyings, uniforms, or global constants. See [VisualShaderNodeGlobalExpression] for such global definitions. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeFaceForward.xml b/doc/classes/VisualShaderNodeFaceForward.xml index 5ef08ea8c2..48f84e5495 100644 --- a/doc/classes/VisualShaderNodeFaceForward.xml +++ b/doc/classes/VisualShaderNodeFaceForward.xml @@ -4,7 +4,7 @@ Returns the vector that points in the same direction as a reference vector within the visual shader graph. </brief_description> <description> - Translates to [code]faceforward(N, I, Nref)[/code] in the shader language. The function has three vector parameters: [code]N[/code], the vector to orient, [code]I[/code], the incident vector, and [code]Nref[/code], the reference vector. If the dot product of [code]I[/code] and [code]Nref[/code] is smaller than zero the return value is [code]N[/code]. Otherwise [code]-N[/code] is returned. + Translates to [code]faceforward(N, I, Nref)[/code] in the shader language. The function has three vector parameters: [code]N[/code], the vector to orient, [code]I[/code], the incident vector, and [code]Nref[/code], the reference vector. If the dot product of [code]I[/code] and [code]Nref[/code] is smaller than zero the return value is [code]N[/code]. Otherwise, [code]-N[/code] is returned. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml index afa14c776e..be3f7f173d 100644 --- a/doc/classes/VisualShaderNodeGroupBase.xml +++ b/doc/classes/VisualShaderNodeGroupBase.xml @@ -74,7 +74,7 @@ <return type="String"> </return> <description> - Returns a [String] description of the input ports as as colon-separated list using the format [code]id,type,name;[/code] (see [method add_input_port]). + Returns a [String] description of the input ports as a colon-separated list using the format [code]id,type,name;[/code] (see [method add_input_port]). </description> </method> <method name="get_output_port_count" qualifiers="const"> @@ -88,7 +88,7 @@ <return type="String"> </return> <description> - Returns a [String] description of the output ports as as colon-separated list using the format [code]id,type,name;[/code] (see [method add_output_port]). + Returns a [String] description of the output ports as a colon-separated list using the format [code]id,type,name;[/code] (see [method add_output_port]). </description> </method> <method name="has_input_port" qualifiers="const"> diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml index ad0b21a370..418999863b 100644 --- a/doc/classes/VisualShaderNodeIf.xml +++ b/doc/classes/VisualShaderNodeIf.xml @@ -4,7 +4,7 @@ Compares two floating-point numbers in order to return a required vector within the visual shader graph. </brief_description> <description> - First two ports are scalar floatin-point numbers to compare, third is tolerance comparison amount and last three ports represents a vectors returned if [code]a == b[/code], [code]a > b[/code] and [code]a < b[/code] respectively. + First two ports are scalar floating-point numbers to compare, third is tolerance comparison amount and last three ports represents a vectors returned if [code]a == b[/code], [code]a > b[/code] and [code]a < b[/code] respectively. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index 8e819b011c..067f78dffe 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -14,7 +14,7 @@ <return type="String"> </return> <description> - Returns a translated name of the current constant in the Godot Shader Language. eg. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code]. + Returns a translated name of the current constant in the Godot Shader Language. E.g. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code]. </description> </method> </methods> diff --git a/doc/classes/VisualShaderNodeParticleAccelerator.xml b/doc/classes/VisualShaderNodeParticleAccelerator.xml new file mode 100644 index 0000000000..82aae1df63 --- /dev/null +++ b/doc/classes/VisualShaderNodeParticleAccelerator.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeParticleAccelerator" inherits="VisualShaderNodeOutput" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="VisualShaderNodeParticleAccelerator.Mode" default="0"> + </member> + </members> + <constants> + <constant name="MODE_LINEAR" value="0" enum="Mode"> + </constant> + <constant name="MODE_RADIAL" value="1" enum="Mode"> + </constant> + <constant name="MODE_TANGENTIAL" value="2" enum="Mode"> + </constant> + <constant name="MODE_MAX" value="3" enum="Mode"> + </constant> + </constants> +</class> diff --git a/doc/classes/GLTFTexture.xml b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml index c7f94ab0da..af33b285d2 100644 --- a/doc/classes/GLTFTexture.xml +++ b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFTexture" inherits="Resource" version="4.0"> +<class name="VisualShaderNodeParticleBoxEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0"> <brief_description> </brief_description> <description> @@ -8,10 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="src_image" type="int" setter="set_src_image" getter="get_src_image" default="4"> - </member> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleConeVelocity.xml b/doc/classes/VisualShaderNodeParticleConeVelocity.xml new file mode 100644 index 0000000000..7a40c2a7d0 --- /dev/null +++ b/doc/classes/VisualShaderNodeParticleConeVelocity.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeParticleConeVelocity" inherits="VisualShaderNode" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeParticleEmit.xml b/doc/classes/VisualShaderNodeParticleEmit.xml new file mode 100644 index 0000000000..120b12d643 --- /dev/null +++ b/doc/classes/VisualShaderNodeParticleEmit.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeParticleEmit" inherits="VisualShaderNode" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="flags" type="int" setter="set_flags" getter="get_flags" enum="VisualShaderNodeParticleEmit.EmitFlags" default="31"> + </member> + </members> + <constants> + <constant name="EMIT_FLAG_POSITION" value="1" enum="EmitFlags"> + </constant> + <constant name="EMIT_FLAG_ROT_SCALE" value="2" enum="EmitFlags"> + </constant> + <constant name="EMIT_FLAG_VELOCITY" value="4" enum="EmitFlags"> + </constant> + <constant name="EMIT_FLAG_COLOR" value="8" enum="EmitFlags"> + </constant> + <constant name="EMIT_FLAG_CUSTOM" value="16" enum="EmitFlags"> + </constant> + </constants> +</class> diff --git a/doc/classes/EditorSceneImporterGLTF.xml b/doc/classes/VisualShaderNodeParticleEmitter.xml index e717b30f73..3a25fc1c7f 100644 --- a/doc/classes/EditorSceneImporterGLTF.xml +++ b/doc/classes/VisualShaderNodeParticleEmitter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorSceneImporterGLTF" inherits="EditorSceneImporter" version="4.0"> +<class name="VisualShaderNodeParticleEmitter" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/GLTFAnimation.xml b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml index 5c1fa02f11..89a53699c9 100644 --- a/doc/classes/GLTFAnimation.xml +++ b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GLTFAnimation" inherits="Resource" version="4.0"> +<class name="VisualShaderNodeParticleMultiplyByAxisAngle" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="loop" type="bool" setter="set_loop" getter="get_loop" default="false"> + <member name="degrees_mode" type="bool" setter="set_degrees_mode" getter="is_degrees_mode" default="true"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeParticleOutput.xml b/doc/classes/VisualShaderNodeParticleOutput.xml new file mode 100644 index 0000000000..c8fc66f2ff --- /dev/null +++ b/doc/classes/VisualShaderNodeParticleOutput.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeParticleOutput" inherits="VisualShaderNodeOutput" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeParticleRandomness.xml b/doc/classes/VisualShaderNodeParticleRandomness.xml new file mode 100644 index 0000000000..f19723a663 --- /dev/null +++ b/doc/classes/VisualShaderNodeParticleRandomness.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeParticleRandomness" inherits="VisualShaderNode" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeParticleRandomness.OpType" default="0"> + </member> + </members> + <constants> + <constant name="OP_TYPE_SCALAR" value="0" enum="OpType"> + </constant> + <constant name="OP_TYPE_VECTOR" value="1" enum="OpType"> + </constant> + <constant name="OP_TYPE_MAX" value="2" enum="OpType"> + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeParticleRingEmitter.xml b/doc/classes/VisualShaderNodeParticleRingEmitter.xml new file mode 100644 index 0000000000..ee3fbe7faf --- /dev/null +++ b/doc/classes/VisualShaderNodeParticleRingEmitter.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeParticleRingEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml new file mode 100644 index 0000000000..d43ac518cf --- /dev/null +++ b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeParticleSphereEmitter" inherits="VisualShaderNodeParticleEmitter" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeSDFToScreenUV.xml b/doc/classes/VisualShaderNodeSDFToScreenUV.xml index ea04180095..40fb66e364 100644 --- a/doc/classes/VisualShaderNodeSDFToScreenUV.xml +++ b/doc/classes/VisualShaderNodeSDFToScreenUV.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeSDFToScreenUV" inherits="VisualShaderNode" version="4.0"> <brief_description> - A function to convert a SDF (signed-distance field) to screen UV, to be used within the visual shader graph. + A function to convert an SDF (signed-distance field) to screen UV, to be used within the visual shader graph. </brief_description> <description> Translates to [code]sdf_to_screen_uv(sdf_pos)[/code] in the shader language. diff --git a/doc/classes/VisualShaderNodeScreenUVToSDF.xml b/doc/classes/VisualShaderNodeScreenUVToSDF.xml index 438c8dc67b..2e121ffc54 100644 --- a/doc/classes/VisualShaderNodeScreenUVToSDF.xml +++ b/doc/classes/VisualShaderNodeScreenUVToSDF.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeScreenUVToSDF" inherits="VisualShaderNode" version="4.0"> <brief_description> - A function to convert screen UV to a SDF (signed-distance field), to be used within the visual shader graph. + A function to convert screen UV to an SDF (signed-distance field), to be used within the visual shader graph. </brief_description> <description> Translates to [code]screen_uv_to_sdf(uv)[/code] in the shader language. If the UV port isn't connected, [code]SCREEN_UV[/code] is used instead. diff --git a/doc/classes/VisualShaderNodeSmoothStep.xml b/doc/classes/VisualShaderNodeSmoothStep.xml index fa22d16da8..0ed53a8c26 100644 --- a/doc/classes/VisualShaderNodeSmoothStep.xml +++ b/doc/classes/VisualShaderNodeSmoothStep.xml @@ -5,7 +5,7 @@ </brief_description> <description> Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language. - Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials. + Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise, the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeTextureSDF.xml b/doc/classes/VisualShaderNodeTextureSDF.xml index 7d3d654bd0..b5c89c2c31 100644 --- a/doc/classes/VisualShaderNodeTextureSDF.xml +++ b/doc/classes/VisualShaderNodeTextureSDF.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTextureSDF" inherits="VisualShaderNode" version="4.0"> <brief_description> - Performs a SDF (signed-distance field) texture lookup within the visual shader graph. + Performs an SDF (signed-distance field) texture lookup within the visual shader graph. </brief_description> <description> Translates to [code]texture_sdf(sdf_pos)[/code] in the shader language. diff --git a/doc/classes/VisualShaderNodeTextureSDFNormal.xml b/doc/classes/VisualShaderNodeTextureSDFNormal.xml index 5dbf3e545a..25fe1c4b28 100644 --- a/doc/classes/VisualShaderNodeTextureSDFNormal.xml +++ b/doc/classes/VisualShaderNodeTextureSDFNormal.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTextureSDFNormal" inherits="VisualShaderNode" version="4.0"> <brief_description> - Performs a SDF (signed-distance field) normal texture lookup within the visual shader graph. + Performs an SDF (signed-distance field) normal texture lookup within the visual shader graph. </brief_description> <description> Translates to [code]texture_sdf_normal(sdf_pos)[/code] in the shader language. diff --git a/doc/classes/VisualShaderNodeTransformCompose.xml b/doc/classes/VisualShaderNodeTransformCompose.xml index 41762b0099..b82ce9bdd8 100644 --- a/doc/classes/VisualShaderNodeTransformCompose.xml +++ b/doc/classes/VisualShaderNodeTransformCompose.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformCompose" inherits="VisualShaderNode" version="4.0"> <brief_description> - Composes a [Transform] from four [Vector3]s within the visual shader graph. + Composes a [Transform3D] from four [Vector3]s within the visual shader graph. </brief_description> <description> Creates a 4x4 transform matrix using four vectors of type [code]vec3[/code]. Each vector is one row in the matrix and the last column is a [code]vec4(0, 0, 0, 1)[/code]. diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml index b8f054e914..550ed829c9 100644 --- a/doc/classes/VisualShaderNodeTransformConstant.xml +++ b/doc/classes/VisualShaderNodeTransformConstant.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNodeConstant" version="4.0"> <brief_description> - A [Transform] constant for use within the visual shader graph. + A [Transform3D] constant for use within the visual shader graph. </brief_description> <description> - A constant [Transform], which can be used as an input node. + A constant [Transform3D], which can be used as an input node. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="constant" type="Transform" setter="set_constant" getter="get_constant" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> - A [Transform] constant which represents the state of this node. + <member name="constant" type="Transform3D" setter="set_constant" getter="get_constant" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + A [Transform3D] constant which represents the state of this node. </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeTransformDecompose.xml b/doc/classes/VisualShaderNodeTransformDecompose.xml index c8d893db00..b815efc67a 100644 --- a/doc/classes/VisualShaderNodeTransformDecompose.xml +++ b/doc/classes/VisualShaderNodeTransformDecompose.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformDecompose" inherits="VisualShaderNode" version="4.0"> <brief_description> - Decomposes a [Transform] into four [Vector3]s within the visual shader graph. + Decomposes a [Transform3D] into four [Vector3]s within the visual shader graph. </brief_description> <description> Takes a 4x4 transform matrix and decomposes it into four [code]vec3[/code] values, one from each row of the matrix. diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml index d0b5c5129d..41a58e1458 100644 --- a/doc/classes/VisualShaderNodeTransformFunc.xml +++ b/doc/classes/VisualShaderNodeTransformFunc.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformFunc" inherits="VisualShaderNode" version="4.0"> <brief_description> - Computes a [Transform] function within the visual shader graph. + Computes a [Transform3D] function within the visual shader graph. </brief_description> <description> - Computes an inverse or transpose function on the provided [Transform]. + Computes an inverse or transpose function on the provided [Transform3D]. </description> <tutorials> </tutorials> @@ -17,10 +17,10 @@ </members> <constants> <constant name="FUNC_INVERSE" value="0" enum="Function"> - Perform the inverse operation on the [Transform] matrix. + Perform the inverse operation on the [Transform3D] matrix. </constant> <constant name="FUNC_TRANSPOSE" value="1" enum="Function"> - Perform the transpose operation on the [Transform] matrix. + Perform the transpose operation on the [Transform3D] matrix. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformMult.xml b/doc/classes/VisualShaderNodeTransformMult.xml index 02b6e0cd1c..f26f60a1f3 100644 --- a/doc/classes/VisualShaderNodeTransformMult.xml +++ b/doc/classes/VisualShaderNodeTransformMult.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformMult" inherits="VisualShaderNode" version="4.0"> <brief_description> - Multiplies [Transform] by [Transform] within the visual shader graph. + Multiplies [Transform3D] by [Transform3D] within the visual shader graph. </brief_description> <description> A multiplication operation on two transforms (4x4 matrices), with support for different multiplication operators. diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml index ff6246618d..1f1cc4b630 100644 --- a/doc/classes/VisualShaderNodeTransformUniform.xml +++ b/doc/classes/VisualShaderNodeTransformUniform.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformUniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> - A [Transform] uniform for use within the visual shader graph. + A [Transform3D] uniform for use within the visual shader graph. </brief_description> <description> Translated to [code]uniform mat4[/code] in the shader language. @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="default_value" type="Transform" setter="set_default_value" getter="get_default_value" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + <member name="default_value" type="Transform3D" setter="set_default_value" getter="get_default_value" default="Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> A default value to be assigned within the shader. </member> <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml index 3d5f87f727..2c9c115d9c 100644 --- a/doc/classes/VisualShaderNodeTransformVecMult.xml +++ b/doc/classes/VisualShaderNodeTransformVecMult.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeTransformVecMult" inherits="VisualShaderNode" version="4.0"> <brief_description> - Multiplies a [Transform] and a [Vector3] within the visual shader graph. + Multiplies a [Transform3D] and a [Vector3] within the visual shader graph. </brief_description> <description> A multiplication operation on a transform (4x4 matrix) and a vector, with support for different multiplication operators. diff --git a/doc/classes/VisualShaderNodeUVFunc.xml b/doc/classes/VisualShaderNodeUVFunc.xml new file mode 100644 index 0000000000..042644feb0 --- /dev/null +++ b/doc/classes/VisualShaderNodeUVFunc.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeUVFunc" inherits="VisualShaderNode" version="4.0"> + <brief_description> + Contains functions to modify texture coordinates ([code]uv[/code]) to be used within the visual shader graph. + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeUVFunc.Function" default="0"> + A function to be applied to the texture coordinates. See [enum Function] for options. + </member> + </members> + <constants> + <constant name="FUNC_PANNING" value="0" enum="Function"> + Translates [code]uv[/code] by using [code]scale[/code] and [code]offset[/code] values using the following formula: [code]uv = uv + offset * scale[/code]. [code]uv[/code] port is connected to [code]UV[/code] built-in by default. + </constant> + <constant name="FUNC_SCALING" value="1" enum="Function"> + Scales [code]uv[/uv] by using [code]scale[/code] and [code]pivot[/code] values using the following formula: [code]uv = (uv - pivot) * scale + pivot[/code]. [code]uv[/code] port is connected to [code]UV[/code] built-in by default. + </constant> + <constant name="FUNC_MAX" value="2" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/GIProbe.xml b/doc/classes/VoxelGI.xml index dd51248fd9..fa5035349e 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/VoxelGI.xml @@ -1,14 +1,15 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GIProbe" inherits="VisualInstance3D" version="4.0"> +<class name="VoxelGI" inherits="VisualInstance3D" version="4.0"> <brief_description> Real-time global illumination (GI) probe. </brief_description> <description> - [GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked. - Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/global_illumination/gi_probes/quality]. + [VoxelGI]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [VoxelGI]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked. + Having [VoxelGI]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/global_illumination/voxel_gi/quality]. + [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. </description> <tutorials> - <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link> + <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/voxel_gi.html</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> @@ -20,7 +21,7 @@ <argument index="1" name="create_visual_debug" type="bool" default="false"> </argument> <description> - Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_DYNAMIC] or [constant Light3D.BAKE_STATIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring. + Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_DYNAMIC] or [constant Light3D.BAKE_STATIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [VoxelGI]'s data and debug any issues that may be occurring. </description> </method> <method name="debug_bake"> @@ -32,14 +33,14 @@ </method> </methods> <members> - <member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data"> - The [GIProbeData] resource that holds the data for this [GIProbe]. + <member name="data" type="VoxelGIData" setter="set_probe_data" getter="get_probe_data"> + The [VoxelGIData] resource that holds the data for this [VoxelGI]. </member> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )"> - The size of the area covered by the [GIProbe]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting. + The size of the area covered by the [VoxelGI]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting. </member> - <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="GIProbe.Subdiv" default="1"> - Number of times to subdivide the grid that the [GIProbe] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance. + <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="VoxelGI.Subdiv" default="1"> + Number of times to subdivide the grid that the [VoxelGI] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance. </member> </members> <constants> diff --git a/doc/classes/GIProbeData.xml b/doc/classes/VoxelGIData.xml index 693df8f819..88a0411e2b 100644 --- a/doc/classes/GIProbeData.xml +++ b/doc/classes/VoxelGIData.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GIProbeData" inherits="Resource" version="4.0"> +<class name="VoxelGIData" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> @@ -11,7 +11,7 @@ <method name="allocate"> <return type="void"> </return> - <argument index="0" name="to_cell_xform" type="Transform"> + <argument index="0" name="to_cell_xform" type="Transform3D"> </argument> <argument index="1" name="aabb" type="AABB"> </argument> @@ -59,7 +59,7 @@ </description> </method> <method name="get_to_cell_xform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> </description> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index b99a251a11..9c320747d1 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -45,7 +45,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -55,7 +55,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -65,10 +65,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns the [Font] at [code]name[/code] if the theme has [code]type[/code]. + Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_theme_font_size" qualifiers="const"> @@ -76,10 +76,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns the font size at [code]name[/code] if the theme has [code]type[/code]. + Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_theme_icon" qualifiers="const"> @@ -87,7 +87,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -97,7 +97,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -119,7 +119,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -129,7 +129,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -139,11 +139,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_font_size" qualifiers="const"> @@ -151,11 +151,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font size with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code]. + Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_icon" qualifiers="const"> @@ -163,7 +163,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -173,7 +173,7 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName" default=""""> + <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> </description> @@ -340,6 +340,8 @@ </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> </member> + <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="&"""> + </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> </member> <member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false"> diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml index 25033cdb09..20b3afbd0b 100644 --- a/doc/classes/World2D.xml +++ b/doc/classes/World2D.xml @@ -18,6 +18,9 @@ <member name="direct_space_state" type="PhysicsDirectSpaceState2D" setter="" getter="get_direct_space_state"> Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to [code]_physics_process(delta)[/code] in the main thread. </member> + <member name="navigation_map" type="RID" setter="" getter="get_navigation_map"> + The [RID] of this world's navigation map. Used by the [NavigationServer2D]. + </member> <member name="space" type="RID" setter="" getter="get_space"> The [RID] of this world's physics space resource. Used by the [PhysicsServer2D] for 2D physics, treating it as both a space and an area. </member> diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml index fe92077432..610ecacff4 100644 --- a/doc/classes/World3D.xml +++ b/doc/classes/World3D.xml @@ -23,6 +23,9 @@ <member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment"> The World3D's fallback_environment will be used if the World3D's [Environment] fails or is missing. </member> + <member name="navigation_map" type="RID" setter="" getter="get_navigation_map"> + The [RID] of this world's navigation map. Used by the [NavigationServer3D]. + </member> <member name="scenario" type="RID" setter="" getter="get_scenario"> The World3D's visual scenario. </member> diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml index a4a86cc22a..5d8c23bd6f 100644 --- a/doc/classes/XRController3D.xml +++ b/doc/classes/XRController3D.xml @@ -62,7 +62,7 @@ <argument index="0" name="button" type="int"> </argument> <description> - Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoyButtonList]. + Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoyButton]. </description> </method> </methods> diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml index 36cd6e2ea0..2cf8e1d6f5 100644 --- a/doc/classes/XRPositionalTracker.xml +++ b/doc/classes/XRPositionalTracker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="XRPositionalTracker" inherits="Object" version="4.0"> +<class name="XRPositionalTracker" inherits="Reference" version="4.0"> <brief_description> A tracked object. </brief_description> @@ -69,7 +69,7 @@ </description> </method> <method name="get_transform" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <argument index="0" name="adjust_by_reference_frame" type="bool"> </argument> diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml index 75a05bef17..8284fa4a89 100644 --- a/doc/classes/XRServer.xml +++ b/doc/classes/XRServer.xml @@ -10,6 +10,24 @@ <link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> + <method name="add_interface"> + <return type="void"> + </return> + <argument index="0" name="interface" type="XRInterface"> + </argument> + <description> + Registers an [XRInterface] object. + </description> + </method> + <method name="add_tracker"> + <return type="void"> + </return> + <argument index="0" name="tracker" type="XRPositionalTracker"> + </argument> + <description> + Registers a new [XRPositionalTracker] that tracks a spatial location in real space. + </description> + </method> <method name="center_on_hmd"> <return type="void"> </return> @@ -26,6 +44,15 @@ You should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism. </description> </method> + <method name="clear_primary_interface_if"> + <return type="void"> + </return> + <argument index="0" name="interface" type="XRInterface"> + </argument> + <description> + Clears our current primary interface if it is set to the provided interface. + </description> + </method> <method name="find_interface" qualifiers="const"> <return type="XRInterface"> </return> @@ -36,7 +63,7 @@ </description> </method> <method name="get_hmd_transform"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> Returns the primary interface's transformation. @@ -87,7 +114,7 @@ </description> </method> <method name="get_reference_frame" qualifiers="const"> - <return type="Transform"> + <return type="Transform3D"> </return> <description> Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces. @@ -109,6 +136,24 @@ Returns the number of trackers currently registered. </description> </method> + <method name="remove_interface"> + <return type="void"> + </return> + <argument index="0" name="interface" type="XRInterface"> + </argument> + <description> + Removes this interface. + </description> + </method> + <method name="remove_tracker"> + <return type="void"> + </return> + <argument index="0" name="tracker" type="XRPositionalTracker"> + </argument> + <description> + Removes this positional tracker. + </description> + </method> </methods> <members> <member name="primary_interface" type="XRInterface" setter="set_primary_interface" getter="get_primary_interface"> diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml deleted file mode 100644 index 4ef6a4b4ec..0000000000 --- a/doc/classes/YSort.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="YSort" inherits="Node2D" version="4.0"> - <brief_description> - Sort all child nodes based on their Y positions. - </brief_description> - <description> - Sort all child nodes based on their Y positions. The child node must inherit from [CanvasItem] for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position. - Nesting of YSort nodes is possible. Children YSort nodes will be sorted in the same space as the parent YSort, allowing to better organize a scene or divide it in multiple ones, yet keep the unique sorting. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="sort_enabled" type="bool" setter="set_sort_enabled" getter="is_sort_enabled" default="true"> - If [code]true[/code], child nodes are sorted, otherwise sorting is disabled. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index 03e8bee7d5..48f336d58c 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -4,7 +4,7 @@ Boolean built-in type. </brief_description> <description> - Boolean is a built-in type. There are two boolean values: [code]true[/code] and [code]false[/code]. You can think of it as an switch with on or off (1 or 0) setting. Booleans are used in programming for logic in condition statements, like [code]if[/code] statements. + Boolean is a built-in type. There are two boolean values: [code]true[/code] and [code]false[/code]. You can think of it as a switch with on or off (1 or 0) setting. Booleans are used in programming for logic in condition statements, like [code]if[/code] statements. Booleans can be directly used in [code]if[/code] statements. The code below demonstrates this on the [code]if can_shoot:[/code] line. You don't need to use [code]== true[/code], you only need [code]if can_shoot:[/code]. Similarly, use [code]if not can_shoot:[/code] rather than [code]== false[/code]. [codeblocks] [gdscript] @@ -49,6 +49,7 @@ [/csharp] [/codeblocks] The following code will set [code]can_shoot[/code] to [code]false[/code] and start a timer. This will prevent player from shooting until the timer runs out. Next [code]can_shoot[/code] will be set to [code]true[/code] again allowing player to shoot once again. + [codeblocks] [gdscript] var _can_shoot = true onready var _cool_down = $CoolDownTimer @@ -131,6 +132,7 @@ <argument index="0" name="right" type="bool"> </argument> <description> + Returns [code]true[/code] if two bools are different, i.e. one is [code]true[/code] and the other is [code]false[/code]. </description> </method> <method name="operator <" qualifiers="operator"> @@ -139,6 +141,7 @@ <argument index="0" name="right" type="bool"> </argument> <description> + Returns [code]true[/code] if left operand is [code]false[/code] and right operand is [code]true[/code]. </description> </method> <method name="operator ==" qualifiers="operator"> @@ -147,6 +150,7 @@ <argument index="0" name="right" type="bool"> </argument> <description> + Returns [code]true[/code] if two bools are equal, i.e. both are [code]true[/code] or both are [code]false[/code]. </description> </method> <method name="operator >" qualifiers="operator"> @@ -155,6 +159,7 @@ <argument index="0" name="right" type="bool"> </argument> <description> + Returns [code]true[/code] if left operand is [code]true[/code] and right operand is [code]false[/code]. </description> </method> </methods> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 85fe31eec8..f75c130039 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -49,6 +49,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] if two floats are different from each other. </description> </method> <method name="operator !=" qualifiers="operator"> @@ -57,6 +58,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] if the integer has different value than the float. </description> </method> <method name="operator *" qualifiers="operator"> @@ -65,6 +67,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Multiplies two [float]s. </description> </method> <method name="operator *" qualifiers="operator"> @@ -73,6 +76,10 @@ <argument index="0" name="right" type="Vector2"> </argument> <description> + Multiplies each component of the [Vector2] by the given [float]. + [codeblock] + print(2.5 * Vector2(1, 1)) # Vector2(2.5, 2.5) + [/codeblock] </description> </method> <method name="operator *" qualifiers="operator"> @@ -81,6 +88,10 @@ <argument index="0" name="right" type="Vector2i"> </argument> <description> + Multiplies each component of the [Vector2i] by the given [float]. + [codeblock] + print(2.0 * Vector2i(1, 1)) # Vector2i(2.0, 2.0) + [/codeblock] </description> </method> <method name="operator *" qualifiers="operator"> @@ -89,6 +100,7 @@ <argument index="0" name="right" type="Vector3"> </argument> <description> + Multiplies each component of the [Vector3] by the given [float]. </description> </method> <method name="operator *" qualifiers="operator"> @@ -97,14 +109,16 @@ <argument index="0" name="right" type="Vector3i"> </argument> <description> + Multiplies each component of the [Vector3i] by the given [float]. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> - <argument index="0" name="right" type="Quat"> + <argument index="0" name="right" type="Quaternion"> </argument> <description> + Multiplies each component of the [Quaternion] by the given [float]. </description> </method> <method name="operator *" qualifiers="operator"> @@ -113,6 +127,10 @@ <argument index="0" name="right" type="Color"> </argument> <description> + Multiplies each component of the [Color] by the given [float]. + [codeblock] + print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75) + [/codeblock] </description> </method> <method name="operator *" qualifiers="operator"> @@ -121,12 +139,17 @@ <argument index="0" name="right" type="int"> </argument> <description> + Multiplies a [float] and an [int]. The result is a [float]. </description> </method> <method name="operator +" qualifiers="operator"> <return type="float"> </return> <description> + Unary plus operator. Doesn't have any effect. + [codeblock] + var a = +2.5 # a is 2.5. + [/codeblock] </description> </method> <method name="operator +" qualifiers="operator"> @@ -135,6 +158,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Adds two floats. </description> </method> <method name="operator +" qualifiers="operator"> @@ -143,12 +167,18 @@ <argument index="0" name="right" type="int"> </argument> <description> + Adds a [float] and an [int]. The result is a [float]. </description> </method> <method name="operator -" qualifiers="operator"> <return type="float"> </return> <description> + Unary minus operator. Negates the number. + [codeblock] + var a = -2.5 # a is -2.5. + print(-a) # 2.5 + [/codeblock] </description> </method> <method name="operator -" qualifiers="operator"> @@ -157,6 +187,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Subtracts a float from a float. </description> </method> <method name="operator -" qualifiers="operator"> @@ -165,6 +196,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Subtracts an [int] from a [float]. The result is a [float]. </description> </method> <method name="operator /" qualifiers="operator"> @@ -173,6 +205,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Divides two floats. </description> </method> <method name="operator /" qualifiers="operator"> @@ -181,6 +214,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Divides a [float] by an [int]. The result is a [float]. </description> </method> <method name="operator <" qualifiers="operator"> @@ -189,6 +223,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] the left float is less than the right one. </description> </method> <method name="operator <" qualifiers="operator"> @@ -197,6 +232,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] if this [float] is less than the given [int]. </description> </method> <method name="operator <=" qualifiers="operator"> @@ -205,6 +241,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] the left integer is less than or equal to the right one. </description> </method> <method name="operator <=" qualifiers="operator"> @@ -213,6 +250,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] if this [float] is less than or equal to the given [int]. </description> </method> <method name="operator ==" qualifiers="operator"> @@ -221,6 +259,8 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] if both floats are exactly equal. + [b]Note:[/b] Due to floating-point precision errors, consider using [method @GlobalScope.is_equal_approx] or [method @GlobalScope.is_zero_approx] instead, which are more reliable. </description> </method> <method name="operator ==" qualifiers="operator"> @@ -229,6 +269,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] if the [float] and the given [int] are equal. </description> </method> <method name="operator >" qualifiers="operator"> @@ -237,6 +278,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] the left float is greater than the right one. </description> </method> <method name="operator >" qualifiers="operator"> @@ -245,6 +287,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] if this [float] is greater than the given [int]. </description> </method> <method name="operator >=" qualifiers="operator"> @@ -253,6 +296,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] the left float is greater than or equal to the right one. </description> </method> <method name="operator >=" qualifiers="operator"> @@ -261,6 +305,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] if this [float] is greater than or equal to the given [int]. </description> </method> </methods> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index a63c509937..b0ad963998 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -79,6 +79,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] if operands are different from each other. </description> </method> <method name="operator !=" qualifiers="operator"> @@ -87,6 +88,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] if operands are different from each other. </description> </method> <method name="operator %" qualifiers="operator"> @@ -95,6 +97,12 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns the result of the modulo operator for two integers, i.e. the remainder after dividing both numbers. + [codeblock] + print(5 % 2) # 1 + print(12 % 4) # 0 + print(12 % 2) # 2 + [/codeblock] </description> </method> <method name="operator &" qualifiers="operator"> @@ -103,6 +111,18 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns the result of bitwise [code]AND[/code] operation for two integers. + [codeblock] + print(3 & 1) # 1 + print(11 & 3) # 3 + [/codeblock] + It's useful to retrieve binary flags from a variable. + [codeblock] + var flags = 5 + # Do something if the first bit is enabled. + if flags & 1: + do_stuff() + [/codeblock] </description> </method> <method name="operator *" qualifiers="operator"> @@ -111,6 +131,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Multiplies an [int] and a [float]. The result is a [float]. </description> </method> <method name="operator *" qualifiers="operator"> @@ -119,6 +140,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Multiplies two [int]s. </description> </method> <method name="operator *" qualifiers="operator"> @@ -127,6 +149,10 @@ <argument index="0" name="right" type="Vector2"> </argument> <description> + Multiplies each component of the vector by the given integer. + [codeblock] + print(2 * Vector2(1, 1)) # Vector2(2, 2) + [/codeblock] </description> </method> <method name="operator *" qualifiers="operator"> @@ -135,6 +161,7 @@ <argument index="0" name="right" type="Vector2i"> </argument> <description> + Multiplies each component of the integer vector by the given integer. </description> </method> <method name="operator *" qualifiers="operator"> @@ -143,6 +170,7 @@ <argument index="0" name="right" type="Vector3"> </argument> <description> + Multiplies each component of the vector by the given integer. </description> </method> <method name="operator *" qualifiers="operator"> @@ -151,14 +179,16 @@ <argument index="0" name="right" type="Vector3i"> </argument> <description> + Multiplies each component of the integer vector by the given integer. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quat"> + <return type="Quaternion"> </return> - <argument index="0" name="right" type="Quat"> + <argument index="0" name="right" type="Quaternion"> </argument> <description> + Multiplies each component of the quaternion by the given integer. </description> </method> <method name="operator *" qualifiers="operator"> @@ -167,12 +197,20 @@ <argument index="0" name="right" type="Color"> </argument> <description> + Multiplies each component of the color by the given integer. + [codeblock] + print(2 * Color(0.5, 0.5, 0.5)) # Color(1, 1, 1) + [/codeblock] </description> </method> <method name="operator +" qualifiers="operator"> <return type="int"> </return> <description> + Unary plus operator. Doesn't have any effect. + [codeblock] + var a = +1 # a is 1. + [/codeblock] </description> </method> <method name="operator +" qualifiers="operator"> @@ -181,6 +219,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Adds an [int] to a [float]. The result is a [float]. </description> </method> <method name="operator +" qualifiers="operator"> @@ -189,12 +228,18 @@ <argument index="0" name="right" type="int"> </argument> <description> + Adds two integers. </description> </method> <method name="operator -" qualifiers="operator"> <return type="int"> </return> <description> + Unary minus operator. Negates the number. + [codeblock] + var a = -1 # a is -1. + print(-a) # 1 + [/codeblock] </description> </method> <method name="operator -" qualifiers="operator"> @@ -203,6 +248,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Subtracts a [float] from an [int]. The result is a [float]. </description> </method> <method name="operator -" qualifiers="operator"> @@ -211,6 +257,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Subtracts two integers. </description> </method> <method name="operator /" qualifiers="operator"> @@ -219,6 +266,10 @@ <argument index="0" name="right" type="float"> </argument> <description> + Divides an [int] by a [float]. The result is a [float]. + [codeblock] + print(10 / 3.0) # 3.333... + [/codeblock] </description> </method> <method name="operator /" qualifiers="operator"> @@ -227,6 +278,11 @@ <argument index="0" name="right" type="int"> </argument> <description> + Divides two integers. The decimal part of the result is discarded (truncated). + [codeblock] + print(10 / 2) # 5 + print(10 / 3) # 3 + [/codeblock] </description> </method> <method name="operator <" qualifiers="operator"> @@ -235,6 +291,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] if this [int] is less than the given [float]. </description> </method> <method name="operator <" qualifiers="operator"> @@ -243,6 +300,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] the left integer is less than the right one. </description> </method> <method name="operator <<" qualifiers="operator"> @@ -251,6 +309,11 @@ <argument index="0" name="right" type="int"> </argument> <description> + Performs bitwise shift left operation on the integer. Effectively the same as multiplying by a power of 2. + [codeblock] + print(10 << 1) # 20 + print(10 << 4) # 160 + [/codeblock] </description> </method> <method name="operator <=" qualifiers="operator"> @@ -259,6 +322,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] if this [int] is less than or equal to the given [float]. </description> </method> <method name="operator <=" qualifiers="operator"> @@ -267,6 +331,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] the left integer is less than or equal to the right one. </description> </method> <method name="operator ==" qualifiers="operator"> @@ -275,6 +340,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] if the integer is equal to the given [float]. </description> </method> <method name="operator ==" qualifiers="operator"> @@ -283,6 +349,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] if both integers are equal. </description> </method> <method name="operator >" qualifiers="operator"> @@ -291,6 +358,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] if this [int] is greater than the given [float]. </description> </method> <method name="operator >" qualifiers="operator"> @@ -299,6 +367,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] the left integer is greater than the right one. </description> </method> <method name="operator >=" qualifiers="operator"> @@ -307,6 +376,7 @@ <argument index="0" name="right" type="float"> </argument> <description> + Returns [code]true[/code] if this [int] is greater than or equal to the given [float]. </description> </method> <method name="operator >=" qualifiers="operator"> @@ -315,6 +385,7 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns [code]true[/code] the left integer is greater than or equal to the right one. </description> </method> <method name="operator >>" qualifiers="operator"> @@ -323,6 +394,11 @@ <argument index="0" name="right" type="int"> </argument> <description> + Performs bitwise shift right operation on the integer. Effectively the same as dividing by a power of 2. + [codeblock] + print(10 >> 1) # 5 + print(10 >> 2) # 2 + [/codeblock] </description> </method> <method name="operator ^" qualifiers="operator"> @@ -331,6 +407,11 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns the result of bitwise [code]XOR[/code] operation for two integers. + [codeblock] + print(5 ^ 1) # 4 + print(4 ^ 7) # 3 + [/codeblock] </description> </method> <method name="operator |" qualifiers="operator"> @@ -339,12 +420,29 @@ <argument index="0" name="right" type="int"> </argument> <description> + Returns the result of bitwise [code]OR[/code] operation for two integers. + [codeblock] + print(2 | 4) # 6 + print(1 | 3) # 3 + [/codeblock] + It's useful to store binary flags in a variable. + [codeblock] + var flags = 0 + # Turn first and third bit on. + flags |= 1 + flags |= 4 + [/codeblock] </description> </method> <method name="operator ~" qualifiers="operator"> <return type="int"> </return> <description> + Returns the result of bitwise [code]NOT[/code] operation for the integer. It's effectively equal to [code]-int + 1[/code]. + [codeblock] + print(~4) # -3 + print(~7) # -6 + [/codeblock] </description> </method> </methods> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index ae3cc73098..1c6055f8ca 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -437,7 +437,7 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S for property_def in class_def.properties.values(): type_rst = property_def.type_name.to_rst(state) default = property_def.default_value - if property_def.overridden: + if default is not None and property_def.overridden: ml.append((type_rst, property_def.name, default + " *(parent override)*")) else: ref = ":ref:`{0}<class_{1}_property_{0}>`".format(property_def.name, class_name) diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot index 4cd89924ee..d14b0d9b1f 100644 --- a/doc/translations/classes.pot +++ b/doc/translations/classes.pot @@ -25583,7 +25583,7 @@ msgstr "" #: doc/classes/Input.xml:99 msgid "" "Returns the current value of the joypad axis at given index (see [enum " -"JoyAxisList])." +"JoyAxis])." msgstr "" #: doc/classes/Input.xml:108 @@ -25592,7 +25592,7 @@ msgstr "" #: doc/classes/Input.xml:117 msgid "" -"Receives a [enum JoyAxisList] axis and returns its equivalent name as a " +"Receives a [enum JoyAxis] axis and returns its equivalent name as a " "string." msgstr "" @@ -25602,7 +25602,7 @@ msgstr "" #: doc/classes/Input.xml:135 msgid "" -"Receives a gamepad button from [enum JoyButtonList] and returns its " +"Receives a gamepad button from [enum JoyButton] and returns its " "equivalent name as a string." msgstr "" @@ -25677,7 +25677,7 @@ msgstr "" #: doc/classes/Input.xml:238 msgid "" "Returns [code]true[/code] if you are pressing the joypad button (see [enum " -"JoyButtonList])." +"JoyButton])." msgstr "" #: doc/classes/Input.xml:247 @@ -26077,7 +26077,7 @@ msgid "" msgstr "" #: doc/classes/InputEventJoypadButton.xml:16 -msgid "Button identifier. One of the [enum JoyButtonList] button constants." +msgid "Button identifier. One of the [enum JoyButton] button constants." msgstr "" #: doc/classes/InputEventJoypadButton.xml:19 @@ -26105,7 +26105,7 @@ msgid "" msgstr "" #: doc/classes/InputEventJoypadMotion.xml:16 -msgid "Axis identifier. Use one of the [enum JoyAxisList] axis constants." +msgid "Axis identifier. Use one of the [enum JoyAxis] axis constants." msgstr "" #: doc/classes/InputEventJoypadMotion.xml:19 @@ -60259,7 +60259,7 @@ msgstr "" #: doc/classes/XRController3D.xml:65 msgid "" "Returns [code]true[/code] if the button at index [code]button[/code] is " -"pressed. See [enum JoyButtonList]." +"pressed. See [enum JoyButton]." msgstr "" #: doc/classes/XRController3D.xml:71 diff --git a/doc/translations/fr.po b/doc/translations/fr.po index c4fe08e67b..f3e26ebc61 100644 --- a/doc/translations/fr.po +++ b/doc/translations/fr.po @@ -25946,7 +25946,7 @@ msgstr "" #: doc/classes/Input.xml:99 msgid "" "Returns the current value of the joypad axis at given index (see [enum " -"JoyAxisList])." +"JoyAxis])." msgstr "" #: doc/classes/Input.xml:108 @@ -25955,7 +25955,7 @@ msgstr "" #: doc/classes/Input.xml:117 msgid "" -"Receives a [enum JoyAxisList] axis and returns its equivalent name as a " +"Receives a [enum JoyAxis] axis and returns its equivalent name as a " "string." msgstr "" @@ -25965,7 +25965,7 @@ msgstr "" #: doc/classes/Input.xml:135 msgid "" -"Receives a gamepad button from [enum JoyButtonList] and returns its " +"Receives a gamepad button from [enum JoyButton] and returns its " "equivalent name as a string." msgstr "" @@ -26041,7 +26041,7 @@ msgstr "" #, fuzzy msgid "" "Returns [code]true[/code] if you are pressing the joypad button (see [enum " -"JoyButtonList])." +"JoyButton])." msgstr "" "Retourne [code]true[/code] (vrai) si la chaîne de caractères finit par la " "chaîne de caractères donnée." @@ -26443,7 +26443,7 @@ msgid "" msgstr "" #: doc/classes/InputEventJoypadButton.xml:16 -msgid "Button identifier. One of the [enum JoyButtonList] button constants." +msgid "Button identifier. One of the [enum JoyButton] button constants." msgstr "" #: doc/classes/InputEventJoypadButton.xml:19 @@ -26471,7 +26471,7 @@ msgid "" msgstr "" #: doc/classes/InputEventJoypadMotion.xml:16 -msgid "Axis identifier. Use one of the [enum JoyAxisList] axis constants." +msgid "Axis identifier. Use one of the [enum JoyAxis] axis constants." msgstr "" #: doc/classes/InputEventJoypadMotion.xml:19 @@ -60738,7 +60738,7 @@ msgstr "" #, fuzzy msgid "" "Returns [code]true[/code] if the button at index [code]button[/code] is " -"pressed. See [enum JoyButtonList]." +"pressed. See [enum JoyButton]." msgstr "" "Renvoie [code]true[/code] (vrai) si [code]s[/code] vaut zéro ou quasiment " "zéro." |