diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 5ef29f57d..34a8c0380 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -189,8 +189,11 @@ Constants --------- - **PI** = **3.141593** --- Constant that represents how many times the diameter of a circle fits around its perimeter. + - **TAU** = **6.283185** --- The circle constant, the circumference of the unit circle. + - **INF** = **inf** --- A positive infinity. (For negative infinity, use -INF). + - **NAN** = **nan** --- Macro constant that expands to an expression of type float that represents a NaN. The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0. @@ -239,7 +242,7 @@ Supported color names: - :ref:`float` **abs** **(** :ref:`float` s **)** -Returns the absolute value of parameter ``s`` (i.e. unsigned value, works for integer and float). +Returns the absolute value of parameter ``s`` (i.e. unsigned value, works for integer and float). :: @@ -490,7 +493,7 @@ Returns the floating-point remainder of ``x/y`` that wraps equally in positive a :: - var i = -10; + var i = -10 while i < 0: prints(i, fposmod(i, 10)) i += 1 diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index e6dbb04d5..18cc6989a 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -71,30 +71,55 @@ Enumerations enum **Variant.Operator**: - **OP_EQUAL** = **0** + - **OP_NOT_EQUAL** = **1** + - **OP_LESS** = **2** + - **OP_LESS_EQUAL** = **3** + - **OP_GREATER** = **4** + - **OP_GREATER_EQUAL** = **5** + - **OP_ADD** = **6** + - **OP_SUBTRACT** = **7** + - **OP_MULTIPLY** = **8** + - **OP_DIVIDE** = **9** + - **OP_NEGATE** = **10** + - **OP_POSITIVE** = **11** + - **OP_MODULE** = **12** + - **OP_STRING_CONCAT** = **13** + - **OP_SHIFT_LEFT** = **14** + - **OP_SHIFT_RIGHT** = **15** + - **OP_BIT_AND** = **16** + - **OP_BIT_OR** = **17** + - **OP_BIT_XOR** = **18** + - **OP_BIT_NEGATE** = **19** + - **OP_AND** = **20** + - **OP_OR** = **21** + - **OP_XOR** = **22** + - **OP_NOT** = **23** + - **OP_IN** = **24** + - **OP_MAX** = **25** .. _enum_@GlobalScope_MethodFlags: @@ -102,12 +127,19 @@ enum **Variant.Operator**: enum **MethodFlags**: - **METHOD_FLAG_NORMAL** = **1** --- Flag for normal method + - **METHOD_FLAG_EDITOR** = **2** --- Flag for editor method + - **METHOD_FLAG_NOSCRIPT** = **4** + - **METHOD_FLAG_CONST** = **8** --- Flag for constant method + - **METHOD_FLAG_REVERSE** = **16** + - **METHOD_FLAG_VIRTUAL** = **32** --- Flag for virtual method + - **METHOD_FLAG_FROM_SCRIPT** = **64** --- Flag for method from script + - **METHOD_FLAGS_DEFAULT** = **1** --- Default method flags .. _enum_@GlobalScope_Orientation: @@ -115,6 +147,7 @@ enum **MethodFlags**: enum **Orientation**: - **VERTICAL** = **1** --- General vertical alignment, used usually for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. + - **HORIZONTAL** = **0** --- General horizontal alignment, used usually for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. .. _enum_@GlobalScope_PropertyUsageFlags: @@ -122,21 +155,37 @@ enum **Orientation**: enum **PropertyUsageFlags**: - **PROPERTY_USAGE_STORAGE** = **1** --- Property will be used as storage (default). + - **PROPERTY_USAGE_EDITOR** = **2** --- Property will be visible in editor (default). + - **PROPERTY_USAGE_NETWORK** = **4** + - **PROPERTY_USAGE_EDITOR_HELPER** = **8** + - **PROPERTY_USAGE_CHECKABLE** = **16** + - **PROPERTY_USAGE_CHECKED** = **32** + - **PROPERTY_USAGE_INTERNATIONALIZED** = **64** + - **PROPERTY_USAGE_GROUP** = **128** + - **PROPERTY_USAGE_CATEGORY** = **256** + - **PROPERTY_USAGE_STORE_IF_NONZERO** = **512** + - **PROPERTY_USAGE_STORE_IF_NONONE** = **1024** + - **PROPERTY_USAGE_NO_INSTANCE_STATE** = **2048** + - **PROPERTY_USAGE_RESTART_IF_CHANGED** = **4096** + - **PROPERTY_USAGE_SCRIPT_VARIABLE** = **8192** + - **PROPERTY_USAGE_DEFAULT** = **7** --- Default usage (storage and editor). + - **PROPERTY_USAGE_DEFAULT_INTL** = **71** + - **PROPERTY_USAGE_NOEDITOR** = **5** .. _enum_@GlobalScope_JoystickList: @@ -144,62 +193,119 @@ enum **PropertyUsageFlags**: enum **JoystickList**: - **JOY_BUTTON_0** = **0** --- Joypad Button 0 + - **JOY_BUTTON_1** = **1** --- Joypad Button 1 + - **JOY_BUTTON_2** = **2** --- Joypad Button 2 + - **JOY_BUTTON_3** = **3** --- Joypad Button 3 + - **JOY_BUTTON_4** = **4** --- Joypad Button 4 + - **JOY_BUTTON_5** = **5** --- Joypad Button 5 + - **JOY_BUTTON_6** = **6** --- Joypad Button 6 + - **JOY_BUTTON_7** = **7** --- Joypad Button 7 + - **JOY_BUTTON_8** = **8** --- Joypad Button 8 + - **JOY_BUTTON_9** = **9** --- Joypad Button 9 + - **JOY_BUTTON_10** = **10** --- Joypad Button 10 + - **JOY_BUTTON_11** = **11** --- Joypad Button 11 + - **JOY_BUTTON_12** = **12** --- Joypad Button 12 + - **JOY_BUTTON_13** = **13** --- Joypad Button 13 + - **JOY_BUTTON_14** = **14** --- Joypad Button 14 + - **JOY_BUTTON_15** = **15** --- Joypad Button 15 + - **JOY_BUTTON_MAX** = **16** --- Joypad Button 16 + - **JOY_SONY_CIRCLE** = **1** --- DUALSHOCK circle button + - **JOY_SONY_X** = **0** --- DUALSHOCK X button + - **JOY_SONY_SQUARE** = **2** --- DUALSHOCK square button + - **JOY_SONY_TRIANGLE** = **3** --- DUALSHOCK triangle button + - **JOY_XBOX_B** = **1** --- XBOX controller B button + - **JOY_XBOX_A** = **0** --- XBOX controller A button + - **JOY_XBOX_X** = **2** --- XBOX controller X button + - **JOY_XBOX_Y** = **3** --- XBOX controller Y button + - **JOY_DS_A** = **1** --- DualShock controller A button + - **JOY_DS_B** = **0** --- DualShock controller B button + - **JOY_DS_X** = **3** --- DualShock controller X button + - **JOY_DS_Y** = **2** --- DualShock controller Y button + - **JOY_SELECT** = **10** --- Joypad Button Select + - **JOY_START** = **11** --- Joypad Button Start + - **JOY_DPAD_UP** = **12** --- Joypad DPad Up + - **JOY_DPAD_DOWN** = **13** --- Joypad DPad Down + - **JOY_DPAD_LEFT** = **14** --- Joypad DPad Left + - **JOY_DPAD_RIGHT** = **15** --- Joypad DPad Right + - **JOY_L** = **4** --- Joypad Left Shoulder Button + - **JOY_L2** = **6** --- Joypad Left Trigger + - **JOY_L3** = **8** --- Joypad Left Stick Click + - **JOY_R** = **5** --- Joypad Right Shoulder Button + - **JOY_R2** = **7** --- Joypad Right Trigger + - **JOY_R3** = **9** --- Joypad Right Stick Click + - **JOY_AXIS_0** = **0** --- Joypad Left Stick Horizontal Axis + - **JOY_AXIS_1** = **1** --- Joypad Left Stick Vertical Axis + - **JOY_AXIS_2** = **2** --- Joypad Right Stick Horizontal Axis + - **JOY_AXIS_3** = **3** --- Joypad Right Stick Vertical Axis + - **JOY_AXIS_4** = **4** + - **JOY_AXIS_5** = **5** + - **JOY_AXIS_6** = **6** --- Joypad Left Trigger Analog Axis + - **JOY_AXIS_7** = **7** --- Joypad Right Trigger Analog Axis + - **JOY_AXIS_8** = **8** + - **JOY_AXIS_9** = **9** + - **JOY_AXIS_MAX** = **10** + - **JOY_ANALOG_LX** = **0** --- Joypad Left Stick Horizontal Axis + - **JOY_ANALOG_LY** = **1** --- Joypad Left Stick Vertical Axis + - **JOY_ANALOG_RX** = **2** --- Joypad Right Stick Horizontal Axis + - **JOY_ANALOG_RY** = **3** --- Joypad Right Stick Vertical Axis + - **JOY_ANALOG_L2** = **6** --- Joypad Left Analog Trigger + - **JOY_ANALOG_R2** = **7** --- Joypad Right Analog Trigger .. _enum_@GlobalScope_MidiMessageList: @@ -207,11 +313,17 @@ enum **JoystickList**: enum **MidiMessageList**: - **MIDI_MESSAGE_NOTE_OFF** = **8** + - **MIDI_MESSAGE_NOTE_ON** = **9** + - **MIDI_MESSAGE_AFTERTOUCH** = **10** + - **MIDI_MESSAGE_CONTROL_CHANGE** = **11** + - **MIDI_MESSAGE_PROGRAM_CHANGE** = **12** + - **MIDI_MESSAGE_CHANNEL_PRESSURE** = **13** + - **MIDI_MESSAGE_PITCH_BEND** = **14** .. _enum_@GlobalScope_KeyModifierMask: @@ -219,13 +331,21 @@ enum **MidiMessageList**: enum **KeyModifierMask**: - **KEY_CODE_MASK** = **33554431** --- Key Code Mask + - **KEY_MODIFIER_MASK** = **-16777216** --- Modifier Key Mask + - **KEY_MASK_SHIFT** = **33554432** --- Shift Key Mask + - **KEY_MASK_ALT** = **67108864** --- Alt Key Mask + - **KEY_MASK_META** = **134217728** --- Meta Key Mask + - **KEY_MASK_CTRL** = **268435456** --- CTRL Key Mask + - **KEY_MASK_CMD** = **268435456** --- CMD Key Mask + - **KEY_MASK_KPAD** = **536870912** --- Keypad Key Mask + - **KEY_MASK_GROUP_SWITCH** = **1073741824** --- Group Switch Key Mask .. _enum_@GlobalScope_HAlign: @@ -233,7 +353,9 @@ enum **KeyModifierMask**: enum **HAlign**: - **HALIGN_LEFT** = **0** --- Horizontal left alignment, usually for text-derived classes. + - **HALIGN_CENTER** = **1** --- Horizontal center alignment, usually for text-derived classes. + - **HALIGN_RIGHT** = **2** --- Horizontal right alignment, usually for text-derived classes. .. _enum_@GlobalScope_Error: @@ -241,45 +363,85 @@ enum **HAlign**: enum **Error**: - **OK** = **0** --- Functions that return Error return OK when no error occurred. Most functions don't return errors and/or just print errors to STDOUT. + - **FAILED** = **1** --- Generic error. + - **ERR_UNAVAILABLE** = **2** --- Unavailable error + - **ERR_UNCONFIGURED** = **3** --- Unconfigured error + - **ERR_UNAUTHORIZED** = **4** --- Unauthorized error + - **ERR_PARAMETER_RANGE_ERROR** = **5** --- Parameter range error + - **ERR_OUT_OF_MEMORY** = **6** --- Out of memory (OOM) error + - **ERR_FILE_NOT_FOUND** = **7** --- File: Not found error + - **ERR_FILE_BAD_DRIVE** = **8** --- File: Bad drive error + - **ERR_FILE_BAD_PATH** = **9** --- File: Bad path error + - **ERR_FILE_NO_PERMISSION** = **10** --- File: No permission error + - **ERR_FILE_ALREADY_IN_USE** = **11** --- File: Already in use error + - **ERR_FILE_CANT_OPEN** = **12** --- File: Can't open error + - **ERR_FILE_CANT_WRITE** = **13** --- File: Can't write error + - **ERR_FILE_CANT_READ** = **14** --- File: Can't read error + - **ERR_FILE_UNRECOGNIZED** = **15** --- File: Unrecognized error + - **ERR_FILE_CORRUPT** = **16** --- File: Corrupt error + - **ERR_FILE_MISSING_DEPENDENCIES** = **17** --- File: Missing dependencies error + - **ERR_FILE_EOF** = **18** --- File: End of file (EOF) error + - **ERR_CANT_OPEN** = **19** --- Can't open error + - **ERR_CANT_CREATE** = **20** --- Can't create error + - **ERR_PARSE_ERROR** = **43** --- Parse error + - **ERR_QUERY_FAILED** = **21** --- Query failed error + - **ERR_ALREADY_IN_USE** = **22** --- Already in use error + - **ERR_LOCKED** = **23** --- Locked error + - **ERR_TIMEOUT** = **24** --- Timeout error + - **ERR_CANT_ACQUIRE_RESOURCE** = **28** --- Can't acquire resource error + - **ERR_INVALID_DATA** = **30** --- Invalid data error + - **ERR_INVALID_PARAMETER** = **31** --- Invalid parameter error + - **ERR_ALREADY_EXISTS** = **32** --- Already exists error + - **ERR_DOES_NOT_EXIST** = **33** --- Does not exist error + - **ERR_DATABASE_CANT_READ** = **34** --- Database: Read error + - **ERR_DATABASE_CANT_WRITE** = **35** --- Database: Write error + - **ERR_COMPILATION_FAILED** = **36** --- Compilation failed error + - **ERR_METHOD_NOT_FOUND** = **37** --- Method not found error + - **ERR_LINK_FAILED** = **38** --- Linking failed error + - **ERR_SCRIPT_FAILED** = **39** --- Script failed error + - **ERR_CYCLIC_LINK** = **40** --- Cycling link (import cycle) error + - **ERR_BUSY** = **44** --- Busy error + - **ERR_HELP** = **46** --- Help error + - **ERR_BUG** = **47** --- Bug error .. _enum_@GlobalScope_VAlign: @@ -287,7 +449,9 @@ enum **Error**: enum **VAlign**: - **VALIGN_TOP** = **0** --- Vertical top alignment, usually for text-derived classes. + - **VALIGN_CENTER** = **1** --- Vertical center alignment, usually for text-derived classes. + - **VALIGN_BOTTOM** = **2** --- Vertical bottom alignment, usually for text-derived classes. .. _enum_@GlobalScope_PropertyHint: @@ -295,26 +459,47 @@ enum **VAlign**: enum **PropertyHint**: - **PROPERTY_HINT_NONE** = **0** --- No hint for edited property. + - **PROPERTY_HINT_RANGE** = **1** --- Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats. + - **PROPERTY_HINT_EXP_RANGE** = **2** --- Hints that the string is an exponential range, defined as "min,max" or "min,max,step". This is valid for integers and floats. + - **PROPERTY_HINT_ENUM** = **3** --- Property hint for an enumerated value, like "Hello,Something,Else". This is valid for integer, float and string properties. + - **PROPERTY_HINT_EXP_EASING** = **4** + - **PROPERTY_HINT_LENGTH** = **5** + - **PROPERTY_HINT_KEY_ACCEL** = **7** + - **PROPERTY_HINT_FLAGS** = **8** --- Property hint for a bitmask description, for bits 0,1,2,3 and 5 the hint would be like "Bit0,Bit1,Bit2,Bit3,,Bit5". Valid only for integers. + - **PROPERTY_HINT_LAYERS_2D_RENDER** = **9** + - **PROPERTY_HINT_LAYERS_2D_PHYSICS** = **10** + - **PROPERTY_HINT_LAYERS_3D_RENDER** = **11** + - **PROPERTY_HINT_LAYERS_3D_PHYSICS** = **12** + - **PROPERTY_HINT_FILE** = **13** --- String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "\*.doc". + - **PROPERTY_HINT_DIR** = **14** --- String property is a directory (so pop up a file dialog when edited). + - **PROPERTY_HINT_GLOBAL_FILE** = **15** + - **PROPERTY_HINT_GLOBAL_DIR** = **16** + - **PROPERTY_HINT_RESOURCE_TYPE** = **17** --- String property is a resource, so open the resource popup menu when edited. + - **PROPERTY_HINT_MULTILINE_TEXT** = **18** + - **PROPERTY_HINT_PLACEHOLDER_TEXT** = **19** + - **PROPERTY_HINT_COLOR_NO_ALPHA** = **20** + - **PROPERTY_HINT_IMAGE_COMPRESS_LOSSY** = **21** --- Hints that the image is compressed using lossy compression. + - **PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS** = **22** --- Hints that the image is compressed using lossless compression. .. _enum_@GlobalScope_Corner: @@ -322,8 +507,11 @@ enum **PropertyHint**: enum **Corner**: - **CORNER_TOP_LEFT** = **0** + - **CORNER_TOP_RIGHT** = **1** + - **CORNER_BOTTOM_RIGHT** = **2** + - **CORNER_BOTTOM_LEFT** = **3** .. _enum_@GlobalScope_KeyList: @@ -331,246 +519,487 @@ enum **Corner**: enum **KeyList**: - **KEY_ESCAPE** = **16777217** --- Escape Key + - **KEY_TAB** = **16777218** --- Tab Key + - **KEY_BACKTAB** = **16777219** --- Shift-Tab Key + - **KEY_BACKSPACE** = **16777220** --- Backspace Key + - **KEY_ENTER** = **16777221** --- Return Key (On Main Keyboard) + - **KEY_KP_ENTER** = **16777222** --- Enter Key (On Numpad) + - **KEY_INSERT** = **16777223** --- Insert Key + - **KEY_DELETE** = **16777224** --- Delete Key + - **KEY_PAUSE** = **16777225** --- Pause Key + - **KEY_PRINT** = **16777226** --- Printscreen Key + - **KEY_SYSREQ** = **16777227** --- System Request Key + - **KEY_CLEAR** = **16777228** --- Clear Key + - **KEY_HOME** = **16777229** --- Home Key + - **KEY_END** = **16777230** --- End Key + - **KEY_LEFT** = **16777231** --- Left Arrow Key + - **KEY_UP** = **16777232** --- Up Arrow Key + - **KEY_RIGHT** = **16777233** --- Right Arrow Key + - **KEY_DOWN** = **16777234** --- Down Arrow Key + - **KEY_PAGEUP** = **16777235** --- Pageup Key + - **KEY_PAGEDOWN** = **16777236** --- Pagedown Key + - **KEY_SHIFT** = **16777237** --- Shift Key + - **KEY_CONTROL** = **16777238** --- Control Key + - **KEY_META** = **16777239** --- Meta Key + - **KEY_ALT** = **16777240** --- Alt Key + - **KEY_CAPSLOCK** = **16777241** --- Capslock Key + - **KEY_NUMLOCK** = **16777242** --- Numlock Key + - **KEY_SCROLLLOCK** = **16777243** --- Scrolllock Key + - **KEY_F1** = **16777244** --- F1 Key + - **KEY_F2** = **16777245** --- F2 Key + - **KEY_F3** = **16777246** --- F3 Key + - **KEY_F4** = **16777247** --- F4 Key + - **KEY_F5** = **16777248** --- F5 Key + - **KEY_F6** = **16777249** --- F6 Key + - **KEY_F7** = **16777250** --- F7 Key + - **KEY_F8** = **16777251** --- F8 Key + - **KEY_F9** = **16777252** --- F9 Key + - **KEY_F10** = **16777253** --- F10 Key + - **KEY_F11** = **16777254** --- F11 Key + - **KEY_F12** = **16777255** --- F12 Key + - **KEY_F13** = **16777256** --- F13 Key + - **KEY_F14** = **16777257** --- F14 Key + - **KEY_F15** = **16777258** --- F15 Key + - **KEY_F16** = **16777259** --- F16 Key + - **KEY_KP_MULTIPLY** = **16777345** --- Multiply Key on Numpad + - **KEY_KP_DIVIDE** = **16777346** --- Divide Key on Numpad + - **KEY_KP_SUBTRACT** = **16777347** --- Subtract Key on Numpad + - **KEY_KP_PERIOD** = **16777348** --- Period Key on Numpad + - **KEY_KP_ADD** = **16777349** --- Add Key on Numpad + - **KEY_KP_0** = **16777350** --- Number 0 on Numpad + - **KEY_KP_1** = **16777351** --- Number 1 on Numpad + - **KEY_KP_2** = **16777352** --- Number 2 on Numpad + - **KEY_KP_3** = **16777353** --- Number 3 on Numpad + - **KEY_KP_4** = **16777354** --- Number 4 on Numpad + - **KEY_KP_5** = **16777355** --- Number 5 on Numpad + - **KEY_KP_6** = **16777356** --- Number 6 on Numpad + - **KEY_KP_7** = **16777357** --- Number 7 on Numpad + - **KEY_KP_8** = **16777358** --- Number 8 on Numpad + - **KEY_KP_9** = **16777359** --- Number 9 on Numpad + - **KEY_SUPER_L** = **16777260** --- Left Super Key (Windows Key) + - **KEY_SUPER_R** = **16777261** --- Right Super Key (Windows Key) + - **KEY_MENU** = **16777262** --- Context menu key + - **KEY_HYPER_L** = **16777263** --- Left Hyper Key + - **KEY_HYPER_R** = **16777264** --- Right Hyper Key + - **KEY_HELP** = **16777265** --- Help key + - **KEY_DIRECTION_L** = **16777266** --- Left Direction Key + - **KEY_DIRECTION_R** = **16777267** --- Right Direction Key + - **KEY_BACK** = **16777280** --- Back key + - **KEY_FORWARD** = **16777281** --- Forward key + - **KEY_STOP** = **16777282** --- Stop key + - **KEY_REFRESH** = **16777283** --- Refresh key + - **KEY_VOLUMEDOWN** = **16777284** --- Volume down key + - **KEY_VOLUMEMUTE** = **16777285** --- Mute volume key + - **KEY_VOLUMEUP** = **16777286** --- Volume up key + - **KEY_BASSBOOST** = **16777287** --- Bass Boost Key + - **KEY_BASSUP** = **16777288** --- Bass Up Key + - **KEY_BASSDOWN** = **16777289** --- Bass Down Key + - **KEY_TREBLEUP** = **16777290** --- Treble Up Key + - **KEY_TREBLEDOWN** = **16777291** --- Treble Down Key + - **KEY_MEDIAPLAY** = **16777292** --- Media play key + - **KEY_MEDIASTOP** = **16777293** --- Media stop key + - **KEY_MEDIAPREVIOUS** = **16777294** --- Previous song key + - **KEY_MEDIANEXT** = **16777295** --- Next song key + - **KEY_MEDIARECORD** = **16777296** --- Media record key + - **KEY_HOMEPAGE** = **16777297** --- Home page key + - **KEY_FAVORITES** = **16777298** --- Favorites key + - **KEY_SEARCH** = **16777299** --- Search key + - **KEY_STANDBY** = **16777300** --- Standby Key + - **KEY_OPENURL** = **16777301** --- Open URL / Launch Browser Key + - **KEY_LAUNCHMAIL** = **16777302** --- Launch Mail Key + - **KEY_LAUNCHMEDIA** = **16777303** --- Launch Media Key + - **KEY_LAUNCH0** = **16777304** --- Launch Shortcut 0 Key + - **KEY_LAUNCH1** = **16777305** --- Launch Shortcut 1 Key + - **KEY_LAUNCH2** = **16777306** --- Launch Shortcut 2 Key + - **KEY_LAUNCH3** = **16777307** --- Launch Shortcut 3 Key + - **KEY_LAUNCH4** = **16777308** --- Launch Shortcut 4 Key + - **KEY_LAUNCH5** = **16777309** --- Launch Shortcut 5 Key + - **KEY_LAUNCH6** = **16777310** --- Launch Shortcut 6 Key + - **KEY_LAUNCH7** = **16777311** --- Launch Shortcut 7 Key + - **KEY_LAUNCH8** = **16777312** --- Launch Shortcut 8 Key + - **KEY_LAUNCH9** = **16777313** --- Launch Shortcut 9 Key + - **KEY_LAUNCHA** = **16777314** --- Launch Shortcut A Key + - **KEY_LAUNCHB** = **16777315** --- Launch Shortcut B Key + - **KEY_LAUNCHC** = **16777316** --- Launch Shortcut C Key + - **KEY_LAUNCHD** = **16777317** --- Launch Shortcut D Key + - **KEY_LAUNCHE** = **16777318** --- Launch Shortcut E Key + - **KEY_LAUNCHF** = **16777319** --- Launch Shortcut F Key + - **KEY_UNKNOWN** = **33554431** --- Unknown Key + - **KEY_SPACE** = **32** --- Space Key + - **KEY_EXCLAM** = **33** --- ! key + - **KEY_QUOTEDBL** = **34** --- " key + - **KEY_NUMBERSIGN** = **35** --- # key + - **KEY_DOLLAR** = **36** --- $ key + - **KEY_PERCENT** = **37** --- % key + - **KEY_AMPERSAND** = **38** --- & key + - **KEY_APOSTROPHE** = **39** --- ' key + - **KEY_PARENLEFT** = **40** --- ( key + - **KEY_PARENRIGHT** = **41** --- ) key + - **KEY_ASTERISK** = **42** --- \* key + - **KEY_PLUS** = **43** --- + key + - **KEY_COMMA** = **44** --- , key + - **KEY_MINUS** = **45** --- - key + - **KEY_PERIOD** = **46** --- . key + - **KEY_SLASH** = **47** --- / key + - **KEY_0** = **48** --- Number 0 + - **KEY_1** = **49** --- Number 1 + - **KEY_2** = **50** --- Number 2 + - **KEY_3** = **51** --- Number 3 + - **KEY_4** = **52** --- Number 4 + - **KEY_5** = **53** --- Number 5 + - **KEY_6** = **54** --- Number 6 + - **KEY_7** = **55** --- Number 7 + - **KEY_8** = **56** --- Number 8 + - **KEY_9** = **57** --- Number 9 + - **KEY_COLON** = **58** --- : key + - **KEY_SEMICOLON** = **59** --- ; key + - **KEY_LESS** = **60** --- Lower than key + - **KEY_EQUAL** = **61** --- = key + - **KEY_GREATER** = **62** --- Greater than key + - **KEY_QUESTION** = **63** --- ? key + - **KEY_AT** = **64** --- @ key + - **KEY_A** = **65** --- A Key + - **KEY_B** = **66** --- B Key + - **KEY_C** = **67** --- C Key + - **KEY_D** = **68** --- D Key + - **KEY_E** = **69** --- E Key + - **KEY_F** = **70** --- F Key + - **KEY_G** = **71** --- G Key + - **KEY_H** = **72** --- H Key + - **KEY_I** = **73** --- I Key + - **KEY_J** = **74** --- J Key + - **KEY_K** = **75** --- K Key + - **KEY_L** = **76** --- L Key + - **KEY_M** = **77** --- M Key + - **KEY_N** = **78** --- N Key + - **KEY_O** = **79** --- O Key + - **KEY_P** = **80** --- P Key + - **KEY_Q** = **81** --- Q Key + - **KEY_R** = **82** --- R Key + - **KEY_S** = **83** --- S Key + - **KEY_T** = **84** --- T Key + - **KEY_U** = **85** --- U Key + - **KEY_V** = **86** --- V Key + - **KEY_W** = **87** --- W Key + - **KEY_X** = **88** --- X Key + - **KEY_Y** = **89** --- Y Key + - **KEY_Z** = **90** --- Z Key + - **KEY_BRACKETLEFT** = **91** --- [ key + - **KEY_BACKSLASH** = **92** --- \\ key + - **KEY_BRACKETRIGHT** = **93** --- ] key + - **KEY_ASCIICIRCUM** = **94** --- ^ key + - **KEY_UNDERSCORE** = **95** --- \_ key + - **KEY_QUOTELEFT** = **96** --- Left Quote Key + - **KEY_BRACELEFT** = **123** --- { key + - **KEY_BAR** = **124** --- | key + - **KEY_BRACERIGHT** = **125** --- } key + - **KEY_ASCIITILDE** = **126** --- ~ key + - **KEY_NOBREAKSPACE** = **160** + - **KEY_EXCLAMDOWN** = **161** + - **KEY_CENT** = **162** --- ¢ key + - **KEY_STERLING** = **163** + - **KEY_CURRENCY** = **164** + - **KEY_YEN** = **165** --- Yen Key + - **KEY_BROKENBAR** = **166** --- ¦ key + - **KEY_SECTION** = **167** --- § key + - **KEY_DIAERESIS** = **168** --- ¨ key + - **KEY_COPYRIGHT** = **169** --- © key + - **KEY_ORDFEMININE** = **170** + - **KEY_GUILLEMOTLEFT** = **171** --- « key + - **KEY_NOTSIGN** = **172** --- » key + - **KEY_HYPHEN** = **173** --- ‐ key + - **KEY_REGISTERED** = **174** --- ® key + - **KEY_MACRON** = **175** --- Macron Key + - **KEY_DEGREE** = **176** --- ° key + - **KEY_PLUSMINUS** = **177** --- ± key + - **KEY_TWOSUPERIOR** = **178** --- ² key + - **KEY_THREESUPERIOR** = **179** --- ³ key + - **KEY_ACUTE** = **180** --- ´ key + - **KEY_MU** = **181** --- µ key + - **KEY_PARAGRAPH** = **182** --- Paragraph Key + - **KEY_PERIODCENTERED** = **183** --- · key + - **KEY_CEDILLA** = **184** --- ¬ key + - **KEY_ONESUPERIOR** = **185** --- ¹ key + - **KEY_MASCULINE** = **186** --- ♂ key + - **KEY_GUILLEMOTRIGHT** = **187** --- » key + - **KEY_ONEQUARTER** = **188** --- ¼ key + - **KEY_ONEHALF** = **189** --- ½ key + - **KEY_THREEQUARTERS** = **190** --- ¾ key + - **KEY_QUESTIONDOWN** = **191** --- ¿ key + - **KEY_AGRAVE** = **192** --- à key + - **KEY_AACUTE** = **193** --- á key + - **KEY_ACIRCUMFLEX** = **194** --- â key + - **KEY_ATILDE** = **195** --- ã key + - **KEY_ADIAERESIS** = **196** --- ä key + - **KEY_ARING** = **197** --- å key + - **KEY_AE** = **198** --- æ key + - **KEY_CCEDILLA** = **199** --- ç key + - **KEY_EGRAVE** = **200** --- è key + - **KEY_EACUTE** = **201** --- é key + - **KEY_ECIRCUMFLEX** = **202** --- ê key + - **KEY_EDIAERESIS** = **203** --- ë key + - **KEY_IGRAVE** = **204** --- ì key + - **KEY_IACUTE** = **205** --- í key + - **KEY_ICIRCUMFLEX** = **206** --- î key + - **KEY_IDIAERESIS** = **207** --- ë key + - **KEY_ETH** = **208** --- ð key + - **KEY_NTILDE** = **209** --- ñ key + - **KEY_OGRAVE** = **210** --- ò key + - **KEY_OACUTE** = **211** --- ó key + - **KEY_OCIRCUMFLEX** = **212** --- ô key + - **KEY_OTILDE** = **213** --- õ key + - **KEY_ODIAERESIS** = **214** --- ö key + - **KEY_MULTIPLY** = **215** --- × key + - **KEY_OOBLIQUE** = **216** --- ø key + - **KEY_UGRAVE** = **217** --- ù key + - **KEY_UACUTE** = **218** --- ú key + - **KEY_UCIRCUMFLEX** = **219** --- û key + - **KEY_UDIAERESIS** = **220** --- ü key + - **KEY_YACUTE** = **221** --- ý key + - **KEY_THORN** = **222** --- þ key + - **KEY_SSHARP** = **223** --- ß key + - **KEY_DIVISION** = **247** --- ÷ key + - **KEY_YDIAERESIS** = **255** --- ÿ key .. _enum_@GlobalScope_Variant.Type: @@ -578,32 +1007,59 @@ enum **KeyList**: enum **Variant.Type**: - **TYPE_NIL** = **0** --- Variable is of type nil (only applied for null). + - **TYPE_BOOL** = **1** --- Variable is of type :ref:`bool`. + - **TYPE_INT** = **2** --- Variable is of type :ref:`int`. + - **TYPE_REAL** = **3** --- Variable is of type :ref:`float`/real. + - **TYPE_STRING** = **4** --- Variable is of type :ref:`String`. + - **TYPE_VECTOR2** = **5** --- Variable is of type :ref:`Vector2`. + - **TYPE_RECT2** = **6** --- Variable is of type :ref:`Rect2`. + - **TYPE_VECTOR3** = **7** --- Variable is of type :ref:`Vector3`. + - **TYPE_TRANSFORM2D** = **8** --- Variable is of type :ref:`Transform2D`. + - **TYPE_PLANE** = **9** --- Variable is of type :ref:`Plane`. + - **TYPE_QUAT** = **10** --- Variable is of type :ref:`Quat`. + - **TYPE_AABB** = **11** --- Variable is of type :ref:`AABB`. + - **TYPE_BASIS** = **12** --- Variable is of type :ref:`Basis`. + - **TYPE_TRANSFORM** = **13** --- Variable is of type :ref:`Transform`. + - **TYPE_COLOR** = **14** --- Variable is of type :ref:`Color`. + - **TYPE_NODE_PATH** = **15** --- Variable is of type :ref:`NodePath`. + - **TYPE_RID** = **16** --- Variable is of type :ref:`RID`. + - **TYPE_OBJECT** = **17** --- Variable is of type :ref:`Object`. + - **TYPE_DICTIONARY** = **18** --- Variable is of type :ref:`Dictionary`. + - **TYPE_ARRAY** = **19** --- Variable is of type :ref:`Array`. + - **TYPE_RAW_ARRAY** = **20** --- Variable is of type :ref:`PoolByteArray`. + - **TYPE_INT_ARRAY** = **21** --- Variable is of type :ref:`PoolIntArray`. + - **TYPE_REAL_ARRAY** = **22** --- Variable is of type :ref:`PoolRealArray`. + - **TYPE_STRING_ARRAY** = **23** --- Variable is of type :ref:`PoolStringArray`. + - **TYPE_VECTOR2_ARRAY** = **24** --- Variable is of type :ref:`PoolVector2Array`. + - **TYPE_VECTOR3_ARRAY** = **25** --- Variable is of type :ref:`PoolVector3Array`. + - **TYPE_COLOR_ARRAY** = **26** --- Variable is of type :ref:`PoolColorArray`. + - **TYPE_MAX** = **27** --- Marker for end of type constants. .. _enum_@GlobalScope_Margin: @@ -611,8 +1067,11 @@ enum **Variant.Type**: enum **Margin**: - **MARGIN_LEFT** = **0** --- Left margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. + - **MARGIN_TOP** = **1** --- Top margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. + - **MARGIN_RIGHT** = **2** --- Right margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. + - **MARGIN_BOTTOM** = **3** --- Bottom margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. .. _enum_@GlobalScope_ButtonList: @@ -620,19 +1079,32 @@ enum **Margin**: enum **ButtonList**: - **BUTTON_LEFT** = **1** --- Left Mouse Button + - **BUTTON_RIGHT** = **2** --- Right Mouse Button + - **BUTTON_MIDDLE** = **3** --- Middle Mouse Button -- **BUTTON_XBUTTON1** = **8** -- **BUTTON_XBUTTON2** = **9** + +- **BUTTON_XBUTTON1** = **8** --- Extra Mouse Button 1 + +- **BUTTON_XBUTTON2** = **9** --- Extra Mouse Button 2 + - **BUTTON_WHEEL_UP** = **4** --- Mouse wheel up + - **BUTTON_WHEEL_DOWN** = **5** --- Mouse wheel down + - **BUTTON_WHEEL_LEFT** = **6** --- Mouse wheel left button + - **BUTTON_WHEEL_RIGHT** = **7** --- Mouse wheel right button + - **BUTTON_MASK_LEFT** = **1** --- Left Mouse Button Mask + - **BUTTON_MASK_RIGHT** = **2** --- Right Mouse Button Mask + - **BUTTON_MASK_MIDDLE** = **4** --- Middle Mouse Button Mask -- **BUTTON_MASK_XBUTTON1** = **128** -- **BUTTON_MASK_XBUTTON2** = **256** + +- **BUTTON_MASK_XBUTTON1** = **128** --- Extra Mouse Button 1 Mask + +- **BUTTON_MASK_XBUTTON2** = **256** --- Extra Mouse Button 2 Mask Constants --------- diff --git a/classes/class_animation.rst b/classes/class_animation.rst index a12e8427d..f07420ddf 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -152,8 +152,11 @@ Enumerations enum **UpdateMode**: - **UPDATE_CONTINUOUS** = **0** --- Update between keyframes. + - **UPDATE_DISCRETE** = **1** --- Update at the keyframes and hold the value. + - **UPDATE_TRIGGER** = **2** --- Update at the keyframes. + - **UPDATE_CAPTURE** = **3** .. _enum_Animation_InterpolationType: @@ -161,7 +164,9 @@ enum **UpdateMode**: enum **InterpolationType**: - **INTERPOLATION_NEAREST** = **0** --- No interpolation (nearest value). + - **INTERPOLATION_LINEAR** = **1** --- Linear interpolation. + - **INTERPOLATION_CUBIC** = **2** --- Cubic interpolation. .. _enum_Animation_TrackType: @@ -169,10 +174,15 @@ enum **InterpolationType**: enum **TrackType**: - **TYPE_VALUE** = **0** --- Value tracks set values in node properties, but only those which can be Interpolated. + - **TYPE_TRANSFORM** = **1** --- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated. + - **TYPE_METHOD** = **2** --- Method tracks call functions with given arguments per key. + - **TYPE_BEZIER** = **3** + - **TYPE_AUDIO** = **4** + - **TYPE_ANIMATION** = **5** Description @@ -180,7 +190,17 @@ Description An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. -Animations are just data containers, and must be added to odes such as an :ref:`AnimationPlayer` or :ref:`AnimationTreePlayer` to be played back. +:: + + # This creates an animation that makes the node "Enemy" move to the right by + # 100 pixels in 1 second. + var animation = Animation.new() + var track_index = animation.add_track(Animation.TYPE_VALUE) + animation.track_set_path(track_index, "Enemy:position.x") + animation.track_insert_key(track_index, 0.0, 0) + animation.track_insert_key(track_index, 0.5, 100) + +Animations are just data containers, and must be added to nodes such as an :ref:`AnimationPlayer` or :ref:`AnimationTreePlayer` to be played back. Tutorials --------- diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 364c8c34b..3069d1b83 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -77,8 +77,11 @@ Enumerations enum **FilterAction**: - **FILTER_IGNORE** = **0** + - **FILTER_PASS** = **1** + - **FILTER_STOP** = **2** + - **FILTER_BLEND** = **3** Property Descriptions diff --git a/classes/class_animationnodeblendtree.rst b/classes/class_animationnodeblendtree.rst index bc4dc4bd8..5097959c1 100644 --- a/classes/class_animationnodeblendtree.rst +++ b/classes/class_animationnodeblendtree.rst @@ -50,10 +50,15 @@ Constants --------- - **CONNECTION_OK** = **0** + - **CONNECTION_ERROR_NO_INPUT** = **1** + - **CONNECTION_ERROR_NO_INPUT_INDEX** = **2** + - **CONNECTION_ERROR_NO_OUTPUT** = **3** + - **CONNECTION_ERROR_SAME_NODE** = **4** + - **CONNECTION_ERROR_CONNECTION_EXISTS** = **5** Property Descriptions diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index 20d5bef10..b4d9c4f85 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -50,6 +50,7 @@ Enumerations enum **MixMode**: - **MIX_MODE_BLEND** = **0** + - **MIX_MODE_ADD** = **1** Property Descriptions diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index 38d4abd6b..ed3ed992b 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -48,7 +48,9 @@ Enumerations enum **SwitchMode**: - **SWITCH_MODE_IMMEDIATE** = **0** + - **SWITCH_MODE_SYNC** = **1** + - **SWITCH_MODE_AT_END** = **2** Property Descriptions diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 900e58faa..0ef536e03 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -121,7 +121,9 @@ Enumerations enum **AnimationProcessMode**: - **ANIMATION_PROCESS_PHYSICS** = **0** --- Process animation during the physics process. This is especially useful when animating physics bodies. + - **ANIMATION_PROCESS_IDLE** = **1** --- Process animation during the idle process. + - **ANIMATION_PROCESS_MANUAL** = **2** --- Do not process animation. Use the 'advance' method to process the animation manually. Description diff --git a/classes/class_animationtree.rst b/classes/class_animationtree.rst index 0878165d3..245041f08 100644 --- a/classes/class_animationtree.rst +++ b/classes/class_animationtree.rst @@ -50,7 +50,9 @@ Enumerations enum **AnimationProcessMode**: - **ANIMATION_PROCESS_PHYSICS** = **0** + - **ANIMATION_PROCESS_IDLE** = **1** + - **ANIMATION_PROCESS_MANUAL** = **2** Property Descriptions diff --git a/classes/class_animationtreeplayer.rst b/classes/class_animationtreeplayer.rst index 9ce06e1fc..3ee72464a 100644 --- a/classes/class_animationtreeplayer.rst +++ b/classes/class_animationtreeplayer.rst @@ -156,6 +156,7 @@ Enumerations enum **AnimationProcessMode**: - **ANIMATION_PROCESS_PHYSICS** = **0** --- Process animation during the physics process. This is especially useful when animating physics bodies. + - **ANIMATION_PROCESS_IDLE** = **1** --- Process animation during the idle process. .. _enum_AnimationTreePlayer_NodeType: @@ -163,14 +164,23 @@ enum **AnimationProcessMode**: enum **NodeType**: - **NODE_OUTPUT** = **0** --- Output node. + - **NODE_ANIMATION** = **1** --- Animation node. + - **NODE_ONESHOT** = **2** --- OneShot node. + - **NODE_MIX** = **3** --- Mix node. + - **NODE_BLEND2** = **4** --- Blend2 node. + - **NODE_BLEND3** = **5** --- Blend3 node. + - **NODE_BLEND4** = **6** --- Blend4 node. + - **NODE_TIMESCALE** = **7** --- TimeScale node. + - **NODE_TIMESEEK** = **8** --- TimeSeek node. + - **NODE_TRANSITION** = **9** --- Transition node. Description diff --git a/classes/class_area.rst b/classes/class_area.rst index 19b1cf610..f1a65be41 100644 --- a/classes/class_area.rst +++ b/classes/class_area.rst @@ -137,9 +137,13 @@ Enumerations enum **SpaceOverride**: - **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping. + - **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order). + - **SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order), ignoring any lower priority areas. + - **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. + - **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas. Description diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index a51205d2c..6ac4a4587 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -129,9 +129,13 @@ Enumerations enum **SpaceOverride**: - **SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damping. + - **SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order). + - **SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order), ignoring any lower priority areas. + - **SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. + - **SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas. Description diff --git a/classes/class_array.rst b/classes/class_array.rst index 436a32f11..3b827f64b 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -174,7 +174,7 @@ Finds the index of an existing value (or the insertion index that maintains sort - :ref:`int` **bsearch_custom** **(** :ref:`Variant` value, :ref:`Object` obj, :ref:`String` func, :ref:`bool` before=True **)** -Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return true if the first argument is less than the second, and return false otherwise. Note that calling bsearch on an unsorted array results in unexpected behavior. +Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return true if the first argument is less than the second, and return false otherwise. Note that calling bsearch on an unsorted array results in unexpected behavior. .. _class_Array_clear: @@ -343,7 +343,7 @@ Sort the array using a custom method. The arguments are an object that holds the static func sort(a, b): if a[0] < b[0]: return true - return false + return false var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]] my_items.sort_custom(MyCustomSorter, "sort") diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index dc903659b..13339d394 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -74,13 +74,21 @@ Enumerations enum **ArrayFormat**: - **ARRAY_FORMAT_VERTEX** = **1** --- Array format will include vertices (mandatory). + - **ARRAY_FORMAT_NORMAL** = **2** --- Array format will include normals + - **ARRAY_FORMAT_TANGENT** = **4** --- Array format will include tangents + - **ARRAY_FORMAT_COLOR** = **8** --- Array format will include a color array. + - **ARRAY_FORMAT_TEX_UV** = **16** --- Array format will include UVs. + - **ARRAY_FORMAT_TEX_UV2** = **32** --- Array format will include another set of UVs. + - **ARRAY_FORMAT_BONES** = **64** --- Array format will include bone indices. + - **ARRAY_FORMAT_WEIGHTS** = **128** --- Array format will include bone weights. + - **ARRAY_FORMAT_INDEX** = **256** --- Index array will be used. .. _enum_ArrayMesh_ArrayType: @@ -88,24 +96,57 @@ enum **ArrayFormat**: enum **ArrayType**: - **ARRAY_VERTEX** = **0** --- Vertex array (array of :ref:`Vector3` vertices). + - **ARRAY_NORMAL** = **1** --- Normal array (array of :ref:`Vector3` normals). + - **ARRAY_TANGENT** = **2** --- Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. + - **ARRAY_COLOR** = **3** --- Vertex array (array of :ref:`Color` colors). + - **ARRAY_TEX_UV** = **4** --- UV array (array of :ref:`Vector3` UVs or float array of groups of 2 floats (u,v)). + - **ARRAY_TEX_UV2** = **5** --- Second UV array (array of :ref:`Vector3` UVs or float array of groups of 2 floats (u,v)). + - **ARRAY_BONES** = **6** --- Array of bone indices, as a float array. Each element in groups of 4 floats. + - **ARRAY_WEIGHTS** = **7** --- Array of bone weights, as a float array. Each element in groups of 4 floats. + - **ARRAY_INDEX** = **8** --- :ref:`Array` of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the \*i\*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. + - **ARRAY_MAX** = **9** Constants --------- - **NO_INDEX_ARRAY** = **-1** --- Default value used for index_array_len when no indices are present. + - **ARRAY_WEIGHTS_SIZE** = **4** --- Amount of weights/bone indices per vertex (always 4). +Description +----------- + +The ``ArrayMesh`` is used to construct a :ref:`Mesh` by specifying the attributes as arrays. The most basic example is the creation of a single triangle + +:: + + var vertices = PoolVector3Array() + vertices.push_back(Vector3(0,1,0)) + vertices.push_back(Vector3(1,0,0)) + vertices.push_back(Vector3(0,0,1)) + # Initialize the ArrayMesh. + var arr_mesh = ArrayMesh.new() + var arrays = [] + arrays.resize(ArrayMesh.ARRAY_MAX) + arrays[ArrayMesh.ARRAY_VERTEX] = vertices + # Create the Mesh. + arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) + var m = MeshInstance.new() + m.mesh = arr_mesh + +The ``MeshInstance`` is ready to be added to the SceneTree to be shown. + Property Descriptions --------------------- @@ -144,7 +185,7 @@ Method Descriptions Creates a new surface. -Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See :ref:`Mesh` for details. (As a note, when using indices, it is recommended to only use points, lines or triangles). :ref:`get_surface_count` will become the surf_idx for this new surface. +Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See :ref:`Mesh` for details. (As a note, when using indices, it is recommended to only use points, lines or triangles). :ref:`Mesh.get_surface_count` will become the ``surf_idx`` for this new surface. The ``arrays`` argument is an array of arrays. See :ref:`ArrayType` for the values used in this array. For example, ``arrays[0]`` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for ``ARRAY_INDEX`` if it is used. diff --git a/classes/class_arvrcontroller.rst b/classes/class_arvrcontroller.rst index 471c52e7a..d29f94486 100644 --- a/classes/class_arvrcontroller.rst +++ b/classes/class_arvrcontroller.rst @@ -64,7 +64,7 @@ This is a helper spatial node that is linked to the tracking of controllers. It Controllers are linked by their id. You can create controller nodes before the controllers are available. Say your game always uses two controllers (one for each hand) you can predefine the controllers with id 1 and 2 and they will become active as soon as the controllers are identified. If you expect additional controllers to be used you should react to the signals and add ARVRController nodes to your scene. -The position of the controller node is automatically updated by the ARVR Server. This makes this node ideal to add child nodes to visualise the controller. +The position of the controller node is automatically updated by the ARVR Server. This makes this node ideal to add child nodes to visualise the controller. Property Descriptions --------------------- diff --git a/classes/class_arvrinterface.rst b/classes/class_arvrinterface.rst index 8cd39e4d8..677503ce7 100644 --- a/classes/class_arvrinterface.rst +++ b/classes/class_arvrinterface.rst @@ -56,7 +56,9 @@ Enumerations enum **Eyes**: - **EYE_MONO** = **0** --- Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. + - **EYE_LEFT** = **1** --- Left eye output, this is mostly used internally when rendering the image for the left eye and obtaining positioning and projection information. + - **EYE_RIGHT** = **2** --- Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information. .. _enum_ARVRInterface_Tracking_status: @@ -64,9 +66,13 @@ enum **Eyes**: enum **Tracking_status**: - **ARVR_NORMAL_TRACKING** = **0** --- Tracking is behaving as expected. + - **ARVR_EXCESSIVE_MOTION** = **1** --- Tracking is hindered by excessive motion, player is moving faster then tracking can keep up. + - **ARVR_INSUFFICIENT_FEATURES** = **2** --- Tracking is hindered by insufficient features, it's too dark (for camera based tracking), player is blocked, etc. + - **ARVR_UNKNOWN_TRACKING** = **3** --- We don't know the status of the tracking or this interface does not provide feedback. + - **ARVR_NOT_TRACKING** = **4** --- Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.) .. _enum_ARVRInterface_Capabilities: @@ -74,9 +80,13 @@ enum **Tracking_status**: enum **Capabilities**: - **ARVR_NONE** = **0** --- No ARVR capabilities. + - **ARVR_MONO** = **1** --- This interface can work with normal rendering output (non-HMD based AR). + - **ARVR_STEREO** = **2** --- This interface supports stereoscopic rendering. + - **ARVR_AR** = **4** --- This interface support AR (video background and real world tracking). + - **ARVR_EXTERNAL** = **8** --- This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of get_render_targetsize. Using a separate viewport node frees up the main viewport for other purposes. Description diff --git a/classes/class_arvrpositionaltracker.rst b/classes/class_arvrpositionaltracker.rst index 9999f728b..5752735fb 100644 --- a/classes/class_arvrpositionaltracker.rst +++ b/classes/class_arvrpositionaltracker.rst @@ -54,7 +54,9 @@ Enumerations enum **TrackerHand**: - **TRACKER_HAND_UNKNOWN** = **0** --- The hand this tracker is held in is unknown or not applicable. + - **TRACKER_LEFT_HAND** = **1** --- This tracker is the left hand controller. + - **TRACKER_RIGHT_HAND** = **2** --- This tracker is the right hand controller. Description diff --git a/classes/class_arvrserver.rst b/classes/class_arvrserver.rst index 91f51ad33..f53a988f4 100644 --- a/classes/class_arvrserver.rst +++ b/classes/class_arvrserver.rst @@ -89,7 +89,9 @@ Enumerations enum **RotationMode**: - **RESET_FULL_ROTATION** = **0** --- Fully reset the orientation of the HMD. Regardless of what direction the user is looking to in the real world. The user will look dead ahead in the virtual world. + - **RESET_BUT_KEEP_TILT** = **1** --- Resets the orientation but keeps the tilt of the device. So if we're looking down, we keep looking down but heading will be reset. + - **DONT_RESET_ROTATION** = **2** --- Does not reset the orientation of the HMD, only the position of the player gets centered. .. _enum_ARVRServer_TrackerType: @@ -97,10 +99,15 @@ enum **RotationMode**: enum **TrackerType**: - **TRACKER_CONTROLLER** = **1** --- Our tracker tracks the location of a controller. + - **TRACKER_BASESTATION** = **2** --- Our tracker tracks the location of a base station. + - **TRACKER_ANCHOR** = **4** --- Our tracker tracks the location and size of an AR anchor. + - **TRACKER_ANY_KNOWN** = **127** --- Used internally to filter trackers of any known type. + - **TRACKER_UNKNOWN** = **128** --- Used internally if we haven't set the tracker type yet. + - **TRACKER_ANY** = **255** --- Used internally to select all trackers. Description diff --git a/classes/class_audioeffectbandlimitfilter.rst b/classes/class_audioeffectbandlimitfilter.rst index 7a517ba68..05ee15d9d 100644 --- a/classes/class_audioeffectbandlimitfilter.rst +++ b/classes/class_audioeffectbandlimitfilter.rst @@ -19,5 +19,5 @@ Adds a band limit filter to the Audio Bus. Description ----------- -Limits the frequencies in a range around the :ref:`cutoff_hz` and allows frequencies outside of this range to pass. +Limits the frequencies in a range around the :ref:`AudioEffectFilter.cutoff_hz` and allows frequencies outside of this range to pass. diff --git a/classes/class_audioeffectbandpassfilter.rst b/classes/class_audioeffectbandpassfilter.rst index 0a285afad..877032e1d 100644 --- a/classes/class_audioeffectbandpassfilter.rst +++ b/classes/class_audioeffectbandpassfilter.rst @@ -19,5 +19,5 @@ Adds a band pass filter to the Audio Bus. Description ----------- -Attenuates the frequencies inside of a range around the :ref:`cutoff_hz` and cuts frequencies outside of this band. +Attenuates the frequencies inside of a range around the :ref:`AudioEffectFilter.cutoff_hz` and cuts frequencies outside of this band. diff --git a/classes/class_audioeffectdistortion.rst b/classes/class_audioeffectdistortion.rst index 1ac7c6cf7..763ee9881 100644 --- a/classes/class_audioeffectdistortion.rst +++ b/classes/class_audioeffectdistortion.rst @@ -41,9 +41,13 @@ Enumerations enum **Mode**: - **MODE_CLIP** = **0** --- Digital distortion effect which cuts off peaks at the top and bottom of the waveform. + - **MODE_ATAN** = **1** + - **MODE_LOFI** = **2** --- Low-resolution digital distortion effect. You can use it to emulate the sound of early digital audio devices. + - **MODE_OVERDRIVE** = **3** --- Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers. + - **MODE_WAVESHAPE** = **4** --- Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound. Description diff --git a/classes/class_audioeffectfilter.rst b/classes/class_audioeffectfilter.rst index cecce6d08..6b7c0aa6c 100644 --- a/classes/class_audioeffectfilter.rst +++ b/classes/class_audioeffectfilter.rst @@ -39,8 +39,11 @@ Enumerations enum **FilterDB**: - **FILTER_6DB** = **0** + - **FILTER_12DB** = **1** + - **FILTER_18DB** = **2** + - **FILTER_24DB** = **3** Description diff --git a/classes/class_audioeffecthighpassfilter.rst b/classes/class_audioeffecthighpassfilter.rst index 86bd34403..e04f86666 100644 --- a/classes/class_audioeffecthighpassfilter.rst +++ b/classes/class_audioeffecthighpassfilter.rst @@ -19,5 +19,5 @@ Adds a high pass filter to the Audio Bus. Description ----------- -Cuts frequencies lower than the :ref:`cutoff_hz` and allows higher frequencies to pass. +Cuts frequencies lower than the :ref:`AudioEffectFilter.cutoff_hz` and allows higher frequencies to pass. diff --git a/classes/class_audioeffectlowpassfilter.rst b/classes/class_audioeffectlowpassfilter.rst index 5c194d14d..d965814ca 100644 --- a/classes/class_audioeffectlowpassfilter.rst +++ b/classes/class_audioeffectlowpassfilter.rst @@ -19,5 +19,5 @@ Adds a low pass filter to the Audio Bus. Description ----------- -Cuts frequencies higher than the :ref:`cutoff_hz` and allows lower frequencies to pass. +Cuts frequencies higher than the :ref:`AudioEffectFilter.cutoff_hz` and allows lower frequencies to pass. diff --git a/classes/class_audioeffectnotchfilter.rst b/classes/class_audioeffectnotchfilter.rst index 058f00474..224739d79 100644 --- a/classes/class_audioeffectnotchfilter.rst +++ b/classes/class_audioeffectnotchfilter.rst @@ -19,5 +19,5 @@ Adds a notch filter to the Audio Bus. Description ----------- -Attenuates frequencies in a narrow band around the :ref:`cutoff_hz` and cuts frequencies outside of this range. +Attenuates frequencies in a narrow band around the :ref:`AudioEffectFilter.cutoff_hz` and cuts frequencies outside of this range. diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index b49868ba9..2291342c3 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -116,7 +116,11 @@ Enumerations enum **SpeakerMode**: - **SPEAKER_MODE_STEREO** = **0** --- Two or fewer speakers are detected. + +- **SPEAKER_SURROUND_31** = **1** + - **SPEAKER_SURROUND_51** = **2** --- A 5.1 channel surround setup detected. + - **SPEAKER_SURROUND_71** = **3** --- A 7.1 channel surround setup detected. Description diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 883f7193d..58164d2a0 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -67,7 +67,9 @@ Enumerations enum **MixTarget**: - **MIX_TARGET_STEREO** = **0** --- The audio will be played only on the first channel. + - **MIX_TARGET_SURROUND** = **1** --- The audio will be played on all surround channels. + - **MIX_TARGET_CENTER** = **2** --- The audio will be played on the second channel, which is usually the center. Description diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index ac2a42432..915ba87f3 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -89,7 +89,9 @@ Enumerations enum **DopplerTracking**: - **DOPPLER_TRACKING_DISABLED** = **0** --- Disables doppler tracking. + - **DOPPLER_TRACKING_IDLE_STEP** = **1** --- Executes doppler tracking in idle step. + - **DOPPLER_TRACKING_PHYSICS_STEP** = **2** --- Executes doppler tracking in physics step. .. _enum_AudioStreamPlayer3D_OutOfRangeMode: @@ -97,6 +99,7 @@ enum **DopplerTracking**: enum **OutOfRangeMode**: - **OUT_OF_RANGE_MIX** = **0** --- Mix this audio in, even when it's out of range. + - **OUT_OF_RANGE_PAUSE** = **1** --- Pause this audio when it gets out of range. .. _enum_AudioStreamPlayer3D_AttenuationModel: @@ -104,7 +107,9 @@ enum **OutOfRangeMode**: enum **AttenuationModel**: - **ATTENUATION_INVERSE_DISTANCE** = **0** --- Linear dampening of loudness according to distance. + - **ATTENUATION_INVERSE_SQUARE_DISTANCE** = **1** --- Squared dampening of loudness according to distance. + - **ATTENUATION_LOGARITHMIC** = **2** --- Logarithmic dampening of loudness according to distance. Description diff --git a/classes/class_audiostreamsample.rst b/classes/class_audiostreamsample.rst index c6aa8c204..587769ff6 100644 --- a/classes/class_audiostreamsample.rst +++ b/classes/class_audiostreamsample.rst @@ -50,7 +50,9 @@ Enumerations enum **LoopMode**: - **LOOP_DISABLED** = **0** --- Audio does not loop. + - **LOOP_FORWARD** = **1** --- Audio loops the data between loop_begin and loop_end playing forward only. + - **LOOP_PING_PONG** = **2** --- Audio loops the data between loop_begin and loop_end playing back and forth. .. _enum_AudioStreamSample_Format: @@ -58,7 +60,9 @@ enum **LoopMode**: enum **Format**: - **FORMAT_8_BITS** = **0** --- Audio codec 8 bit. + - **FORMAT_16_BITS** = **1** --- Audio codec 16 bit. + - **FORMAT_IMA_ADPCM** = **2** --- Audio codec IMA ADPCM. Description diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst index b42eeffee..2f73220ff 100644 --- a/classes/class_backbuffercopy.rst +++ b/classes/class_backbuffercopy.rst @@ -33,7 +33,9 @@ Enumerations enum **CopyMode**: - **COPY_MODE_DISABLED** = **0** --- Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers. + - **COPY_MODE_RECT** = **1** --- BackBufferCopy buffers a rectangular region. + - **COPY_MODE_VIEWPORT** = **2** --- BackBufferCopy buffers the entire screen. Description diff --git a/classes/class_bakedlightmap.rst b/classes/class_bakedlightmap.rst index 2f1b51c49..7447306ab 100644 --- a/classes/class_bakedlightmap.rst +++ b/classes/class_bakedlightmap.rst @@ -58,7 +58,9 @@ Enumerations enum **BakeQuality**: - **BAKE_QUALITY_LOW** = **0** --- Lowest bake quality mode. Fastest to calculate. + - **BAKE_QUALITY_MEDIUM** = **1** --- Default bake quality mode. + - **BAKE_QUALITY_HIGH** = **2** --- Highest bake quality mode. Takes longer to calculate. .. _enum_BakedLightmap_BakeError: @@ -66,9 +68,13 @@ enum **BakeQuality**: enum **BakeError**: - **BAKE_ERROR_OK** = **0** + - **BAKE_ERROR_NO_SAVE_PATH** = **1** + - **BAKE_ERROR_NO_MESHES** = **2** + - **BAKE_ERROR_CANT_CREATE_IMAGE** = **3** + - **BAKE_ERROR_USER_ABORTED** = **4** .. _enum_BakedLightmap_BakeMode: @@ -76,6 +82,7 @@ enum **BakeError**: enum **BakeMode**: - **BAKE_MODE_CONE_TRACE** = **0** --- Less precise but faster bake mode. + - **BAKE_MODE_RAY_TRACE** = **1** --- More precise bake mode but can take considerably longer to bake. Description diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index 122eefc09..ad2f0f906 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -87,6 +87,7 @@ Enumerations enum **ActionMode**: - **ACTION_MODE_BUTTON_PRESS** = **0** --- Require just a press to consider the button clicked. + - **ACTION_MODE_BUTTON_RELEASE** = **1** --- Require a press and a subsequent release before considering the button clicked. .. _enum_BaseButton_DrawMode: @@ -94,10 +95,15 @@ enum **ActionMode**: enum **DrawMode**: - **DRAW_NORMAL** = **0** --- The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons. + - **DRAW_PRESSED** = **1** --- The state of buttons are pressed. + - **DRAW_HOVER** = **2** --- The state of buttons are hovered. + - **DRAW_DISABLED** = **3** --- The state of buttons are disabled. +- **DRAW_HOVER_PRESSED** = **4** + Description ----------- diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index 6985a83ff..3e2cd9c49 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -40,7 +40,9 @@ Enumerations enum **AlignMode**: - **ALIGN_BEGIN** = **0** --- Aligns children with the beginning of the container. + - **ALIGN_CENTER** = **1** --- Aligns children with the center of the container. + - **ALIGN_END** = **2** --- Aligns children with the end of the container. Description diff --git a/classes/class_button.rst b/classes/class_button.rst index fd8eba9c4..95e661906 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -68,7 +68,9 @@ Enumerations enum **TextAlign**: - **ALIGN_LEFT** = **0** --- Align the text to the left. + - **ALIGN_CENTER** = **1** --- Align the text to the center. + - **ALIGN_RIGHT** = **2** --- Align the text to the right. Description diff --git a/classes/class_camera.rst b/classes/class_camera.rst index a56e37d5f..140e60442 100644 --- a/classes/class_camera.rst +++ b/classes/class_camera.rst @@ -86,7 +86,9 @@ Enumerations enum **DopplerTracking**: - **DOPPLER_TRACKING_DISABLED** = **0** --- Disable Doppler effect simulation (default). + - **DOPPLER_TRACKING_IDLE_STEP** = **1** --- Simulate Doppler effect by tracking positions of objects that are changed in ``_process``. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's ``pitch shift``). + - **DOPPLER_TRACKING_PHYSICS_STEP** = **2** --- Simulate Doppler effect by tracking positions of objects that are changed in ``_physics_process``. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's ``pitch shift``). .. _enum_Camera_Projection: @@ -94,6 +96,7 @@ enum **DopplerTracking**: enum **Projection**: - **PROJECTION_PERSPECTIVE** = **0** --- Perspective Projection (object's size on the screen becomes smaller when far away). + - **PROJECTION_ORTHOGONAL** = **1** --- Orthogonal Projection (objects remain the same size on the screen no matter how far away they are). .. _enum_Camera_KeepAspect: @@ -101,6 +104,7 @@ enum **Projection**: enum **KeepAspect**: - **KEEP_WIDTH** = **0** --- Preserves the horizontal aspect ratio. + - **KEEP_HEIGHT** = **1** --- Preserves the vertical aspect ratio. Description diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index ab738fedd..de25ba1ee 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -96,6 +96,7 @@ Enumerations enum **AnchorMode**: - **ANCHOR_MODE_FIXED_TOP_LEFT** = **0** --- The camera's position is fixed so that the top-left corner is always at the origin. + - **ANCHOR_MODE_DRAG_CENTER** = **1** --- The camera's position takes into account vertical/horizontal offsets and the screen size. Description diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 7a18162d3..b91f85dc6 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -169,19 +169,28 @@ Enumerations enum **BlendMode**: - **BLEND_MODE_MIX** = **0** --- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. + - **BLEND_MODE_ADD** = **1** --- Additive blending mode. + - **BLEND_MODE_SUB** = **2** --- Subtractive blending mode. + - **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode. + - **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. + - **BLEND_MODE_DISABLED** = **5** --- Disable blending mode. Colors including alpha are written as is. Only applicable for render targets with a transparent background. No lighting will be applied. Constants --------- - **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Canvas item transform has changed. Notification is only received if enabled by :ref:`set_notify_transform` or :ref:`set_notify_local_transform`. + - **NOTIFICATION_DRAW** = **30** --- CanvasItem is requested to draw. + - **NOTIFICATION_VISIBILITY_CHANGED** = **31** --- Canvas item visibility has changed. + - **NOTIFICATION_ENTER_CANVAS** = **32** --- Canvas item has entered the canvas. + - **NOTIFICATION_EXIT_CANVAS** = **33** --- Canvas item has exited the canvas. Description diff --git a/classes/class_canvasitemmaterial.rst b/classes/class_canvasitemmaterial.rst index f3422bd16..e48ceabff 100644 --- a/classes/class_canvasitemmaterial.rst +++ b/classes/class_canvasitemmaterial.rst @@ -33,7 +33,9 @@ Enumerations enum **LightMode**: - **LIGHT_MODE_NORMAL** = **0** --- Render the material using both light and non-light sensitive material properties. + - **LIGHT_MODE_UNSHADED** = **1** --- Render the material as if there were no light. + - **LIGHT_MODE_LIGHT_ONLY** = **2** --- Render the material as if there were only light. .. _enum_CanvasItemMaterial_BlendMode: @@ -41,9 +43,13 @@ enum **LightMode**: enum **BlendMode**: - **BLEND_MODE_MIX** = **0** --- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. + - **BLEND_MODE_ADD** = **1** --- Additive blending mode. + - **BLEND_MODE_SUB** = **2** --- Subtractive blending mode. + - **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode. + - **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. Description diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index b30ec352b..0f506e698 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -19,39 +19,43 @@ Binary choice user interface widget. Theme Properties ---------------- -+---------------------------------+----------------------------------------------------------------+ -| :ref:`int` | :ref:`check_vadjust` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`Texture` | :ref:`checked` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`disabled` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`focus` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`Font` | :ref:`font` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`Color` | :ref:`font_color` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`Color` | :ref:`font_color_disabled` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`Color` | :ref:`font_color_hover` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`Color` | :ref:`font_color_pressed` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`hover` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`int` | :ref:`hseparation` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`normal` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`pressed` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`Texture` | :ref:`radio_checked` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`Texture` | :ref:`radio_unchecked` | -+---------------------------------+----------------------------------------------------------------+ -| :ref:`Texture` | :ref:`unchecked` | -+---------------------------------+----------------------------------------------------------------+ ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`int` | :ref:`check_vadjust` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`checked` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`disabled` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`focus` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`Font` | :ref:`font` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`font_color` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`font_color_disabled` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`font_color_hover` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`font_color_hover_pressed` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`font_color_pressed` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`hover` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`hover_pressed` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hseparation` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`normal` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`pressed` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`radio_checked` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`radio_unchecked` | ++---------------------------------+--------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`unchecked` | ++---------------------------------+--------------------------------------------------------------------------+ Description ----------- diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index fdbf16c56..65688a907 100644 --- a/classes/class_checkbutton.rst +++ b/classes/class_checkbutton.rst @@ -19,35 +19,39 @@ Checkable button. Theme Properties ---------------- -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`int` | :ref:`check_vadjust` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`disabled` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`focus` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`Font` | :ref:`font` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`Color` | :ref:`font_color` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`Color` | :ref:`font_color_disabled` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`Color` | :ref:`font_color_hover` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`Color` | :ref:`font_color_pressed` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`hover` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`int` | :ref:`hseparation` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`normal` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`Texture` | :ref:`off` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`Texture` | :ref:`on` | -+---------------------------------+-------------------------------------------------------------------+ -| :ref:`StyleBox` | :ref:`pressed` | -+---------------------------------+-------------------------------------------------------------------+ ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`int` | :ref:`check_vadjust` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`disabled` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`focus` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`Font` | :ref:`font` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`font_color` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`font_color_disabled` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`font_color_hover` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`font_color_hover_pressed` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`font_color_pressed` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`hover` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`hover_pressed` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hseparation` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`normal` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`off` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`on` | ++---------------------------------+-----------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`pressed` | ++---------------------------------+-----------------------------------------------------------------------------+ Description ----------- diff --git a/classes/class_clippedcamera.rst b/classes/class_clippedcamera.rst index 06f49ce40..f3a3bae72 100644 --- a/classes/class_clippedcamera.rst +++ b/classes/class_clippedcamera.rst @@ -58,6 +58,7 @@ Enumerations enum **ProcessMode**: - **CLIP_PROCESS_PHYSICS** = **0** + - **CLIP_PROCESS_IDLE** = **1** Property Descriptions diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index bcbe97155..6d00023a5 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -37,6 +37,7 @@ Enumerations enum **BuildMode**: - **BUILD_SOLIDS** = **0** --- Collisions will include the polygon and its contained area. + - **BUILD_SEGMENTS** = **1** --- Collisions will only include the polygon edges. Description diff --git a/classes/class_collisionshape.rst b/classes/class_collisionshape.rst index fa5863578..1292b7bd2 100644 --- a/classes/class_collisionshape.rst +++ b/classes/class_collisionshape.rst @@ -37,7 +37,7 @@ Methods Description ----------- -Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area` to give it a detection shape, or add it to a :ref:`PhysicsBody` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`get_shape` to get the actual shape. +Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area` to give it a detection shape, or add it to a :ref:`PhysicsBody` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject.shape_owner_get_shape` to get the actual shape. Tutorials --------- diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index c95e374d1..518c756b8 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -30,7 +30,7 @@ Properties Description ----------- -Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area2D` to give it a detection shape, or add it to a :ref:`PhysicsBody2D` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`get_shape` to get the actual shape. +Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an :ref:`Area2D` to give it a detection shape, or add it to a :ref:`PhysicsBody2D` to create a solid object. **IMPORTANT**: this is an Editor-only helper to create shapes, use :ref:`CollisionObject2D.shape_owner_get_shape` to get the actual shape. Tutorials --------- diff --git a/classes/class_color.rst b/classes/class_color.rst index 21bbc35f5..e604dc712 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -88,157 +88,301 @@ Constants --------- - **gray** = **Color( 0.75, 0.75, 0.75, 1 )** + - **aliceblue** = **Color( 0.94, 0.97, 1, 1 )** + - **antiquewhite** = **Color( 0.98, 0.92, 0.84, 1 )** + - **aqua** = **Color( 0, 1, 1, 1 )** + - **aquamarine** = **Color( 0.5, 1, 0.83, 1 )** + - **azure** = **Color( 0.94, 1, 1, 1 )** + - **beige** = **Color( 0.96, 0.96, 0.86, 1 )** + - **bisque** = **Color( 1, 0.89, 0.77, 1 )** + - **black** = **Color( 0, 0, 0, 1 )** + - **blanchedalmond** = **Color( 1, 0.92, 0.8, 1 )** + - **blue** = **Color( 0, 0, 1, 1 )** + - **blueviolet** = **Color( 0.54, 0.17, 0.89, 1 )** + - **brown** = **Color( 0.65, 0.16, 0.16, 1 )** + - **burlywood** = **Color( 0.87, 0.72, 0.53, 1 )** + - **cadetblue** = **Color( 0.37, 0.62, 0.63, 1 )** + - **chartreuse** = **Color( 0.5, 1, 0, 1 )** + - **chocolate** = **Color( 0.82, 0.41, 0.12, 1 )** + - **coral** = **Color( 1, 0.5, 0.31, 1 )** + - **cornflower** = **Color( 0.39, 0.58, 0.93, 1 )** + - **cornsilk** = **Color( 1, 0.97, 0.86, 1 )** + - **crimson** = **Color( 0.86, 0.08, 0.24, 1 )** + - **cyan** = **Color( 0, 1, 1, 1 )** + - **darkblue** = **Color( 0, 0, 0.55, 1 )** + - **darkcyan** = **Color( 0, 0.55, 0.55, 1 )** + - **darkgoldenrod** = **Color( 0.72, 0.53, 0.04, 1 )** + - **darkgray** = **Color( 0.66, 0.66, 0.66, 1 )** + - **darkgreen** = **Color( 0, 0.39, 0, 1 )** + - **darkkhaki** = **Color( 0.74, 0.72, 0.42, 1 )** + - **darkmagenta** = **Color( 0.55, 0, 0.55, 1 )** + - **darkolivegreen** = **Color( 0.33, 0.42, 0.18, 1 )** + - **darkorange** = **Color( 1, 0.55, 0, 1 )** + - **darkorchid** = **Color( 0.6, 0.2, 0.8, 1 )** + - **darkred** = **Color( 0.55, 0, 0, 1 )** + - **darksalmon** = **Color( 0.91, 0.59, 0.48, 1 )** + - **darkseagreen** = **Color( 0.56, 0.74, 0.56, 1 )** + - **darkslateblue** = **Color( 0.28, 0.24, 0.55, 1 )** + - **darkslategray** = **Color( 0.18, 0.31, 0.31, 1 )** + - **darkturquoise** = **Color( 0, 0.81, 0.82, 1 )** + - **darkviolet** = **Color( 0.58, 0, 0.83, 1 )** + - **deeppink** = **Color( 1, 0.08, 0.58, 1 )** + - **deepskyblue** = **Color( 0, 0.75, 1, 1 )** + - **dimgray** = **Color( 0.41, 0.41, 0.41, 1 )** + - **dodgerblue** = **Color( 0.12, 0.56, 1, 1 )** + - **firebrick** = **Color( 0.7, 0.13, 0.13, 1 )** + - **floralwhite** = **Color( 1, 0.98, 0.94, 1 )** + - **forestgreen** = **Color( 0.13, 0.55, 0.13, 1 )** + - **fuchsia** = **Color( 1, 0, 1, 1 )** + - **gainsboro** = **Color( 0.86, 0.86, 0.86, 1 )** + - **ghostwhite** = **Color( 0.97, 0.97, 1, 1 )** + - **gold** = **Color( 1, 0.84, 0, 1 )** + - **goldenrod** = **Color( 0.85, 0.65, 0.13, 1 )** + - **green** = **Color( 0, 1, 0, 1 )** + - **greenyellow** = **Color( 0.68, 1, 0.18, 1 )** + - **honeydew** = **Color( 0.94, 1, 0.94, 1 )** + - **hotpink** = **Color( 1, 0.41, 0.71, 1 )** + - **indianred** = **Color( 0.8, 0.36, 0.36, 1 )** + - **indigo** = **Color( 0.29, 0, 0.51, 1 )** + - **ivory** = **Color( 1, 1, 0.94, 1 )** + - **khaki** = **Color( 0.94, 0.9, 0.55, 1 )** + - **lavender** = **Color( 0.9, 0.9, 0.98, 1 )** + - **lavenderblush** = **Color( 1, 0.94, 0.96, 1 )** + - **lawngreen** = **Color( 0.49, 0.99, 0, 1 )** + - **lemonchiffon** = **Color( 1, 0.98, 0.8, 1 )** + - **lightblue** = **Color( 0.68, 0.85, 0.9, 1 )** + - **lightcoral** = **Color( 0.94, 0.5, 0.5, 1 )** + - **lightcyan** = **Color( 0.88, 1, 1, 1 )** + - **lightgoldenrod** = **Color( 0.98, 0.98, 0.82, 1 )** + - **lightgray** = **Color( 0.83, 0.83, 0.83, 1 )** + - **lightgreen** = **Color( 0.56, 0.93, 0.56, 1 )** + - **lightpink** = **Color( 1, 0.71, 0.76, 1 )** + - **lightsalmon** = **Color( 1, 0.63, 0.48, 1 )** + - **lightseagreen** = **Color( 0.13, 0.7, 0.67, 1 )** + - **lightskyblue** = **Color( 0.53, 0.81, 0.98, 1 )** + - **lightslategray** = **Color( 0.47, 0.53, 0.6, 1 )** + - **lightsteelblue** = **Color( 0.69, 0.77, 0.87, 1 )** + - **lightyellow** = **Color( 1, 1, 0.88, 1 )** + - **lime** = **Color( 0, 1, 0, 1 )** + - **limegreen** = **Color( 0.2, 0.8, 0.2, 1 )** + - **linen** = **Color( 0.98, 0.94, 0.9, 1 )** + - **magenta** = **Color( 1, 0, 1, 1 )** + - **maroon** = **Color( 0.69, 0.19, 0.38, 1 )** + - **mediumaquamarine** = **Color( 0.4, 0.8, 0.67, 1 )** + - **mediumblue** = **Color( 0, 0, 0.8, 1 )** + - **mediumorchid** = **Color( 0.73, 0.33, 0.83, 1 )** + - **mediumpurple** = **Color( 0.58, 0.44, 0.86, 1 )** + - **mediumseagreen** = **Color( 0.24, 0.7, 0.44, 1 )** + - **mediumslateblue** = **Color( 0.48, 0.41, 0.93, 1 )** + - **mediumspringgreen** = **Color( 0, 0.98, 0.6, 1 )** + - **mediumturquoise** = **Color( 0.28, 0.82, 0.8, 1 )** + - **mediumvioletred** = **Color( 0.78, 0.08, 0.52, 1 )** + - **midnightblue** = **Color( 0.1, 0.1, 0.44, 1 )** + - **mintcream** = **Color( 0.96, 1, 0.98, 1 )** + - **mistyrose** = **Color( 1, 0.89, 0.88, 1 )** + - **moccasin** = **Color( 1, 0.89, 0.71, 1 )** + - **navajowhite** = **Color( 1, 0.87, 0.68, 1 )** + - **navyblue** = **Color( 0, 0, 0.5, 1 )** + - **oldlace** = **Color( 0.99, 0.96, 0.9, 1 )** + - **olive** = **Color( 0.5, 0.5, 0, 1 )** + - **olivedrab** = **Color( 0.42, 0.56, 0.14, 1 )** + - **orange** = **Color( 1, 0.65, 0, 1 )** + - **orangered** = **Color( 1, 0.27, 0, 1 )** + - **orchid** = **Color( 0.85, 0.44, 0.84, 1 )** + - **palegoldenrod** = **Color( 0.93, 0.91, 0.67, 1 )** + - **palegreen** = **Color( 0.6, 0.98, 0.6, 1 )** + - **paleturquoise** = **Color( 0.69, 0.93, 0.93, 1 )** + - **palevioletred** = **Color( 0.86, 0.44, 0.58, 1 )** + - **papayawhip** = **Color( 1, 0.94, 0.84, 1 )** + - **peachpuff** = **Color( 1, 0.85, 0.73, 1 )** + - **peru** = **Color( 0.8, 0.52, 0.25, 1 )** + - **pink** = **Color( 1, 0.75, 0.8, 1 )** + - **plum** = **Color( 0.87, 0.63, 0.87, 1 )** + - **powderblue** = **Color( 0.69, 0.88, 0.9, 1 )** + - **purple** = **Color( 0.63, 0.13, 0.94, 1 )** + - **rebeccapurple** = **Color( 0.4, 0.2, 0.6, 1 )** + - **red** = **Color( 1, 0, 0, 1 )** + - **rosybrown** = **Color( 0.74, 0.56, 0.56, 1 )** + - **royalblue** = **Color( 0.25, 0.41, 0.88, 1 )** + - **saddlebrown** = **Color( 0.55, 0.27, 0.07, 1 )** + - **salmon** = **Color( 0.98, 0.5, 0.45, 1 )** + - **sandybrown** = **Color( 0.96, 0.64, 0.38, 1 )** + - **seagreen** = **Color( 0.18, 0.55, 0.34, 1 )** + - **seashell** = **Color( 1, 0.96, 0.93, 1 )** + - **sienna** = **Color( 0.63, 0.32, 0.18, 1 )** + - **silver** = **Color( 0.75, 0.75, 0.75, 1 )** + - **skyblue** = **Color( 0.53, 0.81, 0.92, 1 )** + - **slateblue** = **Color( 0.42, 0.35, 0.8, 1 )** + - **slategray** = **Color( 0.44, 0.5, 0.56, 1 )** + - **snow** = **Color( 1, 0.98, 0.98, 1 )** + - **springgreen** = **Color( 0, 1, 0.5, 1 )** + - **steelblue** = **Color( 0.27, 0.51, 0.71, 1 )** + - **tan** = **Color( 0.82, 0.71, 0.55, 1 )** + - **teal** = **Color( 0, 0.5, 0.5, 1 )** + - **thistle** = **Color( 0.85, 0.75, 0.85, 1 )** + - **tomato** = **Color( 1, 0.39, 0.28, 1 )** + - **turquoise** = **Color( 0.25, 0.88, 0.82, 1 )** + - **violet** = **Color( 0.93, 0.51, 0.93, 1 )** + - **webgray** = **Color( 0.5, 0.5, 0.5, 1 )** + - **webgreen** = **Color( 0, 0.5, 0, 1 )** + - **webmaroon** = **Color( 0.5, 0, 0, 1 )** + - **webpurple** = **Color( 0.5, 0, 0.5, 1 )** + - **wheat** = **Color( 0.96, 0.87, 0.7, 1 )** + - **white** = **Color( 1, 1, 1, 1 )** + - **whitesmoke** = **Color( 0.96, 0.96, 0.96, 1 )** + - **yellow** = **Color( 1, 1, 0, 1 )** + - **yellowgreen** = **Color( 0.6, 0.8, 0.2, 1 )** Description ----------- -A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate(color)) may accept values > 1. +A color is represented by red, green, and blue ``(r, g, b)`` components. Additionally, ``a`` represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some properties (such as :ref:`CanvasItem.modulate`) may accept values > 1. -You can also create a color from standardised color names with Color.ColorN (e.g. Color.green) or :ref:`@GDScript.ColorN`. +You can also create a color from standardized color names by using :ref:`@GDScript.ColorN`. Property Descriptions --------------------- @@ -247,67 +391,67 @@ Property Descriptions - :ref:`float` **a** -Alpha (0 to 1) +Alpha value (range 0 to 1). .. _class_Color_a8: - :ref:`int` **a8** -Alpha (0 to 255) +Alpha value (range 0 to 255). .. _class_Color_b: - :ref:`float` **b** -Blue (0 to 1) +Blue value (range 0 to 1). .. _class_Color_b8: - :ref:`int` **b8** -Blue (0 to 255) +Blue value (range 0 to 255). .. _class_Color_g: - :ref:`float` **g** -Green (0 to 1) +Green value (range 0 to 1). .. _class_Color_g8: - :ref:`int` **g8** -Green (0 to 255) +Green value (range 0 to 255). .. _class_Color_h: - :ref:`float` **h** -Hue (0 to 1) +HSV hue value (range 0 to 1). .. _class_Color_r: - :ref:`float` **r** -Red (0 to 1) +Red value (range 0 to 1). .. _class_Color_r8: - :ref:`int` **r8** -Red (0 to 255) +Red value (range 0 to 255). .. _class_Color_s: - :ref:`float` **s** -Saturation (0 to 1) +HSV saturation value (range 0 to 1). .. _class_Color_v: - :ref:`float` **v** -Value (0 to 1) +HSV value (range 0 to 1). Method Descriptions ------------------- @@ -330,7 +474,7 @@ The following string formats are supported: :: - # The following code creates the same color of an RGBA(178, 217, 10, 255) + # Each of the following creates the same color RGBA(178, 217, 10, 255) var c1 = Color("#ffb2d90a") # ARGB format with '#' var c2 = Color("ffb2d90a") # ARGB format var c3 = Color("#b2d90a") # RGB format with '#' @@ -344,33 +488,33 @@ Constructs a color from a 32-bit integer (each byte represents a component of th :: - var c = Color(274) # a color of an RGBA(0, 0, 1, 18) + var c = Color(274) # Equivalent to RGBA(0, 0, 1, 18) .. _class_Color_Color: - :ref:`Color` **Color** **(** :ref:`float` r, :ref:`float` g, :ref:`float` b **)** -Constructs a color from an RGB profile using values between 0 and 1 (float). Alpha will always be 1. +Constructs a color from an RGB profile using values between 0 and 1. Alpha will always be 1. :: - var c = Color(0.2, 1.0, .7) # a color of an RGBA(51, 255, 178, 255) + var c = Color(0.2, 1.0, .7) # Equivalent to RGBA(51, 255, 178, 255) .. _class_Color_Color: - :ref:`Color` **Color** **(** :ref:`float` r, :ref:`float` g, :ref:`float` b, :ref:`float` a **)** -Constructs a color from an RGBA profile using values between 0 and 1 (float). +Constructs a color from an RGBA profile using values between 0 and 1. :: - var c = Color(0.2, 1.0, .7, .8) # a color of an RGBA(51, 255, 178, 204) + var c = Color(0.2, 1.0, .7, .8) # Equivalent to RGBA(51, 255, 178, 204) .. _class_Color_blend: - :ref:`Color` **blend** **(** :ref:`Color` over **)** -Returns a new color resulting from blending this color over another color. If the color is opaque, the result would also be opaque. The other color could then take a range of values with different alpha values. +Returns a new color resulting from blending this color over another. If the color is opaque, the result is also opaque. The second color may have a range of alpha values. :: @@ -387,7 +531,7 @@ Returns the most contrasting color. :: var c = Color(.3, .4, .9) - var contrastedColor = c.contrasted() # a color of an RGBA(204, 229, 102, 255) + var contrastedColor = c.contrasted() # Equivalent to RGBA(204, 229, 102, 255) .. _class_Color_darkened: @@ -408,15 +552,15 @@ Constructs a color from an HSV profile. ``h``, ``s``, and ``v`` are values betwe :: - var c = Color.from_hsv(0.58, 0.5, 0.79, 0.8) # equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8) + var c = Color.from_hsv(0.58, 0.5, 0.79, 0.8) # Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8) .. _class_Color_gray: - :ref:`float` **gray** **(** **)** -Returns the color's grayscale. +Returns the color's grayscale representation. -The gray is calculated by (r + g + b) / 3. +The gray is calculated by ``(r + g + b) / 3``. :: @@ -427,7 +571,7 @@ The gray is calculated by (r + g + b) / 3. - :ref:`Color` **inverted** **(** **)** -Returns the inverted color (1-r, 1-g, 1-b, 1-a). +Returns the inverted color ``(1 - r, 1 - g, 1 - b, 1 - a)``. :: @@ -449,7 +593,7 @@ Returns a new color resulting from making this color lighter by the specified pe - :ref:`Color` **linear_interpolate** **(** :ref:`Color` b, :ref:`float` t **)** -Returns the color of the linear interpolation with another color. The value t is between 0 and 1 (float). +Returns the linear interpolation with another color. The value t is between 0 and 1. :: @@ -507,7 +651,7 @@ Returns the color's 64-bit integer in ARGB format (each word represents a compon Returns the color's HTML hexadecimal color string in ARGB format (ex: ``ff34f822``). -Optionally flag 'false' to not include alpha in hexadecimal string. +Setting ``with_alpha`` to ``false`` excludes alpha from the hexadecimal string. :: @@ -519,7 +663,7 @@ Optionally flag 'false' to not include alpha in hexadecimal string. - :ref:`int` **to_rgba32** **(** **)** -Returns the color's 32-bit integer in RGBA format (each byte represents a component of the RGBA profile). RGBA is the format that Godot uses by default. +Returns the color's 32-bit integer in RGBA format (each byte represents a component of the RGBA profile). RGBA is Godot's default format. :: @@ -530,7 +674,7 @@ Returns the color's 32-bit integer in RGBA format (each byte represents a compon - :ref:`int` **to_rgba64** **(** **)** -Returns the color's 64-bit integer in RGBA format (each word represents a component of the RGBA profile). RGBA is the format that Godot uses by default. +Returns the color's 64-bit integer in RGBA format (each word represents a component of the RGBA profile). RGBA is Godot's default format. :: diff --git a/classes/class_conetwistjoint.rst b/classes/class_conetwistjoint.rst index 9acd9eb5a..e6cb0293b 100644 --- a/classes/class_conetwistjoint.rst +++ b/classes/class_conetwistjoint.rst @@ -45,14 +45,19 @@ The swing span defines, how much rotation will not get corrected allong the swin Could be defined as looseness in the ``ConeTwistJoint``. If below 0.05, this behaviour is locked. Default value: ``PI/4``. + - **PARAM_TWIST_SPAN** = **1** --- Twist is the rotation around the twist axis, this value defined how far the joint can twist. Twist is locked if below 0.05. + - **PARAM_BIAS** = **2** --- The speed with which the swing or twist will take place. The higher, the faster. + - **PARAM_SOFTNESS** = **3** --- The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. + - **PARAM_RELAXATION** = **4** --- Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + - **PARAM_MAX** = **5** --- End flag of PARAM\_\* constants, used internally. Description diff --git a/classes/class_control.rst b/classes/class_control.rst index 020581f66..17c0bc257 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -279,9 +279,13 @@ Enumerations enum **SizeFlags**: - **SIZE_FILL** = **1** --- Tells the parent :ref:`Container` to expand the bounds of this node to fill all the available space without pushing any other node. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. + - **SIZE_EXPAND** = **2** --- Tells the parent :ref:`Container` to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See :ref:`size_flags_stretch_ratio`. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. + - **SIZE_EXPAND_FILL** = **3** --- Sets the node's size flags to both fill and expand. See the 2 constants above for more information. + - **SIZE_SHRINK_CENTER** = **4** --- Tells the parent :ref:`Container` to center the node in itself. It centers the control based on its bounding box, so it doesn't work with the fill or expand size flags. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. + - **SIZE_SHRINK_END** = **8** --- Tells the parent :ref:`Container` to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. .. _enum_Control_CursorShape: @@ -289,21 +293,37 @@ enum **SizeFlags**: enum **CursorShape**: - **CURSOR_ARROW** = **0** --- Show the system's arrow mouse cursor when the user hovers the node. Use with :ref:`set_default_cursor_shape`. + - **CURSOR_IBEAM** = **1** --- Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text. + - **CURSOR_POINTING_HAND** = **2** --- Show the system's pointing hand mouse cursor when the user hovers the node. + - **CURSOR_CROSS** = **3** --- Show the system's cross mouse cursor when the user hovers the node. + - **CURSOR_WAIT** = **4** --- Show the system's wait mouse cursor, often an hourglass, when the user hovers the node. + - **CURSOR_BUSY** = **5** --- Show the system's busy mouse cursor when the user hovers the node. Often an hourglass. + - **CURSOR_DRAG** = **6** --- Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock. + - **CURSOR_CAN_DROP** = **7** --- Show the system's drop mouse cursor when the user hovers the node. It can be an open hand. It tells the user they can drop an item they're currently grabbing, like a node in the Scene dock. + - **CURSOR_FORBIDDEN** = **8** --- Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle. + - **CURSOR_VSIZE** = **9** --- Show the system's vertical resize mouse cursor when the user hovers the node. A double headed vertical arrow. It tells the user they can resize the window or the panel vertically. + - **CURSOR_HSIZE** = **10** --- Show the system's horizontal resize mouse cursor when the user hovers the node. A double headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. + - **CURSOR_BDIAGSIZE** = **11** --- Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. + - **CURSOR_FDIAGSIZE** = **12** --- Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double headed arrow that goes from the top left to the bottom right, the opposite of ``CURSOR_BDIAGSIZE``. It tells the user they can resize the window or the panel both horizontally and vertically. + - **CURSOR_MOVE** = **13** --- Show the system's move mouse cursor when the user hovers the node. It shows 2 double-headed arrows at a 90 degree angle. It tells the user they can move a UI element freely. + - **CURSOR_VSPLIT** = **14** --- Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as ``CURSOR_VSIZE``. + - **CURSOR_HSPLIT** = **15** --- Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as ``CURSOR_HSIZE``. + - **CURSOR_HELP** = **16** --- Show the system's help mouse cursor when the user hovers the node, a question mark. .. _enum_Control_FocusMode: @@ -311,7 +331,9 @@ enum **CursorShape**: enum **FocusMode**: - **FOCUS_NONE** = **0** --- The node cannot grab focus. Use with :ref:`focus_mode`. + - **FOCUS_CLICK** = **1** --- The node can only grab focus on mouse clicks. Use with :ref:`focus_mode`. + - **FOCUS_ALL** = **2** --- The node can grab focus on mouse click or using the arrows and the Tab keys on the keyboard. Use with :ref:`focus_mode`. .. _enum_Control_GrowDirection: @@ -319,7 +341,9 @@ enum **FocusMode**: enum **GrowDirection**: - **GROW_DIRECTION_BEGIN** = **0** + - **GROW_DIRECTION_END** = **1** + - **GROW_DIRECTION_BOTH** = **2** .. _enum_Control_LayoutPresetMode: @@ -327,8 +351,11 @@ enum **GrowDirection**: enum **LayoutPresetMode**: - **PRESET_MODE_MINSIZE** = **0** + - **PRESET_MODE_KEEP_WIDTH** = **1** + - **PRESET_MODE_KEEP_HEIGHT** = **2** + - **PRESET_MODE_KEEP_SIZE** = **3** .. _enum_Control_LayoutPreset: @@ -336,20 +363,35 @@ enum **LayoutPresetMode**: enum **LayoutPreset**: - **PRESET_TOP_LEFT** = **0** --- Snap all 4 anchors to the top-left of the parent container's bounds. Use with :ref:`set_anchors_preset`. + - **PRESET_TOP_RIGHT** = **1** --- Snap all 4 anchors to the top-right of the parent container's bounds. Use with :ref:`set_anchors_preset`. + - **PRESET_BOTTOM_LEFT** = **2** --- Snap all 4 anchors to the bottom-left of the parent container's bounds. Use with :ref:`set_anchors_preset`. + - **PRESET_BOTTOM_RIGHT** = **3** --- Snap all 4 anchors to the bottom-right of the parent container's bounds. Use with :ref:`set_anchors_preset`. + - **PRESET_CENTER_LEFT** = **4** --- Snap all 4 anchors to the center of the left edge of the parent container's bounds. Use with :ref:`set_anchors_preset`. + - **PRESET_CENTER_TOP** = **5** --- Snap all 4 anchors to the center of the top edge of the parent container's bounds. Use with :ref:`set_anchors_preset`. + - **PRESET_CENTER_RIGHT** = **6** --- Snap all 4 anchors to the center of the right edge of the parent container's bounds. Use with :ref:`set_anchors_preset`. + - **PRESET_CENTER_BOTTOM** = **7** --- Snap all 4 anchors to the center of the bottom edge of the parent container's bounds. Use with :ref:`set_anchors_preset`. + - **PRESET_CENTER** = **8** --- Snap all 4 anchors to the center of the parent container's bounds. Use with :ref:`set_anchors_preset`. + - **PRESET_LEFT_WIDE** = **9** --- Snap all 4 anchors to the left edge of the parent container. The left margin becomes relative to the left edge and the top margin relative to the top left corner of the node's parent. Use with :ref:`set_anchors_preset`. + - **PRESET_TOP_WIDE** = **10** --- Snap all 4 anchors to the top edge of the parent container. The left margin becomes relative to the top left corner, the top margin relative to the top edge, and the right margin relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. + - **PRESET_RIGHT_WIDE** = **11** --- Snap all 4 anchors to the right edge of the parent container. The right margin becomes relative to the right edge and the top margin relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. + - **PRESET_BOTTOM_WIDE** = **12** --- Snap all 4 anchors to the bottom edge of the parent container. The left margin becomes relative to the bottom left corner, the bottom margin relative to the bottom edge, and the right margin relative to the bottom right corner of the node's parent. Use with :ref:`set_anchors_preset`. + - **PRESET_VCENTER_WIDE** = **13** --- Snap all 4 anchors to a vertical line that cuts the parent container in half. Use with :ref:`set_anchors_preset`. + - **PRESET_HCENTER_WIDE** = **14** --- Snap all 4 anchors to a horizontal line that cuts the parent container in half. Use with :ref:`set_anchors_preset`. + - **PRESET_WIDE** = **15** --- Snap all 4 anchors to the respective corners of the parent container. Set all 4 margins to 0 after you applied this preset and the ``Control`` will fit its parent container. Use with :ref:`set_anchors_preset`. .. _enum_Control_MouseFilter: @@ -357,7 +399,9 @@ enum **LayoutPreset**: enum **MouseFilter**: - **MOUSE_FILTER_STOP** = **0** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. These events are automatically marked as handled and they will not propagate further to other controls. + - **MOUSE_FILTER_PASS** = **1** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. If this control does not handle the event, the parent control (if any) will be considered for a mouse click, and so on until there is no more parent control to potentially handle it. Even if no control handled it at all, the event will still be handled automatically. + - **MOUSE_FILTER_IGNORE** = **2** --- The control will not receive mouse button input events through :ref:`_gui_input` and will not block other controls from receiving these events. These events will also not be handled automatically. .. _enum_Control_Anchor: @@ -365,19 +409,28 @@ enum **MouseFilter**: enum **Anchor**: - **ANCHOR_BEGIN** = **0** --- Snaps one of the 4 anchor's sides to the origin of the node's ``Rect``, in the top left. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset`. + - **ANCHOR_END** = **1** --- Snaps one of the 4 anchor's sides to the end of the node's ``Rect``, in the bottom right. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset`. Constants --------- - **NOTIFICATION_RESIZED** = **40** --- Sent when the node changes size. Use :ref:`rect_size` to get the new size. + - **NOTIFICATION_MOUSE_ENTER** = **41** --- Sent when the mouse pointer enters the node. + - **NOTIFICATION_MOUSE_EXIT** = **42** --- Sent when the mouse pointer exits the node. + - **NOTIFICATION_FOCUS_ENTER** = **43** --- Sent when the node grabs focus. + - **NOTIFICATION_FOCUS_EXIT** = **44** --- Sent when the node loses focus. + - **NOTIFICATION_THEME_CHANGED** = **45** --- Sent when the node's :ref:`theme` changes, right before Godot redraws the control. Happens when you call one of the ``add_*_override`` + - **NOTIFICATION_MODAL_CLOSE** = **46** --- Sent when an open modal dialog closes. See :ref:`show_modal`. + - **NOTIFICATION_SCROLL_BEGIN** = **47** + - **NOTIFICATION_SCROLL_END** = **48** Description @@ -818,7 +871,7 @@ Overrides the color in the :ref:`theme` resource the node u - void **add_constant_override** **(** :ref:`String` name, :ref:`int` constant **)** -Overrides an integer constant in the :ref:`theme` resource the node uses. If the ``constant`` is invalid, Godot clears the override. See :ref:`Theme.INVALID_CONSTANT` for more information. +Overrides an integer constant in the :ref:`theme` resource the node uses. If the ``constant`` is invalid, Godot clears the override. .. _class_Control_add_font_override: diff --git a/classes/class_cpuparticles.rst b/classes/class_cpuparticles.rst index be8e019eb..a44098704 100644 --- a/classes/class_cpuparticles.rst +++ b/classes/class_cpuparticles.rst @@ -158,7 +158,9 @@ Enumerations enum **Flags**: - **FLAG_ALIGN_Y_TO_VELOCITY** = **0** + - **FLAG_ROTATE_Y** = **1** + - **FLAG_MAX** = **4** .. _enum_CPUParticles_Parameter: @@ -166,16 +168,27 @@ enum **Flags**: enum **Parameter**: - **PARAM_INITIAL_LINEAR_VELOCITY** = **0** + - **PARAM_ANGULAR_VELOCITY** = **1** + - **PARAM_LINEAR_ACCEL** = **2** + - **PARAM_RADIAL_ACCEL** = **3** + - **PARAM_TANGENTIAL_ACCEL** = **4** + - **PARAM_DAMPING** = **5** + - **PARAM_ANGLE** = **6** + - **PARAM_SCALE** = **7** + - **PARAM_HUE_VARIATION** = **8** + - **PARAM_ANIM_SPEED** = **9** + - **PARAM_ANIM_OFFSET** = **10** + - **PARAM_MAX** = **11** .. _enum_CPUParticles_EmissionShape: @@ -183,9 +196,13 @@ enum **Parameter**: enum **EmissionShape**: - **EMISSION_SHAPE_POINT** = **0** + - **EMISSION_SHAPE_SPHERE** = **1** + - **EMISSION_SHAPE_BOX** = **2** + - **EMISSION_SHAPE_POINTS** = **3** + - **EMISSION_SHAPE_DIRECTED_POINTS** = **4** .. _enum_CPUParticles_DrawOrder: @@ -193,7 +210,9 @@ enum **EmissionShape**: enum **DrawOrder**: - **DRAW_ORDER_INDEX** = **0** + - **DRAW_ORDER_LIFETIME** = **1** + - **DRAW_ORDER_VIEW_DEPTH** = **2** Property Descriptions diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index b5cbf519d..a2138e265 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -156,6 +156,7 @@ Enumerations enum **Flags**: - **FLAG_ALIGN_Y_TO_VELOCITY** = **0** + - **FLAG_MAX** = **2** .. _enum_CPUParticles2D_Parameter: @@ -163,17 +164,29 @@ enum **Flags**: enum **Parameter**: - **PARAM_INITIAL_LINEAR_VELOCITY** = **0** + - **PARAM_ANGULAR_VELOCITY** = **1** + - **PARAM_ORBIT_VELOCITY** = **2** + - **PARAM_LINEAR_ACCEL** = **3** + - **PARAM_RADIAL_ACCEL** = **4** + - **PARAM_TANGENTIAL_ACCEL** = **5** + - **PARAM_DAMPING** = **6** + - **PARAM_ANGLE** = **7** + - **PARAM_SCALE** = **8** + - **PARAM_HUE_VARIATION** = **9** + - **PARAM_ANIM_SPEED** = **10** + - **PARAM_ANIM_OFFSET** = **11** + - **PARAM_MAX** = **12** .. _enum_CPUParticles2D_EmissionShape: @@ -181,9 +194,13 @@ enum **Parameter**: enum **EmissionShape**: - **EMISSION_SHAPE_POINT** = **0** + - **EMISSION_SHAPE_CIRCLE** = **1** + - **EMISSION_SHAPE_RECTANGLE** = **2** + - **EMISSION_SHAPE_POINTS** = **3** + - **EMISSION_SHAPE_DIRECTED_POINTS** = **4** .. _enum_CPUParticles2D_DrawOrder: @@ -191,6 +208,7 @@ enum **EmissionShape**: enum **DrawOrder**: - **DRAW_ORDER_INDEX** = **0** + - **DRAW_ORDER_LIFETIME** = **1** Property Descriptions diff --git a/classes/class_csgpolygon.rst b/classes/class_csgpolygon.rst index 56046a269..7f54529ed 100644 --- a/classes/class_csgpolygon.rst +++ b/classes/class_csgpolygon.rst @@ -55,7 +55,9 @@ Enumerations enum **Mode**: - **MODE_DEPTH** = **0** --- Shape is extruded to :ref:`depth`. + - **MODE_SPIN** = **1** --- Shape is extruded by rotating it around an axis. + - **MODE_PATH** = **2** --- Shape is extruded along a path set by a :ref:`Shape` set in :ref:`path_node`. .. _enum_CSGPolygon_PathRotation: @@ -63,7 +65,9 @@ enum **Mode**: enum **PathRotation**: - **PATH_ROTATION_POLYGON** = **0** --- Slice is not rotated. + - **PATH_ROTATION_PATH** = **1** --- Slice is rotated around the up vector of the path. + - **PATH_ROTATION_PATH_FOLLOW** = **2** --- Slice is rotate to match the path exactly. Description diff --git a/classes/class_csgshape.rst b/classes/class_csgshape.rst index 239718e02..5cf73bb96 100644 --- a/classes/class_csgshape.rst +++ b/classes/class_csgshape.rst @@ -44,7 +44,9 @@ Enumerations enum **Operation**: - **OPERATION_UNION** = **0** --- Geometry of both primitives is merged, intersecting geometry is removed. + - **OPERATION_INTERSECTION** = **1** --- Only intersecting geometry remains, the rest is removed. + - **OPERATION_SUBTRACTION** = **2** --- The second shape is susbtracted from the first, leaving a dent with it's shape. Description diff --git a/classes/class_cubemap.rst b/classes/class_cubemap.rst index 4c873e752..98824faca 100644 --- a/classes/class_cubemap.rst +++ b/classes/class_cubemap.rst @@ -48,8 +48,11 @@ Enumerations enum **Flags**: - **FLAG_MIPMAPS** = **1** --- Generate mipmaps, to enable smooth zooming out of the texture. + - **FLAG_REPEAT** = **2** --- Repeat (instead of clamp to edge). + - **FLAG_FILTER** = **4** --- Turn on magnifying filter, to enable smooth zooming in of the texture. + - **FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled. .. _enum_CubeMap_Storage: @@ -57,7 +60,9 @@ enum **Flags**: enum **Storage**: - **STORAGE_RAW** = **0** --- Store the ``CubeMap`` without any compression. + - **STORAGE_COMPRESS_LOSSY** = **1** --- Store the ``CubeMap`` with strong compression that reduces image quality. + - **STORAGE_COMPRESS_LOSSLESS** = **2** --- Store the ``CubeMap`` with moderate compression that doesn't reduce image quality. .. _enum_CubeMap_Side: @@ -65,10 +70,15 @@ enum **Storage**: enum **Side**: - **SIDE_LEFT** = **0** --- Identifier for the left face of the ``CubeMap``. + - **SIDE_RIGHT** = **1** --- Identifier for the right face of the ``CubeMap``. + - **SIDE_BOTTOM** = **2** --- Identifier for the bottom face of the ``CubeMap``. + - **SIDE_TOP** = **3** --- Identifier for the top face of the ``CubeMap``. + - **SIDE_FRONT** = **4** --- Identifier for the front face of the ``CubeMap``. + - **SIDE_BACK** = **5** --- Identifier for the back face of the ``CubeMap``. Description diff --git a/classes/class_curve.rst b/classes/class_curve.rst index efbf38426..11a6231f3 100644 --- a/classes/class_curve.rst +++ b/classes/class_curve.rst @@ -87,7 +87,9 @@ Enumerations enum **TangentMode**: - **TANGENT_FREE** = **0** --- The tangent on this side of the point is user-defined. + - **TANGENT_LINEAR** = **1** --- The curve calculates the tangent on this side of the point as the slope halfway towards the adjacent point. + - **TANGENT_MODE_COUNT** = **2** --- The total number of available tangent modes. Description diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 73a8bf31f..ee3d007ec 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -159,7 +159,7 @@ Returns the position of the vertex "idx". If the index is out of bounds, the fun - :ref:`Vector2` **interpolate** **(** :ref:`int` idx, :ref:`float` t **)** const -Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. +Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0). diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index ee9ad0744..157f5b2b4 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -203,7 +203,7 @@ Returns the tilt angle in radians for the point "idx". If the index is out of bo - :ref:`Vector3` **interpolate** **(** :ref:`int` idx, :ref:`float` t **)** const -Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. +Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0). diff --git a/classes/class_directionallight.rst b/classes/class_directionallight.rst index 69c2b10dd..d3adbaf49 100644 --- a/classes/class_directionallight.rst +++ b/classes/class_directionallight.rst @@ -47,6 +47,7 @@ Enumerations enum **ShadowDepthRange**: - **SHADOW_DEPTH_RANGE_STABLE** = **0** --- Keeps the shadow stable when the camera moves, at the cost of lower effective shadow resolution. Default value. + - **SHADOW_DEPTH_RANGE_OPTIMIZED** = **1** --- Tries to achieve maximum shadow resolution. May result in saw effect on shadow edges. .. _enum_DirectionalLight_ShadowMode: @@ -54,7 +55,9 @@ enum **ShadowDepthRange**: enum **ShadowMode**: - **SHADOW_ORTHOGONAL** = **0** --- Renders the entire scene's shadow map from an orthogonal point of view. May result in blockier shadows on close objects. + - **SHADOW_PARALLEL_2_SPLITS** = **1** --- Splits the view frustum in 2 areas, each with its own shadow map. + - **SHADOW_PARALLEL_4_SPLITS** = **2** --- Splits the view frustum in 4 areas, each with its own shadow map. Description diff --git a/classes/class_dynamicfont.rst b/classes/class_dynamicfont.rst index ec893c75c..d020602ae 100644 --- a/classes/class_dynamicfont.rst +++ b/classes/class_dynamicfont.rst @@ -64,8 +64,11 @@ Enumerations enum **SpacingType**: - **SPACING_TOP** = **0** --- Spacing at the top. + - **SPACING_BOTTOM** = **1** --- Spacing at the bottom. + - **SPACING_CHAR** = **2** --- Character spacing. + - **SPACING_SPACE** = **3** --- Space spacing. Description diff --git a/classes/class_dynamicfontdata.rst b/classes/class_dynamicfontdata.rst index 309636f31..126d7ba01 100644 --- a/classes/class_dynamicfontdata.rst +++ b/classes/class_dynamicfontdata.rst @@ -33,7 +33,9 @@ Enumerations enum **Hinting**: - **HINTING_NONE** = **0** --- Disable font hinting (smoother but less crisp). + - **HINTING_LIGHT** = **1** --- Use the light font hinting mode. + - **HINTING_NORMAL** = **2** --- Use the default font hinting mode (crisper but less smooth). Description diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index 935521a74..aae979ac7 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -79,7 +79,9 @@ Enumerations enum **Access**: - **ACCESS_RESOURCES** = **0** --- The ``EditorFileDialog`` can only view ``res://`` directory contents. + - **ACCESS_USERDATA** = **1** --- The ``EditorFileDialog`` can only view ``user://`` directory contents. + - **ACCESS_FILESYSTEM** = **2** --- The ``EditorFileDialog`` can view the entire local file system. .. _enum_EditorFileDialog_DisplayMode: @@ -87,6 +89,7 @@ enum **Access**: enum **DisplayMode**: - **DISPLAY_THUMBNAILS** = **0** --- The ``EditorFileDialog`` displays resources as thumbnails. + - **DISPLAY_LIST** = **1** --- The ``EditorFileDialog`` displays resources as a list of filenames. .. _enum_EditorFileDialog_Mode: @@ -94,9 +97,13 @@ enum **DisplayMode**: enum **Mode**: - **MODE_OPEN_FILE** = **0** --- The ``EditorFileDialog`` can select only one file. Accepting the window will open the file. + - **MODE_OPEN_FILES** = **1** --- The ``EditorFileDialog`` can select multiple files. Accepting the window will open all files. + - **MODE_OPEN_DIR** = **2** --- The ``EditorFileDialog`` can select only one directory. Accepting the window will open the directory. + - **MODE_OPEN_ANY** = **3** --- The ``EditorFileDialog`` can select a file or directory. Accepting the window will open it. + - **MODE_SAVE_FILE** = **4** --- The ``EditorFileDialog`` can select only one file. Accepting the window will save the file. Property Descriptions diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index 9a02a53a6..12ea59ea3 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -89,6 +89,7 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr return FAILED var mesh = Mesh.new() + # Fill the Mesh with data read in 'file', left as exercise to the reader var filename = save_path + "." + get_save_extension() ResourceSaver.save(filename, mesh) diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index a8feac08b..134cff1ad 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -14,7 +14,7 @@ EditorInterface Brief Description ----------------- -Editor interface and main components. +Godot editor's interface. Methods ------- @@ -64,7 +64,7 @@ Methods Description ----------- -Editor interface. Allows saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects and provides access to :ref:`EditorSettings`, :ref:`EditorFileSystem`, :ref:`EditorResourcePreview`, :ref:`ScriptEditor`, the editor viewport, as well as information about scenes. Also see :ref:`EditorPlugin` and :ref:`EditorScript`. +EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to :ref:`EditorSettings`, :ref:`EditorFileSystem`, :ref:`EditorResourcePreview`, :ref:`ScriptEditor`, the editor viewport, and information about scenes. Method Descriptions ------------------- @@ -79,13 +79,13 @@ Edits the given :ref:`Resource`. - :ref:`Control` **get_base_control** **(** **)** -Returns the main container of Godot's editor window. You can use it, for example, to retrieve the size of the container and place your controls accordingly. +Returns the main container of Godot editor's window. You can use it, for example, to retrieve the size of the container and place your controls accordingly. .. _class_EditorInterface_get_edited_scene_root: - :ref:`Node` **get_edited_scene_root** **(** **)** -Returns the edited scene's root :ref:`Node`. +Returns the edited (current) scene's root :ref:`Node`. .. _class_EditorInterface_get_editor_settings: @@ -103,7 +103,7 @@ Returns the editor :ref:`Viewport`. - :ref:`Array` **get_open_scenes** **(** **)** const -Returns an :ref:`Array` of the currently opened scenes. +Returns an :ref:`Array` with the file paths of the currently opened scenes. .. _class_EditorInterface_get_resource_filesystem: @@ -115,7 +115,7 @@ Returns the :ref:`EditorFileSystem`. - :ref:`EditorResourcePreview` **get_resource_previewer** **(** **)** -Returns the :ref:`EditorResourcePreview`\ er. +Returns the :ref:`EditorResourcePreview`. .. _class_EditorInterface_get_script_editor: diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 736bea93e..ae7c5ff11 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -126,7 +126,7 @@ Signals - **main_screen_changed** **(** :ref:`String` screen_name **)** -Emitted when user change main screen view (2D, 3D, Script, AssetLib). Works also with screens which are defined by plugins. +Emitted when user change the workspace (2D, 3D, Script, AssetLib). Also works with custom screens defined by plugins. .. _class_EditorPlugin_resource_saved: @@ -152,13 +152,21 @@ Enumerations enum **DockSlot**: - **DOCK_SLOT_LEFT_UL** = **0** + - **DOCK_SLOT_LEFT_BL** = **1** + - **DOCK_SLOT_LEFT_UR** = **2** + - **DOCK_SLOT_LEFT_BR** = **3** + - **DOCK_SLOT_RIGHT_UL** = **4** + - **DOCK_SLOT_RIGHT_BL** = **5** + - **DOCK_SLOT_RIGHT_UR** = **6** + - **DOCK_SLOT_RIGHT_BR** = **7** + - **DOCK_SLOT_MAX** = **8** .. _enum_EditorPlugin_CustomControlContainer: @@ -166,20 +174,29 @@ enum **DockSlot**: enum **CustomControlContainer**: - **CONTAINER_TOOLBAR** = **0** + - **CONTAINER_SPATIAL_EDITOR_MENU** = **1** + - **CONTAINER_SPATIAL_EDITOR_SIDE_LEFT** = **2** + - **CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT** = **3** + - **CONTAINER_SPATIAL_EDITOR_BOTTOM** = **4** + - **CONTAINER_CANVAS_EDITOR_MENU** = **5** + - **CONTAINER_CANVAS_EDITOR_SIDE_LEFT** = **6** + - **CONTAINER_CANVAS_EDITOR_SIDE_RIGHT** = **7** + - **CONTAINER_CANVAS_EDITOR_BOTTOM** = **8** + - **CONTAINER_PROPERTY_EDITOR_BOTTOM** = **9** Description ----------- -Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. +Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. Also see :ref:`EditorScript` to add functions to the editor. Tutorials --------- @@ -199,7 +216,7 @@ Add a script at ``path`` to the Autoload list as ``name``. - :ref:`ToolButton` **add_control_to_bottom_panel** **(** :ref:`Control` control, :ref:`String` title **)** -Add a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. If your plugin is being removed, also make sure to remove your control by calling :ref:`remove_control_from_bottom_panel`. +Add a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel` and free it with ``queue_free()``. .. _class_EditorPlugin_add_control_to_container: @@ -209,7 +226,7 @@ Add a custom control to a container (see CONTAINER\_\* enum). There are many loc Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). -If your plugin is being removed, also make sure to remove your custom controls too. +When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_container` and free it with ``queue_free()``. .. _class_EditorPlugin_add_control_to_dock: @@ -219,7 +236,7 @@ Add the control to a specific dock slot (see DOCK\_\* enum for options). If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. -If your plugin is being removed, also make sure to remove your control by calling :ref:`remove_control_from_docks`. +When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_docks` and free it with ``queue_free()``. .. _class_EditorPlugin_add_custom_type: @@ -229,7 +246,7 @@ Add a custom type, which will appear in the list of nodes or resources. An icon When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object. -You can use the :ref:`EditorPlugin.handles` to check if your custom object is being edited by checking the script or using 'is' keyword. +You can use the virtual method :ref:`handles` to check if your custom object is being edited by checking the script or using 'is' keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. @@ -253,12 +270,14 @@ During run-time, this will be a simple object with a script so this function doe - void **add_tool_menu_item** **(** :ref:`String` name, :ref:`Object` handler, :ref:`String` callback, :ref:`Variant` ud=null **)** -Adds a custom menu to 'Project > Tools' as ``name`` that calls ``callback`` on an instance of ``handler`` with a parameter ``ud`` when user activates it. +Add a custom menu to 'Project > Tools' as ``name`` that calls ``callback`` on an instance of ``handler`` with a parameter ``ud`` when user activates it. .. _class_EditorPlugin_add_tool_submenu_item: - void **add_tool_submenu_item** **(** :ref:`String` name, :ref:`Object` submenu **)** +Like :ref:`add_tool_menu_item` but adds the ``submenu`` item inside the ``name`` menu. + .. _class_EditorPlugin_apply_changes: - void **apply_changes** **(** **)** virtual @@ -287,6 +306,15 @@ This function is used for plugins that edit specific object types (nodes or reso - void **forward_canvas_draw_over_viewport** **(** :ref:`Control` overlay **)** virtual +This method is called when there is an input event in the 2D viewport, e.g. the user clicks with the mouse in the 2D space (canvas GUI). Keep in mind that for this method to be called you have to first declare the virtual method :ref:`handles` so the editor knows that you want to work with the workspace: + +:: + + func handles(object): + return true + +Also note that the edited scene must have a root node. + .. _class_EditorPlugin_forward_canvas_force_draw_over_viewport: - void **forward_canvas_force_draw_over_viewport** **(** :ref:`Control` overlay **)** virtual @@ -299,9 +327,14 @@ This function is used for plugins that edit specific object types (nodes or reso - :ref:`bool` **forward_spatial_gui_input** **(** :ref:`Camera` camera, :ref:`InputEvent` event **)** virtual -Implement this function if you are interested in 3D view screen input events. It will be called only if currently selected node is handled by your plugin. +This method is called when there is an input event in the 3D viewport, e.g. the user clicks with the mouse in the 3D space (spatial GUI). Keep in mind that for this method to be called you have to first declare the virtual method :ref:`handles` so the editor knows that you want to work with the workspace: -If you would like to always gets those input events then additionally use :ref:`set_input_forwarding_always_enabled`. +:: + + func handles(object): + return true + +Also note that the edited scene must have a root node. .. _class_EditorPlugin_get_breakpoints: @@ -313,6 +346,8 @@ This is for editors that edit script based objects. You can return a list of bre - :ref:`EditorInterface` **get_editor_interface** **(** **)** +Return the :ref:`EditorInterface` object that gives you control over Godot editor's window and its functionalities. + .. _class_EditorPlugin_get_plugin_icon: - :ref:`Object` **get_plugin_icon** **(** **)** virtual @@ -343,19 +378,19 @@ Get the undo/redo object. Most actions in the editor can be undoable, so use thi - void **get_window_layout** **(** :ref:`ConfigFile` layout **)** virtual -Get the GUI layout of the plugin. This is used to save the project's editor layout when the :ref:`EditorPlugin.queue_save_layout` is called or the editor layout was changed(For example changing the position of a dock). +Get the GUI layout of the plugin. This is used to save the project's editor layout when :ref:`queue_save_layout` is called or the editor layout was changed(For example changing the position of a dock). .. _class_EditorPlugin_handles: - :ref:`bool` **handles** **(** :ref:`Object` object **)** virtual -Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions :ref:`EditorPlugin.edit` and :ref:`EditorPlugin.make_visible` called when the editor requests them. +Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions :ref:`EditorPlugin.edit` and :ref:`EditorPlugin.make_visible` called when the editor requests them. If you have declared the methods :ref:`forward_canvas_gui_input` and :ref:`forward_spatial_gui_input` these will be called too. .. _class_EditorPlugin_has_main_screen: - :ref:`bool` **has_main_screen** **(** **)** virtual -Return true if this is a main screen editor plugin (it goes in the main screen selector together with 2D, 3D, Script). +Return true if this is a main screen editor plugin (it goes in the workspaces selector together with '2D', '3D', and 'Script'). .. _class_EditorPlugin_hide_bottom_panel: @@ -389,25 +424,25 @@ Remove an Autoload ``name`` from the list. - void **remove_control_from_bottom_panel** **(** :ref:`Control` control **)** -Remove the control from the bottom panel. Don't forget to call this if you added one, so the editor can remove it cleanly. +Remove the control from the bottom panel. You have to manually ``queue_free()`` the control. .. _class_EditorPlugin_remove_control_from_container: - void **remove_control_from_container** **(** :ref:`CustomControlContainer` container, :ref:`Control` control **)** -Remove the control from the specified container. Use it when cleaning up after adding a control with :ref:`add_control_to_container`. Note that you can simply free the control if you won't use it anymore. +Remove the control from the specified container. You have to manually ``queue_free()`` the control. .. _class_EditorPlugin_remove_control_from_docks: - void **remove_control_from_docks** **(** :ref:`Control` control **)** -Remove the control from the dock. Don't forget to call this if you added one, so the editor can save the layout and remove it cleanly. +Remove the control from the dock. You have to manually ``queue_free()`` the control. .. _class_EditorPlugin_remove_custom_type: - void **remove_custom_type** **(** :ref:`String` type **)** -Remove a custom type added by :ref:`EditorPlugin.add_custom_type` +Remove a custom type added by :ref:`add_custom_type` .. _class_EditorPlugin_remove_export_plugin: diff --git a/classes/class_editorsceneimporter.rst b/classes/class_editorsceneimporter.rst index e135f443d..fa6530ad1 100644 --- a/classes/class_editorsceneimporter.rst +++ b/classes/class_editorsceneimporter.rst @@ -37,14 +37,23 @@ Constants --------- - **IMPORT_SCENE** = **1** + - **IMPORT_ANIMATION** = **2** + - **IMPORT_ANIMATION_DETECT_LOOP** = **4** + - **IMPORT_ANIMATION_OPTIMIZE** = **8** + - **IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS** = **16** + - **IMPORT_ANIMATION_KEEP_VALUE_TRACKS** = **32** + - **IMPORT_GENERATE_TANGENT_ARRAYS** = **256** + - **IMPORT_FAIL_ON_MISSING_DEPENDENCIES** = **512** + - **IMPORT_MATERIALS_IN_INSTANCES** = **1024** + - **IMPORT_USE_COMPRESSION** = **2048** Method Descriptions diff --git a/classes/class_editorscenepostimport.rst b/classes/class_editorscenepostimport.rst index 7cbe1190f..ed7985d4e 100644 --- a/classes/class_editorscenepostimport.rst +++ b/classes/class_editorscenepostimport.rst @@ -30,12 +30,33 @@ Methods Description ----------- -The imported scene can be automatically modified right after import by specifying a 'custom script' that inherits from this class. The :ref:`post_import`-method receives the imported scene's root-node and returns the modified version of the scene +Imported scenes can be automatically modified right after import by setting their *Custom Script* Import property to a ``tool`` script that inherits from this class. + +The :ref:`post_import` callback receives the imported scene's root node and returns the modified version of the scene. Usage example: + +:: + + tool # needed so it runs in editor + extends EditorScenePostImport + + # This sample changes all node names + + # Called right after the scene is imported and gets the root node + func post_import(scene): + # change all node names to "modified_[oldnodename]" + iterate(scene) + return scene # remember to return the imported scene + + func iterate(node): + if node != null: + node.name = "modified_"+node.name + for child in node.get_children(): + iterate(child) Tutorials --------- -- `http://docs.godotengine.org/en/latest/learning/workflow/assets/importing_scenes.html?highlight=post%20import `_ +- `#custom-script <../getting_started/workflow/assets/importing_scenes.html#custom-script>`_ in :doc:`../getting_started/workflow/assets/importing_scenes` Method Descriptions ------------------- @@ -44,17 +65,17 @@ Method Descriptions - :ref:`String` **get_source_file** **(** **)** const -Returns the source-file-path which got imported (e.g. ``res://scene.dae`` ) +Returns the source file path which got imported (e.g. ``res://scene.dae``). .. _class_EditorScenePostImport_get_source_folder: - :ref:`String` **get_source_folder** **(** **)** const -Returns the resource-folder the imported scene-file is located in +Returns the resource folder the imported scene file is located in. .. _class_EditorScenePostImport_post_import: - :ref:`Object` **post_import** **(** :ref:`Object` scene **)** virtual -Gets called after the scene got imported and has to return the modified version of the scene +Gets called after the scene got imported and has to return the modified version of the scene. diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 635eccce1..98acca7f0 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -185,11 +185,17 @@ Enumerations enum **BGMode**: - **BG_KEEP** = **5** --- Keep on screen every pixel drawn in the background. + - **BG_CLEAR_COLOR** = **0** --- Clear the background using the project's clear color. + - **BG_COLOR** = **1** --- Clear the background using a custom clear color. + - **BG_SKY** = **2** --- Display a user-defined sky in the background. + - **BG_COLOR_SKY** = **3** --- Clear the background using a custom clear color and allows defining a sky for shading and reflection. + - **BG_CANVAS** = **4** --- Display a :ref:`CanvasLayer` in the background. + - **BG_MAX** = **6** --- Helper constant keeping track of the enum's size, has no direct usage in API calls. .. _enum_Environment_DOFBlurQuality: @@ -197,7 +203,9 @@ enum **BGMode**: enum **DOFBlurQuality**: - **DOF_BLUR_QUALITY_LOW** = **0** --- Low depth-of-field blur quality. + - **DOF_BLUR_QUALITY_MEDIUM** = **1** --- Medium depth-of-field blur quality. + - **DOF_BLUR_QUALITY_HIGH** = **2** --- High depth-of-field blur quality. .. _enum_Environment_GlowBlendMode: @@ -205,8 +213,11 @@ enum **DOFBlurQuality**: enum **GlowBlendMode**: - **GLOW_BLEND_MODE_ADDITIVE** = **0** --- Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. + - **GLOW_BLEND_MODE_SCREEN** = **1** --- Screen glow blending mode. Increases brightness, used frequently with bloom. + - **GLOW_BLEND_MODE_SOFTLIGHT** = **2** --- Softlight glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. + - **GLOW_BLEND_MODE_REPLACE** = **3** --- Replace glow blending mode. Replaces all pixels' color by the glow value. .. _enum_Environment_ToneMapper: @@ -214,8 +225,11 @@ enum **GlowBlendMode**: enum **ToneMapper**: - **TONE_MAPPER_LINEAR** = **0** --- Linear tonemapper operator. Reads the linear data and performs an exposure adjustment. + - **TONE_MAPPER_REINHARDT** = **1** --- Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: color = color / (1 + color). + - **TONE_MAPPER_FILMIC** = **2** --- Filmic tonemapper operator. + - **TONE_MAPPER_ACES** = **3** --- Academy Color Encoding System tonemapper operator. .. _enum_Environment_SSAOBlur: @@ -223,8 +237,11 @@ enum **ToneMapper**: enum **SSAOBlur**: - **SSAO_BLUR_DISABLED** = **0** + - **SSAO_BLUR_1x1** = **1** + - **SSAO_BLUR_2x2** = **2** + - **SSAO_BLUR_3x3** = **3** .. _enum_Environment_SSAOQuality: @@ -232,7 +249,9 @@ enum **SSAOBlur**: enum **SSAOQuality**: - **SSAO_QUALITY_LOW** = **0** + - **SSAO_QUALITY_MEDIUM** = **1** + - **SSAO_QUALITY_HIGH** = **2** Description diff --git a/classes/class_file.rst b/classes/class_file.rst index 7a309680a..385559644 100644 --- a/classes/class_file.rst +++ b/classes/class_file.rst @@ -122,8 +122,11 @@ Enumerations enum **CompressionMode**: - **COMPRESSION_FASTLZ** = **0** --- Uses the FastLZ compression method. + - **COMPRESSION_DEFLATE** = **1** --- Uses the Deflate compression method. + - **COMPRESSION_ZSTD** = **2** --- Uses the Zstd compression method. + - **COMPRESSION_GZIP** = **3** --- Uses the gzip compression method. .. _enum_File_ModeFlags: @@ -131,8 +134,11 @@ enum **CompressionMode**: enum **ModeFlags**: - **READ** = **1** --- Opens the file for read operations. + - **WRITE** = **2** --- Opens the file for write operations. Create it if the file does not exist and truncate if it exists. + - **READ_WRITE** = **3** --- Opens the file for read and write operations. Does not truncate the file. + - **WRITE_READ** = **7** --- Opens the file for read and write operations. Create it if the file does not exist and truncate if it exists. Description diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index af078c358..6619bff5d 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -96,7 +96,9 @@ Enumerations enum **Access**: - **ACCESS_RESOURCES** = **0** --- The dialog allows the selection of file and directory. + - **ACCESS_USERDATA** = **1** --- The dialog allows access files under :ref:`Resource` path(res://) . + - **ACCESS_FILESYSTEM** = **2** --- The dialog allows access files in whole file system. .. _enum_FileDialog_Mode: @@ -104,9 +106,13 @@ enum **Access**: enum **Mode**: - **MODE_OPEN_FILE** = **0** --- The dialog allows the selection of one, and only one file. + - **MODE_OPEN_FILES** = **1** --- The dialog allows the selection of multiple files. + - **MODE_OPEN_DIR** = **2** --- The dialog functions as a folder selector, disallowing the selection of any file. + - **MODE_OPEN_ANY** = **3** --- The dialog allows the selection of a file or a directory. + - **MODE_SAVE_FILE** = **4** --- The dialog will warn when a file exists. Description @@ -127,6 +133,8 @@ Property Descriptions | *Getter* | get_access() | +----------+-------------------+ +The file system access scope. See enum ``Access`` constants. + .. _class_FileDialog_current_dir: - :ref:`String` **current_dir** @@ -173,6 +181,8 @@ The currently selected file path of the file dialog. | *Getter* | get_filters() | +----------+--------------------+ +Set file type filters. This example shows only .png and .gd files ``set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GD Script"]))``. + .. _class_FileDialog_mode: - :ref:`Mode` **mode** @@ -183,6 +193,8 @@ The currently selected file path of the file dialog. | *Getter* | get_mode() | +----------+-----------------+ +Set dialog to open or save mode, changes selection behavior. See enum ``Mode`` constants. + .. _class_FileDialog_mode_overrides_title: - :ref:`bool` **mode_overrides_title** @@ -193,7 +205,7 @@ The currently selected file path of the file dialog. | *Getter* | is_mode_overriding_title() | +----------+---------------------------------+ -If ``true``, changing the ``mode`` property will set the window title accordingly (e. g. setting mode to ``MODE_OPEN_FILE`` will change the window title to "Open a File"). +If ``true``, changing the ``Mode`` property will set the window title accordingly (e. g. setting mode to ``MODE_OPEN_FILE`` will change the window title to "Open a File"). .. _class_FileDialog_show_hidden_files: @@ -205,6 +217,8 @@ If ``true``, changing the ``mode`` property will set the window title accordingl | *Getter* | is_showing_hidden_files() | +----------+------------------------------+ +If ``true``, the dialog will show hidden files. + Method Descriptions ------------------- @@ -212,7 +226,7 @@ Method Descriptions - void **add_filter** **(** :ref:`String` filter **)** -Add a custom filter. Filter format is: "mask ; description", example (C++): dialog->add_filter("\*.png ; PNG Images"); +Add a custom filter. Example: ``add_filter("*.png ; PNG Images")`` .. _class_FileDialog_clear_filters: @@ -224,10 +238,14 @@ Clear all the added filters in the dialog. - void **deselect_items** **(** **)** +Clear currently selected items in the dialog. + .. _class_FileDialog_get_line_edit: - :ref:`LineEdit` **get_line_edit** **(** **)** +Returns the LineEdit for the selected file. + .. _class_FileDialog_get_vbox: - :ref:`VBoxContainer` **get_vbox** **(** **)** diff --git a/classes/class_float.rst b/classes/class_float.rst index fe752f641..cb682ccd6 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -49,5 +49,5 @@ Cast an :ref:`int` value to a floating point value, ``float(1)`` will - :ref:`float` **float** **(** :ref:`String` from **)** -Cast a :ref:`String` value to a floating point value. This method accepts float value strings like `` '1.23' `` and exponential notation strings for its parameter so calling `` float('1e3') `` will return 1000.0 and calling `` float('1e-3') `` will return -0.001. +Cast a :ref:`String` value to a floating point value. This method accepts float value strings like `` '1.23' `` and exponential notation strings for its parameter so calling `` float('1e3') `` will return 1000.0 and calling `` float('1e-3') `` will return 0.001. diff --git a/classes/class_generic6dofjoint.rst b/classes/class_generic6dofjoint.rst index 9c614cb2b..67e596711 100644 --- a/classes/class_generic6dofjoint.rst +++ b/classes/class_generic6dofjoint.rst @@ -149,9 +149,13 @@ Enumerations enum **Flag**: - **FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If ``set`` there is linear motion possible within the given limits. + - **FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If ``set`` there is rotational motion possible. + - **FLAG_ENABLE_MOTOR** = **2** --- If ``set`` there is a rotational motor across these axes. + - **FLAG_ENABLE_LINEAR_MOTOR** = **3** + - **FLAG_MAX** = **4** --- End flag of FLAG\_\* constants, used internally. .. _enum_Generic6DOFJoint_Param: @@ -159,21 +163,37 @@ enum **Flag**: enum **Param**: - **PARAM_LINEAR_LOWER_LIMIT** = **0** --- The minimum difference between the pivot points' axes. + - **PARAM_LINEAR_UPPER_LIMIT** = **1** --- The maximum difference between the pivot points' axes. + - **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the axes The lower, the slower the movement. + - **PARAM_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes movement The lower, the more momentum gets lost. + - **PARAM_LINEAR_DAMPING** = **4** --- The amount of damping that happens at the linear motion across the axes. + - **PARAM_LINEAR_MOTOR_TARGET_VELOCITY** = **5** --- The velocity the linear motor will try to reach. + - **PARAM_LINEAR_MOTOR_FORCE_LIMIT** = **6** --- The maximum force the linear motor will apply while trying to reach the velocity target. + - **PARAM_ANGULAR_LOWER_LIMIT** = **7** --- The minimum rotation in negative direction to break loose and rotate around the axes. + - **PARAM_ANGULAR_UPPER_LIMIT** = **8** --- The minimum rotation in positive direction to break loose and rotate around the axes. + - **PARAM_ANGULAR_LIMIT_SOFTNESS** = **9** --- The speed of all rotations across the axes. + - **PARAM_ANGULAR_DAMPING** = **10** --- The amount of rotational damping across the axes. The lower, the more dampening occurs. + - **PARAM_ANGULAR_RESTITUTION** = **11** --- The amount of rotational restitution across the axes. The lower, the more restitution occurs. + - **PARAM_ANGULAR_FORCE_LIMIT** = **12** --- The maximum amount of force that can occur, when rotating around the axes. + - **PARAM_ANGULAR_ERP** = **13** --- When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + - **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY** = **14** --- Target speed for the motor at the axes. + - **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = **15** --- Maximum acceleration for the motor at the axes. + - **PARAM_MAX** = **16** --- End flag of PARAM\_\* constants, used internally. Description diff --git a/classes/class_geometryinstance.rst b/classes/class_geometryinstance.rst index 9936f1c47..04d179a3f 100644 --- a/classes/class_geometryinstance.rst +++ b/classes/class_geometryinstance.rst @@ -49,6 +49,7 @@ enum **Flags**: - **FLAG_USE_BAKED_LIGHT** = **0** --- Will allow the GeometryInstance to be used when baking lights using a :ref:`GIProbe` and/or any other form of baked lighting. Added documentation for GeometryInstance and VisualInstance + - **FLAG_MAX** = **2** .. _enum_GeometryInstance_ShadowCastingSetting: @@ -56,12 +57,15 @@ Added documentation for GeometryInstance and VisualInstance enum **ShadowCastingSetting**: - **SHADOW_CASTING_SETTING_OFF** = **0** --- Will not cast any shadows. + - **SHADOW_CASTING_SETTING_ON** = **1** --- Will cast shadows from all visible faces in the GeometryInstance. Will take culling into account, so faces not being rendered will not be taken into account when shadow casting. + - **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = **2** --- Will cast shadows from all visible faces in the GeometryInstance. Will not take culling into account, so all faces will be taken into account when shadow casting. + - **SHADOW_CASTING_SETTING_SHADOWS_ONLY** = **3** --- Will only show the shadows casted from this object. In other words: The actual mesh will not be visible, only the shadows casted from the mesh. diff --git a/classes/class_giprobe.rst b/classes/class_giprobe.rst index a990b5a7c..5ef16decd 100644 --- a/classes/class_giprobe.rst +++ b/classes/class_giprobe.rst @@ -58,9 +58,13 @@ Enumerations enum **Subdiv**: - **SUBDIV_64** = **0** + - **SUBDIV_128** = **1** + - **SUBDIV_256** = **2** + - **SUBDIV_512** = **3** + - **SUBDIV_MAX** = **4** Tutorials diff --git a/classes/class_godotsharp.rst b/classes/class_godotsharp.rst index fbbf6027a..3695b9723 100644 --- a/classes/class_godotsharp.rst +++ b/classes/class_godotsharp.rst @@ -19,15 +19,23 @@ Brief Description Methods ------- -+--------------------------+--------------------------------------------------------------------------------+ -| void | :ref:`attach_thread` **(** **)** | -+--------------------------+--------------------------------------------------------------------------------+ -| void | :ref:`detach_thread` **(** **)** | -+--------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_domain_loaded` **(** **)** | -+--------------------------+--------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_finalizing_domain` **(** **)** | -+--------------------------+--------------------------------------------------------------------------------+ ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`attach_thread` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`detach_thread` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_domain_id` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_scripts_domain_id` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_domain_finalizing_for_unload` **(** :ref:`int` domain_id **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_runtime_initialized` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_runtime_shutting_down` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_scripts_domain_loaded` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- @@ -44,15 +52,31 @@ Attaches the current thread to the mono runtime. Detaches the current thread from the mono runtime. -.. _class_GodotSharp_is_domain_loaded: +.. _class_GodotSharp_get_domain_id: -- :ref:`bool` **is_domain_loaded** **(** **)** +- :ref:`int` **get_domain_id** **(** **)** + +.. _class_GodotSharp_get_scripts_domain_id: + +- :ref:`int` **get_scripts_domain_id** **(** **)** + +.. _class_GodotSharp_is_domain_finalizing_for_unload: + +- :ref:`bool` **is_domain_finalizing_for_unload** **(** :ref:`int` domain_id **)** + +Returns whether the domain is being finalized. + +.. _class_GodotSharp_is_runtime_initialized: + +- :ref:`bool` **is_runtime_initialized** **(** **)** + +.. _class_GodotSharp_is_runtime_shutting_down: + +- :ref:`bool` **is_runtime_shutting_down** **(** **)** + +.. _class_GodotSharp_is_scripts_domain_loaded: + +- :ref:`bool` **is_scripts_domain_loaded** **(** **)** Returns whether the scripts domain is loaded. -.. _class_GodotSharp_is_finalizing_domain: - -- :ref:`bool` **is_finalizing_domain** **(** **)** - -Returns whether the scripts domain is being finalized. - diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index ae3fcfe78..df3a99f73 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -152,7 +152,9 @@ Enumerations enum **Overlay**: - **OVERLAY_DISABLED** = **0** + - **OVERLAY_BREAKPOINT** = **1** + - **OVERLAY_POSITION** = **2** Description diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index 5e0710b03..2bb2fbc4d 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -23,13 +23,6 @@ Properties | :ref:`int` | :ref:`columns` | +-----------------------+---------------------------------------------+ -Methods -------- - -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Control` | :ref:`get_child_control_at_cell` **(** :ref:`int` row, :ref:`int` column **)** | -+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - Theme Properties ---------------- @@ -59,10 +52,3 @@ Property Descriptions The number of columns in the ``GridContainer``. If modified, ``GridContainer`` reorders its children to accommodate the new layout. -Method Descriptions -------------------- - -.. _class_GridContainer_get_child_control_at_cell: - -- :ref:`Control` **get_child_control_at_cell** **(** :ref:`int` row, :ref:`int` column **)** - diff --git a/classes/class_hingejoint.rst b/classes/class_hingejoint.rst index fda4f2c66..722a9c5c9 100644 --- a/classes/class_hingejoint.rst +++ b/classes/class_hingejoint.rst @@ -49,7 +49,9 @@ Enumerations enum **Flag**: - **FLAG_USE_LIMIT** = **0** --- If ``true`` the hinges maximum and minimum rotation, defined by :ref:`angular_limit/lower` and :ref:`angular_limit/upper` has effects. + - **FLAG_ENABLE_MOTOR** = **1** --- When activated, a motor turns the hinge. + - **FLAG_MAX** = **2** --- End flag of FLAG\_\* constants, used internally. .. _enum_HingeJoint_Param: @@ -57,13 +59,21 @@ enum **Flag**: enum **Param**: - **PARAM_BIAS** = **0** --- The speed with which the two bodies get pulled together when they move in different directions. + - **PARAM_LIMIT_UPPER** = **1** --- The maximum rotation. only active if :ref:`angular_limit/enable` is ``true``. + - **PARAM_LIMIT_LOWER** = **2** --- The minimum rotation. only active if :ref:`angular_limit/enable` is ``true``. + - **PARAM_LIMIT_BIAS** = **3** --- The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + - **PARAM_LIMIT_SOFTNESS** = **4** + - **PARAM_LIMIT_RELAXATION** = **5** --- The lower this value, the more the rotation gets slowed down. + - **PARAM_MOTOR_TARGET_VELOCITY** = **6** --- Target speed for the motor. + - **PARAM_MOTOR_MAX_IMPULSE** = **7** --- Maximum acceleration for the motor. + - **PARAM_MAX** = **8** --- End flag of PARAM\_\* constants, used internally. Description diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index 33c98f6a4..4a3507311 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -68,14 +68,23 @@ Enumerations enum **Status**: - **STATUS_DISCONNECTED** = **0** --- Status: Disconnected from the server. + - **STATUS_RESOLVING** = **1** --- Status: Currently resolving the hostname for the given URL into an IP. + - **STATUS_CANT_RESOLVE** = **2** --- Status: DNS failure: Can't resolve the hostname for the given URL. + - **STATUS_CONNECTING** = **3** --- Status: Currently connecting to server. + - **STATUS_CANT_CONNECT** = **4** --- Status: Can't connect to the server. + - **STATUS_CONNECTED** = **5** --- Status: Connection established. + - **STATUS_REQUESTING** = **6** --- Status: Currently sending request. + - **STATUS_BODY** = **7** --- Status: HTTP body received. + - **STATUS_CONNECTION_ERROR** = **8** --- Status: Error in HTTP connection. + - **STATUS_SSL_HANDSHAKE_ERROR** = **9** --- Status: Error in SSL handshake. .. _enum_HTTPClient_Method: @@ -83,14 +92,23 @@ enum **Status**: enum **Method**: - **METHOD_GET** = **0** --- HTTP GET method. The GET method requests a representation of the specified resource. Requests using GET should only retrieve data. + - **METHOD_HEAD** = **1** --- HTTP HEAD method. The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful to request metadata like HTTP headers or to check if a resource exists. + - **METHOD_POST** = **2** --- HTTP POST method. The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server. This is often used for forms and submitting data or uploading files. + - **METHOD_PUT** = **3** --- HTTP PUT method. The PUT method asks to replace all current representations of the target resource with the request payload. (You can think of ``POST`` as "create or update" and ``PUT`` as "update", although many services tend to not make a clear distinction or change their meaning). + - **METHOD_DELETE** = **4** --- HTTP DELETE method. The DELETE method requests to delete the specified resource. + - **METHOD_OPTIONS** = **5** --- HTTP OPTIONS method. The OPTIONS method asks for a description of the communication options for the target resource. Rarely used. + - **METHOD_TRACE** = **6** --- HTTP TRACE method. The TRACE method performs a message loop-back test along the path to the target resource. Returns the entire HTTP request received in the response body. Rarely used. + - **METHOD_CONNECT** = **7** --- HTTP CONNECT method. The CONNECT method establishes a tunnel to the server identified by the target resource. Rarely used. + - **METHOD_PATCH** = **8** --- HTTP PATCH method. The PATCH method is used to apply partial modifications to a resource. + - **METHOD_MAX** = **9** --- Marker for end of ``METHOD_*`` enum. Not used. .. _enum_HTTPClient_ResponseCode: @@ -98,65 +116,125 @@ enum **Method**: enum **ResponseCode**: - **RESPONSE_CONTINUE** = **100** --- HTTP status code ``100 Continue``. Interim response that indicates everything so far is OK and that the client should continue with the request (or ignore this status if already finished). + - **RESPONSE_SWITCHING_PROTOCOLS** = **101** --- HTTP status code ``101 Switching Protocol``. Sent in response to an ``Upgrade`` request header by the client. Indicates the protocol the server is switching to. + - **RESPONSE_PROCESSING** = **102** --- HTTP status code ``102 Processing`` (WebDAV). Indicates that the server has received and is processing the request, but no response is available yet. + - **RESPONSE_OK** = **200** --- HTTP status code ``200 OK``. The request has succeeded. Default response for successful requests. Meaning varies depending on the request. GET: The resource has been fetched and is transmitted in the message body. HEAD: The entity headers are in the message body. POST: The resource describing the result of the action is transmitted in the message body. TRACE: The message body contains the request message as received by the server. + - **RESPONSE_CREATED** = **201** --- HTTP status code ``201 Created``. The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request. + - **RESPONSE_ACCEPTED** = **202** --- HTTP status code ``202 Accepted``. The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing. + - **RESPONSE_NON_AUTHORITATIVE_INFORMATION** = **203** --- HTTP status code ``203 Non-Authoritative Information``. This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response. + - **RESPONSE_NO_CONTENT** = **204** --- HTTP status code ``204 No Content``. There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones. + - **RESPONSE_RESET_CONTENT** = **205** --- HTTP status code ``205 Reset Content``. The server has fulfilled the request and desires that the client resets the "document view" that caused the request to be sent to its original state as received from the origin server. + - **RESPONSE_PARTIAL_CONTENT** = **206** --- HTTP status code ``206 Partial Content``. This response code is used because of a range header sent by the client to separate download into multiple streams. + - **RESPONSE_MULTI_STATUS** = **207** --- HTTP status code ``207 Multi-Status`` (WebDAV). A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate. + - **RESPONSE_ALREADY_REPORTED** = **208** --- HTTP status code ``208 Already Reported`` (WebDAV). Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly. + - **RESPONSE_IM_USED** = **226** --- HTTP status code ``226 IM Used`` (WebDAV). The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. + - **RESPONSE_MULTIPLE_CHOICES** = **300** --- HTTP status code ``300 Multiple Choice``. The request has more than one possible responses and there is no standardized way to choose one of the responses. User-agent or user should choose one of them. + - **RESPONSE_MOVED_PERMANENTLY** = **301** --- HTTP status code ``301 Moved Permanently``. Redirection. This response code means the URI of requested resource has been changed. The new URI is usually included in the response. + - **RESPONSE_FOUND** = **302** --- HTTP status code ``302 Found``. Temporary redirection. This response code means the URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests. + - **RESPONSE_SEE_OTHER** = **303** --- HTTP status code ``303 See Other``. The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request. + - **RESPONSE_NOT_MODIFIED** = **304** --- HTTP status code ``304 Not Modified``. A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to false. + - **RESPONSE_USE_PROXY** = **305** --- HTTP status code ``305 Use Proxy``. Deprecated. Do not use. + - **RESPONSE_SWITCH_PROXY** = **306** --- HTTP status code ``306 Switch Proxy``. Deprecated. Do not use. + - **RESPONSE_TEMPORARY_REDIRECT** = **307** --- HTTP status code ``307 Temporary Redirect``. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI. + - **RESPONSE_PERMANENT_REDIRECT** = **308** --- HTTP status code ``308 Permanent Redirect``. The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. + - **RESPONSE_BAD_REQUEST** = **400** --- HTTP status code ``400 Bad Request``. The request was invalid. The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, invalid request contents, or deceptive request routing). + - **RESPONSE_UNAUTHORIZED** = **401** --- HTTP status code ``401 Unauthorized``. Credentials required. The request has not been applied because it lacks valid authentication credentials for the target resource. + - **RESPONSE_PAYMENT_REQUIRED** = **402** --- HTTP status code ``402 Payment Required``. This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems, however this is not currently used. + - **RESPONSE_FORBIDDEN** = **403** --- HTTP status code ``403 Forbidden``. The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike ``401``, the client's identity is known to the server. + - **RESPONSE_NOT_FOUND** = **404** --- HTTP status code ``404 Not Found``. The server can not find requested resource. Either the URL is not recognized or the endpoint is valid but the resource itself does not exist. May also be sent instead of 403 to hide existence of a resource if the client is not authorized. + - **RESPONSE_METHOD_NOT_ALLOWED** = **405** --- HTTP status code ``405 Method Not Allowed``. The request's HTTP method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code. + - **RESPONSE_NOT_ACCEPTABLE** = **406** --- HTTP status code ``406 Not Acceptable``. The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request. Used when negotiation content. + - **RESPONSE_PROXY_AUTHENTICATION_REQUIRED** = **407** --- HTTP status code ``407 Proxy Authentication Required``. Similar to 401 Unauthorized, but it indicates that the client needs to authenticate itself in order to use a proxy. + - **RESPONSE_REQUEST_TIMEOUT** = **408** --- HTTP status code ``408 Request Timeout``. The server did not receive a complete request message within the time that it was prepared to wait. + - **RESPONSE_CONFLICT** = **409** --- HTTP status code ``409 Conflict``. The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. + - **RESPONSE_GONE** = **410** --- HTTP status code ``410 Gone``. The target resource is no longer available at the origin server and this condition is likely permanent. + - **RESPONSE_LENGTH_REQUIRED** = **411** --- HTTP status code ``411 Length Required``. The server refuses to accept the request without a defined Content-Length header. + - **RESPONSE_PRECONDITION_FAILED** = **412** --- HTTP status code ``412 Precondition Failed``. One or more conditions given in the request header fields evaluated to false when tested on the server. + - **RESPONSE_REQUEST_ENTITY_TOO_LARGE** = **413** --- HTTP status code ``413 Entity Too Large``. The server is refusing to process a request because the request payload is larger than the server is willing or able to process. + - **RESPONSE_REQUEST_URI_TOO_LONG** = **414** --- HTTP status code ``414 Request-URI Too Long``. The server is refusing to service the request because the request-target is longer than the server is willing to interpret. + - **RESPONSE_UNSUPPORTED_MEDIA_TYPE** = **415** --- HTTP status code ``415 Unsupported Media Type``. The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource. + - **RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE** = **416** --- HTTP status code ``416 Requested Range Not Satisfiable``. None of the ranges in the request's Range header field overlap the current extent of the selected resource or the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges. + - **RESPONSE_EXPECTATION_FAILED** = **417** --- HTTP status code ``417 Expectation Failed``. The expectation given in the request's Expect header field could not be met by at least one of the inbound servers. + - **RESPONSE_IM_A_TEAPOT** = **418** --- HTTP status code ``418 I'm A Teapot``. Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout. + - **RESPONSE_MISDIRECTED_REQUEST** = **421** --- HTTP status code ``421 Misdirected Request``. The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI. + - **RESPONSE_UNPROCESSABLE_ENTITY** = **422** --- HTTP status code ``422 Unprocessable Entity`` (WebDAV). The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions. + - **RESPONSE_LOCKED** = **423** --- HTTP status code ``423 Locked`` (WebDAV). The source or destination resource of a method is locked. + - **RESPONSE_FAILED_DEPENDENCY** = **424** --- HTTP status code ``424 Failed Dependency`` (WebDAV). The method could not be performed on the resource because the requested action depended on another action and that action failed. + - **RESPONSE_UPGRADE_REQUIRED** = **426** --- HTTP status code ``426 Upgrade Required``. The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. + - **RESPONSE_PRECONDITION_REQUIRED** = **428** --- HTTP status code ``428 Precondition Required``. The origin server requires the request to be conditional. + - **RESPONSE_TOO_MANY_REQUESTS** = **429** --- HTTP status code ``429 Too Many Requests``. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later. + - **RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE** = **431** --- HTTP status code ``431 Request Header Fields Too Large``. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields. + - **RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS** = **451** --- HTTP status code ``451 Response Unavailable For Legal Reasons``. The server is denying access to the resource as a consequence of a legal demand. + - **RESPONSE_INTERNAL_SERVER_ERROR** = **500** --- HTTP status code ``500 Internal Server Error``. The server encountered an unexpected condition that prevented it from fulfilling the request. + - **RESPONSE_NOT_IMPLEMENTED** = **501** --- HTTP status code ``501 Not Implemented``. The server does not support the functionality required to fulfill the request. + - **RESPONSE_BAD_GATEWAY** = **502** --- HTTP status code ``502 Bad Gateway``. The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request. Usually returned by load balancers or proxies. + - **RESPONSE_SERVICE_UNAVAILABLE** = **503** --- HTTP status code ``503 Service Unavailable``. The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. Try again later. + - **RESPONSE_GATEWAY_TIMEOUT** = **504** --- HTTP status code ``504 Gateway Timeout``. The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. Usually returned by load balancers or proxies. + - **RESPONSE_HTTP_VERSION_NOT_SUPPORTED** = **505** --- HTTP status code ``505 HTTP Version Not Supported``. The server does not support, or refuses to support, the major version of HTTP that was used in the request message. + - **RESPONSE_VARIANT_ALSO_NEGOTIATES** = **506** --- HTTP status code ``506 Variant Also Negotiates``. The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process. + - **RESPONSE_INSUFFICIENT_STORAGE** = **507** --- HTTP status code ``507 Insufficient Storage``. The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. + - **RESPONSE_LOOP_DETECTED** = **508** --- HTTP status code ``508 Loop Detected``. The server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity". This status indicates that the entire operation failed. + - **RESPONSE_NOT_EXTENDED** = **510** --- HTTP status code ``510 Not Extended``. The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request. + - **RESPONSE_NETWORK_AUTH_REQUIRED** = **511** --- HTTP status code ``511 Network Authentication Required``. The client needs to authenticate to gain network access. Description diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index 005fe19bf..b537717f7 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -61,16 +61,27 @@ Enumerations enum **Result**: - **RESULT_SUCCESS** = **0** --- Request successful. + - **RESULT_CHUNKED_BODY_SIZE_MISMATCH** = **1** + - **RESULT_CANT_CONNECT** = **2** --- Request failed while connecting. + - **RESULT_CANT_RESOLVE** = **3** --- Request failed while resolving. + - **RESULT_CONNECTION_ERROR** = **4** --- Request failed due to connection(read/write) error. + - **RESULT_SSL_HANDSHAKE_ERROR** = **5** --- Request failed on SSL handshake. + - **RESULT_NO_RESPONSE** = **6** --- Request does not have a response(yet). + - **RESULT_BODY_SIZE_LIMIT_EXCEEDED** = **7** --- Request exceeded its maximum size limit, see :ref:`set_body_size_limit`. + - **RESULT_REQUEST_FAILED** = **8** --- Request failed. (Unused) + - **RESULT_DOWNLOAD_FILE_CANT_OPEN** = **9** --- HTTPRequest couldn't open the download file. + - **RESULT_DOWNLOAD_FILE_WRITE_ERROR** = **10** --- HTTPRequest couldn't write to the download file. + - **RESULT_REDIRECT_LIMIT_REACHED** = **11** --- Request reached its maximum redirect limit, see :ref:`set_max_redirects`. Description diff --git a/classes/class_image.rst b/classes/class_image.rst index 4820225b1..ac64f502e 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -136,9 +136,13 @@ Enumerations enum **CompressMode**: - **COMPRESS_S3TC** = **0** + - **COMPRESS_PVRTC2** = **1** + - **COMPRESS_PVRTC4** = **2** + - **COMPRESS_ETC** = **3** + - **COMPRESS_ETC2** = **4** .. _enum_Image_Interpolation: @@ -146,8 +150,11 @@ enum **CompressMode**: enum **Interpolation**: - **INTERPOLATE_NEAREST** = **0** + - **INTERPOLATE_BILINEAR** = **1** + - **INTERPOLATE_CUBIC** = **2** + - **INTERPOLATE_TRILINEAR** = **3** --- Performs bilinear separately on the two most suited mipmap levels, then linearly interpolates between them. It's slower than ``INTERPOLATE_BILINEAR``, but produces higher quality results, with much less aliasing artifacts. @@ -161,7 +168,9 @@ On the other hand, if the image already has mipmaps, they will be used, and a ne enum **AlphaMode**: - **ALPHA_NONE** = **0** + - **ALPHA_BIT** = **1** + - **ALPHA_BLEND** = **2** .. _enum_Image_CompressSource: @@ -169,7 +178,9 @@ enum **AlphaMode**: enum **CompressSource**: - **COMPRESS_SOURCE_GENERIC** = **0** + - **COMPRESS_SOURCE_SRGB** = **1** + - **COMPRESS_SOURCE_NORMAL** = **2** .. _enum_Image_Format: @@ -177,42 +188,79 @@ enum **CompressSource**: enum **Format**: - **FORMAT_L8** = **0** + - **FORMAT_LA8** = **1** + - **FORMAT_R8** = **2** --- OpenGL texture format RED with a single component and a bitdepth of 8. + - **FORMAT_RG8** = **3** --- OpenGL texture format RG with two components and a bitdepth of 8 for each. -- **FORMAT_RGB8** = **4** --- OpenGL texture format RGB with three components, each with a bitdepth of 8. -- **FORMAT_RGBA8** = **5** --- OpenGL texture format RGBA with four components, each with a bitdepth of 8. + +- **FORMAT_RGB8** = **4** --- OpenGL texture format RGB with three components, each with a bitdepth of 8. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + +- **FORMAT_RGBA8** = **5** --- OpenGL texture format RGBA with four components, each with a bitdepth of 8. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + - **FORMAT_RGBA4444** = **6** --- OpenGL texture format RGBA with four components, each with a bitdepth of 4. + - **FORMAT_RGBA5551** = **7** --- OpenGL texture format GL_RGB5_A1 where 5 bits of depth for each component of RGB and one bit for alpha. + - **FORMAT_RF** = **8** --- OpenGL texture format GL_R32F where there's one component, a 32-bit floating-point value. + - **FORMAT_RGF** = **9** --- OpenGL texture format GL_RG32F where there are two components, each a 32-bit floating-point values. + - **FORMAT_RGBF** = **10** --- OpenGL texture format GL_RGB32F where there are three components, each a 32-bit floating-point values. + - **FORMAT_RGBAF** = **11** --- OpenGL texture format GL_RGBA32F where there are four components, each a 32-bit floating-point values. + - **FORMAT_RH** = **12** --- OpenGL texture format GL_R32F where there's one component, a 16-bit "half-precision" floating-point value. + - **FORMAT_RGH** = **13** --- OpenGL texture format GL_RG32F where there's two components, each a 16-bit "half-precision" floating-point value. + - **FORMAT_RGBH** = **14** --- OpenGL texture format GL_RGB32F where there's three components, each a 16-bit "half-precision" floating-point value. + - **FORMAT_RGBAH** = **15** --- OpenGL texture format GL_RGBA32F where there's four components, each a 16-bit "half-precision" floating-point value. + - **FORMAT_RGBE9995** = **16** --- A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single exponent. -- **FORMAT_DXT1** = **17** --- The S3TC texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. More information can be found at https://www.khronos.org/opengl/wiki/S3_Texture_Compression. -- **FORMAT_DXT3** = **18** --- The S3TC texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. -- **FORMAT_DXT5** = **19** --- The S3TC texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparency gradients than DXT3. + +- **FORMAT_DXT1** = **17** --- The S3TC texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. More information can be found at https://www.khronos.org/opengl/wiki/S3_Texture_Compression. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + +- **FORMAT_DXT3** = **18** --- The S3TC texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + +- **FORMAT_DXT5** = **19** --- The S3TC texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparency gradients than DXT3. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + - **FORMAT_RGTC_R** = **20** --- Texture format that uses Red Green Texture Compression, normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. More information can be found here https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression. + - **FORMAT_RGTC_RG** = **21** --- Texture format that uses Red Green Texture Compression, normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel. -- **FORMAT_BPTC_RGBA** = **22** --- Texture format that uses BPTC compression with unsigned normalized RGBA components. More information can be found at https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression. + +- **FORMAT_BPTC_RGBA** = **22** --- Texture format that uses BPTC compression with unsigned normalized RGBA components. More information can be found at https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + - **FORMAT_BPTC_RGBF** = **23** --- Texture format that uses BPTC compression with signed floating-point RGB components. + - **FORMAT_BPTC_RGBFU** = **24** --- Texture format that uses BPTC compression with unsigned floating-point RGB components. -- **FORMAT_PVRTC2** = **25** --- Texture format used on PowerVR-supported mobile platforms, uses 2 bit color depth with no alpha. More information on PVRTC can be found here https://en.wikipedia.org/wiki/PVRTC. + +- **FORMAT_PVRTC2** = **25** --- Texture format used on PowerVR-supported mobile platforms, uses 2 bit color depth with no alpha. More information on PVRTC can be found here https://en.wikipedia.org/wiki/PVRTC. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + - **FORMAT_PVRTC2A** = **26** --- Same as PVRTC2, but with an alpha component. + - **FORMAT_PVRTC4** = **27** --- Similar to PVRTC2, but with 4 bit color depth and no alpha. + - **FORMAT_PVRTC4A** = **28** --- Same as PVRTC4, but with an alpha component. + - **FORMAT_ETC** = **29** --- Ericsson Texture Compression format, also referred to as 'ETC1', and is part of the OpenGL ES graphics standard. An overview of the format is given at https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC1. + - **FORMAT_ETC2_R11** = **30** --- Ericsson Texture Compression format 2 variant R11_EAC, which provides one channel of unsigned data. + - **FORMAT_ETC2_R11S** = **31** --- Ericsson Texture Compression format 2 variant SIGNED_R11_EAC, which provides one channel of signed data. + - **FORMAT_ETC2_RG11** = **32** --- Ericsson Texture Compression format 2 variant RG11_EAC, which provides two channels of unsigned data. + - **FORMAT_ETC2_RG11S** = **33** --- Ericsson Texture Compression format 2 variant SIGNED_RG11_EAC, which provides two channels of signed data. -- **FORMAT_ETC2_RGB8** = **34** --- Ericsson Texture Compression format 2 variant RGB8, which is a followup of ETC1 and compresses RGB888 data. -- **FORMAT_ETC2_RGBA8** = **35** --- Ericsson Texture Compression format 2 variant RGBA8, which compresses RGBA8888 data with full alpha support. -- **FORMAT_ETC2_RGB8A1** = **36** --- Ericsson Texture Compression format 2 variant RGB8_PUNCHTHROUGH_ALPHA1, which compresses RGBA data to make alpha either fully transparent or fully opaque. + +- **FORMAT_ETC2_RGB8** = **34** --- Ericsson Texture Compression format 2 variant RGB8, which is a followup of ETC1 and compresses RGB888 data. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + +- **FORMAT_ETC2_RGBA8** = **35** --- Ericsson Texture Compression format 2 variant RGBA8, which compresses RGBA8888 data with full alpha support. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + +- **FORMAT_ETC2_RGB8A1** = **36** --- Ericsson Texture Compression format 2 variant RGB8_PUNCHTHROUGH_ALPHA1, which compresses RGBA data to make alpha either fully transparent or fully opaque. Note that when creating an :ref:`ImageTexture`, an sRGB to linear color space conversion is performed. + - **FORMAT_MAX** = **37** Description diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index ee5620825..1b1ee723f 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -50,7 +50,9 @@ Enumerations enum **Storage**: - **STORAGE_RAW** = **0** --- :ref:`Image` data is stored raw and unaltered. + - **STORAGE_COMPRESS_LOSSY** = **1** --- :ref:`Image` data is compressed with a lossy algorithm. You can set the storage quality with :ref:`set_lossy_storage_quality`. + - **STORAGE_COMPRESS_LOSSLESS** = **2** --- :ref:`Image` data is compressed with a lossless algorithm. Description @@ -102,7 +104,7 @@ Create a new ``ImageTexture`` with "width" and "height". - void **create_from_image** **(** :ref:`Image` image, :ref:`int` flags=7 **)** -Create a new ``ImageTexture`` from an :ref:`Image` with "flags" from :ref:`Texture`.FLAG\_\*. +Create a new ``ImageTexture`` from an :ref:`Image` with "flags" from :ref:`Texture`.FLAG\_\*. An sRGB to linear color space conversion can take place, according to :ref:`Image`.FORMAT\_\*. .. _class_ImageTexture_get_format: diff --git a/classes/class_input.rst b/classes/class_input.rst index 14525b6a0..660f4c3c9 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -114,8 +114,11 @@ Enumerations enum **MouseMode**: - **MOUSE_MODE_VISIBLE** = **0** --- Makes the mouse cursor visible if it is hidden. + - **MOUSE_MODE_HIDDEN** = **1** --- Makes the mouse cursor hidden if it is visible. + - **MOUSE_MODE_CAPTURED** = **2** --- Captures the mouse. The mouse will be hidden and unable to leave the game window. But it will still register movement and mouse button presses. + - **MOUSE_MODE_CONFINED** = **3** --- Makes the mouse cursor visible but confines it to the game window. .. _enum_Input_CursorShape: @@ -123,21 +126,37 @@ enum **MouseMode**: enum **CursorShape**: - **CURSOR_ARROW** = **0** --- Arrow cursor. Standard, default pointing cursor. + - **CURSOR_IBEAM** = **1** --- I-beam cursor. Usually used to show where the text cursor will appear when the mouse is clicked. + - **CURSOR_POINTING_HAND** = **2** --- Pointing hand cursor. Usually used to indicate the pointer is over a link or other interactable item. -- **CURSOR_CROSS** = **3** --- Cross cursor. Typically appears over regions in which a drawing operation can be performance or for selections. + +- **CURSOR_CROSS** = **3** --- Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. + - **CURSOR_WAIT** = **4** --- Wait cursor. Indicates that the application is busy performing an operation. + - **CURSOR_BUSY** = **5** --- Busy cursor. See ``CURSOR_WAIT``. + - **CURSOR_DRAG** = **6** --- Drag cursor. Usually displayed when dragging something. + - **CURSOR_CAN_DROP** = **7** --- Can drop cursor. Usually displayed when dragging something to indicate that it can be dropped at the current position. + - **CURSOR_FORBIDDEN** = **8** --- Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled. + - **CURSOR_VSIZE** = **9** --- Vertical resize mouse cursor. A double headed vertical arrow. It tells the user they can resize the window or the panel vertically. + - **CURSOR_HSIZE** = **10** --- Horizontal resize mouse cursor. A double headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. + - **CURSOR_BDIAGSIZE** = **11** --- Window resize mouse cursor. The cursor is a double headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. + - **CURSOR_FDIAGSIZE** = **12** --- Window resize mouse cursor. The cursor is a double headed arrow that goes from the top left to the bottom right, the opposite of ``CURSOR_BDIAGSIZE``. It tells the user they can resize the window or the panel both horizontally and vertically. + - **CURSOR_MOVE** = **13** --- Move cursor. Indicates that something can be moved. + - **CURSOR_VSPLIT** = **14** --- Vertical split mouse cursor. On Windows, it's the same as ``CURSOR_VSIZE``. + - **CURSOR_HSPLIT** = **15** --- Horizontal split mouse cursor. On Windows, it's the same as ``CURSOR_HSIZE``. + - **CURSOR_HELP** = **16** --- Help cursor. Usually a question mark. Description @@ -183,6 +202,8 @@ Note this method returns an empty :ref:`Vector3` when running fro - :ref:`float` **get_action_strength** **(** :ref:`String` action **)** const +Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1. + .. _class_Input_get_connected_joypads: - :ref:`Array` **get_connected_joypads** **(** **)** @@ -211,18 +232,26 @@ Returns the current value of the joypad axis at given index (see ``JOY_*`` const - :ref:`int` **get_joy_axis_index_from_string** **(** :ref:`String` axis **)** +Returns the index of the provided axis name. + .. _class_Input_get_joy_axis_string: - :ref:`String` **get_joy_axis_string** **(** :ref:`int` axis_index **)** +Receives a ``JOY_AXIS_*`` Enum and returns its equivalent name as a string. + .. _class_Input_get_joy_button_index_from_string: - :ref:`int` **get_joy_button_index_from_string** **(** :ref:`String` button **)** +Returns the index of the provided button name. + .. _class_Input_get_joy_button_string: - :ref:`String` **get_joy_button_string** **(** :ref:`int` button_index **)** +Receives a ``JOY_BUTTON_*`` Enum and returns its equivalent name as a string. + .. _class_Input_get_joy_guid: - :ref:`String` **get_joy_guid** **(** :ref:`int` device **)** const diff --git a/classes/class_inputeventmousebutton.rst b/classes/class_inputeventmousebutton.rst index 0f5a35a97..13c04da93 100644 --- a/classes/class_inputeventmousebutton.rst +++ b/classes/class_inputeventmousebutton.rst @@ -64,7 +64,7 @@ Mouse button identifier, one of the BUTTON\_\* or BUTTON_WHEEL\_\* constants in | *Getter* | is_doubleclick() | +----------+------------------------+ -If ``true`` the mouse button's state is a double-click. If ``false`` the mouse button's state is released. +If ``true`` the mouse button's state is a double-click. .. _class_InputEventMouseButton_factor: diff --git a/classes/class_ip.rst b/classes/class_ip.rst index fbbf6ce62..ece441dfe 100644 --- a/classes/class_ip.rst +++ b/classes/class_ip.rst @@ -45,8 +45,11 @@ Enumerations enum **ResolverStatus**: - **RESOLVER_STATUS_NONE** = **0** --- DNS hostname resolver status: No status. + - **RESOLVER_STATUS_WAITING** = **1** --- DNS hostname resolver status: Waiting. + - **RESOLVER_STATUS_DONE** = **2** --- DNS hostname resolver status: Done. + - **RESOLVER_STATUS_ERROR** = **3** --- DNS hostname resolver status: Error. .. _enum_IP_Type: @@ -54,14 +57,18 @@ enum **ResolverStatus**: enum **Type**: - **TYPE_NONE** = **0** --- Address type: None. + - **TYPE_IPV4** = **1** --- Address type: Internet protocol version 4 (IPv4). + - **TYPE_IPV6** = **2** --- Address type: Internet protocol version 6 (IPv6). + - **TYPE_ANY** = **3** --- Address type: Any. Constants --------- - **RESOLVER_MAX_QUERIES** = **32** --- Maximum number of concurrent DNS resolver queries allowed, ``RESOLVER_INVALID_ID`` is returned if exceeded. + - **RESOLVER_INVALID_ID** = **-1** --- Invalid ID constant. Returned if ``RESOLVER_MAX_QUERIES`` is exceeded. Description diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 11d540085..515731e8c 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -176,12 +176,16 @@ The click position is also provided to allow appropriate popup of context menus at the correct location. +:ref:`allow_rmb_select` must be enabled. + .. _class_ItemList_item_selected: - **item_selected** **(** :ref:`int` index **)** Fired when specified item has been selected. +:ref:`allow_reselect` must be enabled to reselect an item. + .. _class_ItemList_multi_selected: - **multi_selected** **(** :ref:`int` index, :ref:`bool` selected **)** @@ -204,6 +208,7 @@ Enumerations enum **IconMode**: - **ICON_MODE_TOP** = **0** + - **ICON_MODE_LEFT** = **1** .. _enum_ItemList_SelectMode: @@ -211,6 +216,7 @@ enum **IconMode**: enum **SelectMode**: - **SELECT_SINGLE** = **0** + - **SELECT_MULTI** = **1** Description @@ -352,7 +358,7 @@ Adds an item to the item list with no text, only an icon. - void **add_item** **(** :ref:`String` text, :ref:`Texture` icon=null, :ref:`bool` selectable=true **)** -Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon. +Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon. If selectable is true the list item will be selectable. @@ -478,7 +484,7 @@ Remove item at specified index from the list. Select the item at the specified index. -Note: This method does not trigger the item selection signal. +Note: This method does not trigger the item selection signal. .. _class_ItemList_set_item_custom_bg_color: diff --git a/classes/class_kinematicbody.rst b/classes/class_kinematicbody.rst index 450f6c920..856bb1c69 100644 --- a/classes/class_kinematicbody.rst +++ b/classes/class_kinematicbody.rst @@ -158,7 +158,7 @@ Returns ``true`` if the body is on a wall. Only updates when calling :ref:`move_ Moves the body along the vector ``rel_vec``. The body will stop if it collides. Returns a :ref:`KinematicCollision`, which contains information about the collision. -If ``test_only`` is ``true[/true], the body does not move but the would-be collision information is given. +If ``test_only`` is ``true``, the body does not move but the would-be collision information is given. .. _class_KinematicBody_move_and_slide: diff --git a/classes/class_kinematicbody2d.rst b/classes/class_kinematicbody2d.rst index 8457b98f5..279bbaa4c 100644 --- a/classes/class_kinematicbody2d.rst +++ b/classes/class_kinematicbody2d.rst @@ -155,7 +155,7 @@ Returns the movement that remained when the body stopped. To get more detailed i Moves the body while keeping it attached to slopes. Similar to :ref:`move_and_slide`. -As long as the ``snap`` 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``snap`` to``(0, 0)`` or by using :ref:`move_and_slide` instead. +As long as the ``snap`` 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 ``snap`` to ``(0, 0)`` or by using :ref:`move_and_slide` instead. .. _class_KinematicBody2D_test_move: diff --git a/classes/class_label.rst b/classes/class_label.rst index 0dab0d2e7..2dd896e10 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -85,8 +85,11 @@ Enumerations enum **Align**: - **ALIGN_LEFT** = **0** --- Align rows to the left (default). + - **ALIGN_CENTER** = **1** --- Align rows centered. + - **ALIGN_RIGHT** = **2** --- Align rows to the right (default). + - **ALIGN_FILL** = **3** --- Expand row whitespaces to fit the width. .. _enum_Label_VAlign: @@ -94,8 +97,11 @@ enum **Align**: enum **VAlign**: - **VALIGN_TOP** = **0** --- Align the whole text to the top. + - **VALIGN_CENTER** = **1** --- Align the whole text to the center. + - **VALIGN_BOTTOM** = **2** --- Align the whole text to the bottom. + - **VALIGN_FILL** = **3** --- Align the whole text by spreading the rows. Description diff --git a/classes/class_largetexture.rst b/classes/class_largetexture.rst index 9e1001e9c..18240f06c 100644 --- a/classes/class_largetexture.rst +++ b/classes/class_largetexture.rst @@ -87,7 +87,7 @@ Sets the offset of the piece with index "idx" to "ofs". - void **set_piece_texture** **(** :ref:`int` idx, :ref:`Texture` texture **)** -Sets the :ref:`Texture` of the piece with index "idx" to "ofs". +Sets the :ref:`Texture` of the piece with index "idx" to "texture". .. _class_LargeTexture_set_size: diff --git a/classes/class_light.rst b/classes/class_light.rst index f21458e3b..78f60fe5b 100644 --- a/classes/class_light.rst +++ b/classes/class_light.rst @@ -57,7 +57,9 @@ Enumerations enum **BakeMode**: - **BAKE_DISABLED** = **0** --- Light is ignored when baking. Note: hiding a light does *not* affect baking. + - **BAKE_INDIRECT** = **1** --- Only indirect lighting will be baked. Default value. + - **BAKE_ALL** = **2** --- Both direct and indirect light will be baked. Note: you should hide the light if you don't want it to appear twice (dynamic and baked). .. _enum_Light_Param: @@ -65,20 +67,35 @@ enum **BakeMode**: enum **Param**: - **PARAM_ENERGY** = **0** + - **PARAM_INDIRECT_ENERGY** = **1** + - **PARAM_SPECULAR** = **2** + - **PARAM_RANGE** = **3** + - **PARAM_ATTENUATION** = **4** + - **PARAM_SPOT_ANGLE** = **5** + - **PARAM_SPOT_ATTENUATION** = **6** + - **PARAM_CONTACT_SHADOW_SIZE** = **7** + - **PARAM_SHADOW_MAX_DISTANCE** = **8** + - **PARAM_SHADOW_SPLIT_1_OFFSET** = **9** + - **PARAM_SHADOW_SPLIT_2_OFFSET** = **10** + - **PARAM_SHADOW_SPLIT_3_OFFSET** = **11** + - **PARAM_SHADOW_NORMAL_BIAS** = **12** + - **PARAM_SHADOW_BIAS** = **13** + - **PARAM_SHADOW_BIAS_SPLIT_SCALE** = **14** + - **PARAM_MAX** = **15** Description diff --git a/classes/class_light2d.rst b/classes/class_light2d.rst index 63baf6b7f..2ea33e988 100644 --- a/classes/class_light2d.rst +++ b/classes/class_light2d.rst @@ -71,8 +71,11 @@ Enumerations enum **Mode**: - **MODE_ADD** = **0** --- Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light. + - **MODE_SUB** = **1** --- Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. + - **MODE_MIX** = **2** --- Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation. + - **MODE_MASK** = **3** --- The light texture of the Light2D is used as a mask, hiding or revealing parts of the screen underneath depending on the value of each pixel of the light (mask) texture. .. _enum_Light2D_ShadowFilter: @@ -80,10 +83,15 @@ enum **Mode**: enum **ShadowFilter**: - **SHADOW_FILTER_NONE** = **0** --- No filter applies to the shadow map. See :ref:`shadow_filter`. + - **SHADOW_FILTER_PCF3** = **1** --- Percentage closer filtering (3 samples) applies to the shadow map. See :ref:`shadow_filter`. + - **SHADOW_FILTER_PCF5** = **2** --- Percentage closer filtering (5 samples) applies to the shadow map. See :ref:`shadow_filter`. + - **SHADOW_FILTER_PCF7** = **3** --- Percentage closer filtering (7 samples) applies to the shadow map. See :ref:`shadow_filter`. + - **SHADOW_FILTER_PCF9** = **4** --- Percentage closer filtering (9 samples) applies to the shadow map. See :ref:`shadow_filter`. + - **SHADOW_FILTER_PCF13** = **5** --- Percentage closer filtering (13 samples) applies to the shadow map. See :ref:`shadow_filter`. Description diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index 0e453f1bf..d85ccd8b7 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -66,7 +66,9 @@ Enumerations enum **LineCapMode**: - **LINE_CAP_NONE** = **0** --- Don't have a line cap. + - **LINE_CAP_BOX** = **1** --- Draws the line cap as a box. + - **LINE_CAP_ROUND** = **2** --- Draws the line cap as a circle. .. _enum_Line2D_LineTextureMode: @@ -74,7 +76,9 @@ enum **LineCapMode**: enum **LineTextureMode**: - **LINE_TEXTURE_NONE** = **0** --- Takes the left pixels of the texture and renders it over the whole line. + - **LINE_TEXTURE_TILE** = **1** --- Tiles the texture over the line. The texture need to be imported with Repeat Enabled for it to work properly. + - **LINE_TEXTURE_STRETCH** = **2** --- Stretches the texture across the line. Import the texture with Repeat Disabled for best results. .. _enum_Line2D_LineJointMode: @@ -82,7 +86,9 @@ enum **LineTextureMode**: enum **LineJointMode**: - **LINE_JOINT_SHARP** = **0** --- The line's joints will be pointy. If ``sharp_limit`` is greater than the rotation of a joint, it becomes a bevel joint instead. + - **LINE_JOINT_BEVEL** = **1** --- The line's joints will be bevelled/chamfered. + - **LINE_JOINT_ROUND** = **2** --- The line's joints will be rounded. Description diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index a0275709b..d935bab24 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -122,8 +122,11 @@ Enumerations enum **Align**: - **ALIGN_LEFT** = **0** --- Aligns the text on the left hand side of the :ref:`LineEdit`. + - **ALIGN_CENTER** = **1** --- Centers the text in the middle of the :ref:`LineEdit`. + - **ALIGN_RIGHT** = **2** --- Aligns the text on the right hand side of the :ref:`LineEdit`. + - **ALIGN_FILL** = **3** --- Stretches whitespaces to fit the :ref:`LineEdit`'s width. .. _enum_LineEdit_MenuItems: @@ -131,12 +134,19 @@ enum **Align**: enum **MenuItems**: - **MENU_CUT** = **0** --- Cuts (Copies and clears) the selected text. + - **MENU_COPY** = **1** --- Copies the selected text. + - **MENU_PASTE** = **2** --- Pastes the clipboard text over the selected text (or at the cursor's position). + - **MENU_CLEAR** = **3** --- Erases the whole Linedit text. + - **MENU_SELECT_ALL** = **4** --- Selects the whole Linedit text. + - **MENU_UNDO** = **5** --- Undoes the previous action. -- **MENU_REDO** = **6** + +- **MENU_REDO** = **6** --- Reverse the last undo action. + - **MENU_MAX** = **7** Description @@ -205,6 +215,8 @@ The cursor's position inside the ``LineEdit``. When set, the text may scroll to | *Getter* | is_clear_button_enabled() | +----------+---------------------------------+ +If ``true`` the ``LineEdit`` will show a clear button if ``text`` is not empty. + .. _class_LineEdit_context_menu_enabled: - :ref:`bool` **context_menu_enabled** diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index 0a4364eba..fcee6bf75 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -50,7 +50,9 @@ Enumerations enum **UnderlineMode**: - **UNDERLINE_MODE_ALWAYS** = **0** --- The LinkButton will always show an underline at the bottom of its text + - **UNDERLINE_MODE_ON_HOVER** = **1** --- The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. + - **UNDERLINE_MODE_NEVER** = **2** --- The LinkButton will never show an underline at the bottom of its text. Description diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst index e7add13c3..abd1dd9cd 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -53,15 +53,25 @@ Constants --------- - **NOTIFICATION_WM_MOUSE_ENTER** = **2** + - **NOTIFICATION_WM_MOUSE_EXIT** = **3** + - **NOTIFICATION_WM_FOCUS_IN** = **4** + - **NOTIFICATION_WM_FOCUS_OUT** = **5** + - **NOTIFICATION_WM_QUIT_REQUEST** = **6** + - **NOTIFICATION_WM_GO_BACK_REQUEST** = **7** + - **NOTIFICATION_WM_UNFOCUS_REQUEST** = **8** + - **NOTIFICATION_OS_MEMORY_WARNING** = **9** + - **NOTIFICATION_TRANSLATION_CHANGED** = **90** + - **NOTIFICATION_WM_ABOUT** = **91** + - **NOTIFICATION_CRASH** = **92** Description diff --git a/classes/class_material.rst b/classes/class_material.rst index 21eb29a7d..d4edf4a76 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -31,6 +31,7 @@ Constants --------- - **RENDER_PRIORITY_MAX** = **127** + - **RENDER_PRIORITY_MIN** = **-128** Description diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index 3e3eb19aa..e27560e53 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -56,6 +56,7 @@ Enumerations enum **BlendShapeMode**: - **BLEND_SHAPE_MODE_NORMALIZED** = **0** + - **BLEND_SHAPE_MODE_RELATIVE** = **1** .. _enum_Mesh_ArrayType: @@ -63,14 +64,23 @@ enum **BlendShapeMode**: enum **ArrayType**: - **ARRAY_VERTEX** = **0** --- Array of vertices. + - **ARRAY_NORMAL** = **1** --- Array of normals. + - **ARRAY_TANGENT** = **2** --- Array of tangents as an array of floats, 4 floats per tangent. + - **ARRAY_COLOR** = **3** --- Array of colors. + - **ARRAY_TEX_UV** = **4** --- Array of UV coordinates. + - **ARRAY_TEX_UV2** = **5** --- Array of second set of UV coordinates. + - **ARRAY_BONES** = **6** --- Array of bone data. + - **ARRAY_WEIGHTS** = **7** --- Array of weights. + - **ARRAY_INDEX** = **8** --- Array of indices. + - **ARRAY_MAX** = **9** .. _enum_Mesh_ArrayFormat: @@ -78,26 +88,47 @@ enum **ArrayType**: enum **ArrayFormat**: - **ARRAY_FORMAT_VERTEX** = **1** + - **ARRAY_FORMAT_NORMAL** = **2** + - **ARRAY_FORMAT_TANGENT** = **4** + - **ARRAY_FORMAT_COLOR** = **8** + - **ARRAY_FORMAT_TEX_UV** = **16** + - **ARRAY_FORMAT_TEX_UV2** = **32** + - **ARRAY_FORMAT_BONES** = **64** + - **ARRAY_FORMAT_WEIGHTS** = **128** + - **ARRAY_FORMAT_INDEX** = **256** + - **ARRAY_COMPRESS_BASE** = **9** + - **ARRAY_COMPRESS_VERTEX** = **512** + - **ARRAY_COMPRESS_NORMAL** = **1024** + - **ARRAY_COMPRESS_TANGENT** = **2048** + - **ARRAY_COMPRESS_COLOR** = **4096** + - **ARRAY_COMPRESS_TEX_UV** = **8192** + - **ARRAY_COMPRESS_TEX_UV2** = **16384** + - **ARRAY_COMPRESS_BONES** = **32768** + - **ARRAY_COMPRESS_WEIGHTS** = **65536** + - **ARRAY_COMPRESS_INDEX** = **131072** + - **ARRAY_FLAG_USE_2D_VERTICES** = **262144** + - **ARRAY_FLAG_USE_16_BIT_BONES** = **524288** + - **ARRAY_COMPRESS_DEFAULT** = **97280** .. _enum_Mesh_PrimitiveType: @@ -105,11 +136,17 @@ enum **ArrayFormat**: enum **PrimitiveType**: - **PRIMITIVE_POINTS** = **0** --- Render array as points (one vertex equals one point). + - **PRIMITIVE_LINES** = **1** --- Render array as lines (every two vertices a line is created). + - **PRIMITIVE_LINE_STRIP** = **2** --- Render array as line strip. + - **PRIMITIVE_LINE_LOOP** = **3** --- Render array as line loop (like line strip, but closed). + - **PRIMITIVE_TRIANGLES** = **4** --- Render array as triangles (every three vertices a triangle is created). + - **PRIMITIVE_TRIANGLE_STRIP** = **5** --- Render array as triangle strips. + - **PRIMITIVE_TRIANGLE_FAN** = **6** --- Render array as triangle fans. Description diff --git a/classes/class_meshdatatool.rst b/classes/class_meshdatatool.rst index c617e8981..28e441415 100644 --- a/classes/class_meshdatatool.rst +++ b/classes/class_meshdatatool.rst @@ -14,7 +14,7 @@ MeshDataTool Brief Description ----------------- - +Helper tool to access and edit :ref:`Mesh` data. Methods ------- @@ -97,6 +97,26 @@ Methods | void | :ref:`set_vertex_weights` **(** :ref:`int` idx, :ref:`PoolRealArray` weights **)** | +--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +The MeshDataTool provides access to individual vertices in a :ref:`Mesh`. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. + +To use the MeshDataTool, load a mesh with :ref:`create_from_surface`. When you are finished editing the data commit the data to a mesh with :ref:`commit_to_surface`. + +Below is an example of how the MeshDataTool may be used. + +:: + + var mdt = MeshDataTool.new() + mdt.create_from_surface(mesh, 0) + for i in range(mdt.get_vertex_count()): + var vertex = mdt.get_vertex(i) + ... + mdt.set_vertex(i, vertex) + mesh.surface_remove(0) + mdt.commit_to_surface(mesh) + Method Descriptions ------------------- @@ -104,151 +124,237 @@ Method Descriptions - void **clear** **(** **)** +Clears all data currently in MeshDataTool. + .. _class_MeshDataTool_commit_to_surface: - :ref:`Error` **commit_to_surface** **(** :ref:`ArrayMesh` mesh **)** +Adds a new surface to specified :ref:`Mesh` with edited data. + .. _class_MeshDataTool_create_from_surface: - :ref:`Error` **create_from_surface** **(** :ref:`ArrayMesh` mesh, :ref:`int` surface **)** +Uses specified surface of given :ref:`Mesh` to populate data for MeshDataTool. + +Requires :ref:`Mesh` with primitive type ``PRIMITIVE_TRIANGLES``. + .. _class_MeshDataTool_get_edge_count: - :ref:`int` **get_edge_count** **(** **)** const +Returns the number of edges in this :ref:`Mesh`. + .. _class_MeshDataTool_get_edge_faces: - :ref:`PoolIntArray` **get_edge_faces** **(** :ref:`int` idx **)** const +Returns array of faces that touch given edge. + .. _class_MeshDataTool_get_edge_meta: - :ref:`Variant` **get_edge_meta** **(** :ref:`int` idx **)** const +Returns meta information assigned to given edge. + .. _class_MeshDataTool_get_edge_vertex: - :ref:`int` **get_edge_vertex** **(** :ref:`int` idx, :ref:`int` vertex **)** const +Returns index of specified vertex connected to given edge. + +Vertex argument can only be 0 or 1 because edges are comprised of two vertices. + .. _class_MeshDataTool_get_face_count: - :ref:`int` **get_face_count** **(** **)** const +Returns the number of faces in this :ref:`Mesh`. + .. _class_MeshDataTool_get_face_edge: - :ref:`int` **get_face_edge** **(** :ref:`int` idx, :ref:`int` edge **)** const +Returns specified edge associated with given face. + +Edge argument must 2 or less becuase a face only has three edges. + .. _class_MeshDataTool_get_face_meta: - :ref:`Variant` **get_face_meta** **(** :ref:`int` idx **)** const +Returns meta data associated with given face. + .. _class_MeshDataTool_get_face_normal: - :ref:`Vector3` **get_face_normal** **(** :ref:`int` idx **)** const +Calculates and returns face normal of given face. + .. _class_MeshDataTool_get_face_vertex: - :ref:`int` **get_face_vertex** **(** :ref:`int` idx, :ref:`int` vertex **)** const +Returns specified vertex of given face. + +Vertex argument must be 2 or less becuase faces contain three vertices. + .. _class_MeshDataTool_get_format: - :ref:`int` **get_format** **(** **)** const +Returns format of :ref:`Mesh`. Format is an integer made up of :ref:`Mesh` format flags combined together. For example, a mesh containing both vertices and normals would return a format of ``3`` becuase ``ARRAY_FORMAT_VERTEX`` is ``1`` and ``ARRAY_FORMAT_NORMAL`` is ``2``. + +For list of format flags see :ref:`ArrayMesh`. + .. _class_MeshDataTool_get_material: - :ref:`Material` **get_material** **(** **)** const +Returns material assigned to the :ref:`Mesh`. + .. _class_MeshDataTool_get_vertex: - :ref:`Vector3` **get_vertex** **(** :ref:`int` idx **)** const +Returns the vertex at given index. + .. _class_MeshDataTool_get_vertex_bones: - :ref:`PoolIntArray` **get_vertex_bones** **(** :ref:`int` idx **)** const +Returns the bones of the given vertex. + .. _class_MeshDataTool_get_vertex_color: - :ref:`Color` **get_vertex_color** **(** :ref:`int` idx **)** const +Returns the color of the given vertex. + .. _class_MeshDataTool_get_vertex_count: - :ref:`int` **get_vertex_count** **(** **)** const +Returns the total number of vertices in :ref:`Mesh`. + .. _class_MeshDataTool_get_vertex_edges: - :ref:`PoolIntArray` **get_vertex_edges** **(** :ref:`int` idx **)** const +Returns array of edges that share given vertex. + .. _class_MeshDataTool_get_vertex_faces: - :ref:`PoolIntArray` **get_vertex_faces** **(** :ref:`int` idx **)** const +Returns array of faces that share given vertex. + .. _class_MeshDataTool_get_vertex_meta: - :ref:`Variant` **get_vertex_meta** **(** :ref:`int` idx **)** const +Returns meta data associated with given vertex. + .. _class_MeshDataTool_get_vertex_normal: - :ref:`Vector3` **get_vertex_normal** **(** :ref:`int` idx **)** const +Returns normal of given vertex. + .. _class_MeshDataTool_get_vertex_tangent: - :ref:`Plane` **get_vertex_tangent** **(** :ref:`int` idx **)** const +Returns tangent of given vertex. + .. _class_MeshDataTool_get_vertex_uv: - :ref:`Vector2` **get_vertex_uv** **(** :ref:`int` idx **)** const +Returns UV of given vertex. + .. _class_MeshDataTool_get_vertex_uv2: - :ref:`Vector2` **get_vertex_uv2** **(** :ref:`int` idx **)** const +Returns UV2 of given vertex. + .. _class_MeshDataTool_get_vertex_weights: - :ref:`PoolRealArray` **get_vertex_weights** **(** :ref:`int` idx **)** const +Returns bone weights of given vertex. + .. _class_MeshDataTool_set_edge_meta: - void **set_edge_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** +Sets the meta data of given edge. + .. _class_MeshDataTool_set_face_meta: - void **set_face_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** +Sets the meta data of given face. + .. _class_MeshDataTool_set_material: - void **set_material** **(** :ref:`Material` material **)** +Sets the material to be used by newly constructed :ref:`Mesh`. + .. _class_MeshDataTool_set_vertex: - void **set_vertex** **(** :ref:`int` idx, :ref:`Vector3` vertex **)** +Sets the position of given vertex. + .. _class_MeshDataTool_set_vertex_bones: - void **set_vertex_bones** **(** :ref:`int` idx, :ref:`PoolIntArray` bones **)** +Sets the bones of given vertex. + .. _class_MeshDataTool_set_vertex_color: - void **set_vertex_color** **(** :ref:`int` idx, :ref:`Color` color **)** +Sets the color of given vertex. + .. _class_MeshDataTool_set_vertex_meta: - void **set_vertex_meta** **(** :ref:`int` idx, :ref:`Variant` meta **)** +Sets the meta data associated with given vertex. + .. _class_MeshDataTool_set_vertex_normal: - void **set_vertex_normal** **(** :ref:`int` idx, :ref:`Vector3` normal **)** +Sets the normal of given vertex. + .. _class_MeshDataTool_set_vertex_tangent: - void **set_vertex_tangent** **(** :ref:`int` idx, :ref:`Plane` tangent **)** +Sets the tangent of given vertex. + .. _class_MeshDataTool_set_vertex_uv: - void **set_vertex_uv** **(** :ref:`int` idx, :ref:`Vector2` uv **)** +Sets the UV of given vertex. + .. _class_MeshDataTool_set_vertex_uv2: - void **set_vertex_uv2** **(** :ref:`int` idx, :ref:`Vector2` uv2 **)** +Sets the UV2 of given vertex. + .. _class_MeshDataTool_set_vertex_weights: - void **set_vertex_weights** **(** :ref:`int` idx, :ref:`PoolRealArray` weights **)** +Sets the bone weights of given vertex. + diff --git a/classes/class_meshinstance.rst b/classes/class_meshinstance.rst index e7145a9f2..19a5ef907 100644 --- a/classes/class_meshinstance.rst +++ b/classes/class_meshinstance.rst @@ -39,6 +39,8 @@ Methods +----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Material` | :ref:`get_surface_material` **(** :ref:`int` surface **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_surface_material_count` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_surface_material` **(** :ref:`int` surface, :ref:`Material` material **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -101,6 +103,10 @@ This helper creates a :ref:`StaticBody` child node with a :ref Returns the :ref:`Material` for a surface of the :ref:`Mesh` resource. +.. _class_MeshInstance_get_surface_material_count: + +- :ref:`int` **get_surface_material_count** **(** **)** const + .. _class_MeshInstance_set_surface_material: - void **set_surface_material** **(** :ref:`int` surface, :ref:`Material` material **)** diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index 0bd083421..20b798caa 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -58,6 +58,7 @@ Enumerations enum **TransformFormat**: - **TRANSFORM_2D** = **0** + - **TRANSFORM_3D** = **1** .. _enum_MultiMesh_ColorFormat: @@ -65,7 +66,9 @@ enum **TransformFormat**: enum **ColorFormat**: - **COLOR_NONE** = **0** + - **COLOR_8BIT** = **1** + - **COLOR_FLOAT** = **2** .. _enum_MultiMesh_CustomDataFormat: @@ -73,7 +76,9 @@ enum **ColorFormat**: enum **CustomDataFormat**: - **CUSTOM_DATA_NONE** = **0** + - **CUSTOM_DATA_8BIT** = **1** + - **CUSTOM_DATA_FLOAT** = **2** Description diff --git a/classes/class_multiplayerapi.rst b/classes/class_multiplayerapi.rst index 87f29b39d..41a3a49f9 100644 --- a/classes/class_multiplayerapi.rst +++ b/classes/class_multiplayerapi.rst @@ -95,13 +95,21 @@ Enumerations enum **RPCMode**: - **RPC_MODE_DISABLED** = **0** --- Used with :ref:`Node.rpc_config` or :ref:`Node.rset_config` to disable a method or property for all RPC calls, making it unavailable. Default for all methods. + - **RPC_MODE_REMOTE** = **1** --- Used with :ref:`Node.rpc_config` or :ref:`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 ``remote`` keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets. + - **RPC_MODE_MASTER** = **2** --- Used with :ref:`Node.rpc_config` or :ref:`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 ``master`` keyword. Only accepts calls or property changes from the node's network puppets, see :ref:`Node.set_network_master`. + - **RPC_MODE_PUPPET** = **3** --- Used with :ref:`Node.rpc_config` or :ref:`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 ``puppet`` keyword. Only accepts calls or property changes from the node's network master, see :ref:`Node.set_network_master`. + - **RPC_MODE_SLAVE** = **3** --- Deprecated. Use ``RPC_MODE_PUPPET`` instead. Analogous to the ``slave`` keyword. + - **RPC_MODE_REMOTESYNC** = **4** --- Behave like ``RPC_MODE_REMOTE`` but also make the call or property change locally. Analogous to the ``remotesync`` keyword. + - **RPC_MODE_SYNC** = **4** --- Deprecated. Use ``RPC_MODE_REMOTESYNC`` instead. Analogous to the ``sync`` keyword. + - **RPC_MODE_MASTERSYNC** = **5** --- Behave like ``RPC_MODE_MASTER`` but also make the call or property change locally. Analogous to the ``mastersync`` keyword. + - **RPC_MODE_PUPPETSYNC** = **6** --- Behave like ``RPC_MODE_PUPPET`` but also make the call or property change locally. Analogous to the ``puppetsync`` keyword. Description diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst index 50e98d54c..dfad99138 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -78,7 +78,9 @@ Constants --------- - **SAMPLE_PARTITION_WATERSHED** = **0** + - **SAMPLE_PARTITION_MONOTONE** = **1** + - **SAMPLE_PARTITION_LAYERS** = **2** Property Descriptions diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst index 86a75939f..308e298c5 100644 --- a/classes/class_navigationpolygon.rst +++ b/classes/class_navigationpolygon.rst @@ -14,7 +14,7 @@ NavigationPolygon Brief Description ----------------- - +A node that has methods to draw outlines or use indices of vertices to create navigation polygons. Methods ------- @@ -49,6 +49,45 @@ Methods | void | :ref:`set_vertices` **(** :ref:`PoolVector2Array` vertices **)** | +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +There are two ways to create polygons. Either by using the :ref:`add_outline` method or using the :ref:`add_polygon` method. + +Using :ref:`add_outline`: + +`` + +var polygon = NavigationPolygon.new() + +var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + +polygon.add_outline(outline) + +polygon.make_polygons_from_outlines() + +$NavigationPolygonInstance.navpoly = polygon + +`` + +Using :ref:`add_polygon` and indices of the vertices array. + +`` + +var polygon = NavigationPolygon.new() + +var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + +polygon.set_vertices(vertices) + +var indices = PoolIntArray(0, 3, 1) + +polygon.add_polygon(indices) + +$NavigationPolygonInstance.navpoly = polygon + +`` + Method Descriptions ------------------- @@ -56,55 +95,83 @@ Method Descriptions - void **add_outline** **(** :ref:`PoolVector2Array` outline **)** +Appends a :ref:`PoolVector2Array` that contains the vertices of an outline to the internal array that contains all the outlines. You have to call :ref:`make_polygons_from_outlines` in order for this array to be converted to polygons that the engine will use. + .. _class_NavigationPolygon_add_outline_at_index: - void **add_outline_at_index** **(** :ref:`PoolVector2Array` outline, :ref:`int` index **)** +Adds a :ref:`PoolVector2Array` that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call :ref:`make_polygons_from_outlines` in order for this array to be converted to polygons that the engine will use. + .. _class_NavigationPolygon_add_polygon: - void **add_polygon** **(** :ref:`PoolIntArray` polygon **)** +Adds a polygon using the indices of the vertices you get when calling :ref:`get_vertices`. + .. _class_NavigationPolygon_clear_outlines: - void **clear_outlines** **(** **)** +Clears the array of the outlines, but it doesn't clear the vertices and the polygons that were created by them. + .. _class_NavigationPolygon_clear_polygons: - void **clear_polygons** **(** **)** +Clears the array of polygons, but it doesn't clear the array of outlines and vertices. + .. _class_NavigationPolygon_get_outline: - :ref:`PoolVector2Array` **get_outline** **(** :ref:`int` idx **)** const +Returns a :ref:`PoolVector2Array` containing the vertices of an outline that was created in the editor or by script. + .. _class_NavigationPolygon_get_outline_count: - :ref:`int` **get_outline_count** **(** **)** const +Returns the number of outlines that were created in the editor or by script. + .. _class_NavigationPolygon_get_polygon: - :ref:`PoolIntArray` **get_polygon** **(** :ref:`int` idx **)** +Returns a :ref:`PoolIntArray` containing the indices of the vertices of a created polygon. + .. _class_NavigationPolygon_get_polygon_count: - :ref:`int` **get_polygon_count** **(** **)** const +Returns the count of all polygons. + .. _class_NavigationPolygon_get_vertices: - :ref:`PoolVector2Array` **get_vertices** **(** **)** const +Returns a :ref:`PoolVector2Array` containing all the vertices being used to create the polygons. + .. _class_NavigationPolygon_make_polygons_from_outlines: - void **make_polygons_from_outlines** **(** **)** +Creates polygons from the outlines added in the editor or by script. + .. _class_NavigationPolygon_remove_outline: - void **remove_outline** **(** :ref:`int` idx **)** +Removes an outline created in the editor or by script. You have to call :ref:`make_polygons_from_outlines` for the polygons to update. + .. _class_NavigationPolygon_set_outline: - void **set_outline** **(** :ref:`int` idx, :ref:`PoolVector2Array` outline **)** +Changes an outline created in the editor or by script. You have to call :ref:`make_polygons_from_outlines` for the polygons to update. + .. _class_NavigationPolygon_set_vertices: - void **set_vertices** **(** :ref:`PoolVector2Array` vertices **)** +Sets the vertices that can be then indexed to create polygons with the :ref:`add_polygon` method. + diff --git a/classes/class_networkedmultiplayerenet.rst b/classes/class_networkedmultiplayerenet.rst index 738dc21c3..cc50a0e05 100644 --- a/classes/class_networkedmultiplayerenet.rst +++ b/classes/class_networkedmultiplayerenet.rst @@ -60,9 +60,13 @@ Enumerations enum **CompressionMode**: - **COMPRESS_NONE** = **0** --- No compression. + - **COMPRESS_RANGE_CODER** = **1** --- ENet's buildin range encoding. + - **COMPRESS_FASTLZ** = **2** --- FastLZ compression. + - **COMPRESS_ZLIB** = **3** --- zlib compression. + - **COMPRESS_ZSTD** = **4** --- ZStandard compression. Description @@ -165,7 +169,7 @@ Returns the channel of the last packet fetched via :ref:`PacketPeer.get_packet` **get_packet_channel** **(** **)** const -Returns the channel of the next packet that will be retrieved via :ref:`PacketPeer.get_packet_peer` +Returns the channel of the next packet that will be retrieved via :ref:`PacketPeer.get_packet` .. _class_NetworkedMultiplayerENet_get_peer_address: diff --git a/classes/class_networkedmultiplayerpeer.rst b/classes/class_networkedmultiplayerpeer.rst index 299b6db64..9e3254815 100644 --- a/classes/class_networkedmultiplayerpeer.rst +++ b/classes/class_networkedmultiplayerpeer.rst @@ -82,22 +82,27 @@ Enumerations enum **TransferMode**: -- **TRANSFER_MODE_UNRELIABLE** = **0** --- Packets are sent via unordered UDP packets. -- **TRANSFER_MODE_UNRELIABLE_ORDERED** = **1** --- Packets are sent via ordered UDP packets. -- **TRANSFER_MODE_RELIABLE** = **2** --- Packets are sent via TCP packets. +- **TRANSFER_MODE_UNRELIABLE** = **0** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than ``TRANSFER_MODE_UNRELIABLE_ORDERED``. Use for non-critical data, and always consider whether the order matters. + +- **TRANSFER_MODE_UNRELIABLE_ORDERED** = **1** --- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than ``TRANSFER_MODE_RELIABLE``. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. + +- **TRANSFER_MODE_RELIABLE** = **2** --- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. .. _enum_NetworkedMultiplayerPeer_ConnectionStatus: enum **ConnectionStatus**: - **CONNECTION_DISCONNECTED** = **0** --- The ongoing connection disconnected. + - **CONNECTION_CONNECTING** = **1** --- A connection attempt is ongoing. + - **CONNECTION_CONNECTED** = **2** --- The connection attempt succeeded. Constants --------- - **TARGET_PEER_BROADCAST** = **0** --- Packets are sent to the server and then redistributed to other peers. + - **TARGET_PEER_SERVER** = **1** --- Packets are sent to the server alone. Description diff --git a/classes/class_ninepatchrect.rst b/classes/class_ninepatchrect.rst index 6183d2ad7..a576b5688 100644 --- a/classes/class_ninepatchrect.rst +++ b/classes/class_ninepatchrect.rst @@ -56,7 +56,9 @@ Enumerations enum **AxisStretchMode**: - **AXIS_STRETCH_MODE_STRETCH** = **0** --- Doesn't do anything at the time of writing. Default value for ``axis_stretch_horizontal`` and ``axis_stretch_vertical``. + - **AXIS_STRETCH_MODE_TILE** = **1** --- Doesn't do anything at the time of writing. + - **AXIS_STRETCH_MODE_TILE_FIT** = **2** --- Doesn't do anything at the time of writing. Description diff --git a/classes/class_node.rst b/classes/class_node.rst index 8ab7d269d..27c403247 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -69,6 +69,8 @@ Methods +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`find_node` **(** :ref:`String` mask, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** const | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`find_parent` **(** :ref:`String` mask **)** const | ++------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_child` **(** :ref:`int` idx **)** const | +------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_child_count` **(** **)** const | @@ -243,7 +245,9 @@ Enumerations enum **PauseMode**: - **PAUSE_MODE_INHERIT** = **0** --- Inherits pause mode from the node's parent. For the root node, it is equivalent to PAUSE_MODE_STOP. Default. + - **PAUSE_MODE_STOP** = **1** --- Stop processing when the :ref:`SceneTree` is paused. + - **PAUSE_MODE_PROCESS** = **2** --- Continue to process regardless of the :ref:`SceneTree` pause state. .. _enum_Node_DuplicateFlags: @@ -251,29 +255,48 @@ enum **PauseMode**: enum **DuplicateFlags**: - **DUPLICATE_SIGNALS** = **1** --- Duplicate the node's signals. + - **DUPLICATE_GROUPS** = **2** --- Duplicate the node's groups. + - **DUPLICATE_SCRIPTS** = **4** --- Duplicate the node's scripts. + - **DUPLICATE_USE_INSTANCING** = **8** --- Duplicate using instancing. Constants --------- - **NOTIFICATION_ENTER_TREE** = **10** --- Notification received when the node enters a :ref:`SceneTree`. + - **NOTIFICATION_EXIT_TREE** = **11** --- Notification received when the node is about to exit a :ref:`SceneTree`. + - **NOTIFICATION_MOVED_IN_PARENT** = **12** --- Notification received when the node is moved in the parent. + - **NOTIFICATION_READY** = **13** --- Notification received when the node is ready. See :ref:`_ready`. + - **NOTIFICATION_PAUSED** = **14** --- Notification received when the node is paused. + - **NOTIFICATION_UNPAUSED** = **15** --- Notification received when the node is unpaused. + - **NOTIFICATION_PHYSICS_PROCESS** = **16** --- Notification received every frame when the physics process flag is set (see :ref:`set_physics_process`). + - **NOTIFICATION_PROCESS** = **17** --- Notification received every frame when the process flag is set (see :ref:`set_process`). + - **NOTIFICATION_PARENTED** = **18** --- Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the Scene Tree. + - **NOTIFICATION_UNPARENTED** = **19** --- Notification received when a node is unparented (parent removed it from the list of children). + - **NOTIFICATION_INSTANCED** = **20** --- Notification received when the node is instanced. + - **NOTIFICATION_DRAG_BEGIN** = **21** --- Notification received when a drag begins. + - **NOTIFICATION_DRAG_END** = **22** --- Notification received when a drag ends. + - **NOTIFICATION_PATH_CHANGED** = **23** --- Notification received when the node's :ref:`NodePath` changed. + - **NOTIFICATION_TRANSLATION_CHANGED** = **24** --- Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like :ref:`Object.tr`. + - **NOTIFICATION_INTERNAL_PROCESS** = **25** --- Notification received every frame when the internal process flag is set (see :ref:`set_process_internal`). + - **NOTIFICATION_INTERNAL_PHYSICS_PROCESS** = **26** --- Notification received every frame when the internal physics process flag is set (see :ref:`set_physics_process_internal`). Description @@ -295,7 +318,7 @@ Nodes can also process input events. When present, the :ref:`_input`. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. -Finally, when a node is freed with :ref:`free` or :ref:`queue_free`, it will also free all its children. +Finally, when a node is freed with :ref:`Object.free` or :ref:`queue_free`, it will also free all its children. **Groups:** Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See :ref:`add_to_group`, :ref:`is_in_group` and :ref:`remove_from_group`. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on :ref:`SceneTree`. @@ -510,6 +533,14 @@ You can fine-tune the behavior using the ``flags``. See DUPLICATE\_\* constants. Finds a descendant of this node whose name matches ``mask`` as in :ref:`String.match` (i.e. case sensitive, but '\*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. +If ``owned`` is ``true``, this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through script, because those scenes don't have an owner. + +.. _class_Node_find_parent: + +- :ref:`Node` **find_parent** **(** :ref:`String` mask **)** const + +Finds the first parent of the current node whose name matches ``mask`` as in :ref:`String.match` (i.e. case sensitive, but '\*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. + .. _class_Node_get_child: - :ref:`Node` **get_child** **(** :ref:`int` idx **)** const diff --git a/classes/class_noisetexture.rst b/classes/class_noisetexture.rst index da373fc70..d3c5e3727 100644 --- a/classes/class_noisetexture.rst +++ b/classes/class_noisetexture.rst @@ -14,34 +14,27 @@ NoiseTexture Brief Description ----------------- -:ref:`SimplexNoise` filled texture. +:ref:`OpenSimplexNoise` filled texture. Properties ---------- -+-----------------------------------------+------------------------------------------------------+ -| :ref:`bool` | :ref:`as_normalmap` | -+-----------------------------------------+------------------------------------------------------+ -| :ref:`SimplexNoise` | :ref:`noise` | -+-----------------------------------------+------------------------------------------------------+ -| :ref:`bool` | :ref:`seamless` | -+-----------------------------------------+------------------------------------------------------+ -| :ref:`Vector2` | :ref:`size` | -+-----------------------------------------+------------------------------------------------------+ - -Methods -------- - -+-------+-------------------------------------------------------------------------------------------+ -| void | :ref:`set_height` **(** :ref:`int` height **)** | -+-------+-------------------------------------------------------------------------------------------+ -| void | :ref:`set_width` **(** :ref:`int` width **)** | -+-------+-------------------------------------------------------------------------------------------+ ++-------------------------------------------------+------------------------------------------------------+ +| :ref:`bool` | :ref:`as_normalmap` | ++-------------------------------------------------+------------------------------------------------------+ +| :ref:`int` | :ref:`height` | ++-------------------------------------------------+------------------------------------------------------+ +| :ref:`OpenSimplexNoise` | :ref:`noise` | ++-------------------------------------------------+------------------------------------------------------+ +| :ref:`bool` | :ref:`seamless` | ++-------------------------------------------------+------------------------------------------------------+ +| :ref:`int` | :ref:`width` | ++-------------------------------------------------+------------------------------------------------------+ Description ----------- -Uses a :ref:`SimplexNoise` to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures. +Uses an :ref:`OpenSimplexNoise` to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures. NoiseTexture can also generate normalmap textures. @@ -60,9 +53,21 @@ Property Descriptions If true, the resulting texture contains a normal map created from the original noise interpreted as a bump map. +.. _class_NoiseTexture_height: + +- :ref:`int` **height** + ++----------+-------------------+ +| *Setter* | set_height(value) | ++----------+-------------------+ +| *Getter* | get_height() | ++----------+-------------------+ + +Height of the generated texture. + .. _class_NoiseTexture_noise: -- :ref:`SimplexNoise` **noise** +- :ref:`OpenSimplexNoise` **noise** +----------+------------------+ | *Setter* | set_noise(value) | @@ -70,7 +75,7 @@ If true, the resulting texture contains a normal map created from the original n | *Getter* | get_noise() | +----------+------------------+ -The :ref:`SimplexNoise` instance used to generate the noise. +The :ref:`OpenSimplexNoise` instance used to generate the noise. .. _class_NoiseTexture_seamless: @@ -84,30 +89,15 @@ The :ref:`SimplexNoise` instance used to generate the noise. Whether the texture can be tiled without visible seams or not. Seamless textures take longer to generate. -.. _class_NoiseTexture_size: +.. _class_NoiseTexture_width: -- :ref:`Vector2` **size** +- :ref:`int` **width** -+----------+-----------------+ -| *Setter* | set_size(value) | -+----------+-----------------+ -| *Getter* | get_size() | -+----------+-----------------+ ++----------+------------------+ +| *Setter* | set_width(value) | ++----------+------------------+ +| *Getter* | get_width() | ++----------+------------------+ -Size of the generated texture. - -Method Descriptions -------------------- - -.. _class_NoiseTexture_set_height: - -- void **set_height** **(** :ref:`int` height **)** - -Set texture height. - -.. _class_NoiseTexture_set_width: - -- void **set_width** **(** :ref:`int` width **)** - -Set texture width. +Width of the generated texture. diff --git a/classes/class_object.rst b/classes/class_object.rst index 513e3e5a5..6e5248415 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -122,14 +122,18 @@ Enumerations enum **ConnectFlags**: - **CONNECT_DEFERRED** = **1** --- Connect a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time. + - **CONNECT_PERSIST** = **2** --- Persisting connections are saved when the object is serialized to file. + - **CONNECT_ONESHOT** = **4** --- One shot connections disconnect themselves after emission. + - **CONNECT_REFERENCE_COUNTED** = **8** Constants --------- - **NOTIFICATION_POSTINITIALIZE** = **0** --- Called right when the object is initialized. Not available in script. + - **NOTIFICATION_PREDELETE** = **1** --- Called before the object is about to be deleted. Description diff --git a/classes/class_occluderpolygon2d.rst b/classes/class_occluderpolygon2d.rst index 7d43d55d2..444a5918e 100644 --- a/classes/class_occluderpolygon2d.rst +++ b/classes/class_occluderpolygon2d.rst @@ -35,7 +35,9 @@ Enumerations enum **CullMode**: - **CULL_DISABLED** = **0** --- Culling mode for the occlusion. Disabled means no culling. See :ref:`cull_mode`. + - **CULL_CLOCKWISE** = **1** --- Culling mode for the occlusion. Sets the culling to be in clockwise direction. See :ref:`cull_mode`. + - **CULL_COUNTER_CLOCKWISE** = **2** --- Culling mode for the occlusion. Sets the culling to be in counter clockwise direction. See :ref:`cull_mode`. Description diff --git a/classes/class_omnilight.rst b/classes/class_omnilight.rst index 27762571e..2100f3074 100644 --- a/classes/class_omnilight.rst +++ b/classes/class_omnilight.rst @@ -37,6 +37,7 @@ Enumerations enum **ShadowDetail**: - **SHADOW_DETAIL_VERTICAL** = **0** + - **SHADOW_DETAIL_HORIZONTAL** = **1** .. _enum_OmniLight_ShadowMode: @@ -44,6 +45,7 @@ enum **ShadowDetail**: enum **ShadowMode**: - **SHADOW_DUAL_PARABOLOID** = **0** + - **SHADOW_CUBE** = **1** Description diff --git a/classes/class_simplexnoise.rst b/classes/class_opensimplexnoise.rst similarity index 59% rename from classes/class_simplexnoise.rst rename to classes/class_opensimplexnoise.rst index 5265ecad7..eebb8d87e 100644 --- a/classes/class_simplexnoise.rst +++ b/classes/class_opensimplexnoise.rst @@ -1,11 +1,11 @@ .. Generated automatically by doc/tools/makerst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the SimplexNoise.xml source instead. +.. DO NOT EDIT THIS FILE, but the OpenSimplexNoise.xml source instead. .. The source is found in doc/classes or modules//doc_classes. -.. _class_SimplexNoise: +.. _class_OpenSimplexNoise: -SimplexNoise -============ +OpenSimplexNoise +================ **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` @@ -19,49 +19,45 @@ Noise generator based on Open Simplex. Properties ---------- -+---------------------------+----------------------------------------------------+ -| :ref:`float` | :ref:`lacunarity` | -+---------------------------+----------------------------------------------------+ -| :ref:`int` | :ref:`octaves` | -+---------------------------+----------------------------------------------------+ -| :ref:`float` | :ref:`period` | -+---------------------------+----------------------------------------------------+ -| :ref:`float` | :ref:`persistence` | -+---------------------------+----------------------------------------------------+ -| :ref:`int` | :ref:`seed` | -+---------------------------+----------------------------------------------------+ ++---------------------------+--------------------------------------------------------+ +| :ref:`float` | :ref:`lacunarity` | ++---------------------------+--------------------------------------------------------+ +| :ref:`int` | :ref:`octaves` | ++---------------------------+--------------------------------------------------------+ +| :ref:`float` | :ref:`period` | ++---------------------------+--------------------------------------------------------+ +| :ref:`float` | :ref:`persistence` | ++---------------------------+--------------------------------------------------------+ +| :ref:`int` | :ref:`seed` | ++---------------------------+--------------------------------------------------------+ Methods ------- -+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_image` **(** :ref:`int` width, :ref:`int` height **)** | -+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_2d` **(** :ref:`float` x, :ref:`float` y **)** | -+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_2dv` **(** :ref:`Vector2` pos **)** | -+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_3d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** | -+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_3dv` **(** :ref:`Vector3` pos **)** | -+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_4d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** | -+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_seamless_image` **(** :ref:`int` size **)** | -+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_image` **(** :ref:`int` width, :ref:`int` height **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_noise_2d` **(** :ref:`float` x, :ref:`float` y **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_noise_2dv` **(** :ref:`Vector2` pos **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_noise_3d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_noise_3dv` **(** :ref:`Vector3` pos **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_noise_4d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_seamless_image` **(** :ref:`int` size **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- -This resource allows you to configure and sample a fractal noise space. - - - -Here is a brief usage example that configures a SimplexNoise and gets samples at various positions and dimensions: +This resource allows you to configure and sample a fractal noise space. Here is a brief usage example that configures an OpenSimplexNoise and gets samples at various positions and dimensions: :: - var noise = SimplexNoise.new() + var noise = OpenSimplexNoise.new() # Configure noise.seed = randi() @@ -78,7 +74,7 @@ Here is a brief usage example that configures a SimplexNoise and gets samples at Property Descriptions --------------------- -.. _class_SimplexNoise_lacunarity: +.. _class_OpenSimplexNoise_lacunarity: - :ref:`float` **lacunarity** @@ -88,9 +84,9 @@ Property Descriptions | *Getter* | get_lacunarity() | +----------+-----------------------+ -Difference in period between :ref:`octaves`. +Difference in period between :ref:`octaves`. -.. _class_SimplexNoise_octaves: +.. _class_OpenSimplexNoise_octaves: - :ref:`int` **octaves** @@ -100,9 +96,9 @@ Difference in period between :ref:`octaves`. | *Getter* | get_octaves() | +----------+--------------------+ -Number of Simplex noise layers that are sampled to get the fractal noise. +Number of OpenSimplex noise layers that are sampled to get the fractal noise. -.. _class_SimplexNoise_period: +.. _class_OpenSimplexNoise_period: - :ref:`float` **period** @@ -112,11 +108,9 @@ Number of Simplex noise layers that are sampled to get the fractal noise. | *Getter* | get_period() | +----------+-------------------+ -Period of the base octave. +Period of the base octave. A lower period results in a higher-frequency noise (more value changes across the same distance). -A lower period results in a higher-frequency noise (more value changes across the same distance). - -.. _class_SimplexNoise_persistence: +.. _class_OpenSimplexNoise_persistence: - :ref:`float` **persistence** @@ -126,11 +120,9 @@ A lower period results in a higher-frequency noise (more value changes across th | *Getter* | get_persistence() | +----------+------------------------+ -Contribution factor of the different octaves. +Contribution factor of the different octaves. A ``persistence`` value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one. -A ``persistence`` value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one. - -.. _class_SimplexNoise_seed: +.. _class_OpenSimplexNoise_seed: - :ref:`int` **seed** @@ -145,47 +137,45 @@ Seed used to generate random values, different seeds will generate different noi Method Descriptions ------------------- -.. _class_SimplexNoise_get_image: +.. _class_OpenSimplexNoise_get_image: - :ref:`Image` **get_image** **(** :ref:`int` width, :ref:`int` height **)** Generate a noise image with the requested ``width`` and ``height``, based on the current noise parameters. -.. _class_SimplexNoise_get_noise_2d: +.. _class_OpenSimplexNoise_get_noise_2d: - :ref:`float` **get_noise_2d** **(** :ref:`float` x, :ref:`float` y **)** Returns the 2D noise value ``[-1,1]`` at the given position. -.. _class_SimplexNoise_get_noise_2dv: +.. _class_OpenSimplexNoise_get_noise_2dv: - :ref:`float` **get_noise_2dv** **(** :ref:`Vector2` pos **)** Returns the 2D noise value ``[-1,1]`` at the given position. -.. _class_SimplexNoise_get_noise_3d: +.. _class_OpenSimplexNoise_get_noise_3d: - :ref:`float` **get_noise_3d** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** Returns the 3D noise value ``[-1,1]`` at the given position. -.. _class_SimplexNoise_get_noise_3dv: +.. _class_OpenSimplexNoise_get_noise_3dv: - :ref:`float` **get_noise_3dv** **(** :ref:`Vector3` pos **)** Returns the 3D noise value ``[-1,1]`` at the given position. -.. _class_SimplexNoise_get_noise_4d: +.. _class_OpenSimplexNoise_get_noise_4d: - :ref:`float` **get_noise_4d** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** Returns the 4D noise value ``[-1,1]`` at the given position. -.. _class_SimplexNoise_get_seamless_image: +.. _class_OpenSimplexNoise_get_seamless_image: - :ref:`Image` **get_seamless_image** **(** :ref:`int` size **)** -Generate a tileable noise image, based on the current noise parameters. - -Generated seamless images are always square (``size`` x ``size``). +Generate a tileable noise image, based on the current noise parameters. Generated seamless images are always square (``size`` x ``size``). diff --git a/classes/class_os.rst b/classes/class_os.rst index 31e4b8285..837dac6ca 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -232,12 +232,19 @@ Enumerations enum **SystemDir**: - **SYSTEM_DIR_DESKTOP** = **0** --- Desktop directory path. + - **SYSTEM_DIR_DCIM** = **1** --- DCIM (Digital Camera Images) directory path. + - **SYSTEM_DIR_DOCUMENTS** = **2** --- Documents directory path. + - **SYSTEM_DIR_DOWNLOADS** = **3** --- Downloads directory path. + - **SYSTEM_DIR_MOVIES** = **4** --- Movies directory path. + - **SYSTEM_DIR_MUSIC** = **5** --- Music directory path. + - **SYSTEM_DIR_PICTURES** = **6** --- Pictures directory path. + - **SYSTEM_DIR_RINGTONES** = **7** --- Ringtones directory path. .. _enum_OS_ScreenOrientation: @@ -245,11 +252,17 @@ enum **SystemDir**: enum **ScreenOrientation**: - **SCREEN_ORIENTATION_LANDSCAPE** = **0** --- Landscape screen orientation. + - **SCREEN_ORIENTATION_PORTRAIT** = **1** --- Portrait screen orientation. + - **SCREEN_ORIENTATION_REVERSE_LANDSCAPE** = **2** --- Reverse landscape screen orientation. + - **SCREEN_ORIENTATION_REVERSE_PORTRAIT** = **3** --- Reverse portrait screen orientation. + - **SCREEN_ORIENTATION_SENSOR_LANDSCAPE** = **4** --- Uses landscape or reverse landscape based on the hardware sensor. + - **SCREEN_ORIENTATION_SENSOR_PORTRAIT** = **5** --- Uses portrait or reverse portrait based on the hardware sensor. + - **SCREEN_ORIENTATION_SENSOR** = **6** --- Uses most suitable orientation based on the hardware sensor. .. _enum_OS_PowerState: @@ -257,9 +270,13 @@ enum **ScreenOrientation**: enum **PowerState**: - **POWERSTATE_UNKNOWN** = **0** --- Unknown powerstate. + - **POWERSTATE_ON_BATTERY** = **1** --- Unplugged, running on battery. + - **POWERSTATE_NO_BATTERY** = **2** --- Plugged in, no battery available. + - **POWERSTATE_CHARGING** = **3** --- Plugged in, battery charging. + - **POWERSTATE_CHARGED** = **4** --- Plugged in, battery fully charged. .. _enum_OS_Weekday: @@ -267,11 +284,17 @@ enum **PowerState**: enum **Weekday**: - **DAY_SUNDAY** = **0** --- Sunday. + - **DAY_MONDAY** = **1** --- Monday. + - **DAY_TUESDAY** = **2** --- Tuesday. + - **DAY_WEDNESDAY** = **3** --- Wednesday. + - **DAY_THURSDAY** = **4** --- Thursday. + - **DAY_FRIDAY** = **5** --- Friday. + - **DAY_SATURDAY** = **6** --- Saturday. .. _enum_OS_Month: @@ -279,16 +302,27 @@ enum **Weekday**: enum **Month**: - **MONTH_JANUARY** = **1** --- January. + - **MONTH_FEBRUARY** = **2** --- February. + - **MONTH_MARCH** = **3** --- March. + - **MONTH_APRIL** = **4** --- April. + - **MONTH_MAY** = **5** --- May. + - **MONTH_JUNE** = **6** --- June. + - **MONTH_JULY** = **7** --- July. + - **MONTH_AUGUST** = **8** --- August. + - **MONTH_SEPTEMBER** = **9** --- September. + - **MONTH_OCTOBER** = **10** --- October. + - **MONTH_NOVEMBER** = **11** --- November. + - **MONTH_DECEMBER** = **12** --- December. Description @@ -544,7 +578,7 @@ At the end of the file is a statistic of all used Resource Types. Execute the file at the given path with the arguments passed as an array of strings. Platform path resolution will take place. The resolved file must exist and be executable. -The arguments are used in the given order and separated by a space, so ``OS.execute('ping', ['-c', '3', 'godotengine.org'])`` will resolve to ``ping -c 3 godotengine.org`` in the system's shell. +The arguments are used in the given order and separated by a space, so ``OS.execute('ping', ['-w', '3', 'godotengine.org'], false)`` will resolve to ``ping -w 3 godotengine.org`` in the system's shell. This method has slightly different behaviour based on whether the ``blocking`` mode is enabled. @@ -949,6 +983,8 @@ Pauses native video playback. Plays native video from the specified path, at the given volume and with audio and subtitle tracks. +Note: This method is only implemented on Android and iOS, and the current Android implementation does not support the ``volume``, ``audio_track`` and ``subtitle_track`` options. + .. _class_OS_native_video_stop: - void **native_video_stop** **(** **)** diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst index 2eb429339..e3c80205f 100644 --- a/classes/class_packedscene.rst +++ b/classes/class_packedscene.rst @@ -44,7 +44,9 @@ Enumerations enum **GenEditState**: - **GEN_EDIT_STATE_DISABLED** = **0** --- If passed to :ref:`instance`, blocks edits to the scene state. + - **GEN_EDIT_STATE_INSTANCE** = **1** --- If passed to :ref:`instance`, provides local scene resources to the local scene. Requires tools compiled. + - **GEN_EDIT_STATE_MAIN** = **2** --- If passed to :ref:`instance`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. Requires tools compiled. Description @@ -54,14 +56,27 @@ A simplified interface to a scene file. Provides access to operations and checks Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see ``owner`` property on :ref:`Node`). Note that the node doesn't need to own itself. -Example of saving a node: +Example of saving a node with different owners: The following example creates 3 objects: ``Node2D`` (``node``), ``RigidBody2D`` (``rigid``) and ``CollisionObject2D`` (``collision``). ``collision`` is a child of ``rigid`` which is a child of ``node``. Only ``rigid`` is owned by ``node`` and ``pack`` will therefore only save those two nodes, but not ``collision``. :: + # create the objects + var node = Node2D.new() + var rigid = RigidBody2D.new() + var collision = CollisionShape2D.new() + + # create the object hierachy + rigid.add_child(collision) + node.add_child(rigid) + + # change owner of rigid, but not of collision + rigid.set_owner(node) + var scene = PackedScene.new() - var result = scene.pack(child) + # only node and rigid are now packed + var result = scene.pack(node) if result == OK: - ResourceSaver.save("res://path/name.scn", scene) // or user://... + ResourceSaver.save("res://path/name.scn", scene) # or user://... Property Descriptions --------------------- @@ -93,7 +108,7 @@ Returns the ``SceneState`` representing the scene file contents. - :ref:`Node` **instance** **(** :ref:`GenEditState` edit_state=0 **)** const -Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers the :ref:`NOTIFICATION_INSTANCED` notification on the root node. +Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers the :ref:`NOTIFICATION_INSTANCED` notification on the root node. .. _class_PackedScene_pack: diff --git a/classes/class_parallaxlayer.rst b/classes/class_parallaxlayer.rst index 74d6ea2cb..594013ded 100644 --- a/classes/class_parallaxlayer.rst +++ b/classes/class_parallaxlayer.rst @@ -34,6 +34,8 @@ A ParallaxLayer must be the child of a :ref:`ParallaxBackground` to set :ref:`flag_align_y`. + - **FLAG_ROTATE_Y** = **1** --- Use with :ref:`set_flag` to set :ref:`flag_rotate_y` + - **FLAG_MAX** = **4** .. _enum_ParticlesMaterial_Parameter: @@ -145,17 +147,29 @@ enum **Flags**: enum **Parameter**: - **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set initial velocity properties. + - **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set angular velocity properties. + - **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set orbital_velocity properties. + - **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set linear acceleration properties. + - **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set radial acceleration properties. + - **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set tangential acceleration properties. + - **PARAM_DAMPING** = **6** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set damping properties. + - **PARAM_ANGLE** = **7** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set angle properties. + - **PARAM_SCALE** = **8** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set scale properties. + - **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set hue_variation properties. + - **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set animation speed properties. + - **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param`, :ref:`set_param_randomness`, and :ref:`set_param_texture` to set animation offset properties. + - **PARAM_MAX** = **12** .. _enum_ParticlesMaterial_EmissionShape: @@ -163,9 +177,13 @@ enum **Parameter**: enum **EmissionShape**: - **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point. + - **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere. + - **EMISSION_SHAPE_BOX** = **2** --- Particles will be emitted in the volume of a box. + - **EMISSION_SHAPE_POINTS** = **3** + - **EMISSION_SHAPE_DIRECTED_POINTS** = **4** Description diff --git a/classes/class_pathfollow.rst b/classes/class_pathfollow.rst index a0146e3ea..efa9abad4 100644 --- a/classes/class_pathfollow.rst +++ b/classes/class_pathfollow.rst @@ -43,8 +43,11 @@ Enumerations enum **RotationMode**: - **ROTATION_NONE** = **0** --- Forbids the PathFollow to rotate. + - **ROTATION_Y** = **1** --- Allows the PathFollow to rotate in the Y axis only. + - **ROTATION_XY** = **2** --- Allows the PathFollow to rotate in both the X, and Y axes. + - **ROTATION_XYZ** = **3** --- Allows the PathFollow to rotate in any axis. Description diff --git a/classes/class_pathfollow2d.rst b/classes/class_pathfollow2d.rst index 54e80ce8e..86dcf01db 100644 --- a/classes/class_pathfollow2d.rst +++ b/classes/class_pathfollow2d.rst @@ -85,6 +85,8 @@ The node's offset along the curve. | *Getter* | get_lookahead() | +----------+----------------------+ +How far to look ahead of the curve to calculate the tangent if the node is rotating. E.g. shorter lookaheads will lead to faster rotations. Default value: ``4``. + .. _class_PathFollow2D_loop: - :ref:`bool` **loop** diff --git a/classes/class_performance.rst b/classes/class_performance.rst index 7a4989899..5cdb82213 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -31,33 +31,61 @@ Enumerations enum **Monitor**: - **TIME_FPS** = **0** --- Frames per second. + - **TIME_PROCESS** = **1** --- Time it took to complete one frame. + - **TIME_PHYSICS_PROCESS** = **2** --- Time it took to complete one physics frame. + - **MEMORY_STATIC** = **3** --- Static memory currently used, in bytes. Not available in release builds. + - **MEMORY_DYNAMIC** = **4** --- Dynamic memory currently used, in bytes. Not available in release builds. + - **MEMORY_STATIC_MAX** = **5** --- Available static memory. Not available in release builds. + - **MEMORY_DYNAMIC_MAX** = **6** --- Available dynamic memory. Not available in release builds. + - **MEMORY_MESSAGE_BUFFER_MAX** = **7** --- Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. + - **OBJECT_COUNT** = **8** --- Number of objects currently instanced (including nodes). + - **OBJECT_RESOURCE_COUNT** = **9** --- Number of resources currently used. + - **OBJECT_NODE_COUNT** = **10** --- Number of nodes currently instanced. This also includes the root node, as well as any nodes not in the scene tree. + - **RENDER_OBJECTS_IN_FRAME** = **11** --- 3D objects drawn per frame. + - **RENDER_VERTICES_IN_FRAME** = **12** --- Vertices drawn per frame. 3D only. + - **RENDER_MATERIAL_CHANGES_IN_FRAME** = **13** --- Material changes per frame. 3D only + - **RENDER_SHADER_CHANGES_IN_FRAME** = **14** --- Shader changes per frame. 3D only. + - **RENDER_SURFACE_CHANGES_IN_FRAME** = **15** --- Render surface changes per frame. 3D only. + - **RENDER_DRAW_CALLS_IN_FRAME** = **16** --- Draw calls per frame. 3D only. + - **RENDER_VIDEO_MEM_USED** = **17** --- Video memory used. Includes both texture and vertex memory. + - **RENDER_TEXTURE_MEM_USED** = **18** --- Texture memory used. + - **RENDER_VERTEX_MEM_USED** = **19** --- Vertex memory used. + - **RENDER_USAGE_VIDEO_MEM_TOTAL** = **20** + - **PHYSICS_2D_ACTIVE_OBJECTS** = **21** --- Number of active :ref:`RigidBody2D` nodes in the game. + - **PHYSICS_2D_COLLISION_PAIRS** = **22** --- Number of collision pairs in the 2D physics engine. + - **PHYSICS_2D_ISLAND_COUNT** = **23** --- Number of islands in the 2D physics engine. + - **PHYSICS_3D_ACTIVE_OBJECTS** = **24** --- Number of active :ref:`RigidBody` and :ref:`VehicleBody` nodes in the game. + - **PHYSICS_3D_COLLISION_PAIRS** = **25** --- Number of collision pairs in the 3D physics engine. + - **PHYSICS_3D_ISLAND_COUNT** = **26** --- Number of islands in the 3D physics engine. + - **AUDIO_OUTPUT_LATENCY** = **27** + - **MONITOR_MAX** = **28** Description diff --git a/classes/class_physicalbone.rst b/classes/class_physicalbone.rst index 2b8f0359a..77a5bc64d 100644 --- a/classes/class_physicalbone.rst +++ b/classes/class_physicalbone.rst @@ -58,10 +58,15 @@ Enumerations enum **JointType**: - **JOINT_TYPE_NONE** = **0** + - **JOINT_TYPE_PIN** = **1** + - **JOINT_TYPE_CONE** = **2** + - **JOINT_TYPE_HINGE** = **3** + - **JOINT_TYPE_SLIDER** = **4** + - **JOINT_TYPE_6DOF** = **5** Property Descriptions diff --git a/classes/class_physics2ddirectspacestate.rst b/classes/class_physics2ddirectspacestate.rst index d4a5eebcf..c6b058072 100644 --- a/classes/class_physics2ddirectspacestate.rst +++ b/classes/class_physics2ddirectspacestate.rst @@ -140,5 +140,5 @@ Checks the intersections of a shape, given through a :ref:`Physics2DShapeQueryPa ``shape``: The shape index of the colliding shape. -The number of intersections can be limited with the second parameter, to reduce the processing time. +The number of intersections can be limited with the ``max_results`` parameter, to reduce the processing time. diff --git a/classes/class_physics2dserver.rst b/classes/class_physics2dserver.rst index 0b128be9f..483a58065 100644 --- a/classes/class_physics2dserver.rst +++ b/classes/class_physics2dserver.rst @@ -227,7 +227,9 @@ Enumerations enum **CCDMode**: - **CCD_MODE_DISABLED** = **0** --- Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. + - **CCD_MODE_CAST_RAY** = **1** --- Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. + - **CCD_MODE_CAST_SHAPE** = **2** --- Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. .. _enum_Physics2DServer_BodyState: @@ -235,9 +237,13 @@ enum **CCDMode**: enum **BodyState**: - **BODY_STATE_TRANSFORM** = **0** --- Constant to set/get the current transform matrix of the body. + - **BODY_STATE_LINEAR_VELOCITY** = **1** --- Constant to set/get the current linear velocity of the body. + - **BODY_STATE_ANGULAR_VELOCITY** = **2** --- Constant to set/get the current angular velocity of the body. + - **BODY_STATE_SLEEPING** = **3** --- Constant to sleep/wake up a body, or to get whether it is sleeping. + - **BODY_STATE_CAN_SLEEP** = **4** --- Constant to set/get whether the body can sleep. .. _enum_Physics2DServer_ProcessInfo: @@ -245,7 +251,9 @@ enum **BodyState**: enum **ProcessInfo**: - **INFO_ACTIVE_OBJECTS** = **0** --- Constant to get the number of objects that are not sleeping. + - **INFO_COLLISION_PAIRS** = **1** --- Constant to get the number of possible collisions. + - **INFO_ISLAND_COUNT** = **2** --- Constant to get the number of space regions where a collision could occur. .. _enum_Physics2DServer_JointParam: @@ -253,7 +261,9 @@ enum **ProcessInfo**: enum **JointParam**: - **JOINT_PARAM_BIAS** = **0** + - **JOINT_PARAM_MAX_BIAS** = **1** + - **JOINT_PARAM_MAX_FORCE** = **2** .. _enum_Physics2DServer_ShapeType: @@ -261,13 +271,21 @@ enum **JointParam**: enum **ShapeType**: - **SHAPE_LINE** = **0** --- This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks. + - **SHAPE_RAY** = **1** + - **SHAPE_SEGMENT** = **2** --- This is the constant for creating segment shapes. A segment shape is a line from a point A to a point B. It can be checked for intersections. + - **SHAPE_CIRCLE** = **3** --- This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. + - **SHAPE_RECTANGLE** = **4** --- This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. + - **SHAPE_CAPSULE** = **5** --- This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. + - **SHAPE_CONVEX_POLYGON** = **6** --- This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the method :ref:`CollisionPolygon2D.set_polygon`, polygons modified with :ref:`shape_set_data` do not verify that the points supplied form is a convex polygon. + - **SHAPE_CONCAVE_POLYGON** = **7** --- This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. + - **SHAPE_CUSTOM** = **8** --- This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. .. _enum_Physics2DServer_AreaParameter: @@ -275,12 +293,19 @@ enum **ShapeType**: enum **AreaParameter**: - **AREA_PARAM_GRAVITY** = **0** --- Constant to set/get gravity strength in an area. + - **AREA_PARAM_GRAVITY_VECTOR** = **1** --- Constant to set/get gravity vector/center in an area. + - **AREA_PARAM_GRAVITY_IS_POINT** = **2** --- Constant to set/get whether the gravity vector of an area is a direction, or a center point. + - **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = **3** --- Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. + - **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = **4** --- This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. + - **AREA_PARAM_LINEAR_DAMP** = **5** --- Constant to set/get the linear dampening factor of an area. + - **AREA_PARAM_ANGULAR_DAMP** = **6** --- Constant to set/get the angular dampening factor of an area. + - **AREA_PARAM_PRIORITY** = **7** --- Constant to set/get the priority (order of processing) of an area. .. _enum_Physics2DServer_AreaBodyStatus: @@ -288,6 +313,7 @@ enum **AreaParameter**: enum **AreaBodyStatus**: - **AREA_BODY_ADDED** = **0** --- The value of the first parameter and area callback function receives, when an object enters one of its shapes. + - **AREA_BODY_REMOVED** = **1** --- The value of the first parameter and area callback function receives, when an object exits one of its shapes. .. _enum_Physics2DServer_BodyParameter: @@ -295,12 +321,19 @@ enum **AreaBodyStatus**: enum **BodyParameter**: - **BODY_PARAM_BOUNCE** = **0** --- Constant to set/get a body's bounce factor. + - **BODY_PARAM_FRICTION** = **1** --- Constant to set/get a body's friction. + - **BODY_PARAM_MASS** = **2** --- Constant to set/get a body's mass. + - **BODY_PARAM_INERTIA** = **3** --- Constant to set/get a body's inertia. + - **BODY_PARAM_GRAVITY_SCALE** = **4** --- Constant to set/get a body's gravity multiplier. + - **BODY_PARAM_LINEAR_DAMP** = **5** --- Constant to set/get a body's linear dampening factor. + - **BODY_PARAM_ANGULAR_DAMP** = **6** --- Constant to set/get a body's angular dampening factor. + - **BODY_PARAM_MAX** = **7** --- This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. .. _enum_Physics2DServer_BodyMode: @@ -308,8 +341,11 @@ enum **BodyParameter**: enum **BodyMode**: - **BODY_MODE_STATIC** = **0** --- Constant for static bodies. + - **BODY_MODE_KINEMATIC** = **1** --- Constant for kinematic bodies. + - **BODY_MODE_RIGID** = **2** --- Constant for rigid bodies. + - **BODY_MODE_CHARACTER** = **3** --- Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. .. _enum_Physics2DServer_DampedStringParam: @@ -317,7 +353,9 @@ enum **BodyMode**: enum **DampedStringParam**: - **DAMPED_STRING_REST_LENGTH** = **0** --- Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. + - **DAMPED_STRING_STIFFNESS** = **1** --- Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. + - **DAMPED_STRING_DAMPING** = **2** --- Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). .. _enum_Physics2DServer_SpaceParameter: @@ -325,11 +363,17 @@ enum **DampedStringParam**: enum **SpaceParameter**: - **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = **0** --- Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. + - **SPACE_PARAM_CONTACT_MAX_SEPARATION** = **1** --- Constant to set/get the maximum distance a shape can be from another before they are considered separated. + - **SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION** = **2** --- Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. + - **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = **3** --- Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + - **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = **4** --- Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + - **SPACE_PARAM_BODY_TIME_TO_SLEEP** = **5** --- Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. + - **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = **6** --- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. .. _enum_Physics2DServer_AreaSpaceOverrideMode: @@ -337,9 +381,13 @@ enum **SpaceParameter**: enum **AreaSpaceOverrideMode**: - **AREA_SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. + - **AREA_SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + - **AREA_SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + - **AREA_SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + - **AREA_SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. .. _enum_Physics2DServer_JointType: @@ -347,7 +395,9 @@ enum **AreaSpaceOverrideMode**: enum **JointType**: - **JOINT_PIN** = **0** --- Constant to create pin joints. + - **JOINT_GROOVE** = **1** --- Constant to create groove joints. + - **JOINT_DAMPED_SPRING** = **2** --- Constant to create damped spring joints. Description diff --git a/classes/class_physicsdirectspacestate.rst b/classes/class_physicsdirectspacestate.rst index 115900f45..38556f0e5 100644 --- a/classes/class_physicsdirectspacestate.rst +++ b/classes/class_physicsdirectspacestate.rst @@ -50,7 +50,7 @@ Method Descriptions Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of ``motion``. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be 1, 1. -If the shape can not move, the array will be empty. +If the shape can not move, the returned array will be 0, 0. .. _class_PhysicsDirectSpaceState_collide_shape: @@ -62,7 +62,7 @@ Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryPara - :ref:`Dictionary` **get_rest_info** **(** :ref:`PhysicsShapeQueryParameters` shape **)** -Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters` object, against the space. If it collides with more than a shape, the nearest one is selected. The returned object is a dictionary containing the following fields: +Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters` object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields: ``collider_id``: The colliding object's ID. @@ -114,5 +114,5 @@ Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryPara ``shape``: The shape index of the colliding shape. -The number of intersections can be limited with the second parameter, to reduce the processing time. +The number of intersections can be limited with the ``max_results`` parameter, to reduce the processing time. diff --git a/classes/class_physicsserver.rst b/classes/class_physicsserver.rst index e04c5921b..ba19824b4 100644 --- a/classes/class_physicsserver.rst +++ b/classes/class_physicsserver.rst @@ -253,9 +253,13 @@ Enumerations enum **BodyState**: - **BODY_STATE_TRANSFORM** = **0** --- Constant to set/get the current transform matrix of the body. + - **BODY_STATE_LINEAR_VELOCITY** = **1** --- Constant to set/get the current linear velocity of the body. + - **BODY_STATE_ANGULAR_VELOCITY** = **2** --- Constant to set/get the current angular velocity of the body. + - **BODY_STATE_SLEEPING** = **3** --- Constant to sleep/wake up a body, or to get whether it is sleeping. + - **BODY_STATE_CAN_SLEEP** = **4** --- Constant to set/get whether the body can sleep. .. _enum_PhysicsServer_G6DOFJointAxisParam: @@ -263,20 +267,35 @@ enum **BodyState**: enum **G6DOFJointAxisParam**: - **G6DOF_JOINT_LINEAR_LOWER_LIMIT** = **0** --- The minimum difference between the pivot points' axes. + - **G6DOF_JOINT_LINEAR_UPPER_LIMIT** = **1** --- The maximum difference between the pivot points' axes. + - **G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor that gets applied to the movement across the axes. The lower, the slower the movement. + - **G6DOF_JOINT_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. + - **G6DOF_JOINT_LINEAR_DAMPING** = **4** --- The amount of damping that happens at the linear motion across the axes. + - **G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY** = **5** --- The velocity that the joint's linear motor will attempt to reach. + - **G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT** = **6** --- The maximum force that the linear motor can apply while trying to reach the target velocity. + - **G6DOF_JOINT_ANGULAR_LOWER_LIMIT** = **7** --- The minimum rotation in negative direction to break loose and rotate around the axes. + - **G6DOF_JOINT_ANGULAR_UPPER_LIMIT** = **8** --- The minimum rotation in positive direction to break loose and rotate around the axes. + - **G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS** = **9** --- A factor that gets multiplied onto all rotations across the axes. + - **G6DOF_JOINT_ANGULAR_DAMPING** = **10** --- The amount of rotational damping across the axes. The lower, the more dampening occurs. + - **G6DOF_JOINT_ANGULAR_RESTITUTION** = **11** --- The amount of rotational restitution across the axes. The lower, the more restitution occurs. + - **G6DOF_JOINT_ANGULAR_FORCE_LIMIT** = **12** --- The maximum amount of force that can occur, when rotating around the axes. + - **G6DOF_JOINT_ANGULAR_ERP** = **13** --- When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + - **G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY** = **14** --- Target speed for the motor at the axes. + - **G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT** = **15** --- Maximum acceleration for the motor at the axes. .. _enum_PhysicsServer_ProcessInfo: @@ -284,7 +303,9 @@ enum **G6DOFJointAxisParam**: enum **ProcessInfo**: - **INFO_ACTIVE_OBJECTS** = **0** --- Constant to get the number of objects that are not sleeping. + - **INFO_COLLISION_PAIRS** = **1** --- Constant to get the number of possible collisions. + - **INFO_ISLAND_COUNT** = **2** --- Constant to get the number of space regions where a collision could occur. .. _enum_PhysicsServer_ShapeType: @@ -292,14 +313,23 @@ enum **ProcessInfo**: enum **ShapeType**: - **SHAPE_PLANE** = **0** --- The :ref:`Shape` is a :ref:`PlaneShape`. + - **SHAPE_RAY** = **1** --- The :ref:`Shape` is a :ref:`RayShape`. + - **SHAPE_SPHERE** = **2** --- The :ref:`Shape` is a :ref:`SphereShape`. + - **SHAPE_BOX** = **3** --- The :ref:`Shape` is a :ref:`BoxShape`. + - **SHAPE_CAPSULE** = **4** --- The :ref:`Shape` is a :ref:`CapsuleShape`. + - **SHAPE_CYLINDER** = **5** --- The :ref:`Shape` is a :ref:`CylinderShape`. + - **SHAPE_CONVEX_POLYGON** = **6** --- The :ref:`Shape` is a :ref:`ConvexPolygonShape`. + - **SHAPE_CONCAVE_POLYGON** = **7** --- The :ref:`Shape` is a :ref:`ConcavePolygonShape`. + - **SHAPE_HEIGHTMAP** = **8** --- The :ref:`Shape` is a HeightMapShape. + - **SHAPE_CUSTOM** = **9** --- This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. .. _enum_PhysicsServer_HingeJointFlag: @@ -307,6 +337,7 @@ enum **ShapeType**: enum **HingeJointFlag**: - **HINGE_JOINT_FLAG_USE_LIMIT** = **0** --- If ``true`` the Hinge has a maximum and a minimum rotation. + - **HINGE_JOINT_FLAG_ENABLE_MOTOR** = **1** --- If ``true`` a motor turns the Hinge .. _enum_PhysicsServer_AreaParameter: @@ -314,12 +345,19 @@ enum **HingeJointFlag**: enum **AreaParameter**: - **AREA_PARAM_GRAVITY** = **0** --- Constant to set/get gravity strength in an area. + - **AREA_PARAM_GRAVITY_VECTOR** = **1** --- Constant to set/get gravity vector/center in an area. + - **AREA_PARAM_GRAVITY_IS_POINT** = **2** --- Constant to set/get whether the gravity vector of an area is a direction, or a center point. + - **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = **3** --- Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. + - **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = **4** --- This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. + - **AREA_PARAM_LINEAR_DAMP** = **5** --- Constant to set/get the linear dampening factor of an area. + - **AREA_PARAM_ANGULAR_DAMP** = **6** --- Constant to set/get the angular dampening factor of an area. + - **AREA_PARAM_PRIORITY** = **7** --- Constant to set/get the priority (order of processing) of an area. .. _enum_PhysicsServer_PinJointParam: @@ -329,21 +367,29 @@ enum **PinJointParam**: - **PIN_JOINT_BIAS** = **0** --- The strength with which the pinned objects try to stay in positional relation to each other. The higher, the stronger. + - **PIN_JOINT_DAMPING** = **1** --- The strength with which the pinned objects try to stay in velocity relation to each other. The higher, the stronger. -- **PIN_JOINT_IMPULSE_CLAMP** = **2** --- If above 0, this value is the maximum value for an impulse that this Joint puts on it's ends. + +- **PIN_JOINT_IMPULSE_CLAMP** = **2** --- If above 0, this value is the maximum value for an impulse that this Joint puts on its ends. .. _enum_PhysicsServer_BodyParameter: enum **BodyParameter**: - **BODY_PARAM_BOUNCE** = **0** --- Constant to set/get a body's bounce factor. + - **BODY_PARAM_FRICTION** = **1** --- Constant to set/get a body's friction. + - **BODY_PARAM_MASS** = **2** --- Constant to set/get a body's mass. + - **BODY_PARAM_GRAVITY_SCALE** = **3** --- Constant to set/get a body's gravity multiplier. + - **BODY_PARAM_LINEAR_DAMP** = **4** --- Constant to set/get a body's linear dampening factor. + - **BODY_PARAM_ANGULAR_DAMP** = **5** --- Constant to set/get a body's angular dampening factor. + - **BODY_PARAM_MAX** = **6** --- This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. .. _enum_PhysicsServer_BodyMode: @@ -351,22 +397,31 @@ enum **BodyParameter**: enum **BodyMode**: - **BODY_MODE_STATIC** = **0** --- Constant for static bodies. + - **BODY_MODE_KINEMATIC** = **1** --- Constant for kinematic bodies. + - **BODY_MODE_RIGID** = **2** --- Constant for rigid bodies. -- **BODY_MODE_SOFT** = **3** -- **BODY_MODE_CHARACTER** = **4** --- Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. + +- **BODY_MODE_CHARACTER** = **3** --- Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. .. _enum_PhysicsServer_SpaceParameter: enum **SpaceParameter**: - **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = **0** --- Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. + - **SPACE_PARAM_CONTACT_MAX_SEPARATION** = **1** --- Constant to set/get the maximum distance a shape can be from another before they are considered separated. + - **SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION** = **2** --- Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. + - **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = **3** --- Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + - **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = **4** --- Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + - **SPACE_PARAM_BODY_TIME_TO_SLEEP** = **5** --- Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. + - **SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO** = **6** + - **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = **7** --- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. .. _enum_PhysicsServer_AreaBodyStatus: @@ -374,6 +429,7 @@ enum **SpaceParameter**: enum **AreaBodyStatus**: - **AREA_BODY_ADDED** = **0** --- The value of the first parameter and area callback function receives, when an object enters one of its shapes. + - **AREA_BODY_REMOVED** = **1** --- The value of the first parameter and area callback function receives, when an object exits one of its shapes. .. _enum_PhysicsServer_BodyAxis: @@ -381,10 +437,15 @@ enum **AreaBodyStatus**: enum **BodyAxis**: - **BODY_AXIS_LINEAR_X** = **1** + - **BODY_AXIS_LINEAR_Y** = **2** + - **BODY_AXIS_LINEAR_Z** = **4** + - **BODY_AXIS_ANGULAR_X** = **8** + - **BODY_AXIS_ANGULAR_Y** = **16** + - **BODY_AXIS_ANGULAR_Z** = **32** .. _enum_PhysicsServer_JointType: @@ -392,9 +453,13 @@ enum **BodyAxis**: enum **JointType**: - **JOINT_PIN** = **0** --- The :ref:`Joint` is a :ref:`PinJoint`. + - **JOINT_HINGE** = **1** --- The :ref:`Joint` is a :ref:`HingeJoint`. + - **JOINT_SLIDER** = **2** --- The :ref:`Joint` is a :ref:`SliderJoint`. + - **JOINT_CONE_TWIST** = **3** --- The :ref:`Joint` is a :ref:`ConeTwistJoint`. + - **JOINT_6DOF** = **4** --- The :ref:`Joint` is a :ref:`Generic6DOFJoint`. .. _enum_PhysicsServer_AreaSpaceOverrideMode: @@ -402,9 +467,13 @@ enum **JointType**: enum **AreaSpaceOverrideMode**: - **AREA_SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. + - **AREA_SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + - **AREA_SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + - **AREA_SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + - **AREA_SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. .. _enum_PhysicsServer_G6DOFJointAxisFlag: @@ -412,8 +481,11 @@ enum **AreaSpaceOverrideMode**: enum **G6DOFJointAxisFlag**: - **G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If ``set`` there is linear motion possible within the given limits. + - **G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If ``set`` there is rotational motion possible. + - **G6DOF_JOINT_FLAG_ENABLE_MOTOR** = **2** --- If ``set`` there is a rotational motor across these axes. + - **G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR** = **3** --- If ``set`` there is a linear motor on this axis that targets a specific velocity. .. _enum_PhysicsServer_SliderJointParam: @@ -421,27 +493,49 @@ enum **G6DOFJointAxisFlag**: enum **SliderJointParam**: - **SLIDER_JOINT_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their x-axis before damping happens. + - **SLIDER_JOINT_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their x-axis before damping happens. + - **SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. + - **SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION** = **3** --- The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. + - **SLIDER_JOINT_LINEAR_LIMIT_DAMPING** = **4** --- The amount of damping once the slider limits are surpassed. + - **SLIDER_JOINT_LINEAR_MOTION_SOFTNESS** = **5** --- A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. + - **SLIDER_JOINT_LINEAR_MOTION_RESTITUTION** = **6** --- The amount of restitution inside the slider limits. + - **SLIDER_JOINT_LINEAR_MOTION_DAMPING** = **7** --- The amount of damping inside the slider limits. + - **SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS** = **8** --- A factor applied to the movement across axes orthogonal to the slider. + - **SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION** = **9** --- The amount of restitution when movement is across axes orthogonal to the slider. + - **SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING** = **10** --- The amount of damping when movement is across axes orthogonal to the slider. + - **SLIDER_JOINT_ANGULAR_LIMIT_UPPER** = **11** --- The upper limit of rotation in the slider. + - **SLIDER_JOINT_ANGULAR_LIMIT_LOWER** = **12** --- The lower limit of rotation in the slider. + - **SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS** = **13** --- A factor applied to the all rotation once the limit is surpassed. + - **SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION** = **14** --- The amount of restitution of the rotation when the limit is surpassed. + - **SLIDER_JOINT_ANGULAR_LIMIT_DAMPING** = **15** --- The amount of damping of the rotation when the limit is surpassed. + - **SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS** = **16** --- A factor that gets applied to the all rotation in the limits. + - **SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION** = **17** --- The amount of restitution of the rotation in the limits. + - **SLIDER_JOINT_ANGULAR_MOTION_DAMPING** = **18** --- The amount of damping of the rotation in the limits. + - **SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** --- A factor that gets applied to the all rotation across axes orthogonal to the slider. + - **SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** --- The amount of restitution of the rotation across axes orthogonal to the slider. + - **SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING** = **21** --- The amount of damping of the rotation across axes orthogonal to the slider. + - **SLIDER_JOINT_MAX** = **22** --- End flag of SLIDER_JOINT\_\* constants, used internally. .. _enum_PhysicsServer_ConeTwistJointParam: @@ -455,13 +549,17 @@ The swing span defines, how much rotation will not get corrected allong the swin Could be defined as looseness in the :ref:`ConeTwistJoint`. If below 0.05, this behaviour is locked. Default value: ``PI/4``. + - **CONE_TWIST_JOINT_TWIST_SPAN** = **1** --- Twist is the rotation around the twist axis, this value defined how far the joint can twist. Twist is locked if below 0.05. + - **CONE_TWIST_JOINT_BIAS** = **2** --- The speed with which the swing or twist will take place. The higher, the faster. + - **CONE_TWIST_JOINT_SOFTNESS** = **3** --- The ease with which the Joint twists, if it's too low, it takes more force to twist the joint. + - **CONE_TWIST_JOINT_RELAXATION** = **4** --- Defines, how fast the swing- and twist-speed-difference on both sides gets synced. .. _enum_PhysicsServer_HingeJointParam: @@ -469,12 +567,19 @@ The higher, the faster. enum **HingeJointParam**: - **HINGE_JOINT_BIAS** = **0** --- The speed with which the two bodies get pulled together when they move in different directions. + - **HINGE_JOINT_LIMIT_UPPER** = **1** --- The maximum rotation across the Hinge. + - **HINGE_JOINT_LIMIT_LOWER** = **2** --- The minimum rotation across the Hinge. + - **HINGE_JOINT_LIMIT_BIAS** = **3** --- The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + - **HINGE_JOINT_LIMIT_SOFTNESS** = **4** + - **HINGE_JOINT_LIMIT_RELAXATION** = **5** --- The lower this value, the more the rotation gets slowed down. + - **HINGE_JOINT_MOTOR_TARGET_VELOCITY** = **6** --- Target speed for the motor. + - **HINGE_JOINT_MOTOR_MAX_IMPULSE** = **7** --- Maximum acceleration for the motor. Description diff --git a/classes/class_pinjoint.rst b/classes/class_pinjoint.rst index b4a10ae3d..534441a02 100644 --- a/classes/class_pinjoint.rst +++ b/classes/class_pinjoint.rst @@ -37,9 +37,11 @@ enum **Param**: - **PARAM_BIAS** = **0** --- The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. + - **PARAM_DAMPING** = **1** --- The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. + - **PARAM_IMPULSE_CLAMP** = **2** --- If above 0, this value is the maximum value for an impulse that this Joint produces. Description diff --git a/classes/class_plane.rst b/classes/class_plane.rst index 6aceeabab..4119660ce 100644 --- a/classes/class_plane.rst +++ b/classes/class_plane.rst @@ -64,7 +64,9 @@ Constants --------- - **PLANE_YZ** = **Plane( 1, 0, 0, 0 )** + - **PLANE_XZ** = **Plane( 0, 1, 0, 0 )** + - **PLANE_XY** = **Plane( 0, 0, 1, 0 )** Description diff --git a/classes/class_poolbytearray.rst b/classes/class_poolbytearray.rst index 5501f6679..66c60f022 100644 --- a/classes/class_poolbytearray.rst +++ b/classes/class_poolbytearray.rst @@ -145,5 +145,5 @@ Return the size of the array. - :ref:`PoolByteArray` **subarray** **(** :ref:`int` from, :ref:`int` to **)** -Returns the slice of the ``PoolByteArray`` between indices (inclusive) as a new ``PoolByteArray``. Any negative index is considered to be from the end of the array. +Returns the slice of the ``PoolByteArray`` between indices (inclusive) as a new ``PoolByteArray``. Any negative index is considered to be from the end of the array. diff --git a/classes/class_popup.rst b/classes/class_popup.rst index 4d5a12dbc..e6a90c5ca 100644 --- a/classes/class_popup.rst +++ b/classes/class_popup.rst @@ -57,6 +57,7 @@ Constants --------- - **NOTIFICATION_POST_POPUP** = **80** --- Notification sent right after the popup is shown. + - **NOTIFICATION_POPUP_HIDE** = **81** --- Notification sent right after the popup is hidden. Description diff --git a/classes/class_proceduralsky.rst b/classes/class_proceduralsky.rst index b026c1f8a..26a6b79e9 100644 --- a/classes/class_proceduralsky.rst +++ b/classes/class_proceduralsky.rst @@ -61,10 +61,15 @@ Enumerations enum **TextureSize**: - **TEXTURE_SIZE_256** = **0** + - **TEXTURE_SIZE_512** = **1** + - **TEXTURE_SIZE_1024** = **2** + - **TEXTURE_SIZE_2048** = **3** + - **TEXTURE_SIZE_4096** = **4** + - **TEXTURE_SIZE_MAX** = **5** Description diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index fdadda576..b62a30991 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -68,6 +68,8 @@ Properties +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`compression/formats/zstd/window_log_size` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`debug/gdscript/completion/autocomplete_setters_and_getters` | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/constant_used_as_function` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/deprecated_keyword` | @@ -184,7 +186,7 @@ Properties +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gui/timers/incremental_search_max_interval_msec` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`gui/timers/text_edit_idle_detect_sec` | +| :ref:`float` | :ref:`gui/timers/text_edit_idle_detect_sec` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`input/ui_accept` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -406,8 +408,6 @@ Properties +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/limits/packet_peer_stream/max_buffer_po2` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`network/remote_fs/max_pages` | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/remote_fs/page_read_ahead` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/remote_fs/page_size` | @@ -440,7 +440,7 @@ Properties +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/limits/rendering/max_renderable_elements` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/limits/time/time_rollover_secs` | +| :ref:`float` | :ref:`rendering/limits/time/time_rollover_secs` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/quality/2d/use_pixel_snap` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -472,6 +472,14 @@ Properties +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/quality/reflections/texture_array_reflections.mobile` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`rendering/quality/shading/force_blinn_over_ggx` | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`rendering/quality/shading/force_blinn_over_ggx.mobile` | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`rendering/quality/shading/force_lambert_over_burley` | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`rendering/quality/shading/force_lambert_over_burley.mobile` | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/quality/shading/force_vertex_shading` | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/quality/shading/force_vertex_shading.mobile` | @@ -600,7 +608,7 @@ Name of the project. It is used from both project manager and by the exporters. - :ref:`bool` **application/config/use_custom_user_dir** -Allow the project to save to it's own custom user dir (in AppData on windows or ~/.config on unixes). This setting only works for desktop exporters. A name must be set in the "custom_user_dir_name" setting for this to take effect. +Allow the project to save to its own custom user dir (in AppData on windows or ~/.config on unixes). This setting only works for desktop exporters. A name must be set in the "custom_user_dir_name" setting for this to take effect. .. _class_ProjectSettings_application/run/disable_stderr: @@ -698,6 +706,10 @@ Enable long distance matching in zstd. - :ref:`int` **compression/formats/zstd/window_log_size** +.. _class_ProjectSettings_debug/gdscript/completion/autocomplete_setters_and_getters: + +- :ref:`bool` **debug/gdscript/completion/autocomplete_setters_and_getters** + .. _class_ProjectSettings_debug/gdscript/warnings/constant_used_as_function: - :ref:`bool` **debug/gdscript/warnings/constant_used_as_function** @@ -984,7 +996,7 @@ Timer setting for incremental search in Tree, IntemList, etc. controls. .. _class_ProjectSettings_gui/timers/text_edit_idle_detect_sec: -- :ref:`int` **gui/timers/text_edit_idle_detect_sec** +- :ref:`float` **gui/timers/text_edit_idle_detect_sec** Timer for detecting idle in the editor. @@ -1446,12 +1458,6 @@ Maximum amount of messages allowed to send as output from the debugger. Over thi Default size of packet peer stream for deserializing godot data. Over this size, data is dropped. -.. _class_ProjectSettings_network/remote_fs/max_pages: - -- :ref:`int` **network/remote_fs/max_pages** - -Maximum amount of pages used for remote filesystem (used by debugging). - .. _class_ProjectSettings_network/remote_fs/page_read_ahead: - :ref:`int` **network/remote_fs/page_read_ahead** @@ -1544,7 +1550,7 @@ Max amount of elements renderable in a frame. If more than this are visible per .. _class_ProjectSettings_rendering/limits/time/time_rollover_secs: -- :ref:`int` **rendering/limits/time/time_rollover_secs** +- :ref:`float` **rendering/limits/time/time_rollover_secs** Shaders have a time variable that constantly increases. At some point it needs to be rolled back to zero to avoid numerical errors on shader animations. This setting specifies when. @@ -1622,17 +1628,33 @@ For reflection probes and panorama backgrounds (sky), use a high amount of sampl - :ref:`bool` **rendering/quality/reflections/texture_array_reflections** -For reflection probes and panorama backgrounds (sky), use a texure array instead of mipmaps. This reduces jitter noise on reflections, but costs more performance and memory. +For reflection probes and panorama backgrounds (sky), use a texture array instead of mipmaps. This reduces jitter noise on reflections, but costs more performance and memory. .. _class_ProjectSettings_rendering/quality/reflections/texture_array_reflections.mobile: - :ref:`bool` **rendering/quality/reflections/texture_array_reflections.mobile** +.. _class_ProjectSettings_rendering/quality/shading/force_blinn_over_ggx: + +- :ref:`bool` **rendering/quality/shading/force_blinn_over_ggx** + +.. _class_ProjectSettings_rendering/quality/shading/force_blinn_over_ggx.mobile: + +- :ref:`bool` **rendering/quality/shading/force_blinn_over_ggx.mobile** + +.. _class_ProjectSettings_rendering/quality/shading/force_lambert_over_burley: + +- :ref:`bool` **rendering/quality/shading/force_lambert_over_burley** + +.. _class_ProjectSettings_rendering/quality/shading/force_lambert_over_burley.mobile: + +- :ref:`bool` **rendering/quality/shading/force_lambert_over_burley.mobile** + .. _class_ProjectSettings_rendering/quality/shading/force_vertex_shading: - :ref:`bool` **rendering/quality/shading/force_vertex_shading** -Force vertex shading for all rendering. This can increase performance a lot, but also reduces quality inmensely. Can work to optimize on very low end mobile. +Force vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can work to optimize on very low end mobile. .. _class_ProjectSettings_rendering/quality/shading/force_vertex_shading.mobile: @@ -1804,6 +1826,10 @@ Return true if a configuration value is present. - :ref:`bool` **load_resource_pack** **(** :ref:`String` pack **)** +Loads the contents of the .pck or .zip file specified by ``pack`` into the resource filesystem (res://). Returns true on success. + +Note: If a file from ``pack`` shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from ``pack``. + .. _class_ProjectSettings_localize_path: - :ref:`String` **localize_path** **(** :ref:`String` path **)** const @@ -1814,18 +1840,26 @@ Convert a path to a localized path (res:// path). - :ref:`bool` **property_can_revert** **(** :ref:`String` name **)** +Returns true if the specified property exists and its initial value differs from the current value. + .. _class_ProjectSettings_property_get_revert: - :ref:`Variant` **property_get_revert** **(** :ref:`String` name **)** +Returns the initial value of the specified property. Returns null if the property does not exist. + .. _class_ProjectSettings_save: - :ref:`Error` **save** **(** **)** +Saves the configuration to the project.godot file. + .. _class_ProjectSettings_save_custom: - :ref:`Error` **save_custom** **(** :ref:`String` file **)** +Saves the configuration to a custom file. + .. _class_ProjectSettings_set_initial_value: - void **set_initial_value** **(** :ref:`String` name, :ref:`Variant` value **)** diff --git a/classes/class_proximitygroup.rst b/classes/class_proximitygroup.rst index 527600c32..ed4758b23 100644 --- a/classes/class_proximitygroup.rst +++ b/classes/class_proximitygroup.rst @@ -49,6 +49,7 @@ Enumerations enum **DispatchMode**: - **MODE_PROXY** = **0** + - **MODE_SIGNAL** = **1** Description diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index c697334c1..7374db2e3 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -177,7 +177,7 @@ Removes all collision exceptions for this ray. - void **force_raycast_update** **(** **)** -Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the ray or its parent has changed state. Note: ``enabled == true`` is not required for this to work. +Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the ray or its parent has changed state. Note: ``enabled == true`` is not required for this to work. .. _class_RayCast2D_get_collider: diff --git a/classes/class_reflectionprobe.rst b/classes/class_reflectionprobe.rst index 02f8bdb8e..97b283a60 100644 --- a/classes/class_reflectionprobe.rst +++ b/classes/class_reflectionprobe.rst @@ -53,6 +53,7 @@ Enumerations enum **UpdateMode**: - **UPDATE_ONCE** = **0** + - **UPDATE_ALWAYS** = **1** Tutorials diff --git a/classes/class_resource.rst b/classes/class_resource.rst index 032f0ef0e..af1e94249 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -9,7 +9,7 @@ Resource **Inherits:** :ref:`Reference` **<** :ref:`Object` -**Inherited By:** :ref:`AnimationNodeStateMachinePlayback`, :ref:`AudioStream`, :ref:`Sky`, :ref:`Theme`, :ref:`TextureLayered`, :ref:`CubeMap`, :ref:`DynamicFontData`, :ref:`InputEvent`, :ref:`VisualShaderNode`, :ref:`Curve2D`, :ref:`Image`, :ref:`Shape`, :ref:`Shape2D`, :ref:`Curve`, :ref:`Mesh`, :ref:`StyleBox`, :ref:`Environment`, :ref:`GDNativeLibrary`, :ref:`Material`, :ref:`PhysicsMaterial`, :ref:`VideoStream`, :ref:`PackedScene`, :ref:`Texture`, :ref:`TextFile`, :ref:`ButtonGroup`, :ref:`SimplexNoise`, :ref:`TileSet`, :ref:`ShortCut`, :ref:`BitMap`, :ref:`Animation`, :ref:`BakedLightmapData`, :ref:`PolygonPathFinder`, :ref:`Translation`, :ref:`Shader`, :ref:`Script`, :ref:`AudioBusLayout`, :ref:`AnimationNode`, :ref:`World`, :ref:`AudioEffect`, :ref:`VisualScriptNode`, :ref:`AnimationNodeStateMachineTransition`, :ref:`World2D`, :ref:`GIProbeData`, :ref:`Font`, :ref:`SpriteFrames`, :ref:`MeshLibrary`, :ref:`Curve3D`, :ref:`NavigationPolygon`, :ref:`EditorSettings`, :ref:`Gradient`, :ref:`OccluderPolygon2D`, :ref:`MultiMesh`, :ref:`PackedDataContainer`, :ref:`NavigationMesh` +**Inherited By:** :ref:`AnimationNodeStateMachinePlayback`, :ref:`AudioStream`, :ref:`Sky`, :ref:`Theme`, :ref:`TextureLayered`, :ref:`CubeMap`, :ref:`DynamicFontData`, :ref:`InputEvent`, :ref:`VisualShaderNode`, :ref:`Curve2D`, :ref:`Image`, :ref:`Shape`, :ref:`Shape2D`, :ref:`Curve`, :ref:`Mesh`, :ref:`StyleBox`, :ref:`Environment`, :ref:`GDNativeLibrary`, :ref:`Material`, :ref:`PhysicsMaterial`, :ref:`VideoStream`, :ref:`PackedScene`, :ref:`Texture`, :ref:`TextFile`, :ref:`ButtonGroup`, :ref:`TileSet`, :ref:`ShortCut`, :ref:`OpenSimplexNoise`, :ref:`BitMap`, :ref:`Animation`, :ref:`BakedLightmapData`, :ref:`PolygonPathFinder`, :ref:`Translation`, :ref:`Shader`, :ref:`Script`, :ref:`AudioBusLayout`, :ref:`AnimationNode`, :ref:`World`, :ref:`AudioEffect`, :ref:`VisualScriptNode`, :ref:`AnimationNodeStateMachineTransition`, :ref:`World2D`, :ref:`GIProbeData`, :ref:`Font`, :ref:`SpriteFrames`, :ref:`MeshLibrary`, :ref:`Curve3D`, :ref:`NavigationPolygon`, :ref:`EditorSettings`, :ref:`Gradient`, :ref:`OccluderPolygon2D`, :ref:`MultiMesh`, :ref:`PackedDataContainer`, :ref:`NavigationMesh` **Category:** Core diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst index 9f2046dc0..e6cc1eafb 100644 --- a/classes/class_resourcesaver.rst +++ b/classes/class_resourcesaver.rst @@ -33,12 +33,19 @@ Enumerations enum **SaverFlags**: - **FLAG_RELATIVE_PATHS** = **1** + - **FLAG_BUNDLE_RESOURCES** = **2** + - **FLAG_CHANGE_PATH** = **4** + - **FLAG_OMIT_EDITOR_PROPERTIES** = **8** + - **FLAG_SAVE_BIG_ENDIAN** = **16** + - **FLAG_COMPRESS** = **32** +- **FLAG_REPLACE_SUBRESOURCE_PATHS** = **64** + Description ----------- diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index db6cf517f..7e950b63f 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -85,6 +85,8 @@ Methods +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_meta` **(** :ref:`Variant` data **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_strikethrough` **(** **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_table` **(** :ref:`int` columns **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_underline` **(** **)** | @@ -164,7 +166,9 @@ Enumerations enum **ListType**: - **LIST_NUMBERS** = **0** + - **LIST_LETTERS** = **1** + - **LIST_DOTS** = **2** .. _enum_RichTextLabel_Align: @@ -172,8 +176,11 @@ enum **ListType**: enum **Align**: - **ALIGN_LEFT** = **0** + - **ALIGN_CENTER** = **1** + - **ALIGN_RIGHT** = **2** + - **ALIGN_FILL** = **3** .. _enum_RichTextLabel_ItemType: @@ -181,17 +188,30 @@ enum **Align**: enum **ItemType**: - **ITEM_FRAME** = **0** + - **ITEM_TEXT** = **1** + - **ITEM_IMAGE** = **2** + - **ITEM_NEWLINE** = **3** + - **ITEM_FONT** = **4** + - **ITEM_COLOR** = **5** + - **ITEM_UNDERLINE** = **6** -- **ITEM_ALIGN** = **7** -- **ITEM_INDENT** = **8** -- **ITEM_LIST** = **9** -- **ITEM_TABLE** = **10** -- **ITEM_META** = **11** + +- **ITEM_STRIKETHROUGH** = **7** + +- **ITEM_ALIGN** = **8** + +- **ITEM_INDENT** = **9** + +- **ITEM_LIST** = **10** + +- **ITEM_TABLE** = **11** + +- **ITEM_META** = **12** Description ----------- @@ -459,6 +479,10 @@ Adds a list tag to the tag stack. Similar to the bbcodes ``[ol]`` or ``[ul]``, b Adds a meta tag to the tag stack. Similar to the bbcode ``[url=something]{text}[/url]``, but supports non-:ref:`String` metadata types. +.. _class_RichTextLabel_push_strikethrough: + +- void **push_strikethrough** **(** **)** + .. _class_RichTextLabel_push_table: - void **push_table** **(** :ref:`int` columns **)** diff --git a/classes/class_rid.rst b/classes/class_rid.rst index fdcff8416..e31786d3b 100644 --- a/classes/class_rid.rst +++ b/classes/class_rid.rst @@ -26,7 +26,7 @@ Methods Description ----------- -The RID type is used to access the unique integer ID of a resource. They are opaque, so they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`VisualServer`. +The RID type is used to access the unique integer ID of a resource. They are opaque, so they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`VisualServer`. Method Descriptions ------------------- diff --git a/classes/class_rigidbody.rst b/classes/class_rigidbody.rst index 6f1a59ad4..493bf5c40 100644 --- a/classes/class_rigidbody.rst +++ b/classes/class_rigidbody.rst @@ -136,10 +136,13 @@ Enumerations enum **Mode**: -- **MODE_RIGID** = **0** --- Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code. +- **MODE_RIGID** = **0** --- 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. + - **MODE_STATIC** = **1** --- Static mode. The body behaves like a :ref:`StaticBody`, and can only move by user code. -- **MODE_CHARACTER** = **2** --- Character body. This behaves like a rigid body, but can not rotate. -- **MODE_KINEMATIC** = **3** --- Kinematic body. The body behaves like a :ref:`KinematicBody`, and can only move by user code. + +- **MODE_CHARACTER** = **2** --- Character body mode. This behaves like a rigid body, but can not rotate. + +- **MODE_KINEMATIC** = **3** --- Kinematic body mode. The body behaves like a :ref:`KinematicBody`, and can only move by user code. Description ----------- @@ -194,6 +197,8 @@ RigidBody's rotational velocity. | *Getter* | get_axis_lock() | +----------+----------------------+ +Lock the body's rotation in the x-axis. + .. _class_RigidBody_axis_lock_angular_y: - :ref:`bool` **axis_lock_angular_y** @@ -204,6 +209,8 @@ RigidBody's rotational velocity. | *Getter* | get_axis_lock() | +----------+----------------------+ +Lock the body's rotation in the y-axis. + .. _class_RigidBody_axis_lock_angular_z: - :ref:`bool` **axis_lock_angular_z** @@ -214,6 +221,8 @@ RigidBody's rotational velocity. | *Getter* | get_axis_lock() | +----------+----------------------+ +Lock the body's rotation in the z-axis. + .. _class_RigidBody_axis_lock_linear_x: - :ref:`bool` **axis_lock_linear_x** @@ -224,6 +233,8 @@ RigidBody's rotational velocity. | *Getter* | get_axis_lock() | +----------+----------------------+ +Lock the body's movement in the x-axis. + .. _class_RigidBody_axis_lock_linear_y: - :ref:`bool` **axis_lock_linear_y** @@ -234,6 +245,8 @@ RigidBody's rotational velocity. | *Getter* | get_axis_lock() | +----------+----------------------+ +Lock the body's movement in the x-axis. + .. _class_RigidBody_axis_lock_linear_z: - :ref:`bool` **axis_lock_linear_z** @@ -244,6 +257,8 @@ RigidBody's rotational velocity. | *Getter* | get_axis_lock() | +----------+----------------------+ +Lock the body's movement in the x-axis. + .. _class_RigidBody_bounce: - :ref:`float` **bounce** @@ -278,7 +293,7 @@ If ``true`` the RigidBody will not calculate forces and will act as a static bod | *Getter* | is_contact_monitor_enabled() | +----------+------------------------------+ -If true, the RigidBody will emit signals when it collides with another RigidBody. +If ``true`` the RigidBody will emit signals when it collides with another RigidBody. .. _class_RigidBody_contacts_reported: @@ -328,7 +343,7 @@ If ``true`` internal force integration will be disabled (like gravity or air fri | *Getter* | get_friction() | +----------+---------------------+ -The body friction, from 0 (frictionless) to 1 (max friction). +The body's friction, from 0 (frictionless) to 1 (max friction). .. _class_RigidBody_gravity_scale: @@ -352,7 +367,7 @@ This is multiplied by the global 3D gravity setting found in "Project > Project | *Getter* | get_linear_damp() | +----------+------------------------+ -RigidBody's linear damp. Default value: -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden. +The body's linear damp. Default value: -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden. .. _class_RigidBody_linear_velocity: @@ -364,7 +379,7 @@ RigidBody's linear damp. Default value: -1, cannot be less than -1. If this valu | *Getter* | get_linear_velocity() | +----------+----------------------------+ -RigidBody's linear velocity. Can be used sporadically, but **DON'T SET THIS IN EVERY FRAME**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. +The body's linear velocity. Can be used sporadically, but **DON'T SET THIS IN EVERY FRAME**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. .. _class_RigidBody_mass: @@ -376,7 +391,7 @@ RigidBody's linear velocity. Can be used sporadically, but **DON'T SET THIS IN E | *Getter* | get_mass() | +----------+-----------------+ -RigidBody's mass. +The body's mass. .. _class_RigidBody_mode: @@ -410,7 +425,7 @@ The body mode from the MODE\_\* enum. Modes include: MODE_STATIC, MODE_KINEMATIC | *Getter* | is_sleeping() | +----------+---------------------+ -If ``true`` RigidBody is sleeping and will not calculate forces until woken up by a collision or the ``apply_impulse`` method. +If ``true`` the body is sleeping and will not calculate forces until woken up by a collision or the ``apply_impulse`` method. .. _class_RigidBody_weight: @@ -422,7 +437,7 @@ If ``true`` RigidBody is sleeping and will not calculate forces until woken up b | *Getter* | get_weight() | +----------+-------------------+ -RigidBody's weight based on its mass and the global 3D gravity. Global values are set in "Project > Project Settings > Physics > 3d". +The body's weight based on its mass and the global 3D gravity. Global values are set in "Project > Project Settings > Physics > 3d". Method Descriptions ------------------- @@ -457,7 +472,7 @@ Adds a constant rotational force (i.e. a motor) without affecting position. - void **apply_central_impulse** **(** :ref:`Vector3` impulse **)** -Applies a single directional impulse without affecting rotation. +Applies a directional impulse without affecting rotation. This is equivalent to ``apply_impulse(Vector3(0,0,0), impulse)``. @@ -465,13 +480,13 @@ This is equivalent to ``apply_impulse(Vector3(0,0,0), impulse)``. - void **apply_impulse** **(** :ref:`Vector3` position, :ref:`Vector3` impulse **)** -Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the object's origin. +Applies a positioned impulse which will be affected by the body mass and shape. This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the object's origin. .. _class_RigidBody_apply_torque_impulse: - void **apply_torque_impulse** **(** :ref:`Vector3` impulse **)** -Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the passed in vector. +Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the passed in vector. .. _class_RigidBody_get_colliding_bodies: @@ -483,5 +498,5 @@ Return a list of the bodies colliding with this one. By default, number of max c - void **set_axis_velocity** **(** :ref:`Vector3` axis_velocity **)** -Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. +Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index 28d81871d..cfc6a58aa 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -127,7 +127,9 @@ Enumerations enum **CCDMode**: - **CCD_MODE_DISABLED** = **0** --- Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. + - **CCD_MODE_CAST_RAY** = **1** --- Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise. + - **CCD_MODE_CAST_SHAPE** = **2** --- Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. .. _enum_RigidBody2D_Mode: @@ -135,8 +137,11 @@ enum **CCDMode**: enum **Mode**: - **MODE_RIGID** = **0** --- 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. + - **MODE_STATIC** = **1** --- Static mode. The body behaves like a :ref:`StaticBody2D` and does not move. + - **MODE_CHARACTER** = **2** --- Character mode. Similar to ``MODE_RIGID``, but the body can not rotate. + - **MODE_KINEMATIC** = **3** --- Kinematic mode. The body behaves like a :ref:`KinematicBody2D`, and must be moved by code. Description @@ -406,6 +411,8 @@ Allows you to read and safely modify the simulation state for the object. Use th - void **add_central_force** **(** :ref:`Vector2` force **)** +Adds a constant directional force without affecting rotation. + .. _class_RigidBody2D_add_force: - void **add_force** **(** :ref:`Vector2` offset, :ref:`Vector2` force **)** @@ -416,10 +423,14 @@ Adds a positioned force to the body. Both the force and the offset from the body - void **add_torque** **(** :ref:`float` torque **)** +Adds a constant rotational force. + .. _class_RigidBody2D_apply_central_impulse: - void **apply_central_impulse** **(** :ref:`Vector2` impulse **)** +Applies a directional impulse without affecting rotation. + .. _class_RigidBody2D_apply_impulse: - void **apply_impulse** **(** :ref:`Vector2` offset, :ref:`Vector2` impulse **)** @@ -430,6 +441,8 @@ Applies a positioned impulse to the body (which will be affected by the body mas - void **apply_torque_impulse** **(** :ref:`float` torque **)** +Applies a rotational impulse to the body. + .. _class_RigidBody2D_get_colliding_bodies: - :ref:`Array` **get_colliding_bodies** **(** **)** const diff --git a/classes/class_scenestate.rst b/classes/class_scenestate.rst index 71ad339e5..b6cd80a82 100644 --- a/classes/class_scenestate.rst +++ b/classes/class_scenestate.rst @@ -69,7 +69,9 @@ Enumerations enum **GenEditState**: - **GEN_EDIT_STATE_DISABLED** = **0** --- If passed to :ref:`PackedScene.instance`, blocks edits to the scene state. + - **GEN_EDIT_STATE_INSTANCE** = **1** --- If passed to :ref:`PackedScene.instance`, provides inherited scene resources to the local scene. Requires tools compiled. + - **GEN_EDIT_STATE_MAIN** = **2** --- If passed to :ref:`PackedScene.instance`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. Requires tools compiled. Description diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 85d59356d..ddb8f12ed 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -189,8 +189,11 @@ Enumerations enum **GroupCallFlags**: - **GROUP_CALL_DEFAULT** = **0** --- Call a group with no flags (default). + - **GROUP_CALL_REVERSE** = **1** --- Call a group in reverse scene order. + - **GROUP_CALL_REALTIME** = **2** --- Call a group immediately (calls are normally made on idle). + - **GROUP_CALL_UNIQUE** = **4** --- Call a group only once even if the call is executed many times. .. _enum_SceneTree_StretchMode: @@ -198,7 +201,9 @@ enum **GroupCallFlags**: enum **StretchMode**: - **STRETCH_MODE_DISABLED** = **0** --- No stretching. + - **STRETCH_MODE_2D** = **1** --- Render stretching in higher resolution (interpolated). + - **STRETCH_MODE_VIEWPORT** = **2** --- Keep the specified display resolution. No interpolation. Content may appear pixelated. .. _enum_SceneTree_StretchAspect: @@ -206,9 +211,13 @@ enum **StretchMode**: enum **StretchAspect**: - **STRETCH_ASPECT_IGNORE** = **0** --- Fill the window with the content stretched to cover excessive space. Content may appear elongated. + - **STRETCH_ASPECT_KEEP** = **1** --- Retain the same aspect ratio by padding with black bars in either axes. No expansion of content. + - **STRETCH_ASPECT_KEEP_WIDTH** = **2** --- Expand vertically. Left/right black bars may appear if the window is too wide. + - **STRETCH_ASPECT_KEEP_HEIGHT** = **3** --- Expand horizontally. Top/bottom black bars may appear if the window is too tall. + - **STRETCH_ASPECT_EXPAND** = **4** --- Expand in both directions, retaining the same aspect ratio. No black bars. Description @@ -320,6 +329,14 @@ The peer object to handle the RPC system (effectively enabling networking when s If ``true`` the SceneTree is paused. +Doing so will have the following behavior: + +\* 2D and 3D physics will be stopped. + +\* _process and _physics_process will not be called anymore in nodes. + +\* _input and _input_event will not be called anymore either. + .. _class_SceneTree_refuse_new_network_connections: - :ref:`bool` **refuse_new_network_connections** diff --git a/classes/class_scriptcreatedialog.rst b/classes/class_scriptcreatedialog.rst index ae3bf25a5..d1c71cfef 100644 --- a/classes/class_scriptcreatedialog.rst +++ b/classes/class_scriptcreatedialog.rst @@ -19,9 +19,9 @@ The Editor's popup dialog for creating new :ref:`Script` files. Methods ------- -+-------+-----------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`config` **(** :ref:`String` inherits, :ref:`String` path **)** | -+-------+-----------------------------------------------------------------------------------------------------------------------------------+ ++-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`config` **(** :ref:`String` inherits, :ref:`String` path, :ref:`bool` built_in_enabled=true **)** | ++-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -49,7 +49,7 @@ Method Descriptions .. _class_ScriptCreateDialog_config: -- void **config** **(** :ref:`String` inherits, :ref:`String` path **)** +- void **config** **(** :ref:`String` inherits, :ref:`String` path, :ref:`bool` built_in_enabled=true **)** Prefills required fields to configure the ScriptCreateDialog for use. diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index ae6b784c0..90515d3b8 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -67,7 +67,7 @@ Emitted whenever scrolling is started. Description ----------- -A ScrollContainer node with a :ref:`Control` child and scrollbar child (HScrollbar, :ref:`VScrollBar`, or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a :ref:`Panel` control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension). +A ScrollContainer node with a :ref:`Control` child and scrollbar child (HScrollbar, :ref:`VScrollBar`, or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a :ref:`Panel` control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension). Property Descriptions --------------------- diff --git a/classes/class_shader.rst b/classes/class_shader.rst index d604b2352..8088cca99 100644 --- a/classes/class_shader.rst +++ b/classes/class_shader.rst @@ -46,7 +46,9 @@ Enumerations enum **Mode**: - **MODE_SPATIAL** = **0** + - **MODE_CANVAS_ITEM** = **1** + - **MODE_PARTICLES** = **2** Description diff --git a/classes/class_sky.rst b/classes/class_sky.rst index 35b0044b5..cff994e74 100644 --- a/classes/class_sky.rst +++ b/classes/class_sky.rst @@ -33,12 +33,19 @@ Enumerations enum **RadianceSize**: - **RADIANCE_SIZE_32** = **0** --- Radiance texture size is 32x32 pixels. + - **RADIANCE_SIZE_64** = **1** --- Radiance texture size is 64x64 pixels. + - **RADIANCE_SIZE_128** = **2** --- Radiance texture size is 128x128 pixels. + - **RADIANCE_SIZE_256** = **3** --- Radiance texture size is 256x256 pixels. + - **RADIANCE_SIZE_512** = **4** --- Radiance texture size is 512x512 pixels. + - **RADIANCE_SIZE_1024** = **5** --- Radiance texture size is 1024x1024 pixels. + - **RADIANCE_SIZE_2048** = **6** --- Radiance texture size is 2048x2048 pixels. + - **RADIANCE_SIZE_MAX** = **7** --- Radiance texture size is the largest size it can be. Description diff --git a/classes/class_sliderjoint.rst b/classes/class_sliderjoint.rst index 969e39c73..d1f8ac73e 100644 --- a/classes/class_sliderjoint.rst +++ b/classes/class_sliderjoint.rst @@ -73,27 +73,49 @@ Enumerations enum **Param**: - **PARAM_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their x-axis before damping happens. + - **PARAM_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their x-axis before damping happens. + - **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. + - **PARAM_LINEAR_LIMIT_RESTITUTION** = **3** --- The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. + - **PARAM_LINEAR_LIMIT_DAMPING** = **4** --- The amount of damping once the slider limits are surpassed. + - **PARAM_LINEAR_MOTION_SOFTNESS** = **5** --- A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. + - **PARAM_LINEAR_MOTION_RESTITUTION** = **6** --- The amount of restitution inside the slider limits. + - **PARAM_LINEAR_MOTION_DAMPING** = **7** --- The amount of damping inside the slider limits. + - **PARAM_LINEAR_ORTHOGONAL_SOFTNESS** = **8** --- A factor applied to the movement across axes orthogonal to the slider. + - **PARAM_LINEAR_ORTHOGONAL_RESTITUTION** = **9** --- The amount of restitution when movement is across axes orthogonal to the slider. + - **PARAM_LINEAR_ORTHOGONAL_DAMPING** = **10** --- The amount of damping when movement is across axes orthogonal to the slider. + - **PARAM_ANGULAR_LIMIT_UPPER** = **11** --- The upper limit of rotation in the slider. + - **PARAM_ANGULAR_LIMIT_LOWER** = **12** --- The lower limit of rotation in the slider. + - **PARAM_ANGULAR_LIMIT_SOFTNESS** = **13** --- A factor applied to the all rotation once the limit is surpassed. + - **PARAM_ANGULAR_LIMIT_RESTITUTION** = **14** --- The amount of restitution of the rotation when the limit is surpassed. + - **PARAM_ANGULAR_LIMIT_DAMPING** = **15** --- The amount of damping of the rotation when the limit is surpassed. + - **PARAM_ANGULAR_MOTION_SOFTNESS** = **16** --- A factor applied to the all rotation in the limits. + - **PARAM_ANGULAR_MOTION_RESTITUTION** = **17** --- The amount of restitution of the rotation in the limits. + - **PARAM_ANGULAR_MOTION_DAMPING** = **18** --- The amount of damping of the rotation in the limits. + - **PARAM_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** --- A factor applied to the all rotation across axes orthogonal to the slider. + - **PARAM_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** --- The amount of restitution of the rotation across axes orthogonal to the slider. + - **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = **21** --- The amount of damping of the rotation across axes orthogonal to the slider. + - **PARAM_MAX** = **22** --- End flag of PARAM\_\* constants, used internally. Description diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst index ff8b3f963..e3c96371f 100644 --- a/classes/class_spatial.rst +++ b/classes/class_spatial.rst @@ -125,8 +125,11 @@ Constants - **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Spatial nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform. In order for NOTIFICATION_TRANSFORM_CHANGED to work user first needs to ask for it, with set_notify_transform(true). + - **NOTIFICATION_ENTER_WORLD** = **41** --- Spatial nodes receives this notification when they are registered to new :ref:`World` resource. + - **NOTIFICATION_EXIT_WORLD** = **42** --- Spatial nodes receives this notification when they are unregistered from current :ref:`World` resource. + - **NOTIFICATION_VISIBILITY_CHANGED** = **43** --- Spatial nodes receives this notification when their visibility changes. Description diff --git a/classes/class_spatialmaterial.rst b/classes/class_spatialmaterial.rst index 3077108d3..d8584a932 100644 --- a/classes/class_spatialmaterial.rst +++ b/classes/class_spatialmaterial.rst @@ -14,7 +14,7 @@ SpatialMaterial Brief Description ----------------- - +Default 3D rendering material. Properties ---------- @@ -225,6 +225,7 @@ Enumerations enum **DetailUV**: - **DETAIL_UV_1** = **0** + - **DETAIL_UV_2** = **1** .. _enum_SpatialMaterial_TextureParam: @@ -232,21 +233,37 @@ enum **DetailUV**: enum **TextureParam**: - **TEXTURE_ALBEDO** = **0** + - **TEXTURE_METALLIC** = **1** + - **TEXTURE_ROUGHNESS** = **2** + - **TEXTURE_EMISSION** = **3** + - **TEXTURE_NORMAL** = **4** + - **TEXTURE_RIM** = **5** + - **TEXTURE_CLEARCOAT** = **6** + - **TEXTURE_FLOWMAP** = **7** + - **TEXTURE_AMBIENT_OCCLUSION** = **8** + - **TEXTURE_DEPTH** = **9** + - **TEXTURE_SUBSURFACE_SCATTERING** = **10** + - **TEXTURE_TRANSMISSION** = **11** + - **TEXTURE_REFRACTION** = **12** + - **TEXTURE_DETAIL_MASK** = **13** + - **TEXTURE_DETAIL_ALBEDO** = **14** + - **TEXTURE_DETAIL_NORMAL** = **15** + - **TEXTURE_MAX** = **16** .. _enum_SpatialMaterial_DistanceFadeMode: @@ -254,53 +271,77 @@ enum **TextureParam**: enum **DistanceFadeMode**: - **DISTANCE_FADE_DISABLED** = **0** + - **DISTANCE_FADE_PIXEL_ALPHA** = **1** + - **DISTANCE_FADE_PIXEL_DITHER** = **2** + - **DISTANCE_FADE_OBJECT_DITHER** = **3** .. _enum_SpatialMaterial_DepthDrawMode: enum **DepthDrawMode**: -- **DEPTH_DRAW_OPAQUE_ONLY** = **0** -- **DEPTH_DRAW_ALWAYS** = **1** -- **DEPTH_DRAW_DISABLED** = **2** -- **DEPTH_DRAW_ALPHA_OPAQUE_PREPASS** = **3** +- **DEPTH_DRAW_OPAQUE_ONLY** = **0** --- Default depth draw mode. Depth is drawn only for opaque objects. + +- **DEPTH_DRAW_ALWAYS** = **1** --- Depth draw is calculated for both opaque and transparent objects. + +- **DEPTH_DRAW_DISABLED** = **2** --- No depth draw. + +- **DEPTH_DRAW_ALPHA_OPAQUE_PREPASS** = **3** --- For transparent objects, an opaque pass is made first with the opaque parts, then transparency is drawn. .. _enum_SpatialMaterial_DiffuseMode: enum **DiffuseMode**: -- **DIFFUSE_BURLEY** = **0** -- **DIFFUSE_LAMBERT** = **1** -- **DIFFUSE_LAMBERT_WRAP** = **2** -- **DIFFUSE_OREN_NAYAR** = **3** -- **DIFFUSE_TOON** = **4** +- **DIFFUSE_BURLEY** = **0** --- Default diffuse scattering algorithm. + +- **DIFFUSE_LAMBERT** = **1** --- Diffuse scattering ignores roughness. + +- **DIFFUSE_LAMBERT_WRAP** = **2** --- Extends Lambert to cover more than 90 degrees when roughness increases. + +- **DIFFUSE_OREN_NAYAR** = **3** --- Attempts to use roughness to emulate microsurfacing. + +- **DIFFUSE_TOON** = **4** --- Uses a hard cut for lighting, with smoothing affected by roughness. .. _enum_SpatialMaterial_CullMode: enum **CullMode**: -- **CULL_BACK** = **0** -- **CULL_FRONT** = **1** -- **CULL_DISABLED** = **2** +- **CULL_BACK** = **0** --- Default cull mode. The back of the object is culled when not visible. + +- **CULL_FRONT** = **1** --- The front of the object is culled when not visible. + +- **CULL_DISABLED** = **2** --- No culling is performed. .. _enum_SpatialMaterial_Feature: enum **Feature**: - **FEATURE_TRANSPARENT** = **0** + - **FEATURE_EMISSION** = **1** + - **FEATURE_NORMAL_MAPPING** = **2** + - **FEATURE_RIM** = **3** + - **FEATURE_CLEARCOAT** = **4** + - **FEATURE_ANISOTROPY** = **5** + - **FEATURE_AMBIENT_OCCLUSION** = **6** + - **FEATURE_DEPTH_MAPPING** = **7** + - **FEATURE_SUBSURACE_SCATTERING** = **8** + - **FEATURE_TRANSMISSION** = **9** + - **FEATURE_REFRACTION** = **10** + - **FEATURE_DETAIL** = **11** + - **FEATURE_MAX** = **12** .. _enum_SpatialMaterial_Flags: @@ -308,70 +349,108 @@ enum **Feature**: enum **Flags**: - **FLAG_UNSHADED** = **0** + - **FLAG_USE_VERTEX_LIGHTING** = **1** + - **FLAG_DISABLE_DEPTH_TEST** = **2** + - **FLAG_ALBEDO_FROM_VERTEX_COLOR** = **3** + - **FLAG_SRGB_VERTEX_COLOR** = **4** + - **FLAG_USE_POINT_SIZE** = **5** + - **FLAG_FIXED_SIZE** = **6** + - **FLAG_BILLBOARD_KEEP_SCALE** = **7** + - **FLAG_UV1_USE_TRIPLANAR** = **8** + - **FLAG_UV2_USE_TRIPLANAR** = **9** + - **FLAG_AO_ON_UV2** = **11** + - **FLAG_EMISSION_ON_UV2** = **12** + - **FLAG_USE_ALPHA_SCISSOR** = **13** + - **FLAG_TRIPLANAR_USE_WORLD** = **10** + - **FLAG_ALBEDO_TEXTURE_FORCE_SRGB** = **14** + - **FLAG_DONT_RECEIVE_SHADOWS** = **15** + - **FLAG_DISABLE_AMBIENT_LIGHT** = **17** + - **FLAG_ENSURE_CORRECT_NORMALS** = **16** + - **FLAG_MAX** = **18** .. _enum_SpatialMaterial_BlendMode: enum **BlendMode**: -- **BLEND_MODE_MIX** = **0** +- **BLEND_MODE_MIX** = **0** --- Default blend mode. + - **BLEND_MODE_ADD** = **1** + - **BLEND_MODE_SUB** = **2** + - **BLEND_MODE_MUL** = **3** .. _enum_SpatialMaterial_SpecularMode: enum **SpecularMode**: -- **SPECULAR_SCHLICK_GGX** = **0** -- **SPECULAR_BLINN** = **1** -- **SPECULAR_PHONG** = **2** -- **SPECULAR_TOON** = **3** -- **SPECULAR_DISABLED** = **4** +- **SPECULAR_SCHLICK_GGX** = **0** --- Default specular blob. + +- **SPECULAR_BLINN** = **1** --- Older specular algorithm, included for compatibility. + +- **SPECULAR_PHONG** = **2** --- Older specular algorithm, included for compatibility. + +- **SPECULAR_TOON** = **3** --- Toon blob which changes size based on roughness. + +- **SPECULAR_DISABLED** = **4** --- No specular blob. .. _enum_SpatialMaterial_TextureChannel: enum **TextureChannel**: - **TEXTURE_CHANNEL_RED** = **0** + - **TEXTURE_CHANNEL_GREEN** = **1** + - **TEXTURE_CHANNEL_BLUE** = **2** + - **TEXTURE_CHANNEL_ALPHA** = **3** + - **TEXTURE_CHANNEL_GRAYSCALE** = **4** .. _enum_SpatialMaterial_BillboardMode: enum **BillboardMode**: -- **BILLBOARD_DISABLED** = **0** -- **BILLBOARD_ENABLED** = **1** -- **BILLBOARD_FIXED_Y** = **2** -- **BILLBOARD_PARTICLES** = **3** +- **BILLBOARD_DISABLED** = **0** --- Default value. + +- **BILLBOARD_ENABLED** = **1** --- The object's z-axis will always face the camera. + +- **BILLBOARD_FIXED_Y** = **2** --- The object's x-axis will always face the camera. + +- **BILLBOARD_PARTICLES** = **3** --- Used for particle systems. Enables particle animation options. .. _enum_SpatialMaterial_EmissionOperator: enum **EmissionOperator**: - **EMISSION_OP_ADD** = **0** + - **EMISSION_OP_MULTIPLY** = **1** +Description +----------- + +This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details. + Tutorials --------- @@ -390,6 +469,8 @@ Property Descriptions | *Getter* | get_albedo() | +----------+-------------------+ +The material's base color. + .. _class_SpatialMaterial_albedo_texture: - :ref:`Texture` **albedo_texture** @@ -410,6 +491,8 @@ Property Descriptions | *Getter* | get_anisotropy() | +----------+-----------------------+ +The strength of the anisotropy effect. + .. _class_SpatialMaterial_anisotropy_enabled: - :ref:`bool` **anisotropy_enabled** @@ -420,6 +503,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Default value: ``false``. + .. _class_SpatialMaterial_anisotropy_flowmap: - :ref:`Texture` **anisotropy_flowmap** @@ -440,6 +525,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` ambient occlusion is enabled. + .. _class_SpatialMaterial_ao_light_affect: - :ref:`float` **ao_light_affect** @@ -500,6 +587,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` clearcoat rendering is enabled. Adds a secondary transparent pass to the material. Default value: ``false``. + .. _class_SpatialMaterial_clearcoat_gloss: - :ref:`float` **clearcoat_gloss** @@ -540,6 +629,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` Depth mapping is enabled. See also :ref:`normal_enabled`. + .. _class_SpatialMaterial_depth_max_layers: - :ref:`int` **depth_max_layers** @@ -680,6 +771,8 @@ Property Descriptions | *Getter* | get_emission() | +----------+---------------------+ +The emitted light's color. See :ref:`emission_enabled`. + .. _class_SpatialMaterial_emission_enabled: - :ref:`bool` **emission_enabled** @@ -690,6 +783,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` the body emits light. + .. _class_SpatialMaterial_emission_energy: - :ref:`float` **emission_energy** @@ -700,6 +795,8 @@ Property Descriptions | *Getter* | get_emission_energy() | +----------+----------------------------+ +The emitted light's strength. See :ref:`emission_enabled`. + .. _class_SpatialMaterial_emission_on_uv2: - :ref:`bool` **emission_on_uv2** @@ -750,6 +847,8 @@ Property Descriptions | *Getter* | get_flag() | +----------+-----------------+ +If ``true`` the object receives no ambient light. Default value: ``false``. + .. _class_SpatialMaterial_flags_do_not_receive_shadows: - :ref:`bool` **flags_do_not_receive_shadows** @@ -760,6 +859,8 @@ Property Descriptions | *Getter* | get_flag() | +----------+-----------------+ +If ``true`` the object receives no shadow that would otherwise be cast onto it. Default value: ``false``. + .. _class_SpatialMaterial_flags_ensure_correct_normals: - :ref:`bool` **flags_ensure_correct_normals** @@ -780,6 +881,8 @@ Property Descriptions | *Getter* | get_flag() | +----------+-----------------+ +If ``true`` the object is rendered at the same size regardless of distance. Default value: ``false``. + .. _class_SpatialMaterial_flags_no_depth_test: - :ref:`bool` **flags_no_depth_test** @@ -790,6 +893,8 @@ Property Descriptions | *Getter* | get_flag() | +----------+-----------------+ +If ``true`` depth testing is disabled and the object will be drawn in render order. + .. _class_SpatialMaterial_flags_transparent: - :ref:`bool` **flags_transparent** @@ -800,6 +905,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` transparency is enabled on the body. Default value: ``false``. See also :ref:`params_blend_mode`. + .. _class_SpatialMaterial_flags_unshaded: - :ref:`bool` **flags_unshaded** @@ -810,6 +917,8 @@ Property Descriptions | *Getter* | get_flag() | +----------+-----------------+ +If ``true`` the object is unaffected by lighting. Default value: ``false``. + .. _class_SpatialMaterial_flags_use_point_size: - :ref:`bool` **flags_use_point_size** @@ -820,6 +929,8 @@ Property Descriptions | *Getter* | get_flag() | +----------+-----------------+ +If ``true`` render point size can be changed. Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also :ref:`params_point_size`. + .. _class_SpatialMaterial_flags_vertex_lighting: - :ref:`bool` **flags_vertex_lighting** @@ -830,6 +941,8 @@ Property Descriptions | *Getter* | get_flag() | +----------+-----------------+ +If ``true`` lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. Default value: ``false``. + .. _class_SpatialMaterial_flags_world_triplanar: - :ref:`bool` **flags_world_triplanar** @@ -840,6 +953,8 @@ Property Descriptions | *Getter* | get_flag() | +----------+-----------------+ +If ``true`` triplanar mapping is calculated in world space rather than object local space. See also :ref:`uv1_triplanar`. Default value: ``false``. + .. _class_SpatialMaterial_metallic: - :ref:`float` **metallic** @@ -850,6 +965,8 @@ Property Descriptions | *Getter* | get_metallic() | +----------+---------------------+ +The reflectivity of the object's surface. The higher the value the more light is reflected. + .. _class_SpatialMaterial_metallic_specular: - :ref:`float` **metallic_specular** @@ -860,6 +977,8 @@ Property Descriptions | *Getter* | get_specular() | +----------+---------------------+ +General reflectivity amount. Note: unlike :ref:`metallic`, this is not energy-conserving, so it should be left at ``0.5`` in most cases. See also :ref:`roughness`. + .. _class_SpatialMaterial_metallic_texture: - :ref:`Texture` **metallic_texture** @@ -890,6 +1009,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` normal mapping is enabled. + .. _class_SpatialMaterial_normal_scale: - :ref:`float` **normal_scale** @@ -900,6 +1021,8 @@ Property Descriptions | *Getter* | get_normal_scale() | +----------+-------------------------+ +The strength of the normal map's effect. + .. _class_SpatialMaterial_normal_texture: - :ref:`Texture` **normal_texture** @@ -940,6 +1063,8 @@ Property Descriptions | *Getter* | get_billboard_mode() | +----------+---------------------------+ +Controls how the object faces the camera. See :ref:`BillboardMode`. + .. _class_SpatialMaterial_params_blend_mode: - :ref:`BlendMode` **params_blend_mode** @@ -950,6 +1075,8 @@ Property Descriptions | *Getter* | get_blend_mode() | +----------+-----------------------+ +The material's blend mode. Note that values other than ``Mix`` force the object into the transparent pipeline. See :ref:`BlendMode`. + .. _class_SpatialMaterial_params_cull_mode: - :ref:`CullMode` **params_cull_mode** @@ -960,6 +1087,8 @@ Property Descriptions | *Getter* | get_cull_mode() | +----------+----------------------+ +Which side of the object is not drawn when backfaces are rendered. See :ref:`CullMode`. + .. _class_SpatialMaterial_params_depth_draw_mode: - :ref:`DepthDrawMode` **params_depth_draw_mode** @@ -970,6 +1099,8 @@ Property Descriptions | *Getter* | get_depth_draw_mode() | +----------+----------------------------+ +Determines when depth rendering takes place. See :ref:`DepthDrawMode`. See also :ref:`flags_transparent`. + .. _class_SpatialMaterial_params_diffuse_mode: - :ref:`DiffuseMode` **params_diffuse_mode** @@ -980,6 +1111,8 @@ Property Descriptions | *Getter* | get_diffuse_mode() | +----------+-------------------------+ +The algorithm used for diffuse light scattering. See :ref:`DiffuseMode`. + .. _class_SpatialMaterial_params_grow: - :ref:`bool` **params_grow** @@ -990,6 +1123,8 @@ Property Descriptions | *Getter* | is_grow_enabled() | +----------+-------------------------+ +If ``true`` enables the vertex grow setting. See :ref:`params_grow_amount`. + .. _class_SpatialMaterial_params_grow_amount: - :ref:`float` **params_grow_amount** @@ -1000,6 +1135,8 @@ Property Descriptions | *Getter* | get_grow() | +----------+-----------------+ +Grows object vertices in the direction of their normals. + .. _class_SpatialMaterial_params_line_width: - :ref:`float` **params_line_width** @@ -1020,6 +1157,8 @@ Property Descriptions | *Getter* | get_point_size() | +----------+-----------------------+ +The point size in pixels. See :ref:`flags_use_point_size`. + .. _class_SpatialMaterial_params_specular_mode: - :ref:`SpecularMode` **params_specular_mode** @@ -1030,6 +1169,8 @@ Property Descriptions | *Getter* | get_specular_mode() | +----------+--------------------------+ +The method for rendering the specular blob. See :ref:`SpecularMode`. + .. _class_SpatialMaterial_params_use_alpha_scissor: - :ref:`bool` **params_use_alpha_scissor** @@ -1050,6 +1191,8 @@ Property Descriptions | *Getter* | get_particles_anim_h_frames() | +----------+------------------------------------+ +The number of horizontal frames in the particle spritesheet. Only enabled when using ``BillboardMode.BILLBOARD_PARTICLES``. See :ref:`params_billboard_mode`. + .. _class_SpatialMaterial_particles_anim_loop: - :ref:`int` **particles_anim_loop** @@ -1060,6 +1203,8 @@ Property Descriptions | *Getter* | get_particles_anim_loop() | +----------+--------------------------------+ +If ``true`` particle animations are looped. Only enabled when using ``BillboardMode.BILLBOARD_PARTICLES``. See :ref:`params_billboard_mode`. + .. _class_SpatialMaterial_particles_anim_v_frames: - :ref:`int` **particles_anim_v_frames** @@ -1070,6 +1215,8 @@ Property Descriptions | *Getter* | get_particles_anim_v_frames() | +----------+------------------------------------+ +The number of vertical frames in the particle spritesheet. Only enabled when using ``BillboardMode.BILLBOARD_PARTICLES``. See :ref:`params_billboard_mode`. + .. _class_SpatialMaterial_proximity_fade_distance: - :ref:`float` **proximity_fade_distance** @@ -1090,6 +1237,8 @@ Property Descriptions | *Getter* | is_proximity_fade_enabled() | +----------+-----------------------------+ +If ``true`` the proximity and distance fade effect is enabled. Default value: ``false``. + .. _class_SpatialMaterial_refraction_enabled: - :ref:`bool` **refraction_enabled** @@ -1100,6 +1249,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` the refraction effect is enabled. Distorts transparency based on light from behind the object. Default value: ``false``. + .. _class_SpatialMaterial_refraction_scale: - :ref:`float` **refraction_scale** @@ -1110,6 +1261,8 @@ Property Descriptions | *Getter* | get_refraction() | +----------+-----------------------+ +The strength of the refraction effect. + .. _class_SpatialMaterial_refraction_texture: - :ref:`Texture` **refraction_texture** @@ -1150,6 +1303,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` rim effect is enabled. Default value: ``false``. + .. _class_SpatialMaterial_rim_texture: - :ref:`Texture` **rim_texture** @@ -1170,6 +1325,8 @@ Property Descriptions | *Getter* | get_rim_tint() | +----------+---------------------+ +The amount of to blend light and albedo color when rendering rim effect. If ``0`` the light color is used, while ``1`` means albedo color is used. An intermediate value generally works best. + .. _class_SpatialMaterial_roughness: - :ref:`float` **roughness** @@ -1180,6 +1337,8 @@ Property Descriptions | *Getter* | get_roughness() | +----------+----------------------+ +Surface reflection. A value of ``0`` represents a perfect mirror while a value of ``1`` completely blurs the reflection. See also :ref:`metallic`. + .. _class_SpatialMaterial_roughness_texture: - :ref:`Texture` **roughness_texture** @@ -1210,6 +1369,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. + .. _class_SpatialMaterial_subsurf_scatter_strength: - :ref:`float` **subsurf_scatter_strength** @@ -1220,6 +1381,8 @@ Property Descriptions | *Getter* | get_subsurface_scattering_strength() | +----------+-------------------------------------------+ +The strength of the subsurface scattering effect. + .. _class_SpatialMaterial_subsurf_scatter_texture: - :ref:`Texture` **subsurf_scatter_texture** @@ -1240,6 +1403,8 @@ Property Descriptions | *Getter* | get_transmission() | +----------+-------------------------+ +The color used by the transmission effect. Represents the light passing through an object. + .. _class_SpatialMaterial_transmission_enabled: - :ref:`bool` **transmission_enabled** @@ -1250,6 +1415,8 @@ Property Descriptions | *Getter* | get_feature() | +----------+--------------------+ +If ``true`` the transmission effect is enabled. Default value: ``false``. + .. _class_SpatialMaterial_transmission_texture: - :ref:`Texture` **transmission_texture** @@ -1350,6 +1517,8 @@ Property Descriptions | *Getter* | get_flag() | +----------+-----------------+ +If ``true`` the model's vertex colors are processed as sRGB mode. Default value: ``false``. + .. _class_SpatialMaterial_vertex_color_use_as_albedo: - :ref:`bool` **vertex_color_use_as_albedo** @@ -1360,3 +1529,5 @@ Property Descriptions | *Getter* | get_flag() | +----------+-----------------+ +If ``true`` the vertex color is used as albedo color. Default value: ``false``. + diff --git a/classes/class_spinbox.rst b/classes/class_spinbox.rst index 74f1356fc..f55676c11 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -19,13 +19,15 @@ Numerical input text field. Properties ---------- -+-----------------------------+-----------------------------------------+ -| :ref:`bool` | :ref:`editable` | -+-----------------------------+-----------------------------------------+ -| :ref:`String` | :ref:`prefix` | -+-----------------------------+-----------------------------------------+ -| :ref:`String` | :ref:`suffix` | -+-----------------------------+-----------------------------------------+ ++-----------------------------------+-----------------------------------------+ +| :ref:`Align` | :ref:`align` | ++-----------------------------------+-----------------------------------------+ +| :ref:`bool` | :ref:`editable` | ++-----------------------------------+-----------------------------------------+ +| :ref:`String` | :ref:`prefix` | ++-----------------------------------+-----------------------------------------+ +| :ref:`String` | :ref:`suffix` | ++-----------------------------------+-----------------------------------------+ Methods ------- @@ -49,6 +51,16 @@ SpinBox is a numerical input text field. It allows entering integers and floats. Property Descriptions --------------------- +.. _class_SpinBox_align: + +- :ref:`Align` **align** + ++----------+------------------+ +| *Setter* | set_align(value) | ++----------+------------------+ +| *Getter* | get_align() | ++----------+------------------+ + .. _class_SpinBox_editable: - :ref:`bool` **editable** diff --git a/classes/class_splitcontainer.rst b/classes/class_splitcontainer.rst index f8e9fac69..da967be0f 100644 --- a/classes/class_splitcontainer.rst +++ b/classes/class_splitcontainer.rst @@ -46,7 +46,9 @@ Enumerations enum **DraggerVisibility**: - **DRAGGER_VISIBLE** = **0** --- The split dragger is visible. + - **DRAGGER_HIDDEN** = **1** --- The split dragger is invisible. + - **DRAGGER_HIDDEN_COLLAPSED** = **2** --- The split dragger is invisible and collapsed. Description diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst index 72f2f05bf..6bfc08fc0 100644 --- a/classes/class_spritebase3d.rst +++ b/classes/class_spritebase3d.rst @@ -64,7 +64,9 @@ Enumerations enum **AlphaCutMode**: - **ALPHA_CUT_DISABLED** = **0** + - **ALPHA_CUT_DISCARD** = **1** + - **ALPHA_CUT_OPAQUE_PREPASS** = **2** .. _enum_SpriteBase3D_DrawFlags: @@ -72,8 +74,11 @@ enum **AlphaCutMode**: enum **DrawFlags**: - **FLAG_TRANSPARENT** = **0** --- If set, the texture's transparency and the opacity are used to make those parts of the Sprite invisible. + - **FLAG_SHADED** = **1** --- If set, the Light in the Environment has effects on the Sprite. + - **FLAG_DOUBLE_SIDED** = **2** --- If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind. + - **FLAG_MAX** = **3** --- Used internally to mark the end of the Flags section. Description diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index d73a286a2..0f10bd327 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -47,7 +47,7 @@ Methods +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_partial_data` **(** :ref:`int` bytes **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_string` **(** :ref:`int` bytes **)** | +| :ref:`String` | :ref:`get_string` **(** :ref:`int` bytes=-1 **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_u16` **(** **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ @@ -57,7 +57,7 @@ Methods +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_u8` **(** **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_utf8_string` **(** :ref:`int` bytes **)** | +| :ref:`String` | :ref:`get_utf8_string` **(** :ref:`int` bytes=-1 **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_var` **(** **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ @@ -77,6 +77,8 @@ Methods +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`put_partial_data` **(** :ref:`PoolByteArray` data **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_string` **(** :ref:`String` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_u16` **(** :ref:`int` value **)** | +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ | void | :ref:`put_u32` **(** :ref:`int` value **)** | @@ -169,9 +171,9 @@ Return a chunk data with the received bytes. The amount of bytes to be received .. _class_StreamPeer_get_string: -- :ref:`String` **get_string** **(** :ref:`int` bytes **)** +- :ref:`String` **get_string** **(** :ref:`int` bytes=-1 **)** -Get a string with byte-length "bytes" from the stream. +Get a string with byte-length ``bytes`` from the stream. If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_string`. .. _class_StreamPeer_get_u16: @@ -199,9 +201,9 @@ Get an unsigned byte from the stream. .. _class_StreamPeer_get_utf8_string: -- :ref:`String` **get_utf8_string** **(** :ref:`int` bytes **)** +- :ref:`String` **get_utf8_string** **(** :ref:`int` bytes=-1 **)** -Get a utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8). +Get a utf8 string with byte-length ``bytes`` from the stream (this decodes the string sent as utf8). If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_utf8_string`. .. _class_StreamPeer_get_var: @@ -257,6 +259,12 @@ Put a single-precision float into the stream. Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an Error code and an integer, describing how much data was actually sent. +.. _class_StreamPeer_put_string: + +- void **put_string** **(** :ref:`String` value **)** + +Put a zero-terminated ascii string into the stream prepended by a 32 bits unsigned integer representing its size. + .. _class_StreamPeer_put_u16: - void **put_u16** **(** :ref:`int` value **)** @@ -285,7 +293,7 @@ Put an unsigned byte into the stream. - void **put_utf8_string** **(** :ref:`String` value **)** -Put a zero-terminated utf8 string into the stream. +Put a zero-terminated utf8 string into the stream prepended by a 32 bits unsigned integer representing its size. .. _class_StreamPeer_put_var: diff --git a/classes/class_streampeerssl.rst b/classes/class_streampeerssl.rst index 3997fcd56..dd123825b 100644 --- a/classes/class_streampeerssl.rst +++ b/classes/class_streampeerssl.rst @@ -46,8 +46,13 @@ Enumerations enum **Status**: - **STATUS_DISCONNECTED** = **0** --- A status representing a ``StreamPeerSSL`` that is disconnected. + +- **STATUS_HANDSHAKING** = **1** + - **STATUS_CONNECTED** = **2** --- A status representing a ``StreamPeerSSL`` that is connected to a host. + - **STATUS_ERROR** = **3** + - **STATUS_ERROR_HOSTNAME_MISMATCH** = **4** --- An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation. Description diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst index d95b0b1c6..09c75f9c1 100644 --- a/classes/class_streampeertcp.rst +++ b/classes/class_streampeertcp.rst @@ -43,14 +43,17 @@ Enumerations enum **Status**: - **STATUS_NONE** = **0** --- The initial status of the ``StreamPeerTCP``, also the status after a disconnect. + - **STATUS_CONNECTING** = **1** --- A status representing a ``StreamPeerTCP`` that is connecting to a host. + - **STATUS_CONNECTED** = **2** --- A status representing a ``StreamPeerTCP`` that is connected to a host. + - **STATUS_ERROR** = **3** --- A status representing a ``StreamPeerTCP`` in error state. Description ----------- -TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a tcp server. +TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a TCP server. Method Descriptions ------------------- @@ -89,6 +92,8 @@ Return the status of the connection, one of STATUS\_\* enum. - :ref:`bool` **is_connected_to_host** **(** **)** const +Returns ``true`` if this peer is currently connected to a host, ``false[code] otherwise. + .. _class_StreamPeerTCP_set_no_delay: - void **set_no_delay** **(** :ref:`bool` enabled **)** diff --git a/classes/class_string.rst b/classes/class_string.rst index 273bc6cd6..b84a68969 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -677,6 +677,8 @@ Returns a copy of the string with characters removed from the right. - :ref:`PoolByteArray` **sha256_buffer** **(** **)** +Returns the SHA-256 hash of the string as an array of bytes. + .. _class_String_sha256_text: - :ref:`String` **sha256_text** **(** **)** diff --git a/classes/class_styleboxtexture.rst b/classes/class_styleboxtexture.rst index 9917335b0..9cff9ed04 100644 --- a/classes/class_styleboxtexture.rst +++ b/classes/class_styleboxtexture.rst @@ -75,7 +75,9 @@ Enumerations enum **AxisStretchMode**: - **AXIS_STRETCH_MODE_STRETCH** = **0** + - **AXIS_STRETCH_MODE_TILE** = **1** + - **AXIS_STRETCH_MODE_TILE_FIT** = **2** Description diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index fd060ca16..b5120b29b 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -82,6 +82,8 @@ The ``SurfaceTool`` now contains one vertex of a triangle which has a UV coordin It is very important that vertex attributes are passed **before** the call to :ref:`add_vertex`, failure to do this will result in an error when committing the vertex information to a mesh. +Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. + Method Descriptions ------------------- @@ -89,7 +91,7 @@ Method Descriptions - void **add_bones** **(** :ref:`PoolIntArray` bones **)** -Add an array of bones for the next Vertex to use. +Add an array of bones for the next Vertex to use. Array must contain 4 integers. .. _class_SurfaceTool_add_color: @@ -131,6 +133,8 @@ Specify a Tangent for the next Vertex to use. Insert a triangle fan made of array data into :ref:`Mesh` being constructed. +Requires primitive type be set to ``PRIMITIVE_TRIANGLES``. + .. _class_SurfaceTool_add_uv: - void **add_uv** **(** :ref:`Vector2` uv **)** @@ -153,12 +157,14 @@ Specify position of current Vertex. Should be called after specifying other vert - void **add_weights** **(** :ref:`PoolRealArray` weights **)** -Specify weight value for next Vertex to use. +Specify weight values for next Vertex to use. Array must contain 4 values. .. _class_SurfaceTool_append_from: - void **append_from** **(** :ref:`Mesh` existing, :ref:`int` surface, :ref:`Transform` transform **)** +Append vertices from a given :ref:`Mesh` surface onto the current vertex array with specified :ref:`Transform`. + .. _class_SurfaceTool_begin: - void **begin** **(** :ref:`PrimitiveType` primitive **)** @@ -181,6 +187,8 @@ Returns a constructed :ref:`ArrayMesh` from current information - void **create_from** **(** :ref:`Mesh` existing, :ref:`int` surface **)** +Creates a vertex array from an existing :ref:`Mesh`. + .. _class_SurfaceTool_deindex: - void **deindex** **(** **)** @@ -195,10 +203,16 @@ Generates normals from Vertices so you do not have to do it manually. Setting "flip" ``true`` inverts resulting normals. +Requires primitive type to be set to ``PRIMITIVE_TRIANGLES``. + .. _class_SurfaceTool_generate_tangents: - void **generate_tangents** **(** **)** +Generates a tangent vector for each vertex. + +Requires that each vertex have UVs and normals set already. + .. _class_SurfaceTool_index: - void **index** **(** **)** diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index c7026fa63..a682204d3 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -131,9 +131,11 @@ Enumerations enum **TabAlign**: -- **ALIGN_LEFT** = **0** -- **ALIGN_CENTER** = **1** -- **ALIGN_RIGHT** = **2** +- **ALIGN_LEFT** = **0** --- Align the tabs to the left. + +- **ALIGN_CENTER** = **1** --- Align the tabs to the center. + +- **ALIGN_RIGHT** = **2** --- Align the tabs to the right. Description ----------- @@ -171,6 +173,8 @@ The current tab index. When set, this index's :ref:`Control` node | *Getter* | get_drag_to_rearrange_enabled() | +----------+--------------------------------------+ +If ``true``, tabs can be rearranged with mouse drag. + .. _class_TabContainer_tab_align: - :ref:`TabAlign` **tab_align** @@ -250,6 +254,8 @@ Returns the title of the tab at index ``tab_idx``. Tab titles default to the nam - :ref:`int` **get_tabs_rearrange_group** **(** **)** const +Returns the ``TabContainer`` rearrange group id. + .. _class_TabContainer_set_popup: - void **set_popup** **(** :ref:`Node` popup **)** @@ -278,3 +284,5 @@ Sets a title for the tab at index ``tab_idx``. Tab titles default to the name of - void **set_tabs_rearrange_group** **(** :ref:`int` group_id **)** +Defines rearrange group id, choose for each ``TabContainer`` the same value to enable tab drag between ``TabContainer``. Enable drag with ``set_drag_to_rearrange_enabled(true)``. + diff --git a/classes/class_tabs.rst b/classes/class_tabs.rst index 325e3a386..272f55eaf 100644 --- a/classes/class_tabs.rst +++ b/classes/class_tabs.rst @@ -148,17 +148,23 @@ Enumerations enum **CloseButtonDisplayPolicy**: - **CLOSE_BUTTON_SHOW_NEVER** = **0** + - **CLOSE_BUTTON_SHOW_ACTIVE_ONLY** = **1** + - **CLOSE_BUTTON_SHOW_ALWAYS** = **2** + - **CLOSE_BUTTON_MAX** = **3** .. _enum_Tabs_TabAlign: enum **TabAlign**: -- **ALIGN_LEFT** = **0** -- **ALIGN_CENTER** = **1** -- **ALIGN_RIGHT** = **2** +- **ALIGN_LEFT** = **0** --- Align the tabs to the left. + +- **ALIGN_CENTER** = **1** --- Align the tabs to the center. + +- **ALIGN_RIGHT** = **2** --- Align the tabs to the right. + - **ALIGN_MAX** = **3** Description @@ -179,6 +185,8 @@ Property Descriptions | *Getter* | get_current_tab() | +----------+------------------------+ +Select tab at index ``tab_idx``. + .. _class_Tabs_drag_to_rearrange_enabled: - :ref:`bool` **drag_to_rearrange_enabled** @@ -189,6 +197,8 @@ Property Descriptions | *Getter* | get_drag_to_rearrange_enabled() | +----------+--------------------------------------+ +If ``true``, tabs can be rearranged with mouse drag. + .. _class_Tabs_scrolling_enabled: - :ref:`bool` **scrolling_enabled** @@ -209,6 +219,8 @@ Property Descriptions | *Getter* | get_tab_align() | +----------+----------------------+ +The alignment of all tabs. See enum ``TabAlign`` constants for details. + .. _class_Tabs_tab_close_display_policy: - :ref:`CloseButtonDisplayPolicy` **tab_close_display_policy** @@ -226,10 +238,14 @@ Method Descriptions - void **add_tab** **(** :ref:`String` title="", :ref:`Texture` icon=null **)** +Adds a new tab. + .. _class_Tabs_ensure_tab_visible: - void **ensure_tab_visible** **(** :ref:`int` idx **)** +Moves the Scroll view to make the tab visible. + .. _class_Tabs_get_offset_buttons_visible: - :ref:`bool` **get_offset_buttons_visible** **(** **)** const @@ -238,18 +254,26 @@ Method Descriptions - :ref:`bool` **get_select_with_rmb** **(** **)** const +Returns ``true`` if select with right mouse button is enabled. + .. _class_Tabs_get_tab_count: - :ref:`int` **get_tab_count** **(** **)** const +Returns the number of tabs. + .. _class_Tabs_get_tab_disabled: - :ref:`bool` **get_tab_disabled** **(** :ref:`int` tab_idx **)** const +Returns ``true`` if the tab at index ``tab_idx`` is disabled. + .. _class_Tabs_get_tab_icon: - :ref:`Texture` **get_tab_icon** **(** :ref:`int` tab_idx **)** const +Returns the :ref:`Texture` for the tab at index ``tab_idx`` or null if the tab has no :ref:`Texture`. + .. _class_Tabs_get_tab_offset: - :ref:`int` **get_tab_offset** **(** **)** const @@ -264,10 +288,14 @@ Returns tab :ref:`Rect2` with local position and size. - :ref:`String` **get_tab_title** **(** :ref:`int` tab_idx **)** const +Returns the title of the tab at index ``tab_idx``. Tab titles default to the name of the indexed child node, but this can be overridden with :ref:`set_tab_title`. + .. _class_Tabs_get_tabs_rearrange_group: - :ref:`int` **get_tabs_rearrange_group** **(** **)** const +Returns the ``Tabs`` rearrange group id. + .. _class_Tabs_move_tab: - void **move_tab** **(** :ref:`int` from, :ref:`int` to **)** @@ -278,23 +306,35 @@ Rearrange tab. - void **remove_tab** **(** :ref:`int` tab_idx **)** +Removes tab at index ``tab_idx`` + .. _class_Tabs_set_select_with_rmb: - void **set_select_with_rmb** **(** :ref:`bool` enabled **)** +If ``true`` enables selecting a tab with right mouse button. + .. _class_Tabs_set_tab_disabled: - void **set_tab_disabled** **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** +If ``disabled`` is false, hides the tab at index ``tab_idx``. Note that its title text will remain, unless also removed with :ref:`set_tab_title`. + .. _class_Tabs_set_tab_icon: - void **set_tab_icon** **(** :ref:`int` tab_idx, :ref:`Texture` icon **)** +Sets an icon for the tab at index ``tab_idx``. + .. _class_Tabs_set_tab_title: - void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` title **)** +Sets a title for the tab at index ``tab_idx``. + .. _class_Tabs_set_tabs_rearrange_group: - void **set_tabs_rearrange_group** **(** :ref:`int` group_id **)** +Defines rearrange group id, choose for each ``Tabs`` the same value to enable tab drag between ``Tabs``. Enable drag with ``set_drag_to_rearrange_enabled(true)``. + diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 48528e1cb..cc7a746f5 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -252,11 +252,17 @@ Enumerations enum **MenuItems**: - **MENU_CUT** = **0** --- Cuts (Copies and clears) the selected text. + - **MENU_COPY** = **1** --- Copies the selected text. + - **MENU_PASTE** = **2** --- Pastes the clipboard text over the selected text (or at the cursor's position). + - **MENU_CLEAR** = **3** --- Erases the whole :ref:`TextEdit` text. + - **MENU_SELECT_ALL** = **4** --- Selects the whole :ref:`TextEdit` text. + - **MENU_UNDO** = **5** --- Undoes the previous action. + - **MENU_MAX** = **6** .. _enum_TextEdit_SearchFlags: @@ -264,7 +270,9 @@ enum **MenuItems**: enum **SearchFlags**: - **SEARCH_MATCH_CASE** = **1** --- Match case when searching. + - **SEARCH_WHOLE_WORDS** = **2** --- Match whole words when searching. + - **SEARCH_BACKWARDS** = **4** --- Search from end to beginning. Description diff --git a/classes/class_texture.rst b/classes/class_texture.rst index cbe79c7cf..fa2af7140 100644 --- a/classes/class_texture.rst +++ b/classes/class_texture.rst @@ -54,14 +54,21 @@ Enumerations enum **Flags**: - **FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled. + - **FLAG_MIPMAPS** = **1** --- Generate mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. + - **FLAG_REPEAT** = **2** --- Repeats texture (instead of clamp to edge). + - **FLAG_FILTER** = **4** --- Magnifying filter, to enable smooth zooming in of the texture. + - **FLAG_ANISOTROPIC_FILTER** = **8** --- Anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. More effective on planes often shown going to the horrizon as those textures (Walls or Ground for example) get squashed in the viewport to different aspect ratios and regular mipmaps keep the aspect ratio so they don't optimize storage that well in those cases. + - **FLAG_CONVERT_TO_LINEAR** = **16** --- Converts texture to SRGB color space. + - **FLAG_MIRRORED_REPEAT** = **32** --- Repeats texture with alternate sections mirrored. + - **FLAG_VIDEO_SURFACE** = **2048** --- Texture is a video surface. Description diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst index 9bc8142c3..a53a8166c 100644 --- a/classes/class_texturebutton.rst +++ b/classes/class_texturebutton.rst @@ -45,11 +45,17 @@ Enumerations enum **StretchMode**: - **STRETCH_SCALE** = **0** --- Scale to fit the node's bounding rectangle. + - **STRETCH_TILE** = **1** --- Tile inside the node's bounding rectangle. + - **STRETCH_KEEP** = **2** --- The texture keeps its original size and stays in the bounding rectangle's top-left corner. + - **STRETCH_KEEP_CENTERED** = **3** --- The texture keeps its original size and stays centered in the node's bounding rectangle. + - **STRETCH_KEEP_ASPECT** = **4** --- Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio. + - **STRETCH_KEEP_ASPECT_CENTERED** = **5** --- Scale the texture to fit the node's bounding rectangle, center it, and maintain its aspect ratio. + - **STRETCH_KEEP_ASPECT_COVERED** = **6** --- Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits. Description diff --git a/classes/class_texturelayered.rst b/classes/class_texturelayered.rst index d41aa9598..f95cd4070 100644 --- a/classes/class_texturelayered.rst +++ b/classes/class_texturelayered.rst @@ -56,8 +56,11 @@ Enumerations enum **Flags**: - **FLAG_MIPMAPS** = **1** + - **FLAG_REPEAT** = **2** + - **FLAG_FILTER** = **4** + - **FLAGS_DEFAULT** = **4** Property Descriptions diff --git a/classes/class_textureprogress.rst b/classes/class_textureprogress.rst index 8cad1c19d..94e22ad73 100644 --- a/classes/class_textureprogress.rst +++ b/classes/class_textureprogress.rst @@ -59,14 +59,22 @@ Enumerations enum **FillMode**: - **FILL_LEFT_TO_RIGHT** = **0** --- The :ref:`texture_progress` fills from left to right. + - **FILL_RIGHT_TO_LEFT** = **1** --- The :ref:`texture_progress` fills from right to left. + - **FILL_TOP_TO_BOTTOM** = **2** --- The :ref:`texture_progress` fills from top to bototm. + - **FILL_BOTTOM_TO_TOP** = **3** --- The :ref:`texture_progress` fills from bottom to top. -- **FILL_CLOCKWISE** = **4** --- Turns the node into a radial bar. The :ref:`texture_progress` fills clockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to refine its behavior. -- **FILL_COUNTER_CLOCKWISE** = **5** --- Turns the node into a radial bar. The :ref:`texture_progress` fills counter-clockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to refine its behavior. -- **FILL_BILINEAR_LEFT_AND_RIGHT** = **6** -- **FILL_BILINEAR_TOP_AND_BOTTOM** = **7** -- **FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE** = **8** + +- **FILL_CLOCKWISE** = **4** --- Turns the node into a radial bar. The :ref:`texture_progress` fills clockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. + +- **FILL_COUNTER_CLOCKWISE** = **5** --- Turns the node into a radial bar. The :ref:`texture_progress` fills counter-clockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. + +- **FILL_BILINEAR_LEFT_AND_RIGHT** = **6** --- The :ref:`texture_progress` fills from the center, expanding both towards the left and the right. + +- **FILL_BILINEAR_TOP_AND_BOTTOM** = **7** --- The :ref:`texture_progress` fills from the center, expanding both towards the top and the bottom. + +- **FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE** = **8** --- Turns the node into a radial bar. The :ref:`texture_progress` fills radially from the center, expanding both clockwise and counter-clockwise. See :ref:`radial_center_offset`, :ref:`radial_initial_angle` and :ref:`radial_fill_degrees` to control the way the bar fills up. Description ----------- @@ -234,6 +242,8 @@ The ``value`` property comes from :ref:`Range`. See :ref:`Range.val | *Getter* | get_tint_over() | +----------+----------------------+ +Multiplies the color of the bar's ``texture_over`` texture. The effect is similar to :ref:`CanvasItem.modulate`, except it only affects this specific texture instead of the entire node. + .. _class_TextureProgress_tint_progress: - :ref:`Color` **tint_progress** @@ -244,6 +254,8 @@ The ``value`` property comes from :ref:`Range`. See :ref:`Range.val | *Getter* | get_tint_progress() | +----------+--------------------------+ +Multiplies the color of the bar's ``texture_progress`` texture. + .. _class_TextureProgress_tint_under: - :ref:`Color` **tint_under** @@ -254,3 +266,5 @@ The ``value`` property comes from :ref:`Range`. See :ref:`Range.val | *Getter* | get_tint_under() | +----------+-----------------------+ +Multiplies the color of the bar's ``texture_under`` texture. + diff --git a/classes/class_texturerect.rst b/classes/class_texturerect.rst index 2a1253618..511e761e2 100644 --- a/classes/class_texturerect.rst +++ b/classes/class_texturerect.rst @@ -35,12 +35,19 @@ Enumerations enum **StretchMode**: - **STRETCH_SCALE_ON_EXPAND** = **0** --- Scale to fit the node's bounding rectangle, only if ``expand`` is ``true``. Default ``stretch_mode``, for backwards compatibility. Until you set ``expand`` to ``true``, the texture will behave like ``STRETCH_KEEP``. + - **STRETCH_SCALE** = **1** --- Scale to fit the node's bounding rectangle. + - **STRETCH_TILE** = **2** --- Tile inside the node's bounding rectangle. + - **STRETCH_KEEP** = **3** --- The texture keeps its original size and stays in the bounding rectangle's top-left corner. + - **STRETCH_KEEP_CENTERED** = **4** --- The texture keeps its original size and stays centered in the node's bounding rectangle. + - **STRETCH_KEEP_ASPECT** = **5** --- Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio. + - **STRETCH_KEEP_ASPECT_CENTERED** = **6** --- Scale the texture to fit the node's bounding rectangle, center it and maintain its aspect ratio. + - **STRETCH_KEEP_ASPECT_COVERED** = **7** --- Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits. Description diff --git a/classes/class_thread.rst b/classes/class_thread.rst index 372cc980d..5c9d0943d 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -37,7 +37,9 @@ Enumerations enum **Priority**: - **PRIORITY_LOW** = **0** + - **PRIORITY_NORMAL** = **1** + - **PRIORITY_HIGH** = **2** Description diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index dec9c9886..3c0232ad6 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -115,7 +115,9 @@ Enumerations enum **HalfOffset**: - **HALF_OFFSET_X** = **0** --- Half offset on the X coordinate. + - **HALF_OFFSET_Y** = **1** --- Half offset on the Y coordinate. + - **HALF_OFFSET_DISABLED** = **2** --- Half offset disabled. .. _enum_TileMap_TileOrigin: @@ -123,7 +125,9 @@ enum **HalfOffset**: enum **TileOrigin**: - **TILE_ORIGIN_TOP_LEFT** = **0** --- Tile origin at its top-left corner. + - **TILE_ORIGIN_CENTER** = **1** --- Tile origin at its center. + - **TILE_ORIGIN_BOTTOM_LEFT** = **2** --- Tile origin at its bottom-left corner. .. _enum_TileMap_Mode: @@ -131,7 +135,9 @@ enum **TileOrigin**: enum **Mode**: - **MODE_SQUARE** = **0** --- Orthogonal orientation mode. + - **MODE_ISOMETRIC** = **1** --- Isometric orientation mode. + - **MODE_CUSTOM** = **2** --- Custom orientation mode. Constants @@ -196,7 +202,7 @@ Amount to offset alternating tiles. Uses HALF_OFFSET\_\* constants. Default valu | *Getter* | get_quadrant_size() | +----------+--------------------------+ -The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16. +The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16. .. _class_TileMap_cell_size: @@ -316,7 +322,7 @@ The TileMap orientation mode. Uses MODE\_\* constants. Default value: MODE_SQUAR | *Getter* | get_occluder_light_mask() | +----------+--------------------------------+ -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). +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). .. _class_TileMap_tile_set: diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index e83212553..b4608e5a7 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -129,7 +129,9 @@ Enumerations enum **BitmaskMode**: - **BITMASK_2X2** = **0** + - **BITMASK_3X3_MINIMAL** = **1** + - **BITMASK_3X3** = **2** .. _enum_TileSet_TileMode: @@ -137,7 +139,9 @@ enum **BitmaskMode**: enum **TileMode**: - **SINGLE_TILE** = **0** + - **AUTO_TILE** = **1** + - **ATLAS_TILE** = **2** .. _enum_TileSet_AutotileBindings: @@ -145,12 +149,19 @@ enum **TileMode**: enum **AutotileBindings**: - **BIND_TOPLEFT** = **1** + - **BIND_TOP** = **2** + - **BIND_TOPRIGHT** = **4** + - **BIND_LEFT** = **8** + - **BIND_RIGHT** = **32** + - **BIND_BOTTOMLEFT** = **64** + - **BIND_BOTTOM** = **128** + - **BIND_BOTTOMRIGHT** = **256** Description @@ -197,7 +208,7 @@ Clears all tiles. - void **create_tile** **(** :ref:`int` id **)** -Creates a new tile which will be referenced by the given ID. +Creates a new tile with the given ID. .. _class_TileSet_find_tile_by_name: @@ -221,33 +232,37 @@ Returns an array of all currently used tile IDs. - void **remove_tile** **(** :ref:`int` id **)** -Removes the tile referenced by the given ID. +Removes the given tile ID. .. _class_TileSet_tile_add_shape: - void **tile_add_shape** **(** :ref:`int` id, :ref:`Shape2D` shape, :ref:`Transform2D` shape_transform, :ref:`bool` one_way=false, :ref:`Vector2` autotile_coord=Vector2( 0, 0 ) **)** +Adds a shape to the tile. + .. _class_TileSet_tile_get_light_occluder: - :ref:`OccluderPolygon2D` **tile_get_light_occluder** **(** :ref:`int` id **)** const -Returns the light occluder of the tile. +Returns the tile's light occluder. .. _class_TileSet_tile_get_material: - :ref:`ShaderMaterial` **tile_get_material** **(** :ref:`int` id **)** const -Returns the material of the tile. +Returns the tile's material. .. _class_TileSet_tile_get_modulate: - :ref:`Color` **tile_get_modulate** **(** :ref:`int` id **)** const +Returns the tile's modulation color. + .. _class_TileSet_tile_get_name: - :ref:`String` **tile_get_name** **(** :ref:`int` id **)** const -Returns the name of the tile. +Returns the tile's name. .. _class_TileSet_tile_get_navigation_polygon: @@ -265,6 +280,8 @@ Returns the offset of the tile's navigation polygon. - :ref:`Texture` **tile_get_normal_map** **(** :ref:`int` id **)** const +Returns the tile's normal map texture. + .. _class_TileSet_tile_get_occluder_offset: - :ref:`Vector2` **tile_get_occluder_offset** **(** :ref:`int` id **)** const @@ -281,33 +298,43 @@ Returns the tile sub-region in the texture. - :ref:`Shape2D` **tile_get_shape** **(** :ref:`int` id, :ref:`int` shape_id **)** const +Returns a tile's given shape. + .. _class_TileSet_tile_get_shape_count: - :ref:`int` **tile_get_shape_count** **(** :ref:`int` id **)** const +Returns the number of shapes assigned to a tile. + .. _class_TileSet_tile_get_shape_offset: - :ref:`Vector2` **tile_get_shape_offset** **(** :ref:`int` id, :ref:`int` shape_id **)** const +Returns the offset of a tile's shape. + .. _class_TileSet_tile_get_shape_one_way: - :ref:`bool` **tile_get_shape_one_way** **(** :ref:`int` id, :ref:`int` shape_id **)** const +Returns the one-way collision value of a tile's shape. + .. _class_TileSet_tile_get_shape_transform: - :ref:`Transform2D` **tile_get_shape_transform** **(** :ref:`int` id, :ref:`int` shape_id **)** const +Returns the :ref:`Transform2D` of a tile's shape. + .. _class_TileSet_tile_get_shapes: - :ref:`Array` **tile_get_shapes** **(** :ref:`int` id **)** const -Returns the array of shapes of the tile. +Returns an array of the tile's shapes. .. _class_TileSet_tile_get_texture: - :ref:`Texture` **tile_get_texture** **(** :ref:`int` id **)** const -Returns the texture of the tile. +Returns the tile's texture. .. _class_TileSet_tile_get_texture_offset: @@ -319,10 +346,14 @@ Returns the texture offset of the tile. - :ref:`TileMode` **tile_get_tile_mode** **(** :ref:`int` id **)** const +Returns the tile's :ref:`TileMode`. + .. _class_TileSet_tile_get_z_index: - :ref:`int` **tile_get_z_index** **(** :ref:`int` id **)** const +Returns the tile's z-index (drawing layer). + .. _class_TileSet_tile_set_light_occluder: - void **tile_set_light_occluder** **(** :ref:`int` id, :ref:`OccluderPolygon2D` light_occluder **)** @@ -369,30 +400,38 @@ Sets the tile's normal map texture. - void **tile_set_occluder_offset** **(** :ref:`int` id, :ref:`Vector2` occluder_offset **)** -Set an offset for the tile's light occluder. +Sets an offset for the tile's light occluder. .. _class_TileSet_tile_set_region: - void **tile_set_region** **(** :ref:`int` id, :ref:`Rect2` region **)** -Set the tile's sub-region in the texture. This is common in texture atlases. +Sets the tile's sub-region in the texture. This is common in texture atlases. .. _class_TileSet_tile_set_shape: - void **tile_set_shape** **(** :ref:`int` id, :ref:`int` shape_id, :ref:`Shape2D` shape **)** +Sets a shape for the tile, enabling collision. + .. _class_TileSet_tile_set_shape_offset: - void **tile_set_shape_offset** **(** :ref:`int` id, :ref:`int` shape_id, :ref:`Vector2` shape_offset **)** +Sets the offset of a tile's shape. + .. _class_TileSet_tile_set_shape_one_way: - void **tile_set_shape_one_way** **(** :ref:`int` id, :ref:`int` shape_id, :ref:`bool` one_way **)** +Enables one-way collision on a tile's shape. + .. _class_TileSet_tile_set_shape_transform: - void **tile_set_shape_transform** **(** :ref:`int` id, :ref:`int` shape_id, :ref:`Transform2D` shape_transform **)** +Sets a :ref:`Transform2D` on a tile's shape. + .. _class_TileSet_tile_set_shapes: - void **tile_set_shapes** **(** :ref:`int` id, :ref:`Array` shapes **)** diff --git a/classes/class_timer.rst b/classes/class_timer.rst index 20a5738b6..461f66114 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -61,6 +61,7 @@ Enumerations enum **TimerProcessMode**: - **TIMER_PROCESS_PHYSICS** = **0** --- Update the timer during the physics step at each frame (fixed framerate processing). + - **TIMER_PROCESS_IDLE** = **1** --- Update the timer during the idle time at each frame. Description diff --git a/classes/class_touchscreenbutton.rst b/classes/class_touchscreenbutton.rst index afd38f30a..8fee97875 100644 --- a/classes/class_touchscreenbutton.rst +++ b/classes/class_touchscreenbutton.rst @@ -69,6 +69,7 @@ Enumerations enum **VisibilityMode**: - **VISIBILITY_ALWAYS** = **0** --- Always visible. + - **VISIBILITY_TOUCHSCREEN_ONLY** = **1** --- Visible on touch screens only. Description diff --git a/classes/class_transform.rst b/classes/class_transform.rst index 087244688..470629fbf 100644 --- a/classes/class_transform.rst +++ b/classes/class_transform.rst @@ -62,8 +62,11 @@ Constants --------- - **IDENTITY** = **Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )** + - **FLIP_X** = **Transform( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )** + - **FLIP_Y** = **Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )** + - **FLIP_Z** = **Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )** Description diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index d2c463e00..d68e4aeeb 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -68,7 +68,9 @@ Constants --------- - **IDENTITY** = **Transform2D( 1, 0, 0, 1, 0, 0 )** + - **FLIP_X** = **Transform2D( -1, 0, 0, 1, 0, 0 )** + - **FLIP_Y** = **Transform2D( 1, 0, 0, -1, 0, 0 )** Description diff --git a/classes/class_tree.rst b/classes/class_tree.rst index c9732cc9b..009e1983c 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -264,7 +264,9 @@ Enumerations enum **DropModeFlags**: - **DROP_MODE_DISABLED** = **0** + - **DROP_MODE_ON_ITEM** = **1** + - **DROP_MODE_INBETWEEN** = **2** .. _enum_Tree_SelectMode: @@ -272,7 +274,9 @@ enum **DropModeFlags**: enum **SelectMode**: - **SELECT_SINGLE** = **0** --- Allow selection of a single item at a time. + - **SELECT_ROW** = **1** + - **SELECT_MULTI** = **2** --- Allow selection of multiple items at the same time. Description @@ -342,7 +346,7 @@ The amount of columns. | *Getter* | get_drop_mode_flags() | +----------+----------------------------+ -The drop mode as an OR combination of flags. See ``DROP_MODE_*`` constants. Once dropping is done, reverts to ``DROP_MODE_DISABLED``. Setting this during :ref:`can_drop_data` is recommended. +The drop mode as an OR combination of flags. See ``DROP_MODE_*`` constants. Once dropping is done, reverts to ``DROP_MODE_DISABLED``. Setting this during :ref:`Control.can_drop_data` is recommended. .. _class_Tree_hide_folding: @@ -435,7 +439,7 @@ Returns the rectangle for custom popups. Helper to create custom cell controls t - :ref:`int` **get_drop_section_at_position** **(** :ref:`Vector2` position **)** const -If :ref:`drop_mode_flags` includes ``DROP_MODE_INBETWEEN``, returns -1 if ``position`` is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if :ref:`drop_mode_flags` includes ``DROP_MODE_ON_ITEM``. +If :ref:`drop_mode_flags` includes ``DROP_MODE_INBETWEEN``, returns -1 if ``position`` is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if :ref:`drop_mode_flags` includes ``DROP_MODE_ON_ITEM``. Otherwise, returns 0. If there are no tree item at ``position``, returns -100. diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index 4f7d0cd19..9f34bb44d 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -148,18 +148,23 @@ Enumerations enum **TreeCellMode**: - **CELL_MODE_STRING** = **0** --- Cell contains a string. + - **CELL_MODE_CHECK** = **1** --- Cell can be checked. + - **CELL_MODE_RANGE** = **2** --- Cell contains a range. -- **CELL_MODE_RANGE_EXPRESSION** = **3** --- Cell contains a range expression. -- **CELL_MODE_ICON** = **4** --- Cell contains an icon. -- **CELL_MODE_CUSTOM** = **5** + +- **CELL_MODE_ICON** = **3** --- Cell contains an icon. + +- **CELL_MODE_CUSTOM** = **4** .. _enum_TreeItem_TextAlign: enum **TextAlign**: - **ALIGN_LEFT** = **0** --- Align text to the left. See ``set_text_align()``. + - **ALIGN_CENTER** = **1** --- Center text. See ``set_text_align()``. + - **ALIGN_RIGHT** = **2** --- Align text to the right. See ``set_text_align()``. Description @@ -213,7 +218,7 @@ Method Descriptions - void **add_button** **(** :ref:`int` column, :ref:`Texture` button, :ref:`int` button_idx=-1, :ref:`bool` disabled=false, :ref:`String` tooltip="" **)** -Adds a button with :ref:`Texture` ``button`` at column ``column``. The ``button_idx`` index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling ``get_button_count()`` immediately after this method. Optionally, the button can be ``disabled`` and have a ``tooltip``. +Adds a button with :ref:`Texture` ``button`` at column ``column``. The ``button_idx`` index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count` immediately after this method. Optionally, the button can be ``disabled`` and have a ``tooltip``. .. _class_TreeItem_clear_custom_bg_color: @@ -451,6 +456,8 @@ Sets the given column's custom color. Sets the given column's custom draw callback to ``callback`` method on ``object``. +The ``callback`` should accept two arguments: the :ref:`TreeItem` that is drawn and its position and size as a :ref:`Rect2`. + .. _class_TreeItem_set_editable: - void **set_editable** **(** :ref:`int` column, :ref:`bool` enabled **)** diff --git a/classes/class_tween.rst b/classes/class_tween.rst index 9fe0f346b..d7c15fe2e 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -105,6 +105,7 @@ Enumerations enum **TweenProcessMode**: - **TWEEN_PROCESS_PHYSICS** = **0** --- The tween updates with the ``_physics_process`` callback. + - **TWEEN_PROCESS_IDLE** = **1** --- The tween updates with the ``_process`` callback. .. _enum_Tween_EaseType: @@ -112,8 +113,11 @@ enum **TweenProcessMode**: enum **EaseType**: - **EASE_IN** = **0** --- The interpolation starts slowly and speeds up towards the end. + - **EASE_OUT** = **1** --- The interpolation starts quickly and slows down towards the end. + - **EASE_IN_OUT** = **2** --- A combination of EASE_IN and EASE_OUT. The interpolation is slowest at both ends. + - **EASE_OUT_IN** = **3** --- A combination of EASE_IN and EASE_OUT. The interpolation is fastest at both ends. .. _enum_Tween_TransitionType: @@ -121,15 +125,25 @@ enum **EaseType**: enum **TransitionType**: - **TRANS_LINEAR** = **0** --- The animation is interpolated linearly. + - **TRANS_SINE** = **1** --- The animation is interpolated using a sine function. + - **TRANS_QUINT** = **2** --- The animation is interpolated with a quintic (to the power of 5) function. + - **TRANS_QUART** = **3** --- The animation is interpolated with a quartic (to the power of 4) function. + - **TRANS_QUAD** = **4** --- The animation is interpolated with a quadratic (to the power of 2) function. + - **TRANS_EXPO** = **5** --- The animation is interpolated with an exponential (to the power of x) function. + - **TRANS_ELASTIC** = **6** --- The animation is interpolated with elasticity, wiggling around the edges. + - **TRANS_CUBIC** = **7** --- The animation is interpolated with a cubic (to the power of 3) function. + - **TRANS_CIRC** = **8** --- The animation is interpolated with a function using square roots. + - **TRANS_BOUNCE** = **9** --- The animation is interpolated by bouncing at the end. + - **TRANS_BACK** = **10** --- The animation is interpolated backing out at ends. Description @@ -143,8 +157,8 @@ Here is a brief usage example that causes a 2D node to move smoothly between two var tween = get_node("Tween") tween.interpolate_property($Node2D, "position", - Vector2(0, 0), Vector2(100, 100), 1, - Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) + Vector2(0, 0), Vector2(100, 100), 1, + Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) tween.start() Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector. @@ -199,7 +213,7 @@ Method Descriptions Follows ``method`` of ``object`` and applies the returned value on ``target_method`` of ``target``, beginning from ``initial_val`` for ``duration`` seconds, ``delay`` later. Methods are called with consecutive values. - Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_follow_property: @@ -207,7 +221,7 @@ Follows ``method`` of ``object`` and applies the returned value on ``target_meth Follows ``property`` of ``object`` and applies it on ``target_property`` of ``target``, beginning from ``initial_val`` for ``duration`` seconds, ``delay`` seconds later. - Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_get_runtime: @@ -233,7 +247,7 @@ Calls ``callback`` of ``object`` after ``duration`` on the main thread (similar Animates ``method`` of ``object`` from ``initial_val`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. Methods are called with consecutive values. - Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_interpolate_property: @@ -241,7 +255,7 @@ Animates ``method`` of ``object`` from ``initial_val`` to ``final_val`` for ``du Animates ``property`` of ``object`` from ``initial_val`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. Setting the initial value to ``null`` uses the current value of the property. - Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_is_active: @@ -321,7 +335,7 @@ Stops animating all tweens. Animates ``method`` of ``object`` from the value returned by ``initial_method`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. Methods are animated by calling them with consecutive values. - Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_targeting_property: @@ -329,7 +343,7 @@ Animates ``method`` of ``object`` from the value returned by ``initial_method`` Animates ``property`` of ``object`` from the current value of the ``initial_val`` property of ``initial`` to ``final_val`` for ``duration`` seconds, ``delay`` seconds later. - Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information +Use :ref:`TransitionType` for ``trans_type`` and :ref:`EaseType` for ``ease_type`` parameters. These values control the timing and direction of the interpolation. See the class description for more information .. _class_Tween_tell: diff --git a/classes/class_undoredo.rst b/classes/class_undoredo.rst index a3e3c1b0f..db9967148 100644 --- a/classes/class_undoredo.rst +++ b/classes/class_undoredo.rst @@ -55,7 +55,9 @@ Enumerations enum **MergeMode**: - **MERGE_DISABLE** = **0** + - **MERGE_ENDS** = **1** + - **MERGE_ALL** = **2** Description diff --git a/classes/class_upnp.rst b/classes/class_upnp.rst index d67fdd212..c16d0f8d5 100644 --- a/classes/class_upnp.rst +++ b/classes/class_upnp.rst @@ -62,33 +62,61 @@ Enumerations enum **UPNPResult**: - **UPNP_RESULT_SUCCESS** = **0** --- UPNP command or discovery was successful. + - **UPNP_RESULT_NOT_AUTHORIZED** = **1** --- Not authorized to use the command on the :ref:`UPNPDevice`. May be returned when the user disabled UPNP on their router. + - **UPNP_RESULT_PORT_MAPPING_NOT_FOUND** = **2** --- No port mapping was found for the given port, protocol combination on the given :ref:`UPNPDevice`. + - **UPNP_RESULT_INCONSISTENT_PARAMETERS** = **3** --- Inconsistent parameters. + - **UPNP_RESULT_NO_SUCH_ENTRY_IN_ARRAY** = **4** --- No such entry in array. May be returned if a given port, protocol combination is not found on an :ref:`UPNPDevice`. + - **UPNP_RESULT_ACTION_FAILED** = **5** --- The action failed. + - **UPNP_RESULT_SRC_IP_WILDCARD_NOT_PERMITTED** = **6** --- The :ref:`UPNPDevice` does not allow wildcard values for the source IP address. + - **UPNP_RESULT_EXT_PORT_WILDCARD_NOT_PERMITTED** = **7** --- The :ref:`UPNPDevice` does not allow wildcard values for the external port. + - **UPNP_RESULT_INT_PORT_WILDCARD_NOT_PERMITTED** = **8** --- The :ref:`UPNPDevice` does not allow wildcard values for the internal port. + - **UPNP_RESULT_REMOTE_HOST_MUST_BE_WILDCARD** = **9** --- The remote host value must be a wildcard. + - **UPNP_RESULT_EXT_PORT_MUST_BE_WILDCARD** = **10** --- The external port value must be a wildcard. + - **UPNP_RESULT_NO_PORT_MAPS_AVAILABLE** = **11** --- No port maps are available. May also be returned if port mapping functionality is not available. + - **UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM** = **12** --- Conflict with other mechanism. May be returned instead of ``UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING`` if a port mapping conflicts with an existing one. + - **UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING** = **13** --- Conflict with an existing port mapping. + - **UPNP_RESULT_SAME_PORT_VALUES_REQUIRED** = **14** --- External and internal port values must be the same. + - **UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED** = **15** --- Only permanent leases are supported. Do not use the ``duration`` parameter when adding port mappings. + - **UPNP_RESULT_INVALID_GATEWAY** = **16** --- Invalid gateway. + - **UPNP_RESULT_INVALID_PORT** = **17** --- Invalid port. + - **UPNP_RESULT_INVALID_PROTOCOL** = **18** --- Invalid protocol. + - **UPNP_RESULT_INVALID_DURATION** = **19** --- Invalid duration. + - **UPNP_RESULT_INVALID_ARGS** = **20** --- Invalid arguments. + - **UPNP_RESULT_INVALID_RESPONSE** = **21** --- Invalid response. + - **UPNP_RESULT_INVALID_PARAM** = **22** --- Invalid parameter. + - **UPNP_RESULT_HTTP_ERROR** = **23** --- HTTP error. + - **UPNP_RESULT_SOCKET_ERROR** = **24** --- Socket error. + - **UPNP_RESULT_MEM_ALLOC_ERROR** = **25** --- Error allocating memory. + - **UPNP_RESULT_NO_GATEWAY** = **26** --- No gateway available. You may need to call :ref:`discover` first, or discovery didn't detect any valid IGDs (InternetGatewayDevices). + - **UPNP_RESULT_NO_DEVICES** = **27** --- No devices available. You may need to call :ref:`discover` first, or discovery didn't detect any valid :ref:`UPNPDevice`\ s. + - **UPNP_RESULT_UNKNOWN_ERROR** = **28** --- Unknown error. Description diff --git a/classes/class_upnpdevice.rst b/classes/class_upnpdevice.rst index 4f9a955da..19e8c4fd5 100644 --- a/classes/class_upnpdevice.rst +++ b/classes/class_upnpdevice.rst @@ -54,14 +54,23 @@ Enumerations enum **IGDStatus**: - **IGD_STATUS_OK** = **0** --- OK. + - **IGD_STATUS_HTTP_ERROR** = **1** --- HTTP error. + - **IGD_STATUS_HTTP_EMPTY** = **2** --- Empty HTTP response. + - **IGD_STATUS_NO_URLS** = **3** --- Returned response contained no URLs. + - **IGD_STATUS_NO_IGD** = **4** --- Not a valid IGD. + - **IGD_STATUS_DISCONNECTED** = **5** --- Disconnected. + - **IGD_STATUS_UNKNOWN_DEVICE** = **6** --- Unknown device. + - **IGD_STATUS_INVALID_CONTROL** = **7** --- Invalid control. + - **IGD_STATUS_MALLOC_ERROR** = **8** --- Memory allocation error. + - **IGD_STATUS_UNKNOWN_ERROR** = **9** --- Unknown error. Description diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index 67dbc64c6..741e31e19 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -87,11 +87,18 @@ Methods Constants --------- -- **ZERO** = **Vector2( 0, 0 )** --- Null vector. +- **ZERO** = **Vector2( 0, 0 )** --- Zero vector. + +- **ONE** = **Vector2( 1, 1 )** --- One vector. + - **INF** = **Vector2( inf, inf )** --- Infinite vector. + - **LEFT** = **Vector2( -1, 0 )** --- Left unit vector. + - **RIGHT** = **Vector2( 1, 0 )** --- Right unit vector. + - **UP** = **Vector2( 0, -1 )** --- Up unit vector. + - **DOWN** = **Vector2( 0, 1 )** --- Down unit vector. Description @@ -111,13 +118,13 @@ Property Descriptions - :ref:`float` **x** -The vector's x component. +The vector's x component. Also accessible by using the index position ``[0]``. .. _class_Vector2_y: - :ref:`float` **y** -The vector's y component. +The vector's y component. Also accessible by using the index position ``[1]``. Method Descriptions ------------------- @@ -272,7 +279,7 @@ Returns the vector with all components rounded to the nearest integer, with half - :ref:`Vector2` **slerp** **(** :ref:`Vector2` b, :ref:`float` t **)** -Returns the result of SLERP between this vector and ``b``, by amount ``t``. ``t`` is in the range of ``0.0 - 1.0``, representing the amount of interpolation. +Returns the result of SLERP between this vector and ``b``, by amount ``t``. ``t`` is in the range of ``0.0 - 1.0``, representing the amount of interpolation. Both vectors need to be normalized. diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index d997fb33c..d3de83dda 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -90,15 +90,27 @@ Constants --------- - **AXIS_X** = **0** --- Enumerated value for the X axis. Returned by :ref:`max_axis` and :ref:`min_axis`. + - **AXIS_Y** = **1** --- Enumerated value for the Y axis. + - **AXIS_Z** = **2** --- Enumerated value for the Z axis. -- **ZERO** = **Vector3( 0, 0, 0 )** --- Null vector. + +- **ZERO** = **Vector3( 0, 0, 0 )** --- Zero vector. + +- **ONE** = **Vector3( 1, 1, 1 )** --- One vector. + - **INF** = **Vector3( inf, inf, inf )** --- Infinite vector. + - **LEFT** = **Vector3( -1, 0, 0 )** --- Left unit vector. + - **RIGHT** = **Vector3( 1, 0, 0 )** --- Right unit vector. + - **UP** = **Vector3( 0, 1, 0 )** --- Up unit vector. + - **DOWN** = **Vector3( 0, -1, 0 )** --- Down unit vector. + - **FORWARD** = **Vector3( 0, 0, -1 )** --- Forward unit vector. + - **BACK** = **Vector3( 0, 0, 1 )** --- Back unit vector. Description @@ -118,19 +130,19 @@ Property Descriptions - :ref:`float` **x** -The vector's x component. +The vector's x component. Also accessible by using the index position ``[0]``. .. _class_Vector3_y: - :ref:`float` **y** -The vector's y component. +The vector's y component. Also accessible by using the index position ``[1]``. .. _class_Vector3_z: - :ref:`float` **z** -The vector's z component. +The vector's z component. Also accessible by using the index position ``[2]``. Method Descriptions ------------------- diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index 51d5c3ba0..20a14ebec 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -143,8 +143,11 @@ Enumerations enum **UpdateMode**: - **UPDATE_DISABLED** = **0** --- Do not update the render target. + - **UPDATE_ONCE** = **1** --- Update the render target once, then switch to ``UPDATE_DISABLED``. + - **UPDATE_WHEN_VISIBLE** = **2** --- Update the render target only when it is visible. This is the default value. + - **UPDATE_ALWAYS** = **3** --- Always update the render target. .. _enum_Viewport_RenderInfo: @@ -152,11 +155,17 @@ enum **UpdateMode**: enum **RenderInfo**: - **RENDER_INFO_OBJECTS_IN_FRAME** = **0** --- Amount of objects in frame. + - **RENDER_INFO_VERTICES_IN_FRAME** = **1** --- Amount of vertices in frame. + - **RENDER_INFO_MATERIAL_CHANGES_IN_FRAME** = **2** --- Amount of material changes in frame. + - **RENDER_INFO_SHADER_CHANGES_IN_FRAME** = **3** --- Amount of shader changes in frame. + - **RENDER_INFO_SURFACE_CHANGES_IN_FRAME** = **4** --- Amount of surface changes in frame. + - **RENDER_INFO_DRAW_CALLS_IN_FRAME** = **5** --- Amount of draw calls in frame. + - **RENDER_INFO_MAX** = **6** --- Enum limiter. Do not use it directly. .. _enum_Viewport_MSAA: @@ -164,9 +173,13 @@ enum **RenderInfo**: enum **MSAA**: - **MSAA_DISABLED** = **0** --- Multisample anti-aliasing mode disabled. This is the default value. + - **MSAA_2X** = **1** + - **MSAA_4X** = **2** + - **MSAA_8X** = **3** + - **MSAA_16X** = **4** .. _enum_Viewport_ClearMode: @@ -174,7 +187,9 @@ enum **MSAA**: enum **ClearMode**: - **CLEAR_MODE_ALWAYS** = **0** --- Always clear the render target before drawing. + - **CLEAR_MODE_NEVER** = **1** --- Never clear the render target. + - **CLEAR_MODE_ONLY_NEXT_FRAME** = **2** --- Clear the render target next frame, then switch to ``CLEAR_MODE_NEVER``. .. _enum_Viewport_Usage: @@ -182,8 +197,11 @@ enum **ClearMode**: enum **Usage**: - **USAGE_2D** = **0** + - **USAGE_2D_NO_SAMPLING** = **1** + - **USAGE_3D** = **2** + - **USAGE_3D_NO_EFFECTS** = **3** .. _enum_Viewport_DebugDraw: @@ -191,8 +209,11 @@ enum **Usage**: enum **DebugDraw**: - **DEBUG_DRAW_DISABLED** = **0** --- Objects are displayed normally. + - **DEBUG_DRAW_UNSHADED** = **1** --- Objects are displayed without light information. + - **DEBUG_DRAW_OVERDRAW** = **2** --- Objected are displayed semi-transparent with additive blending so you can see where they intersect. + - **DEBUG_DRAW_WIREFRAME** = **3** --- Objects are displayed in wireframe style. .. _enum_Viewport_ShadowAtlasQuadrantSubdiv: @@ -200,12 +221,19 @@ enum **DebugDraw**: enum **ShadowAtlasQuadrantSubdiv**: - **SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED** = **0** + - **SHADOW_ATLAS_QUADRANT_SUBDIV_1** = **1** + - **SHADOW_ATLAS_QUADRANT_SUBDIV_4** = **2** + - **SHADOW_ATLAS_QUADRANT_SUBDIV_16** = **3** + - **SHADOW_ATLAS_QUADRANT_SUBDIV_64** = **4** + - **SHADOW_ATLAS_QUADRANT_SUBDIV_256** = **5** + - **SHADOW_ATLAS_QUADRANT_SUBDIV_1024** = **6** + - **SHADOW_ATLAS_QUADRANT_SUBDIV_MAX** = **7** --- Enum limiter. Do not use it directly. Description diff --git a/classes/class_visibilityenabler.rst b/classes/class_visibilityenabler.rst index 932dd7ebf..e17b38e29 100644 --- a/classes/class_visibilityenabler.rst +++ b/classes/class_visibilityenabler.rst @@ -33,7 +33,9 @@ Enumerations enum **Enabler**: - **ENABLER_PAUSE_ANIMATIONS** = **0** --- This enabler will pause :ref:`AnimationPlayer` nodes. + - **ENABLER_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody` nodes. + - **ENABLER_MAX** = **2** Description @@ -54,6 +56,8 @@ Property Descriptions | *Getter* | is_enabler_enabled() | +----------+----------------------+ +If ``true`` :ref:`RigidBody` nodes will be paused. + .. _class_VisibilityEnabler_pause_animations: - :ref:`bool` **pause_animations** @@ -64,3 +68,5 @@ Property Descriptions | *Getter* | is_enabler_enabled() | +----------+----------------------+ +If ``true`` :ref:`AnimationPlayer` nodes will be paused. + diff --git a/classes/class_visibilityenabler2d.rst b/classes/class_visibilityenabler2d.rst index 4951c62bb..29cf90d8d 100644 --- a/classes/class_visibilityenabler2d.rst +++ b/classes/class_visibilityenabler2d.rst @@ -41,11 +41,17 @@ Enumerations enum **Enabler**: - **ENABLER_PAUSE_ANIMATIONS** = **0** --- This enabler will pause :ref:`AnimationPlayer` nodes. + - **ENABLER_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody2D` nodes. + - **ENABLER_PAUSE_PARTICLES** = **2** --- This enabler will stop :ref:`Particles2D` nodes. + - **ENABLER_PARENT_PROCESS** = **3** --- This enabler will stop the parent's _process function. + - **ENABLER_PARENT_PHYSICS_PROCESS** = **4** --- This enabler will stop the parent's _physics_process function. + - **ENABLER_PAUSE_ANIMATED_SPRITES** = **5** + - **ENABLER_MAX** = **6** Description @@ -66,6 +72,8 @@ Property Descriptions | *Getter* | is_enabler_enabled() | +----------+----------------------+ +If ``true`` :ref:`RigidBody2D` nodes will be paused. + .. _class_VisibilityEnabler2D_pause_animated_sprites: - :ref:`bool` **pause_animated_sprites** @@ -76,6 +84,8 @@ Property Descriptions | *Getter* | is_enabler_enabled() | +----------+----------------------+ +If ``true`` :ref:`AnimatedSprite` nodes will be paused. + .. _class_VisibilityEnabler2D_pause_animations: - :ref:`bool` **pause_animations** @@ -86,6 +96,8 @@ Property Descriptions | *Getter* | is_enabler_enabled() | +----------+----------------------+ +If ``true`` :ref:`AnimationPlayer` nodes will be paused. + .. _class_VisibilityEnabler2D_pause_particles: - :ref:`bool` **pause_particles** @@ -96,6 +108,8 @@ Property Descriptions | *Getter* | is_enabler_enabled() | +----------+----------------------+ +If ``true`` :ref:`Particles2D` nodes will be paused. + .. _class_VisibilityEnabler2D_physics_process_parent: - :ref:`bool` **physics_process_parent** @@ -106,6 +120,8 @@ Property Descriptions | *Getter* | is_enabler_enabled() | +----------+----------------------+ +If ``true`` the parent's :ref:`Node._physics_process` will be stopped. + .. _class_VisibilityEnabler2D_process_parent: - :ref:`bool` **process_parent** @@ -116,3 +132,5 @@ Property Descriptions | *Getter* | is_enabler_enabled() | +----------+----------------------+ +If ``true`` the parent's :ref:`Node._process` will be stopped. + diff --git a/classes/class_visualscriptbuiltinfunc.rst b/classes/class_visualscriptbuiltinfunc.rst index 501cfd9fd..03ab6f4db 100644 --- a/classes/class_visualscriptbuiltinfunc.rst +++ b/classes/class_visualscriptbuiltinfunc.rst @@ -31,68 +31,131 @@ Enumerations enum **BuiltinFunc**: - **MATH_SIN** = **0** --- Return the sine of the input. + - **MATH_COS** = **1** --- Return the cosine of the input. + - **MATH_TAN** = **2** --- Return the tangent of the input. + - **MATH_SINH** = **3** --- Return the hyperbolic sine of the input. + - **MATH_COSH** = **4** --- Return the hyperbolic cosine of the input. + - **MATH_TANH** = **5** --- Return the hyperbolic tangent of the input. + - **MATH_ASIN** = **6** --- Return the arc sine of the input. + - **MATH_ACOS** = **7** --- Return the arc cosine of the input. + - **MATH_ATAN** = **8** --- Return the arc tangent of the input. + - **MATH_ATAN2** = **9** --- Return the arc tangent of the input, using the signs of both parameters to determine the exact angle. + - **MATH_SQRT** = **10** --- Return the square root of the input. + - **MATH_FMOD** = **11** --- Return the remainder of one input divided by the other, using floating-point numbers. + - **MATH_FPOSMOD** = **12** --- Return the positive remainder of one input divided by the other, using floating-point numbers. + - **MATH_FLOOR** = **13** --- Return the input rounded down. + - **MATH_CEIL** = **14** --- Return the input rounded up. + - **MATH_ROUND** = **15** --- Return the input rounded to the nearest integer. + - **MATH_ABS** = **16** --- Return the absolute value of the input. + - **MATH_SIGN** = **17** --- Return the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative. + - **MATH_POW** = **18** --- Return the input raised to a given power. + - **MATH_LOG** = **19** --- Return the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use. + - **MATH_EXP** = **20** --- Return the mathematical constant **e** raised to the specified power of the input. **e** has an approximate value of 2.71828. + - **MATH_ISNAN** = **21** --- Return whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist. + - **MATH_ISINF** = **22** --- Return whether the input is an infinite floating-point number or not. Infinity is usually produced by dividing a number by 0, though other ways exist. + - **MATH_EASE** = **23** --- Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. + - **MATH_DECIMALS** = **24** --- Return the number of digit places after the decimal that the first non-zero digit occurs. + - **MATH_STEPIFY** = **25** --- Return the input snapped to a given step. + - **MATH_LERP** = **26** --- Return a number linearly interpolated between the first two inputs, based on the third input. Uses the formula ``a + (a - b) * t``. + - **MATH_INVERSE_LERP** = **27** + - **MATH_RANGE_LERP** = **28** + - **MATH_DECTIME** = **29** --- Return the result of 'value' decreased by 'step' \* 'amount'. + - **MATH_RANDOMIZE** = **30** --- Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. + - **MATH_RAND** = **31** --- Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use it with the remainder function. + - **MATH_RANDF** = **32** --- Return a random floating-point value between 0 and 1. To obtain a random value between 0 to N, you can use it with multiplication. + - **MATH_RANDOM** = **33** --- Return a random floating-point value between the two inputs. + - **MATH_SEED** = **34** --- Set the seed for the random number generator. + - **MATH_RANDSEED** = **35** --- Return a random value from the given seed, along with the new seed. + - **MATH_DEG2RAD** = **36** --- Convert the input from degrees to radians. + - **MATH_RAD2DEG** = **37** --- Convert the input from radians to degrees. + - **MATH_LINEAR2DB** = **38** --- Convert the input from linear volume to decibel volume. + - **MATH_DB2LINEAR** = **39** --- Convert the input from decibel volume to linear volume. + - **MATH_POLAR2CARTESIAN** = **40** --- Converts a 2D point expressed in the polar coordinate system (a distance from the origin ``r`` and an angle ``th``) to the cartesian coordinate system (x and y axis). + - **MATH_CARTESIAN2POLAR** = **41** --- Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle). + - **MATH_WRAP** = **42** + - **MATH_WRAPF** = **43** + - **LOGIC_MAX** = **44** --- Return the greater of the two numbers, also known as their maximum. + - **LOGIC_MIN** = **45** --- Return the lesser of the two numbers, also known as their minimum. + - **LOGIC_CLAMP** = **46** --- Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to `min(max(input, range_low), range_high)` + - **LOGIC_NEAREST_PO2** = **47** --- Return the nearest power of 2 to the input. + - **OBJ_WEAKREF** = **48** --- Create a :ref:`WeakRef` from the input. + - **FUNC_FUNCREF** = **49** --- Create a :ref:`FuncRef` from the input. + - **TYPE_CONVERT** = **50** --- Convert between types. + - **TYPE_OF** = **51** --- Return the type of the input as an integer. Check :ref:`Variant.Type` for the integers that might be returned. + - **TYPE_EXISTS** = **52** --- Checks if a type is registered in the :ref:`ClassDB`. + - **TEXT_CHAR** = **53** --- Return a character with the given ascii value. + - **TEXT_STR** = **54** --- Convert the input to a string. + - **TEXT_PRINT** = **55** --- Print the given string to the output window. + - **TEXT_PRINTERR** = **56** --- Print the given string to the standard error output. + - **TEXT_PRINTRAW** = **57** --- Print the given string to the standard output, without adding a newline. + - **VAR_TO_STR** = **58** --- Serialize a :ref:`Variant` to a string. + - **STR_TO_VAR** = **59** --- Deserialize a :ref:`Variant` from a string serialized using VAR_TO_STR. + - **VAR_TO_BYTES** = **60** --- Serialize a :ref:`Variant` to a :ref:`PoolByteArray`. + - **BYTES_TO_VAR** = **61** --- Deserialize a :ref:`Variant` from a :ref:`PoolByteArray` serialized using VAR_TO_BYTES. + - **COLORN** = **62** --- Return the :ref:`Color` with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc. + - **FUNC_MAX** = **63** --- The maximum value the :ref:`function` property can have. Description diff --git a/classes/class_visualscriptcustomnode.rst b/classes/class_visualscriptcustomnode.rst index 775493b2e..8fbaa9877 100644 --- a/classes/class_visualscriptcustomnode.rst +++ b/classes/class_visualscriptcustomnode.rst @@ -57,7 +57,9 @@ Enumerations enum **StartMode**: - **START_MODE_BEGIN_SEQUENCE** = **0** --- The start mode used the first time when :ref:`_step` is called. + - **START_MODE_CONTINUE_SEQUENCE** = **1** --- The start mode used when :ref:`_step` is called after coming back from a STEP_PUSH_STACK_BIT. + - **START_MODE_RESUME_YIELD** = **2** --- The start mode used when :ref:`_step` is called after resuming from STEP_YIELD_BIT. Constants @@ -66,9 +68,13 @@ Constants - **STEP_PUSH_STACK_BIT** = **16777216** --- Hint used by :ref:`_step` to tell that control should return to it when there is no other node left to execute. This is used by :ref:`VisualScriptCondition` to redirect the sequence to the "Done" port after the true/false branch has finished execution. + - **STEP_GO_BACK_BIT** = **33554432** --- Hint used by :ref:`_step` to tell that control should return back, either hitting a previous STEP_PUSH_STACK_BIT or exiting the function. + - **STEP_NO_ADVANCE_BIT** = **67108864** + - **STEP_EXIT_FUNCTION_BIT** = **134217728** --- Hint used by :ref:`_step` to tell that control should stop and exit the function. + - **STEP_YIELD_BIT** = **268435456** --- Hint used by :ref:`_step` to tell that the function should be yielded. Using this requires you to have at least one working memory slot, which is used for the :ref:`VisualScriptFunctionState`. diff --git a/classes/class_visualscriptfunctioncall.rst b/classes/class_visualscriptfunctioncall.rst index 7fb9118ef..4e5c1fb16 100644 --- a/classes/class_visualscriptfunctioncall.rst +++ b/classes/class_visualscriptfunctioncall.rst @@ -49,9 +49,13 @@ Enumerations enum **CallMode**: - **CALL_MODE_SELF** = **0** + - **CALL_MODE_NODE_PATH** = **1** + - **CALL_MODE_INSTANCE** = **2** + - **CALL_MODE_BASIC_TYPE** = **3** + - **CALL_MODE_SINGLETON** = **4** .. _enum_VisualScriptFunctionCall_RPCCallMode: @@ -59,9 +63,13 @@ enum **CallMode**: enum **RPCCallMode**: - **RPC_DISABLED** = **0** + - **RPC_RELIABLE** = **1** + - **RPC_UNRELIABLE** = **2** + - **RPC_RELIABLE_TO_ID** = **3** + - **RPC_UNRELIABLE_TO_ID** = **4** Property Descriptions diff --git a/classes/class_visualscriptinputaction.rst b/classes/class_visualscriptinputaction.rst index 4ad3cd89b..f428280d5 100644 --- a/classes/class_visualscriptinputaction.rst +++ b/classes/class_visualscriptinputaction.rst @@ -33,8 +33,11 @@ Enumerations enum **Mode**: - **MODE_PRESSED** = **0** + - **MODE_RELEASED** = **1** + - **MODE_JUST_PRESSED** = **2** + - **MODE_JUST_RELEASED** = **3** Property Descriptions diff --git a/classes/class_visualscriptmathconstant.rst b/classes/class_visualscriptmathconstant.rst index 986d7d44e..336e12937 100644 --- a/classes/class_visualscriptmathconstant.rst +++ b/classes/class_visualscriptmathconstant.rst @@ -31,13 +31,21 @@ Enumerations enum **MathConstant**: - **MATH_CONSTANT_ONE** = **0** --- Unity: ``1`` + - **MATH_CONSTANT_PI** = **1** --- Pi: ``3.141593`` + - **MATH_CONSTANT_HALF_PI** = **2** --- Pi divided by two: ``1.570796`` + - **MATH_CONSTANT_TAU** = **3** --- Tau: ``6.283185`` + - **MATH_CONSTANT_E** = **4** --- Mathematical constant ``e``, the natural log base: ``2.718282`` + - **MATH_CONSTANT_SQRT2** = **5** --- Square root of two: ``1.414214`` + - **MATH_CONSTANT_INF** = **6** --- Infinity: ``inf`` + - **MATH_CONSTANT_NAN** = **7** --- Not a number: ``nan`` + - **MATH_CONSTANT_MAX** = **8** Description diff --git a/classes/class_visualscriptpropertyget.rst b/classes/class_visualscriptpropertyget.rst index 5fe8b3ae6..106f07a72 100644 --- a/classes/class_visualscriptpropertyget.rst +++ b/classes/class_visualscriptpropertyget.rst @@ -43,7 +43,9 @@ Enumerations enum **CallMode**: - **CALL_MODE_SELF** = **0** + - **CALL_MODE_NODE_PATH** = **1** + - **CALL_MODE_INSTANCE** = **2** Property Descriptions diff --git a/classes/class_visualscriptpropertyset.rst b/classes/class_visualscriptpropertyset.rst index 9b700e0c2..cd842636f 100644 --- a/classes/class_visualscriptpropertyset.rst +++ b/classes/class_visualscriptpropertyset.rst @@ -45,8 +45,11 @@ Enumerations enum **CallMode**: - **CALL_MODE_SELF** = **0** + - **CALL_MODE_NODE_PATH** = **1** + - **CALL_MODE_INSTANCE** = **2** + - **CALL_MODE_BASIC_TYPE** = **3** .. _enum_VisualScriptPropertySet_AssignOp: @@ -54,15 +57,25 @@ enum **CallMode**: enum **AssignOp**: - **ASSIGN_OP_NONE** = **0** + - **ASSIGN_OP_ADD** = **1** + - **ASSIGN_OP_SUB** = **2** + - **ASSIGN_OP_MUL** = **3** + - **ASSIGN_OP_DIV** = **4** + - **ASSIGN_OP_MOD** = **5** + - **ASSIGN_OP_SHIFT_LEFT** = **6** + - **ASSIGN_OP_SHIFT_RIGHT** = **7** + - **ASSIGN_OP_BIT_AND** = **8** + - **ASSIGN_OP_BIT_OR** = **9** + - **ASSIGN_OP_BIT_XOR** = **10** Property Descriptions diff --git a/classes/class_visualscriptyield.rst b/classes/class_visualscriptyield.rst index b65f54938..2dcec30e2 100644 --- a/classes/class_visualscriptyield.rst +++ b/classes/class_visualscriptyield.rst @@ -33,7 +33,9 @@ Enumerations enum **YieldMode**: - **YIELD_FRAME** = **1** + - **YIELD_PHYSICS_FRAME** = **2** + - **YIELD_WAIT** = **3** Property Descriptions diff --git a/classes/class_visualscriptyieldsignal.rst b/classes/class_visualscriptyieldsignal.rst index 18728f1c3..5b25afa13 100644 --- a/classes/class_visualscriptyieldsignal.rst +++ b/classes/class_visualscriptyieldsignal.rst @@ -37,7 +37,9 @@ Enumerations enum **CallMode**: - **CALL_MODE_SELF** = **0** + - **CALL_MODE_NODE_PATH** = **1** + - **CALL_MODE_INSTANCE** = **2** Property Descriptions diff --git a/classes/class_visualserver.rst b/classes/class_visualserver.rst index 86fab85c5..bb6825614 100644 --- a/classes/class_visualserver.rst +++ b/classes/class_visualserver.rst @@ -750,11 +750,17 @@ Enumerations enum **ViewportRenderInfo**: - **VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME** = **0** + - **VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME** = **1** + - **VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME** = **2** + - **VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME** = **3** + - **VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME** = **4** + - **VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME** = **5** + - **VIEWPORT_RENDER_INFO_MAX** = **6** --- Marks end of VIEWPORT_RENDER_INFO\* constants. Used internally. .. _enum_VisualServer_CubeMapSide: @@ -762,10 +768,15 @@ enum **ViewportRenderInfo**: enum **CubeMapSide**: - **CUBEMAP_LEFT** = **0** --- Marks the left side of a cubemap. + - **CUBEMAP_RIGHT** = **1** --- Marks the right side of a cubemap. + - **CUBEMAP_BOTTOM** = **2** --- Marks the bottom side of a cubemap. + - **CUBEMAP_TOP** = **3** --- Marks the top side of a cubemap. + - **CUBEMAP_FRONT** = **4** --- Marks the front side of a cubemap. + - **CUBEMAP_BACK** = **5** --- Marks the back side of a cubemap. .. _enum_VisualServer_TextureType: @@ -773,8 +784,11 @@ enum **CubeMapSide**: enum **TextureType**: - **TEXTURE_TYPE_2D** = **0** + - **TEXTURE_TYPE_CUBEMAP** = **1** + - **TEXTURE_TYPE_2D_ARRAY** = **2** + - **TEXTURE_TYPE_3D** = **3** .. _enum_VisualServer_LightType: @@ -782,7 +796,9 @@ enum **TextureType**: enum **LightType**: - **LIGHT_DIRECTIONAL** = **0** --- Is a directional (sun) light. + - **LIGHT_OMNI** = **1** --- is an omni light. + - **LIGHT_SPOT** = **2** --- is an spot light. .. _enum_VisualServer_ArrayType: @@ -790,14 +806,23 @@ enum **LightType**: enum **ArrayType**: - **ARRAY_VERTEX** = **0** --- Array is a vertex array. + - **ARRAY_NORMAL** = **1** --- Array is a normal array. + - **ARRAY_TANGENT** = **2** --- Array is a tangent array. + - **ARRAY_COLOR** = **3** --- Array is a color array. + - **ARRAY_TEX_UV** = **4** --- Array is a uv coordinates array. + - **ARRAY_TEX_UV2** = **5** --- Array is a uv coordinates array for the second uv coordinates. + - **ARRAY_BONES** = **6** --- Array contains bone information. + - **ARRAY_WEIGHTS** = **7** --- Array is weight information. + - **ARRAY_INDEX** = **8** --- Array is index array. + - **ARRAY_MAX** = **9** --- Marks the maximum of the array types. Used internally. .. _enum_VisualServer_BlendShapeMode: @@ -805,6 +830,7 @@ enum **ArrayType**: enum **BlendShapeMode**: - **BLEND_SHAPE_MODE_NORMALIZED** = **0** + - **BLEND_SHAPE_MODE_RELATIVE** = **1** .. _enum_VisualServer_ShadowCastingSetting: @@ -812,8 +838,11 @@ enum **BlendShapeMode**: enum **ShadowCastingSetting**: - **SHADOW_CASTING_SETTING_OFF** = **0** + - **SHADOW_CASTING_SETTING_ON** = **1** + - **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = **2** + - **SHADOW_CASTING_SETTING_SHADOWS_ONLY** = **3** .. _enum_VisualServer_CanvasOccluderPolygonCullMode: @@ -821,7 +850,9 @@ enum **ShadowCastingSetting**: enum **CanvasOccluderPolygonCullMode**: - **CANVAS_OCCLUDER_POLYGON_CULL_DISABLED** = **0** --- Culling of the canvas occluder is disabled. + - **CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE** = **1** --- Culling of the canvas occluder is clockwise. + - **CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE** = **2** --- Culling of the canvas occluder is counterclockwise. .. _enum_VisualServer_ParticlesDrawOrder: @@ -829,7 +860,9 @@ enum **CanvasOccluderPolygonCullMode**: enum **ParticlesDrawOrder**: - **PARTICLES_DRAW_ORDER_INDEX** = **0** + - **PARTICLES_DRAW_ORDER_LIFETIME** = **1** + - **PARTICLES_DRAW_ORDER_VIEW_DEPTH** = **2** .. _enum_VisualServer_ViewportMSAA: @@ -837,9 +870,13 @@ enum **ParticlesDrawOrder**: enum **ViewportMSAA**: - **VIEWPORT_MSAA_DISABLED** = **0** --- Multisample antialiasing is disabled. + - **VIEWPORT_MSAA_2X** = **1** --- Multisample antialiasing is set to 2X. + - **VIEWPORT_MSAA_4X** = **2** --- Multisample antialiasing is set to 4X. + - **VIEWPORT_MSAA_8X** = **3** --- Multisample antialiasing is set to 8X. + - **VIEWPORT_MSAA_16X** = **4** --- Multisample antialiasing is set to 16X. .. _enum_VisualServer_ViewportUpdateMode: @@ -847,8 +884,11 @@ enum **ViewportMSAA**: enum **ViewportUpdateMode**: - **VIEWPORT_UPDATE_DISABLED** = **0** + - **VIEWPORT_UPDATE_ONCE** = **1** + - **VIEWPORT_UPDATE_WHEN_VISIBLE** = **2** + - **VIEWPORT_UPDATE_ALWAYS** = **3** .. _enum_VisualServer_MultimeshColorFormat: @@ -856,7 +896,9 @@ enum **ViewportUpdateMode**: enum **MultimeshColorFormat**: - **MULTIMESH_COLOR_NONE** = **0** + - **MULTIMESH_COLOR_8BIT** = **1** + - **MULTIMESH_COLOR_FLOAT** = **2** .. _enum_VisualServer_LightDirectionalShadowMode: @@ -864,7 +906,9 @@ enum **MultimeshColorFormat**: enum **LightDirectionalShadowMode**: - **LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL** = **0** + - **LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS** = **1** + - **LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS** = **2** .. _enum_VisualServer_LightOmniShadowMode: @@ -872,6 +916,7 @@ enum **LightDirectionalShadowMode**: enum **LightOmniShadowMode**: - **LIGHT_OMNI_SHADOW_DUAL_PARABOLOID** = **0** + - **LIGHT_OMNI_SHADOW_CUBE** = **1** .. _enum_VisualServer_EnvironmentSSAOQuality: @@ -879,7 +924,9 @@ enum **LightOmniShadowMode**: enum **EnvironmentSSAOQuality**: - **ENV_SSAO_QUALITY_LOW** = **0** + - **ENV_SSAO_QUALITY_MEDIUM** = **1** + - **ENV_SSAO_QUALITY_HIGH** = **2** .. _enum_VisualServer_LightParam: @@ -887,19 +934,33 @@ enum **EnvironmentSSAOQuality**: enum **LightParam**: - **LIGHT_PARAM_ENERGY** = **0** --- The light's energy. + - **LIGHT_PARAM_SPECULAR** = **2** --- The light's influence on specularity. + - **LIGHT_PARAM_RANGE** = **3** --- The light's range. + - **LIGHT_PARAM_ATTENUATION** = **4** --- The light's attenuation. + - **LIGHT_PARAM_SPOT_ANGLE** = **5** --- The spotlight's angle. + - **LIGHT_PARAM_SPOT_ATTENUATION** = **6** --- The spotlight's attenuation. + - **LIGHT_PARAM_CONTACT_SHADOW_SIZE** = **7** --- Scales the shadow color. + - **LIGHT_PARAM_SHADOW_MAX_DISTANCE** = **8** + - **LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET** = **9** + - **LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET** = **10** + - **LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET** = **11** + - **LIGHT_PARAM_SHADOW_NORMAL_BIAS** = **12** + - **LIGHT_PARAM_SHADOW_BIAS** = **13** + - **LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE** = **14** + - **LIGHT_PARAM_MAX** = **15** --- The light parameters endpoint. Used internally. .. _enum_VisualServer_ScenarioDebugMode: @@ -907,8 +968,11 @@ enum **LightParam**: enum **ScenarioDebugMode**: - **SCENARIO_DEBUG_DISABLED** = **0** + - **SCENARIO_DEBUG_WIREFRAME** = **1** + - **SCENARIO_DEBUG_OVERDRAW** = **2** + - **SCENARIO_DEBUG_SHADELESS** = **3** .. _enum_VisualServer_LightDirectionalShadowDepthRangeMode: @@ -916,6 +980,7 @@ enum **ScenarioDebugMode**: enum **LightDirectionalShadowDepthRangeMode**: - **LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE** = **0** + - **LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED** = **1** .. _enum_VisualServer_EnvironmentGlowBlendMode: @@ -923,8 +988,11 @@ enum **LightDirectionalShadowDepthRangeMode**: enum **EnvironmentGlowBlendMode**: - **GLOW_BLEND_MODE_ADDITIVE** = **0** + - **GLOW_BLEND_MODE_SCREEN** = **1** + - **GLOW_BLEND_MODE_SOFTLIGHT** = **2** + - **GLOW_BLEND_MODE_REPLACE** = **3** .. _enum_VisualServer_InstanceType: @@ -932,15 +1000,25 @@ enum **EnvironmentGlowBlendMode**: enum **InstanceType**: - **INSTANCE_NONE** = **0** --- The instance does not have a type. + - **INSTANCE_MESH** = **1** --- The instance is a mesh. + - **INSTANCE_MULTIMESH** = **2** --- The instance is a multimesh. + - **INSTANCE_IMMEDIATE** = **3** --- The instance is an immediate geometry. + - **INSTANCE_PARTICLES** = **4** --- The instance is a particle emitter. + - **INSTANCE_LIGHT** = **5** --- The instance is a light. + - **INSTANCE_REFLECTION_PROBE** = **6** + - **INSTANCE_GI_PROBE** = **7** + - **INSTANCE_LIGHTMAP_CAPTURE** = **8** + - **INSTANCE_MAX** = **9** --- The max value for INSTANCE\_\* constants, used internally. + - **INSTANCE_GEOMETRY_MASK** = **30** --- A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). .. _enum_VisualServer_ShaderMode: @@ -948,8 +1026,11 @@ enum **InstanceType**: enum **ShaderMode**: - **SHADER_SPATIAL** = **0** --- Shader is a 3D shader. + - **SHADER_CANVAS_ITEM** = **1** --- Shader is a 2D shader. + - **SHADER_PARTICLES** = **2** --- Shader is a particle shader. + - **SHADER_MAX** = **3** --- Marks maximum of the shader types array. used internally. .. _enum_VisualServer_ViewportUsage: @@ -957,8 +1038,11 @@ enum **ShaderMode**: enum **ViewportUsage**: - **VIEWPORT_USAGE_2D** = **0** --- The Viewport does not render 3D but samples. + - **VIEWPORT_USAGE_2D_NO_SAMPLING** = **1** --- The Viewport does not render 3D and does not sample. + - **VIEWPORT_USAGE_3D** = **2** --- The Viewport renders 3D with effects. + - **VIEWPORT_USAGE_3D_NO_EFFECTS** = **3** --- The Viewport renders 3D but without effects. .. _enum_VisualServer_EnvironmentDOFBlurQuality: @@ -966,7 +1050,9 @@ enum **ViewportUsage**: enum **EnvironmentDOFBlurQuality**: - **ENV_DOF_BLUR_QUALITY_LOW** = **0** + - **ENV_DOF_BLUR_QUALITY_MEDIUM** = **1** + - **ENV_DOF_BLUR_QUALITY_HIGH** = **2** .. _enum_VisualServer_PrimitiveType: @@ -974,12 +1060,19 @@ enum **EnvironmentDOFBlurQuality**: enum **PrimitiveType**: - **PRIMITIVE_POINTS** = **0** --- Primitive to draw consists of points. + - **PRIMITIVE_LINES** = **1** --- Primitive to draw consists of lines. + - **PRIMITIVE_LINE_STRIP** = **2** --- Primitive to draw consists of a line strip from start to end. + - **PRIMITIVE_LINE_LOOP** = **3** --- Primitive to draw consists of a line loop (a line strip with a line between the last and the first vertex). + - **PRIMITIVE_TRIANGLES** = **4** --- Primitive to draw consists of triangles. + - **PRIMITIVE_TRIANGLE_STRIP** = **5** --- Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle). + - **PRIMITIVE_TRIANGLE_FAN** = **6** --- Primitive to draw consists of a triangle strip (the last 2 vertices are always combined with the first to make a triangle). + - **PRIMITIVE_MAX** = **7** --- Marks the primitive types endpoint. used internally. .. _enum_VisualServer_InstanceFlags: @@ -987,7 +1080,9 @@ enum **PrimitiveType**: enum **InstanceFlags**: - **INSTANCE_FLAG_USE_BAKED_LIGHT** = **0** + - **INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE** = **1** + - **INSTANCE_FLAG_MAX** = **2** .. _enum_VisualServer_ViewportClearMode: @@ -995,7 +1090,9 @@ enum **InstanceFlags**: enum **ViewportClearMode**: - **VIEWPORT_CLEAR_ALWAYS** = **0** --- The viewport is always cleared before drawing. + - **VIEWPORT_CLEAR_NEVER** = **1** --- The viewport is never cleared before drawing. + - **VIEWPORT_CLEAR_ONLY_NEXT_FRAME** = **2** --- The viewport is cleared once, then the clear mode is set to VIEWPORT_CLEAR_NEVER. .. _enum_VisualServer_LightOmniShadowDetail: @@ -1003,6 +1100,7 @@ enum **ViewportClearMode**: enum **LightOmniShadowDetail**: - **LIGHT_OMNI_SHADOW_DETAIL_VERTICAL** = **0** + - **LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL** = **1** .. _enum_VisualServer_CanvasLightMode: @@ -1010,8 +1108,11 @@ enum **LightOmniShadowDetail**: enum **CanvasLightMode**: - **CANVAS_LIGHT_MODE_ADD** = **0** --- Adds light color additive to the canvas. + - **CANVAS_LIGHT_MODE_SUB** = **1** --- Adds light color subtractive to the canvas. + - **CANVAS_LIGHT_MODE_MIX** = **2** --- The light adds color depending on transparency. + - **CANVAS_LIGHT_MODE_MASK** = **3** --- The light adds color depending on mask. .. _enum_VisualServer_NinePatchAxisMode: @@ -1019,7 +1120,9 @@ enum **CanvasLightMode**: enum **NinePatchAxisMode**: - **NINE_PATCH_STRETCH** = **0** --- The nine patch gets stretched where needed. + - **NINE_PATCH_TILE** = **1** --- The nine patch gets filled with tiles where needed. + - **NINE_PATCH_TILE_FIT** = **2** --- The nine patch gets filled with tiles where needed and stretches them a bit if needed. .. _enum_VisualServer_ViewportDebugDraw: @@ -1027,8 +1130,11 @@ enum **NinePatchAxisMode**: enum **ViewportDebugDraw**: - **VIEWPORT_DEBUG_DRAW_DISABLED** = **0** --- Debug draw is disabled. Default setting. + - **VIEWPORT_DEBUG_DRAW_UNSHADED** = **1** --- Debug draw sets objects to unshaded. + - **VIEWPORT_DEBUG_DRAW_OVERDRAW** = **2** --- Overwrites clear color to ``(0,0,0,0)``. + - **VIEWPORT_DEBUG_DRAW_WIREFRAME** = **3** --- Debug draw draws objects in wireframe. .. _enum_VisualServer_MultimeshTransformFormat: @@ -1036,6 +1142,7 @@ enum **ViewportDebugDraw**: enum **MultimeshTransformFormat**: - **MULTIMESH_TRANSFORM_2D** = **0** + - **MULTIMESH_TRANSFORM_3D** = **1** .. _enum_VisualServer_ArrayFormat: @@ -1043,25 +1150,45 @@ enum **MultimeshTransformFormat**: enum **ArrayFormat**: - **ARRAY_FORMAT_VERTEX** = **1** --- Flag used to mark a vertex array. + - **ARRAY_FORMAT_NORMAL** = **2** --- Flag used to mark a normal array. + - **ARRAY_FORMAT_TANGENT** = **4** --- Flag used to mark a tangent array. + - **ARRAY_FORMAT_COLOR** = **8** --- Flag used to mark a color array. + - **ARRAY_FORMAT_TEX_UV** = **16** --- Flag used to mark a uv coordinates array. + - **ARRAY_FORMAT_TEX_UV2** = **32** --- Flag used to mark a uv coordinates array for the second uv coordinates. + - **ARRAY_FORMAT_BONES** = **64** --- Flag used to mark a bone information array. + - **ARRAY_FORMAT_WEIGHTS** = **128** --- Flag used to mark a weights array. + - **ARRAY_FORMAT_INDEX** = **256** --- Flag used to mark a index array. + - **ARRAY_COMPRESS_VERTEX** = **512** --- Flag used to mark a compressed (half float) vertex array. + - **ARRAY_COMPRESS_NORMAL** = **1024** --- Flag used to mark a compressed (half float) normal array. + - **ARRAY_COMPRESS_TANGENT** = **2048** --- Flag used to mark a compressed (half float) tangent array. + - **ARRAY_COMPRESS_COLOR** = **4096** --- Flag used to mark a compressed (half float) color array. + - **ARRAY_COMPRESS_TEX_UV** = **8192** --- Flag used to mark a compressed (half float) uv coordinates array. + - **ARRAY_COMPRESS_TEX_UV2** = **16384** --- Flag used to mark a compressed (half float) uv coordinates array for the second uv coordinates. + - **ARRAY_COMPRESS_BONES** = **32768** + - **ARRAY_COMPRESS_WEIGHTS** = **65536** --- Flag used to mark a compressed (half float) weight array. + - **ARRAY_COMPRESS_INDEX** = **131072** + - **ARRAY_FLAG_USE_2D_VERTICES** = **262144** --- Flag used to mark that the array contains 2D vertices. + - **ARRAY_FLAG_USE_16_BIT_BONES** = **524288** --- Flag used to mark that the array uses 16 bit bones instead of 8 bit. + - **ARRAY_COMPRESS_DEFAULT** = **97280** --- Used to set flags ARRAY_COMPRESS_VERTEX, ARRAY_COMPRESS_NORMAL, ARRAY_COMPRESS_TANGENT, ARRAY_COMPRESS_COLOR, ARRAY_COMPRESS_TEX_UV, ARRAY_COMPRESS_TEX_UV2 and ARRAY_COMPRESS_WEIGHTS quickly. .. _enum_VisualServer_EnvironmentSSAOBlur: @@ -1069,8 +1196,11 @@ enum **ArrayFormat**: enum **EnvironmentSSAOBlur**: - **ENV_SSAO_BLUR_DISABLED** = **0** + - **ENV_SSAO_BLUR_1x1** = **1** + - **ENV_SSAO_BLUR_2x2** = **2** + - **ENV_SSAO_BLUR_3x3** = **3** .. _enum_VisualServer_RenderInfo: @@ -1078,14 +1208,23 @@ enum **EnvironmentSSAOBlur**: enum **RenderInfo**: - **INFO_OBJECTS_IN_FRAME** = **0** --- The amount of objects in the frame. + - **INFO_VERTICES_IN_FRAME** = **1** --- The amount of vertices in the frame. + - **INFO_MATERIAL_CHANGES_IN_FRAME** = **2** --- The amount of modified materials in the frame. + - **INFO_SHADER_CHANGES_IN_FRAME** = **3** --- The amount of shader rebinds in the frame. + - **INFO_SURFACE_CHANGES_IN_FRAME** = **4** --- The amount of surface changes in the frame. + - **INFO_DRAW_CALLS_IN_FRAME** = **5** --- The amount of draw calls in frame. + - **INFO_USAGE_VIDEO_MEM_TOTAL** = **6** + - **INFO_VIDEO_MEM_USED** = **7** --- The amount of vertex memory and texture memory used. + - **INFO_TEXTURE_MEM_USED** = **8** --- The amount of texture memory used. + - **INFO_VERTEX_MEM_USED** = **9** --- The amount of vertex memory used. .. _enum_VisualServer_ReflectionProbeUpdateMode: @@ -1093,6 +1232,7 @@ enum **RenderInfo**: enum **ReflectionProbeUpdateMode**: - **REFLECTION_PROBE_UPDATE_ONCE** = **0** + - **REFLECTION_PROBE_UPDATE_ALWAYS** = **1** .. _enum_VisualServer_EnvironmentBG: @@ -1100,11 +1240,17 @@ enum **ReflectionProbeUpdateMode**: enum **EnvironmentBG**: - **ENV_BG_CLEAR_COLOR** = **0** + - **ENV_BG_COLOR** = **1** + - **ENV_BG_SKY** = **2** + - **ENV_BG_COLOR_SKY** = **3** + - **ENV_BG_CANVAS** = **4** + - **ENV_BG_KEEP** = **5** + - **ENV_BG_MAX** = **6** .. _enum_VisualServer_CanvasLightShadowFilter: @@ -1112,10 +1258,15 @@ enum **EnvironmentBG**: enum **CanvasLightShadowFilter**: - **CANVAS_LIGHT_FILTER_NONE** = **0** + - **CANVAS_LIGHT_FILTER_PCF3** = **1** + - **CANVAS_LIGHT_FILTER_PCF5** = **2** + - **CANVAS_LIGHT_FILTER_PCF7** = **3** + - **CANVAS_LIGHT_FILTER_PCF9** = **4** + - **CANVAS_LIGHT_FILTER_PCF13** = **5** .. _enum_VisualServer_Features: @@ -1123,6 +1274,7 @@ enum **CanvasLightShadowFilter**: enum **Features**: - **FEATURE_SHADERS** = **0** + - **FEATURE_MULTITHREADED** = **1** .. _enum_VisualServer_TextureFlags: @@ -1130,14 +1282,21 @@ enum **Features**: enum **TextureFlags**: - **TEXTURE_FLAG_MIPMAPS** = **1** --- Generate mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. + - **TEXTURE_FLAG_REPEAT** = **2** --- Repeat (instead of clamp to edge). + - **TEXTURE_FLAG_FILTER** = **4** --- Turn on magnifying filter, to enable smooth zooming in of the texture. + - **TEXTURE_FLAG_ANISOTROPIC_FILTER** = **8** --- Anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. More effective on planes often shown going to the horrizon as those textures (Walls or Ground for example) get squashed in the viewport to different aspect ratios and regular mipmaps keep the aspect ratio so they don't optimize storage that well in those cases. + - **TEXTURE_FLAG_CONVERT_TO_LINEAR** = **16** --- Converts texture to SRGB color space. + - **TEXTURE_FLAG_MIRRORED_REPEAT** = **32** --- Repeat texture with alternate sections mirrored. + - **TEXTURE_FLAG_USED_FOR_STREAMING** = **2048** --- Texture is a video surface. + - **TEXTURE_FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled. .. _enum_VisualServer_EnvironmentToneMapper: @@ -1145,20 +1304,30 @@ More effective on planes often shown going to the horrizon as those textures (Wa enum **EnvironmentToneMapper**: - **ENV_TONE_MAPPER_LINEAR** = **0** -- **ENV_TONE_MAPPER_REINHARDT** = **1** + +- **ENV_TONE_MAPPER_REINHARD** = **1** + - **ENV_TONE_MAPPER_FILMIC** = **2** + - **ENV_TONE_MAPPER_ACES** = **3** Constants --------- - **NO_INDEX_ARRAY** = **-1** --- Marks an error that shows that the index array is empty. + - **ARRAY_WEIGHTS_SIZE** = **4** + - **CANVAS_ITEM_Z_MIN** = **-4096** --- The minimum Z-layer for canvas items. + - **CANVAS_ITEM_Z_MAX** = **4096** --- The maximum Z-layer for canvas items. + - **MAX_GLOW_LEVELS** = **7** + - **MAX_CURSORS** = **8** + - **MATERIAL_RENDER_PRIORITY_MIN** = **-128** --- The minimum renderpriority of all materials. + - **MATERIAL_RENDER_PRIORITY_MAX** = **127** --- The maximum renderpriority of all materials. Description diff --git a/classes/class_visualshader.rst b/classes/class_visualshader.rst index bc958e66f..9e54f71b0 100644 --- a/classes/class_visualshader.rst +++ b/classes/class_visualshader.rst @@ -62,14 +62,18 @@ Enumerations enum **Type**: - **TYPE_VERTEX** = **0** + - **TYPE_FRAGMENT** = **1** + - **TYPE_LIGHT** = **2** + - **TYPE_MAX** = **3** Constants --------- - **NODE_ID_INVALID** = **-1** + - **NODE_ID_OUTPUT** = **0** Property Descriptions diff --git a/classes/class_visualshadernodecolorop.rst b/classes/class_visualshadernodecolorop.rst index 9a9d9a545..01cb7eeff 100644 --- a/classes/class_visualshadernodecolorop.rst +++ b/classes/class_visualshadernodecolorop.rst @@ -31,13 +31,21 @@ Enumerations enum **Operator**: - **OP_SCREEN** = **0** + - **OP_DIFFERENCE** = **1** + - **OP_DARKEN** = **2** + - **OP_LIGHTEN** = **3** + - **OP_OVERLAY** = **4** + - **OP_DODGE** = **5** + - **OP_BURN** = **6** + - **OP_SOFT_LIGHT** = **7** + - **OP_HARD_LIGHT** = **8** Property Descriptions diff --git a/classes/class_visualshadernodecubemap.rst b/classes/class_visualshadernodecubemap.rst index 2a1a0032d..a8f1b489d 100644 --- a/classes/class_visualshadernodecubemap.rst +++ b/classes/class_visualshadernodecubemap.rst @@ -33,7 +33,9 @@ Enumerations enum **TextureType**: - **TYPE_DATA** = **0** + - **TYPE_COLOR** = **1** + - **TYPE_NORMALMAP** = **2** Property Descriptions diff --git a/classes/class_visualshadernodescalarfunc.rst b/classes/class_visualshadernodescalarfunc.rst index b241cd34a..46426424a 100644 --- a/classes/class_visualshadernodescalarfunc.rst +++ b/classes/class_visualshadernodescalarfunc.rst @@ -31,24 +31,43 @@ Enumerations enum **Function**: - **FUNC_SIN** = **0** + - **FUNC_COS** = **1** + - **FUNC_TAN** = **2** + - **FUNC_ASIN** = **3** + - **FUNC_ACOS** = **4** + - **FUNC_ATAN** = **5** + - **FUNC_SINH** = **6** + - **FUNC_COSH** = **7** + - **FUNC_TANH** = **8** + - **FUNC_LOG** = **9** + - **FUNC_EXP** = **10** + - **FUNC_SQRT** = **11** + - **FUNC_ABS** = **12** + - **FUNC_SIGN** = **13** + - **FUNC_FLOOR** = **14** + - **FUNC_ROUND** = **15** + - **FUNC_CEIL** = **16** + - **FUNC_FRAC** = **17** + - **FUNC_SATURATE** = **18** + - **FUNC_NEGATE** = **19** Property Descriptions diff --git a/classes/class_visualshadernodescalarop.rst b/classes/class_visualshadernodescalarop.rst index 136da6028..f1da4e0df 100644 --- a/classes/class_visualshadernodescalarop.rst +++ b/classes/class_visualshadernodescalarop.rst @@ -31,13 +31,21 @@ Enumerations enum **Operator**: - **OP_ADD** = **0** + - **OP_SUB** = **1** + - **OP_MUL** = **2** + - **OP_DIV** = **3** + - **OP_MOD** = **4** + - **OP_POW** = **5** + - **OP_MAX** = **6** + - **OP_MIN** = **7** + - **OP_ATAN2** = **8** Property Descriptions diff --git a/classes/class_visualshadernodetexture.rst b/classes/class_visualshadernodetexture.rst index fc7d4b2d3..16608fb8d 100644 --- a/classes/class_visualshadernodetexture.rst +++ b/classes/class_visualshadernodetexture.rst @@ -35,8 +35,11 @@ Enumerations enum **Source**: - **SOURCE_TEXTURE** = **0** + - **SOURCE_SCREEN** = **1** + - **SOURCE_2D_TEXTURE** = **2** + - **SOURCE_2D_NORMAL** = **3** .. _enum_VisualShaderNodeTexture_TextureType: @@ -44,7 +47,9 @@ enum **Source**: enum **TextureType**: - **TYPE_DATA** = **0** + - **TYPE_COLOR** = **1** + - **TYPE_NORMALMAP** = **2** Property Descriptions diff --git a/classes/class_visualshadernodetextureuniform.rst b/classes/class_visualshadernodetextureuniform.rst index a1861718e..3435d8e8d 100644 --- a/classes/class_visualshadernodetextureuniform.rst +++ b/classes/class_visualshadernodetextureuniform.rst @@ -33,8 +33,11 @@ Enumerations enum **TextureType**: - **TYPE_DATA** = **0** + - **TYPE_COLOR** = **1** + - **TYPE_NORMALMAP** = **2** + - **TYPE_ANISO** = **3** .. _enum_VisualShaderNodeTextureUniform_ColorDefault: @@ -42,6 +45,7 @@ enum **TextureType**: enum **ColorDefault**: - **COLOR_DEFAULT_WHITE** = **0** + - **COLOR_DEFAULT_BLACK** = **1** Property Descriptions diff --git a/classes/class_visualshadernodetransformmult.rst b/classes/class_visualshadernodetransformmult.rst index ea3c67471..2c88a90e9 100644 --- a/classes/class_visualshadernodetransformmult.rst +++ b/classes/class_visualshadernodetransformmult.rst @@ -31,6 +31,7 @@ Enumerations enum **Operator**: - **OP_AxB** = **0** + - **OP_BxA** = **1** Property Descriptions diff --git a/classes/class_visualshadernodetransformvecmult.rst b/classes/class_visualshadernodetransformvecmult.rst index f02efe98e..8888b0932 100644 --- a/classes/class_visualshadernodetransformvecmult.rst +++ b/classes/class_visualshadernodetransformvecmult.rst @@ -31,8 +31,11 @@ Enumerations enum **Operator**: - **OP_AxB** = **0** + - **OP_BxA** = **1** + - **OP_3x3_AxB** = **2** + - **OP_3x3_BxA** = **3** Property Descriptions diff --git a/classes/class_visualshadernodevectorfunc.rst b/classes/class_visualshadernodevectorfunc.rst index 3cb402938..1b7884c83 100644 --- a/classes/class_visualshadernodevectorfunc.rst +++ b/classes/class_visualshadernodevectorfunc.rst @@ -31,10 +31,15 @@ Enumerations enum **Function**: - **FUNC_NORMALIZE** = **0** + - **FUNC_SATURATE** = **1** + - **FUNC_NEGATE** = **2** + - **FUNC_RECIPROCAL** = **3** + - **FUNC_RGB2HSV** = **4** + - **FUNC_HSV2RGB** = **5** Property Descriptions diff --git a/classes/class_visualshadernodevectorop.rst b/classes/class_visualshadernodevectorop.rst index ab7da8ad9..4c63ae72d 100644 --- a/classes/class_visualshadernodevectorop.rst +++ b/classes/class_visualshadernodevectorop.rst @@ -31,13 +31,21 @@ Enumerations enum **Operator**: - **OP_ADD** = **0** + - **OP_SUB** = **1** + - **OP_MUL** = **2** + - **OP_DIV** = **3** + - **OP_MOD** = **4** + - **OP_POW** = **5** + - **OP_MAX** = **6** + - **OP_MIN** = **7** + - **OP_CROSS** = **8** Property Descriptions diff --git a/classes/class_websocketclient.rst b/classes/class_websocketclient.rst index 031a0e271..bd7ae7756 100644 --- a/classes/class_websocketclient.rst +++ b/classes/class_websocketclient.rst @@ -29,7 +29,7 @@ Methods +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`connect_to_url` **(** :ref:`String` url, :ref:`PoolStringArray` protocols=PoolStringArray( ), :ref:`bool` gd_mp_api=false **)** | +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_from_host` **(** **)** | +| void | :ref:`disconnect_from_host` **(** :ref:`int` code=1000, :ref:`String` reason="" **)** | +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals @@ -37,9 +37,9 @@ Signals .. _class_WebSocketClient_connection_closed: -- **connection_closed** **(** **)** +- **connection_closed** **(** :ref:`bool` was_clean_close **)** -Emitted when the connection to the server is closed. +Emitted when the connection to the server is closed. ``was_clean_close`` will be ``true`` if the connection was shutdown cleanly. .. _class_WebSocketClient_connection_error: @@ -59,6 +59,12 @@ Emitted when a connection with the server is established, ``protocol`` will cont Emitted when a WebSocket message is received. Note: This signal is NOT emitted when used as high level multiplayer peer. +.. _class_WebSocketClient_server_close_request: + +- **server_close_request** **(** :ref:`int` code, :ref:`String` reason **)** + +Emitted when the server requests a clean close. You should keep polling until you get a :ref:`connection_closed` signal to achieve the clean close. See :ref:`WebSocketPeer.close` for more details. + Description ----------- @@ -98,7 +104,7 @@ If ``true`` is passed as ``gd_mp_api``, the client will behave like a network pe .. _class_WebSocketClient_disconnect_from_host: -- void **disconnect_from_host** **(** **)** +- void **disconnect_from_host** **(** :ref:`int` code=1000, :ref:`String` reason="" **)** -Disconnect from the server if currently connected. +Disconnect this client from the connected host. See :ref:`WebSocketPeer.close` for more info. diff --git a/classes/class_websocketpeer.rst b/classes/class_websocketpeer.rst index 9ada97446..f88f46663 100644 --- a/classes/class_websocketpeer.rst +++ b/classes/class_websocketpeer.rst @@ -19,21 +19,21 @@ A class representing a specific WebSocket connection. Methods ------- -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`close` **(** **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_connected_host` **(** **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connected_port` **(** **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| :ref:`WriteMode` | :ref:`get_write_mode` **(** **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_connected_to_host` **(** **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_write_mode` **(** :ref:`WriteMode` mode **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`was_string_packet` **(** **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`close` **(** :ref:`int` code=1000, :ref:`String` reason="" **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_connected_host` **(** **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connected_port` **(** **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`WriteMode` | :ref:`get_write_mode` **(** **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_connected_to_host` **(** **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_write_mode` **(** :ref:`WriteMode` mode **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`was_string_packet` **(** **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -43,6 +43,7 @@ Enumerations enum **WriteMode**: - **WRITE_MODE_TEXT** = **0** --- Specify that WebSockets messages should be transferred as text payload (only valid UTF-8 is allowed). + - **WRITE_MODE_BINARY** = **1** --- Specify that WebSockets messages should be transferred as binary payload (any byte combination is allowed). Description @@ -57,9 +58,13 @@ Method Descriptions .. _class_WebSocketPeer_close: -- void **close** **(** **)** +- void **close** **(** :ref:`int` code=1000, :ref:`String` reason="" **)** -Close this WebSocket connection, actively disconnecting the peer. +Close this WebSocket connection. ``code`` is the status code for the closure (see RFC6455 section 7.4 for a list of valid status codes). reason is the human readable reason for closing the connection (can be any UTF8 string, must be less than 123 bytes). + +Note: To achieve a clean close, you will need to keep polling until either :ref:`WebSocketClient.connection_closed` or :ref:`WebSocketServer.client_disconnected` is received. + +Note: HTML5 export might not support all status codes. Please refer to browsers-specific documentation for more details. .. _class_WebSocketPeer_get_connected_host: diff --git a/classes/class_websocketserver.rst b/classes/class_websocketserver.rst index 9c5a46474..730abb142 100644 --- a/classes/class_websocketserver.rst +++ b/classes/class_websocketserver.rst @@ -20,7 +20,7 @@ Methods ------- +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_peer` **(** :ref:`int` id **)** | +| void | :ref:`disconnect_peer` **(** :ref:`int` id, :ref:`int` code=1000, :ref:`String` reason="" **)** | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_peer_address` **(** :ref:`int` id **)** const | +----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -38,6 +38,12 @@ Methods Signals ------- +.. _class_WebSocketServer_client_close_request: + +- **client_close_request** **(** :ref:`int` id, :ref:`int` code, :ref:`String` reason **)** + +Emitted when a client requests a clean close. You should keep polling until you get a :ref:`client_disconnected` signal with the same ``id`` to achieve the clean close. See :ref:`WebSocketPeer.close` for more details. + .. _class_WebSocketServer_client_connected: - **client_connected** **(** :ref:`int` id, :ref:`String` protocol **)** @@ -46,9 +52,9 @@ Emitted when a new client connects. "protocol" will be the sub-protocol agreed w .. _class_WebSocketServer_client_disconnected: -- **client_disconnected** **(** :ref:`int` id **)** +- **client_disconnected** **(** :ref:`int` id, :ref:`bool` was_clean_close **)** -Emitted when a client disconnects. +Emitted when a client disconnects. ``was_clean_close`` will be ``true`` if the connection was shutdown cleanly. .. _class_WebSocketServer_data_received: @@ -70,9 +76,9 @@ Method Descriptions .. _class_WebSocketServer_disconnect_peer: -- void **disconnect_peer** **(** :ref:`int` id **)** +- void **disconnect_peer** **(** :ref:`int` id, :ref:`int` code=1000, :ref:`String` reason="" **)** -Disconnects the given peer. +Disconnects the peer identified by ``id`` from the server. See :ref:`WebSocketPeer.close` for more info. .. _class_WebSocketServer_get_peer_address: @@ -106,7 +112,7 @@ Start listening on the given port. You can specify the desired subprotocols via the "protocols" array. If the list empty (default), "binary" will be used. -You can use this server as a network peer for :ref:`MultiplayerAPI` by passing true as "gd_mp_api". Note: :ref:`data_received` will not be fired and clients other than Godot will not work in this case. +You can use this server as a network peer for :ref:`MultiplayerAPI` by passing ``true`` as ``gd_mp_api``. Note: :ref:`data_received` will not be fired and clients other than Godot will not work in this case. .. _class_WebSocketServer_stop: diff --git a/classes/class_xmlparser.rst b/classes/class_xmlparser.rst index a70ce5903..4f45693a3 100644 --- a/classes/class_xmlparser.rst +++ b/classes/class_xmlparser.rst @@ -63,11 +63,17 @@ Enumerations enum **NodeType**: - **NODE_NONE** = **0** --- There's no node (no file or buffer opened) + - **NODE_ELEMENT** = **1** --- Element (tag) + - **NODE_ELEMENT_END** = **2** --- End of element + - **NODE_TEXT** = **3** --- Text node + - **NODE_COMMENT** = **4** --- Comment node + - **NODE_CDATA** = **5** --- CDATA content + - **NODE_UNKNOWN** = **6** --- Unknown node Description diff --git a/classes/class_ysort.rst b/classes/class_ysort.rst index a9b2251b7..f80126552 100644 --- a/classes/class_ysort.rst +++ b/classes/class_ysort.rst @@ -41,3 +41,5 @@ Property Descriptions | *Getter* | is_sort_enabled() | +----------+-------------------------+ +If ``true`` child nodes are sorted, otherwise sorting is disabled. Default: ``true``. +