diff --git a/SConstruct b/SConstruct index 9a3ee03ed5..70e77cb47a 100644 --- a/SConstruct +++ b/SConstruct @@ -352,6 +352,7 @@ if selected_platform in platform_list: sys.modules.pop('detect') env.module_list = [] + env.doc_class_path={} for x in module_list: if env['module_' + x + '_enabled'] != "yes": @@ -363,6 +364,15 @@ if selected_platform in platform_list: if (config.can_build(selected_platform)): config.configure(env) env.module_list.append(x) + try: + doc_classes = config.get_doc_classes() + doc_path = config.get_doc_path() + for c in doc_classes: + env.doc_class_path[c]="modules/"+x+"/"+doc_path + except: + pass + + sys.path.remove(tmppath) sys.modules.pop('config') diff --git a/core/os/file_access.h b/core/os/file_access.h index 8393f0530b..a3eb996c4f 100644 --- a/core/os/file_access.h +++ b/core/os/file_access.h @@ -174,6 +174,7 @@ struct FileAccessRef { operator bool() const { return f != NULL; } FileAccess *f; + operator FileAccess*() { return f; } FileAccessRef(FileAccess *fa) { f = fa; } ~FileAccessRef() { if (f) memdelete(f); diff --git a/doc/base/classes.xml b/doc/base/classes.xml deleted file mode 100644 index a29300e5b9..0000000000 --- a/doc/base/classes.xml +++ /dev/null @@ -1,61254 +0,0 @@ - - - - - Built-in GDScript functions. - - - This contains the list of built-in gdscript functions. Mostly math functions and other utilities. Everything else is expanded by objects. - - - - - - - - - - - - - - - Returns a 32 bit color with red, green, blue and alpha channels. Each channel has 8bits of information ranging from 0 to 255. - 'r8' red channel - 'g8' green channel - 'b8' blue channel - 'a8' alpha channel - [codeblock] - red = Color8(255, 0, 0) - [/codeblock] - - - - - - - - - - - Returns color 'name' with alpha ranging from 0 to 1. Note: 'name' is defined in color_names.inc. - [codeblock] - red = ColorN('red') - [/codeblock] - - - - - - - - - Returns the absolute value of parameter 's' (i.e. unsigned value, works for integer and float). - [codeblock] - # a is 1 - a = abs(-1) - [/codeblock] - - - - - - - - - Returns the arc cosine of 's' in radians. Use to get the angle of cosine 's'. - [codeblock] - # c is 0.523599 or 30 degrees if converted with rad2deg(s) - c = acos(0.866025) - [/codeblock] - - - - - - - - - Returns the arc sine of 's' in radians. Use to get the angle of sine 's'. - [codeblock] - # s is 0.523599 or 30 degrees if converted with rad2deg(s) - s = asin(0.5) - [/codeblock] - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns the arc tangent of y/x in radians. Use to get the angle of tangent y/x. To compute the value, the function takes into account the sign of both arguments in order to determine the quadrant. - [codeblock] - # a is 3.141593 - a = atan(0,-1) - [/codeblock] - - - - - - - - - Decode a byte array back to a value. - - - - - - - - - Rounds 's' upward, returning the smallest integral value that is not less than 's'. - [codeblock] - # i is 2 - i = ceil(1.45) - # i is 2 - i = ceil(1.001) - [/codeblock] - - - - - - - - - Returns a character as String of the given ASCII code. - [codeblock] - # a is 'A' - a = char(65) - # a is 'a' - a = char(65+32) - [/codeblock] - - - - - - - - - - - - - Clamp 'val' and return a value not less than 'min' and not more than 'max'. - [codeblock] - speed = 1000 - # a is 20 - a = clamp(speed, 1, 20) - - speed = -10 - # a is 1 - a = clamp(speed, 1, 20) - [/codeblock] - - - - - - - - - - - Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in [@Global Scope]. - [codeblock] - a = Vector2(1, 0) - # prints 1 - print(a.length()) - a = convert(a, TYPE_STRING) - # prints 6 - # (1, 0) is 6 characters - print(a.length()) - [/codeblock] - - - - - - - - - Returns the cosine of angle 's' in radians. - [codeblock] - # prints 1 and -1 - print(cos(PI*2)) - print(cos(PI)) - [/codeblock] - - - - - - - - - Returns the hyperbolic cosine of 's' in radians. - [codeblock] - # prints 1.543081 - print(cosh(1)) - [/codeblock] - - - - - - - - - Convert from decibels to linear energy (audio). - - - - - - - - - Returns the number of digit places after the decimal that the first non-zero digit occurs. - [codeblock] - # n is 2 - n = decimals(0.035) - [/codeblock] - - - - - - - - - - - - - Returns the result of 'value' decreased by 'step' * 'amount'. - [codeblock] - # a = 59 - a = dectime(60, 10, 0.1)) - [/codeblock] - - - - - - - - - Returns degrees converted to radians. - [codeblock] - # r is 3.141593 - r = deg2rad(180) - [/codeblock] - - - - - - - - - Convert a previously converted instance to dictionary back into an instance. Useful for deserializing. - - - - - - - - - - - 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. - - - - - - - - - Returns [b]e[/b] raised to the power of 's'. [b]e[/b] sometimes called "Euler's number" is a mathematical constant whose value is approximately 2.71828. - - - - - - - - - Returns the largest integer value (rounded down) that is less than or equal to 's'. - - - - - - - - - - - Returns the floating-point remainder of x/y (rounded towards zero): - [codeblock] - fmod = x - tquot * y - [/codeblock] - Where tquot is the truncated (i.e., rounded towards zero) result of: x/y. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns the integer hash of the variable passed. - [codeblock] - # print 177670 - print(hash("a")) - [/codeblock] - - - - - - - - - Returns the passed instance converted a dictionary (useful for serializing). - [codeblock] - var foo = "bar" - func _ready(): - var d = inst2dict(self) - print(d.keys()) - print(d.values()) - [/codeblock] - Prints out: - [codeblock] - [@subpath, @path, foo] - [, res://test.gd, bar] - [/codeblock] - - - - - - - - - Returns the Object that corresponds to 'instance_id'. All Objects have a unique instance ID. - [codeblock] - var foo = "bar" - func _ready(): - var id = get_instance_id() - var inst = instance_from_id(id) - print(inst.foo) - [/codeblock] - Prints "bar" - - - - - - - - - - - - - Returns a normalized value considering the given range. - [codeblock] - inverse_lerp(3, 5, 4) # return 0.5 - [/codeblock] - - - - - - - - - Returns True/False whether 's' is an infinity value (either positive infinity or negative infinity). - - - - - - - - - Returns True/False whether 's' is a NaN (Not-A-Number) value. - - - - - - - - - Returns length of Variant 'var'. Length is the character count of String, element count of Array, size of Dictionary, etc. Note: Generates a fatal error if Variant can not provide a length. - [codeblock] - a = [1, 2, 3, 4] - print(len(a)) - [/codeblock] - Prints 4 - - - - - - - - - - - - - Linear interpolates between two values by a normalized value. - - - - - - - - - Convert from linear energy to decibels (audio). - - - - - - - - - Load a resource from the filesystem located at 'path'. Note: resource paths can be obtained by right clicking on a resource in the Assets Pannel and choosing "Copy Path". - [codeblock] - # load a scene called main located in the root of the project directory - var main = load("res://main.tscn") - [/codeblock] - - - - - - - - - Natural logarithm. The amount of time needed to reach a certain level of continuous growth. Note: This is not the same as the log funcation on your calculator which is a base 10 logarithm. - [codeblock] - # a is 2.302585 - a = log(10) - [/codeblock] - - - - - - - - - - - Returns the maximum of two values. - [codeblock] - # a is 2 - a = max(1,2) - # a is -3.99 - a = max(-3.99, -4) - [/codeblock] - - - - - - - - - - - Returns the minimum of two values. - [codeblock] - # a is 1 - a = min(1,2) - # a is -4 - a = min(-3.99, -4) - [/codeblock] - - - - - - - - - Returns the nearest larger power of 2 for an integer. - [codeblock] - # a is 4 - a = nearest_po2(3) - # a is 4 - a = nearest_po2(4) - # a is 8 - a = nearest_po2(5) - [/codeblock] - - - - - - - - - Parse JSON text to a Variant (use [method typeof] to check if it is what you expect). - Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert every numerical values to [float] types. - [codeblock] - p = parse_json('["a", "b", "c"]') - if typeof(p) == TYPE_ARRAY: - print(p[0]) - else: - print("unexpected results") - [/codeblock] - - - - - - - - - - - Returns the result of 'x' raised to the power of 'y'. - [codeblock] - # a is 32 - a = pow(2,5) - [/codeblock] - - - - - - - - - Returns a resource from the filesystem that is loaded during script parsing. Note: resource paths can be obtained by right clicking on a resource in the Assets Pannel and choosing "Copy Path". - [codeblock] - # load a scene called main located in the root of the project directory - var main = preload("res://main.tscn") - - - - - - - Converts one or more arguments to strings in the best way possible and prints them to the console. - [codeblock] - a = [1,2,3] - print("a","b",a) - [/codeblock] - Prints ab[1, 2, 3] - - - - - - - Print a stack track at code location, only works when running with debugger turned on. - - - - - - - Print one or more arguments to strings in the best way possible to standard error line. - - - - - - - Print one or more arguments to strings in the best way possible to console. No newline is added at the end. - - - - - - - Print one or more arguments to the console with a space between each argument. - - - - - - - Print one or more arguments to the console with a tab between each argument. - - - - - - - - - Convert from radians to degrees. - - - - - - - - - - - Random range, any floating point value between 'from' and 'to'. - - - - - - - - - Random from seed: pass a seed, and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits. - - - - - - - Return a random floating point value between 0 and 1. - - - - - - - Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use remainder. For example, to get a random integer between 0 and 19 inclusive, you can use randi() % 20. - - - - - - - Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. - - - - - - - Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment). - - - - - - - - - - - - - - - - - Maps a value from range [istart, istop] to [ostart, ostop]. - [codeblock] - range_lerp(75, 0, 100, -1, 1) # returns 0.5 - [/codeblock] - - - - - - - - - Returns the integral value that is nearest to s, with halfway cases rounded away from zero. - - - - - - - - - Set seed for the random number generator. - - - - - - - - - Return sign (-1 or +1). - - - - - - - - - Returns the sine of an angle of s radians. - - - - - - - - - Returns the hyperbolic sine of s. - - - - - - - - - Returns the square root of s. - - - - - - - - - - - Snap float value to a given step. - - - - - - - Convert one or more arguments to string in the best way possible. - - - - - - - - - Convert a formatted string that was returned by [method var2str] to the original value. - - - - - - - - - Returns the tangent of an angle of s radians. - - - - - - - - - Returns the hyperbolic tangent of s. - - - - - - - - - Convert a Variant to json text. - - - - - - - - - Returns whether the given class is exist in [ClassDB]. - [codeblock] - type_exists("Sprite") # returns true - type_exists("Variant") # returns false - [/codeblock] - - - - - - - - - Return the internal type of the given Variant object, using the TYPE_* enum in [@Global Scope]. - - - - - - - - - This method is used to validate the structure and data types of a piece of JSON, similar to XML Schema for XML. - - - - - - - - - Encode a variable value to a byte array. - - - - - - - - - Convert a value to a formatted string that can later be parsed using [method str2var]. - - - - - - - - - Return a weak reference to an object. - A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it. - - - - - - - - - - - Stop the function execution and return the current state. Call [method GDFunctionState.resume] on the state to resume execution. This invalidates the state. - Returns anything that was passed to the resume function call. If passed an object and a signal, the execution is resumed when the object's signal is emitted. - - - - - - Constant that represents how many times the diameter of a circumference fits around its perimeter. - - - A positive infinity. (For negative infinity, use -INF). - - - 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. - - - - - - Global scope constants and variables. - - - Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. It's not much. - Singletons are also documented here, since they can be accessed from anywhere. - - - - - - [ARVRServer] singleton - - - [AudioServer] singleton - - - [ClassDB] singleton - - - [Engine] singleton - - - [Geometry] singleton - - - [IP] singleton - - - [Input] singleton - - - [InputMap] singleton - - - [Marshalls] singleton - - - [OS] singleton - - - [Performance] singleton - - - [Physics2DServer] singleton - - - [PhysicsServer] singleton - - - [ProjectSettings] singleton - - - [ResourceLoader] singleton - - - [ResourceSaver] singleton - - - [TranslationServer] singleton - - - [VisualServer] singleton - - - - - Left margin, used usually for [Control] or [StyleBox] derived classes. - - - Top margin, used usually for [Control] or [StyleBox] derived classes. - - - Right margin, used usually for [Control] or [StyleBox] derived classes. - - - Bottom margin, used usually for [Control] or [StyleBox] derived classes. - - - General vertical alignment, used usually for [Separator], [ScrollBar], [Slider], etc. - - - General horizontal alignment, used usually for [Separator], [ScrollBar], [Slider], etc. - - - Horizontal left alignment, usually for text-derived classes. - - - Horizontal center alignment, usually for text-derived classes. - - - Horizontal right alignment, usually for text-derived classes. - - - Vertical top alignment, usually for text-derived classes. - - - Vertical center alignment, usually for text-derived classes. - - - Vertical bottom alignment, usually for text-derived classes. - - - Scancodes with this bit applied are non printable. - - - Escape Key - - - Tab Key - - - Shift-Tab Key - - - Backspace Key - - - Return Key (On Main Keyboard) - - - Enter Key (On Numpad) - - - Insert Key - - - Delete Key - - - Pause Key - - - Printscreen Key - - - - - - - Home Key - - - End Key - - - Left Arrow Key - - - Up Arrow Key - - - Right Arrow Key - - - Down Arrow Key - - - Pageup Key - - - Pagedown Key - - - Shift Key - - - Control Key - - - - - Alt Key - - - Capslock Key - - - Numlock Key - - - Scrolllock Key - - - F1 Key - - - F2 Key - - - F3 Key - - - F4 Key - - - F5 Key - - - F6 Key - - - F7 Key - - - F8 Key - - - F9 Key - - - F10 Key - - - F11 Key - - - F12 Key - - - F13 Key - - - F14 Key - - - F15 Key - - - F16 Key - - - Multiply Key on Numpad - - - Divide Key on Numpad - - - Subtract Key on Numpad - - - Period Key on Numpad - - - Add Key on Numpad - - - Number 0 on Numpad - - - Number 1 on Numpad - - - Number 2 on Numpad - - - Number 3 on Numpad - - - Number 4 on Numpad - - - Number 5 on Numpad - - - Number 6 on Numpad - - - Number 7 on Numpad - - - Number 8 on Numpad - - - Number 9 on Numpad - - - Super Left key (windows key) - - - Super Left key (windows key) - - - Context menu key - - - - - - - Help key - - - - - - - Back key - - - Forward key - - - Stop key - - - Refresh key - - - Volume down key - - - Mute volume key - - - Volume up key - - - - - - - - - - - - - Media play key - - - Media stop key - - - Previous song key - - - Next song key - - - Media record key - - - Home page key - - - Favorites key - - - Search key - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Space Key - - - ! key - - - " key - - - # key - - - $ key - - - % key - - - & key - - - ' key - - - ( key - - - ) key - - - * key - - - + key - - - , key - - - - key - - - . key - - - / key - - - Number 0 - - - Number 1 - - - Number 2 - - - Number 3 - - - Number 4 - - - Number 5 - - - Number 6 - - - Number 7 - - - Number 8 - - - Number 9 - - - : key - - - ; key - - - Lower than key - - - = key - - - Greater than key - - - ? key - - - @ key - - - A Key - - - B Key - - - C Key - - - D Key - - - E Key - - - F Key - - - G Key - - - H Key - - - I Key - - - J Key - - - K Key - - - L Key - - - M Key - - - N Key - - - O Key - - - P Key - - - Q Key - - - R Key - - - S Key - - - T Key - - - U Key - - - V Key - - - W Key - - - X Key - - - Y Key - - - Z Key - - - [ key - - - \ key - - - ] key - - - ^ key - - - _ key - - - - - { key - - - | key - - - } key - - - ~ key - - - - - - - ¢ key - - - - - - - - - ¦ key - - - § key - - - ¨ key - - - © key - - - - - « key - - - » key - - - ‐ key - - - ® key - - - - - ° key - - - ± key - - - ² key - - - ³ key - - - ´ key - - - µ key - - - - - · key - - - ¬ key - - - - - - - - - - - ½ key - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Left Mouse Button - - - Right Mouse Button - - - Middle Mouse Button - - - Mouse wheel up - - - Mouse wheel down - - - Mouse wheel left button - - - Mouse wheel right button - - - - - - - - - Joypad Button 0 - - - Joypad Button 1 - - - Joypad Button 2 - - - Joypad Button 3 - - - Joypad Button 4 - - - Joypad Button 5 - - - Joypad Button 6 - - - Joypad Button 7 - - - Joypad Button 8 - - - Joypad Button 9 - - - Joypad Button 10 - - - Joypad Button 11 - - - Joypad Button 12 - - - Joypad Button 13 - - - Joypad Button 14 - - - Joypad Button 15 - - - Joypad Button 16 - - - DUALSHOCK circle button - - - DUALSHOCK X button - - - DUALSHOCK square button - - - DUALSHOCK triangle button - - - XBOX controller B button - - - XBOX controller A button - - - XBOX controller X button - - - XBOX controller Y button - - - - - - - - - - - Joypad Button Select - - - Joypad Button Start - - - Joypad DPad Up - - - Joypad DPad Down - - - Joypad DPad Left - - - Joypad DPad Right - - - Joypad Left Shoulder Button - - - Joypad Left Trigger - - - Joypad Left Stick Click - - - Joypad Right Shoulder Button - - - Joypad Right Trigger - - - Joypad Right Stick Click - - - Joypad Left Stick Horizontal Axis - - - Joypad Left Stick Vertical Axis - - - Joypad Right Stick Horizontal Axis - - - Joypad Right Stick Vertical Axis - - - - - - - Joypad Left Trigger Analog Axis - - - Joypad Right Trigger Analog Axis - - - - - Joypad Left Stick Horizontal Axis - - - Joypad Left Stick Vertical Axis - - - Joypad Right Stick Horizontal Axis - - - Joypad Right Stick Vertical Axis - - - - - - - Functions that return Error return OK when everything went ok. Most functions don't return error anyway and/or just print errors to stdout. - - - Generic fail return error. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No hint for edited property. - - - Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats. - - - 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 for an enumerated value, like "Hello,Something,Else". This is valid for integer, float and string properties. - - - - - - - - - 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. - - - - - - - - - - - String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc". - - - String property is a directory (so pop up a file dialog when edited). - - - - - - - String property is a resource, so open the resource popup menu when edited. - - - - - - - - - - - Property will be used as storage (default). - - - Property will be visible in editor (default). - - - - - - - - - - - - - - - - - - - - - - - - - - - Default usage (storage and editor). - - - - - - - - - - - - - - - - - - - - - - - Variable is of type nil (only applied for null). - - - Variable is of type [bool]. - - - Variable is of type [int]. - - - Variable is of type [float]/real. - - - Variable is of type [String]. - - - Variable is of type [Vector2]. - - - Variable is of type [Rect2]. - - - Variable is of type [Vector3]. - - - Variable is of type [Transform2D]. - - - Variable is of type [Plane]. - - - Variable is of type [Quat]. - - - Variable is of type [Rect3]. - - - Variable is of type [Basis]. - - - Variable is of type [Transform]. - - - Variable is of type [Color]. - - - Variable is of type [NodePath]. - - - Variable is of type [RID]. - - - Variable is of type [Object]. - - - Variable is of type [Dictionary]. - - - Variable is of type [Array]. - - - Variable is of type [PoolByteArray]. - - - Variable is of type [PoolIntArray]. - - - Variable is of type [PoolRealArray]. - - - Variable is of type [PoolStringArray]. - - - Variable is of type [PoolVector2Array]. - - - Variable is of type [PoolVector3Array]. - - - Variable is of type [PoolColorArray]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Anchor point in AR Space - - - The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. - This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognised. - Keep in mind that as long as plane detection is enable the size, placing and orientation of an anchor will be updates as the detection logic learns more about the real world out there especially if only part of the surface is in view. - - - - - - - Returns the anchor id for this anchor. - - - - - - - Returns the name given to this anchor. - - - - - - - Returns true if the anchor is being tracked and false if no anchor with this id is currently known. - - - - - - - Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table. - - - - - - - - - Binds this anchor node to an anchor with this id. You can set this before the anchor itself exists. The first anchor that is identified gets id 1, the second id 2, etc. When anchors get removed that slot remains free and can be assigned to the next anchor that is identified. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merge them. - - - - - - - - - - - - - A camera node with a few overrules for AR/VR applied such as location tracking. - - - This is a helper spatial node for our camera, note that if stereoscopic rendering is applicable (VR-HMD) most of the camera properties are ignored as the HMD information overrides them. The only properties that can be trusted are the near and far planes. - The position and orientation of this node is automatically updated by the ARVR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that in contrast to the ARVR Controller the render thread has access to the most up to date tracking data of the HMD and the location of the ARVRCamera can lag a few milliseconds behind what is used for rendering as a result. - - - - - - - - - A spatial node representing a spatially tracked controller. - - - This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy pass throughs to the state of buttons and such on the controllers. - 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. - - - - - - - Returns the controller id currently assigned to this node. - - - - - - - If active, returns the name of the associated controller if provided by the AR/VR SDK used. - - - - - - - - - - - - - Returns true if the controller bound to this node is currently active and being tracked. - - - - - - - - - Returns the value of the given axis for things like triggers, touchpads, etc. that are embedded into the controller. - - - - - - - Returns the ID of the joystick object bound to this. Every controller tracked by the ARVR Server that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry. - - - - - - - - - Is the given button currently pressed? - - - - - - - - - Changes the id that identifies the controller bound to this node. The first controller that the ARVR Server detects will have id 1, the second id 2, the third id 3, etc. When a controller is turned off that slot is freed ensuring that controllers will keep the same id while it is turned on even when controllers with lower ids are turned off. - - - - - - - - - - - - - When a button on this controller is pressed, this signal is given. - - - - - - - When a button on this controller is released, this signal is given. - - - - - - - - - Base class for ARVR interface implementation. - - - This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass ARVRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. - Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through ARVRServer. - - - - - - - Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc). - - - - - - - Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform. - - - - - - - Returns true if an HMD is available for this interface. - - - - - - - Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. - After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. - Note that you must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. - If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different. - While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However at this point in time only one interface can render to an HMD. - - - - - - - Returns true if this interface is active. - - - - - - - Returns true if this interface has been installed. Say your game is designed to work with OpenVR so you are using the OpenVR interface but the user hasn't installed SteamVR, this would return false. - - - - - - - Returns true if this interface is currently the primary interface (the interface responsible for showing the output). - - - - - - - - - Set this interface to the primary interface (unset the old one). - - - - - - - Returns true if this interface supports HMDs and by extension uses stereo scopic rendering. - - - - - - - Turns the interface off. - - - - - - - - - - Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. - - - Left eye output, this is mostly used internally when rendering the image for the left eye and obtaining positioning and projection information. - - - Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information. - - - - - - Our origin point in AR/VR. - - - This is a special node within the AR/VR system that maps the physical location of the center of our tracking space to the virtual location within our game world. - There should be only one of these nodes in your scene and you must have one. All the ARVRCamera, ARVRController and ARVRAnchor nodes should be direct children of this node for spatial tracking to work correctly. - It is the position of this node that you update when you're character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point. - So say that your character is driving a car, the ARVROrigin node should be a child node of this car. If you implement a teleport system to move your character, you change the position of this node. Etc. - - - - - - - Get the world scale applied to our positioning. - - - - - - - - - Changes the world scaling factor. - Most AR/VR platforms will assume a unit size of 1 unit in your game world = 1 meter in the real world. This scale allows you to adjust this to the unit system you use in your game. - Note that this method is a passthrough to the ARVRServer itself. - - - - - - - - - - - - - A tracked object - - - An instance of this object represents a device that is tracked such as a controller or anchor point. HMDs aren't represented here as they are fully handled internally. - As controllers are turned on and the AR/VR interface detects them instances of this object are automatically added to this list of active tracking objects accessible through the ARVRServer - The ARVRController and ARVRAnchor both consume objects of this type and should be the objects you use in game. The positional trackers are just the under the hood objects that make this all work and are mostly exposed so GDNative based interfaces can interact with them. - - - - - - - - - - - - - If this is a controller that is being tracked the controller will also be represented by a joystick entry with this id. - - - - - - - If available this returns the name of the controller or anchor point. - - - - - - - Returns the orientation matrix of the controller. - - - - - - - Returns the position of the controller adjusted by world scale. - - - - - - - Returns true if the orientation of this device is being tracked. - - - - - - - Returns true if the position of this device is being tracked. - - - - - - - - - Returns the transform combining the orientation and position of this device. - - - - - - - Type of tracker. - - - - - - - - - - - - - - - Base class for GDNative based ARVR interfaces. - - - This class is used as a base class/interface class for implementing GDNative based ARVR interfaces and as a result exposes more of the internals of the ARVR server. - - - - - - - Should return the projection 4x4 matrix for the requested eye. - - - - - - - - - - - Outputs a finished render buffer to the AR/VR device for the given eye. - - - - - - - Returns the size at which we should render our scene to get optimal quality on the output device. - - - - - - - - - - - Get the location and orientation transform used when rendering a specific eye. - - - - - - - Return true is an HMD is available. - - - - - - - Initialize this interface. - - - - - - - Returns true if this interface has been initialized and is active. - - - - - - - Returns true if the required middleware is installed. - - - - - - - Returns true if we require stereoscopic rendering for this interface. - - - - - - - Gets called before rendering each frame so tracking data gets updated in time. - - - - - - - Returns true if this interface supports HMDs. - - - - - - - Turn this interface off. - - - - - - - - - This is our AR/VR Server. - - - The AR/VR Server is the heart of our AR/VR solution and handles all the processing. - - - - - - - - - Mostly exposed for GDNative based interfaces, this is called to register an available interface with the AR/VR server. - - - - - - - - - Find an interface by its name. Say that you're making a game that uses specific capabilities of an AR/VR platform you can find the interface for that platform by name and initialize it. - - - - - - - - - Get the interface registered at a given index in our list of interfaces. - - - - - - - Get the number of interfaces currently registered with the AR/VR server. If you're game supports multiple AR/VR platforms you can look throught the available interface and either present the user with a selection or simply try an initialize each interface and use the first one that returns true. - - - - - - - Gets our reference frame transform, mostly used internally and exposed for GDNative build interfaces. - - - - - - - - - Get the positional tracker at the given ID. - - - - - - - Get the number of trackers currently registered. - - - - - - - Returns our world scale (see ARVROrigin for more information). - - - - - - - - - Removes a registered interface, again exposed mostly for GDNative based interfaces. - - - - - - - - - - - This is a really important function to understand correctly. AR and VR platforms all handle positioning slightly differently. - For platforms that do not offer spatial tracking our origin point (0,0,0) is the location of our HMD but you have little control over the direction the player is facing in the real world. - For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera. - This method allows you to create a reference frame, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world. - For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game. - You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism. - - - - - - - - - Changes the primary interface to the specified interface. Again mostly exposed for GDNative interfaces. - - - - - - - - - Changing the world scale, see the ARVROrigin documentation for more information. - - - - - - - - - - - - - Signal send when a new interface has been added. - - - - - - - Signal send when an interface is removed. - - - - - - - - - - - Signal send when a new tracker has been added. If you don't use a fixed number of controllers or if you're using ARVRAnchors for an AR solution it is important to react to this signal and add the appropriate ARVRController or ARVRAnchor node related to this new tracker. - - - - - - - - - - - Signal send when a tracker is removed, you should remove any ARVRController or ARVRAnchor points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one). - - - - - - Our tracker tracks the location of a controller. - - - Our tracker tracks the location of a base station. - - - Our tracker tracks the location and size of an AR anchor. - - - Used internally if we haven't set the tracker type yet. - - - Used internally to filter trackers of any known type. - - - Used interally to select all trackers. - - - - - - AStar class representation that uses vectors as edges. - - - A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting an efficiently directed path between multiple points. It enjoys widespread use due to its performance and accuracy. Godot's A* implementation make use of vectors as points. - You must add points manually with [method AStar.add_point] and create segments manually with [method AStar.connect_points]. So you can test if there is a path between two points with the [method AStar.are_points_connected] function, get the list of existing ids in the found path with [method AStar.get_id_path], or the points list with [method AStar.get_point_path]. - - - - - - - - - - - Called when computing the cost between two connected points. - - - - - - - - - - - Called when estimating the cost between a point and the path's ending point. - - - - - - - - - - - - - Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. - [codeblock] - var as = AStar.new() - - as.add_point(1, Vector3(1,0,0), 4) # Adds the point (1,0,0) with weight_scale=4 and id=1 - [/codeblock] - - - - - - - - - - - Returns whether there is a connection/segment between the given points. - - - - - - - Clears all the points and segments. - - - - - - - - - - - - - Creates a segment between the given points. - [codeblock] - var as = AStar.new() - - as.add_point(1, Vector3(1,1,0)) - as.add_point(2, Vector3(0,5,0)) - - as.connect_points(1, 2, false) # If bidirectional=false it's only possible to go from point 1 to point 2 - # and not from point 2 to point 1. - [/codeblock] - - - - - - - - - - - Deletes the segment between the given points. - - - - - - - Returns an id with no point associated to it. - - - - - - - - - Returns the id of the closest point to [code]to_pos[/code]. Returns -1 if there are no points in the points pool. - - - - - - - - - Returns the closest position to [code]to_pos[/code] that resides inside a segment between two connected points. - [codeblock] - var as = AStar.new() - - as.add_point(1, Vector3(0,0,0)) - as.add_point(2, Vector3(0,5,0)) - - as.connect_points(1, 2) - - var res = as.get_closest_pos_in_segment(Vector3(3,3,0)) # returns (0, 3, 0) - [/codeblock] - The result is in the segment that goes from [code]y=0[/code] to [code]y=5[/code]. It's the closest position in the segment to the given point. - - - - - - - - - - - Returns an array with the ids of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. - [codeblock] - var as = AStar.new() - - as.add_point(1, Vector3(0,0,0)) - as.add_point(2, Vector3(0,1,0), 1) # default weight is 1 - as.add_point(3, Vector3(1,1,0)) - as.add_point(4, Vector3(2,0,0)) - - as.connect_points(1, 2, false) - as.connect_points(2, 3, false) - as.connect_points(4, 3, false) - as.connect_points(1, 4, false) - as.connect_points(5, 4, false) - - var res = as.get_id_path(1, 3) # returns [1, 2, 3] - [/codeblock] - If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. - - - - - - - - - - - Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. - - - - - - - - - Returns the position of the point associated with the given id. - - - - - - - - - Returns the weight scale of the point associated with the given id. - - - - - - - - - - - - - - - Returns whether a point associated with the given id exists. - - - - - - - - - Removes the point associated with the given id from the points pool. - - - - - - - - - Base dialog for user notification. - - - This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result. - - - - - - - - - - - - - Add custom button to the dialog and return the created button. - The button titled with [i]text[/i] and the [i]action[/i] will be passed to [custom_action] signal when it is pressed. - - - - - - - - - Add custom cancel button to the dialog and return the created button. - - - - - - - Return true if the dialog will be hidden when accepted (default true). - - - - - - - Return the label used for built-in text. - - - - - - - Return the OK Button. - - - - - - - Return the built-in label text. - - - - - - - - - Register a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted. - - - - - - - - - Set whether the dialog is hidden when accepted (default true). - - - - - - - - - Set the built-in label text. - - - - - - - - - - - - - Emitted when accepted. - - - - - - - Emitted with a custom button is added. - - - - - - - - - Sprite node that can use multiple textures for animation. - - - Sprite node that can use multiple textures for animation. - - - - - - - Return the name of the current animation set to the node. - - - - - - - Return the visible frame index. - - - - - - - Return the offset of the sprite in the node origin. - - - - - - - Get the [SpriteFrames] resource, which contains all frames. - - - - - - - Return true when centered. See [method set_centered]. - - - - - - - Return true if sprite is flipped horizontally. - - - - - - - Return true if sprite is flipped vertically. - - - - - - - Return true if an animation if currently being played. - - - - - - - - - Play the animation set in parameter. If no parameter is provided, the current animation is played. - - - - - - - - - Set the current animation of the node and reinits the frame counter of the animation. - - - - - - - - - When turned on, offset at (0,0) is the center of the sprite, when off, the top-left corner is. - - - - - - - - - If true, sprite is flipped horizontally. - - - - - - - - - If true, sprite is flipped vertically. - - - - - - - - - Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource). - - - - - - - - - Set the offset of the sprite in the node origin. Position varies depending on whether it is centered or not. - - - - - - - - - Set the [SpriteFrames] resource, which contains all frames. - - - - - - - Stop the current animation (does not reset the frame counter). - - - - - - - - - - - - - - - - - - - - - - - - - Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn, before looping. - - - - - Emitted when frame is changed. - - - - - - - - - - - - - - - - - Return the name of the current animation set to the node. - - - - - - - Return the visible frame index. - - - - - - - Get the [SpriteFrames] resource, which contains all frames. - - - - - - - Return true if an animation if currently being played. - - - - - - - - - Play the animation set in parameter. If no parameter is provided, the current animation is played. - - - - - - - - - Set the current animation of the node and reinits the frame counter of the animation. - - - - - - - - - Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource). - - - - - - - - - Set the [SpriteFrames] resource, which contains all frames. - - - - - - - Stop the current animation (does not reset the frame counter). - - - - - - - - - - - - - - - - - Emitted when frame is changed. - - - - - - - - - Contains data used to animate everything in the engine. - - - 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 [AnimationPlayer] or [AnimationTreePlayer] to be played back. - - - - - - - - - - - Add a track to the Animation. The track type must be specified as any of the values in the TYPE_* enumeration. - - - - - - - Clear the animation (clear all tracks and reset all). - - - - - - - - - Return the index of the specified track. If the track is not found, return -1. - - - - - - - Return the total length of the animation (in seconds). - - - - - - - Get the animation step value. - - - - - - - Return the amount of tracks in the animation. - - - - - - - Return whether the animation has the loop flag set. - - - - - - - - - - - - - Return all the key indices of a method track, given a position and delta time. - - - - - - - - - - - Return the method name of a method track. - - - - - - - - - - - Return the arguments values to be called on a method track for a given key in a given track. - - - - - - - - - Remove a track by specifying the track index. - - - - - - - - - Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. - - - - - - - - - Set a flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. - - - - - - - - - Set the animation step value. - - - - - - - - - - - - - Find the key index by time in a given track. Optionally, only find it if the exact time is given. - - - - - - - - - - - - - - - - - Return the interpolation type of a given track, from the INTERPOLATION_* enum. - - - - - - - - - Return the amount of keys in a given track. - - - - - - - - - - - Return the time at which the key is located. - - - - - - - - - - - Return the transition curve (easing) for a specific key (see built-in math function "ease"). - - - - - - - - - - - Return the value of a given key in a given track. - - - - - - - - - Get the path of a track. for more information on the path format, see [method track_set_path] - - - - - - - - - Get the type of a track. - - - - - - - - - - - - - - - Insert a generic key in a given track. - - - - - - - - - Return true if the given track is imported. Else, return false. - - - - - - - - - Move a track down. - - - - - - - - - Move a track up. - - - - - - - - - - - Remove a key by index in a given track. - - - - - - - - - - - Remove a key by position (seconds) in a given track. - - - - - - - - - - - Set the given track as imported or not. - - - - - - - - - - - - - - - - - - - - - Set the interpolation type of a given track, from the INTERPOLATION_* enum. - - - - - - - - - - - - - Set the transition curve (easing) for a specific key (see built-in math function "ease"). - - - - - - - - - - - - - Set the value of an existing key. - - - - - - - - - - - Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local" - - - - - - - - - - - - - - - - - Insert a transform key for a transform track. - - - - - - - - - - - Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]). - - - - - - - - - - - - - Return all the key indices of a value track, given a position and delta time. - - - - - - - - - Return the update mode of a value track. - - - - - - - - - - - Set the update mode (UPDATE_*) of a value track. - - - - - - Value tracks set values in node properties, but only those which can be Interpolated. - - - Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated. - - - Method tracks call functions with given arguments per key. - - - No interpolation (nearest value). - - - Linear interpolation. - - - Cubic interpolation. - - - Update between keyframes. - - - Update at the keyframes and hold the value. - - - Update at the keyframes. - - - - - - Container and player of [Animation] resources. - - - An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels. - - - - - - - - - - - Add an animation resource to the player, which will be later referenced by the "name" argument. - - - - - - - - - Used to skip ahead or skip back in an animation. Delta is the time in seconds to skip. - - - - - - - - - Return the name of the next animation in the queue. - - - - - - - - - - - Set the name of an animation that will be played after. - - - - - - - The animation player creates caches for faster access to the nodes it will animate. However, if a specific node is removed, it may not notice it, so clear_caches will force the player to search for the nodes again. - - - - - - - If animations are queued to play, clear them. - - - - - - - - - Find an animation name by resource. - - - - - - - - - Get an [Animation] resource by requesting a name. - - - - - - - Get the list of names of the animations stored in the player. - - - - - - - Return the mode in which the animation player processes. See [method set_animation_process_mode]. - - - - - - - Return the name of the animation that will be automatically played when the scene is loaded. - - - - - - - - - - - Get the blend time between two animations, referenced by their names. - - - - - - - Return the name of the animation being played. - - - - - - - Get the length (in seconds) of the currently being played animation. - - - - - - - Get the position (in seconds) of the currently being played animation. - - - - - - - Return the default blend time between animations. - - - - - - - Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided). - - - - - - - Return path to root node (see [method set_root]). - - - - - - - Get the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling). - - - - - - - - - Request whether an [Animation] name exist within the player. - - - - - - - Return true if the player is active. - - - - - - - Return whether an animation is playing. - - - - - - - - - - - - - - - Play a given animation by the animation name. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards. - - - - - - - - - - - Play a given animation by the animation name in reverse. - - - - - - - - - Queue an animation for playback once the current one is done. - - - - - - - - - Remove an animation from the player (by supplying the same name used to add it). - - - - - - - - - - - Rename an existing animation. - - - - - - - - - - - Seek the animation to a given position in time (in seconds). If 'update' is true, the animation will be updated too, otherwise it will be updated at process time. - - - - - - - - - Set the player as active (playing). If false, it will do nothing. - - - - - - - - - Set the mode in which the animation player processes. By default, it processes on idle time (framerate dependent), but using fixed time works well for animating static collision bodies in 2D and 3D. See enum ANIMATION_PROCESS_*. - - - - - - - - - Set the name of the animation that will be automatically played when the scene is loaded. - - - - - - - - - - - - - Specify a blend time (in seconds) between two animations, referenced by their names. - - - - - - - - - Set the current animation (even if no playback occurs). Using set_current_animation() and set_active() are similar to calling play(). - - - - - - - - - Set the default blend time between animations. - - - - - - - - - AnimationPlayer resolves animation track paths from this node (which is relative to itself), by default root is "..", but it can be changed. - - - - - - - - - Set a speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling). - - - - - - - - - Stop the currently playing animation. - - - - - - - Stop playback of animations (deprecated). - - - - - - - - - - - - - - - - - - - If the currently being played animation changes, this signal will notify of such change. - - - - - - - Notifies when an animation finished playing. - - - - - - - Notifies when an animation starts playing. - - - - - - Process animation on fixed process. This is specially useful when animating kinematic bodies. - - - Process animation on idle process. - - - - - - Animation Player that uses a node graph for the blending. - - - Animation Player that uses a node graph for the blending. This kind of player is very useful when animating character or other skeleton based rigs, because it can combine several animations to form a desired pose. - - - - - - - - - - - Add a node of a given type in the graph with given id. - - - - - - - - - - - - - - - - - Returns an animation given its name. - - - - - - - - - - - - - - - - - - - Set the animation for an animation node. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns whether node [code]id[/code] and [code]dst_id[/code] are connected at the specified slot. - - - - - - - - - Returns the blend amount of a Blend2 node given its name. - - - - - - - - - - - Sets the blend amount of a Blend2 node given its name and value. - - - - - - - - - - - - - - - - - - - - - Returns the blend amount of a Blend3 node given its name. - - - - - - - - - - - Sets the blend amount of a Blend3 node given its name and value. - - - - - - - - - Returns the blend amount of a Blend4 node given its name. - - - - - - - - - - - Sets the blend amount of a Blend4 node given its name and value. - - - - - - - - - - - - - Connects node [code]id[/code] to [code]dst_id[/code] at the specified input slot. - - - - - - - - - - - Disconnects nodes connected to [code]id[/code] at the specified input slot. - - - - - - - Returns playback process mode of this AnimationTreePlayer. - - - - - - - - - - - - - - - - - - - Returns a PoolStringArray containing the name of all nodes. - - - - - - - Returns whether this AnimationTreePlayer is active. - - - - - - - - - Returns mix amount of a Mix node given its name. - - - - - - - - - - - Sets mix amount of a Mix node given its name and value. - - - - - - - - - Check if a node exists (by name). - - - - - - - - - Return the input count for a given node. Different types of nodes have different amount of inputs. - - - - - - - - - - - Return the input source for a given node input. - - - - - - - - - Returns position of a node in the graph given its name. - - - - - - - - - Get the node type, will return from NODE_* enum. - - - - - - - - - - - Rename a node in the graph. - - - - - - - - - - - Sets position of a node in the graph given its name and position. - - - - - - - - - Returns autostart delay of a OneShot node given its name. - - - - - - - - - Returns autostart random delay of a OneShot node given its name. - - - - - - - - - Returns fade in time of a OneShot node given its name. - - - - - - - - - Returns fade out time of a OneShot node given its name. - - - - - - - - - Returns whether a OneShot node will auto restart given its name. - - - - - - - - - Returns whether a OneShot node is active given its name. - - - - - - - - - - - Sets autorestart property of a OneShot node given its name and value. - - - - - - - - - - - Sets autorestart delay of a OneShot node given its name and value in seconds. - - - - - - - - - - - Sets autorestart random delay of a OneShot node given its name and value in seconds. - - - - - - - - - - - Sets fade in time of a OneShot node given its name and value in seconds. - - - - - - - - - - - Sets fade out time of a OneShot node given its name and value in seconds. - - - - - - - - - - - - - - - - - - - - - Starts a OneShot node given its name. - - - - - - - - - Stops a OneShot node given its name. - - - - - - - - - - - - - - - - - - - - - Resets this AnimationTreePlayer. - - - - - - - - - Sets whether this AnimationTreePlayer is active. AnimationTreePlayer will start processing if set to active. - - - - - - - - - Sets process mode (ANIMATION_PROCESS_*) of this AnimationTreePlayer. - - - - - - - - - Sets base path of this AnimationTreePlayer. - - - - - - - - - - - - - - - - - Returns time scale value of a TimeScale node given its name. - - - - - - - - - - - Sets time scale value of a TimeScale node given its name and value. - - - - - - - - - - - Sets time seek value of a TimeSeek node given its name and value. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Output node. - - - Animation node. - - - OneShot node. - - - Mix node. - - - Blend2 node. - - - Blend3 node. - - - Blend4 node. - - - TimeScale node. - - - TimeSeek node. - - - Transition node. - - - - - - General purpose area detection and influence for 3D physics. - - - General purpose area detection for 3D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass. - - - - - - - Return the angular damp rate. - - - - - - - - - - - - - Return the physics layer this area is in. - - - - - - - - - Return an individual bit on the layer mask. - - - - - - - Return the physics layers this area can scan for collisions. - - - - - - - - - Return an individual bit on the collision mask. - - - - - - - Return the gravity intensity. - - - - - - - Return the falloff factor for point gravity. - - - - - - - Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. - - - - - - - Return the linear damp rate. - - - - - - - Return a list of the areas that are totally or partially inside this area. - - - - - - - Return a list of the bodies ([PhysicsBody]) that are totally or partially inside this area. - - - - - - - Return the processing order of this area. - - - - - - - - - - - - - - - - - - - - - - - - - Return the space override mode. - - - - - - - Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction. - - - - - - - Return whether this area can be detected by other, monitoring, areas. - - - - - - - Return whether this area detects bodies/areas entering/exiting it. - - - - - - - - - - - - - - - - - - - - - Return whether the area passed is totally or partially inside this area. - - - - - - - - - Return whether the body passed is totally or partially inside this area. - - - - - - - - - Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops. - In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. - - - - - - - - - - - - - - - - - - - - - - - - - Set the physics layers this area is in. - Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask]. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. - - - - - - - - - - - Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier. - - - - - - - - - Set the physics layers this area can scan for collisions. - - - - - - - - - - - Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. - - - - - - - - - Set the gravity intensity. This is useful to alter the force of gravity without altering its direction. - This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity). - - - - - - - - - Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance. - - - - - - - - - When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector]. - - - - - - - - - Set the gravity vector. This vector does not have to be normalized. - If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. - - - - - - - - - Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops. - In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. - - - - - - - - - Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so. - - - - - - - - - Set whether this area can detect bodies/areas entering/exiting it. - - - - - - - - - Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent. - Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the space override mode. This mode controls how an area affects gravity and damp. - AREA_SPACE_OVERRIDE_DISABLED: 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: 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: 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: 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: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area. - - - - - - - This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area. - - - - - - - - - - - - - This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering. - - - - - - - - - - - - - This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering. - - - - - - - This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area. - - - - - - - This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area. - - - - - - - - - - - - - This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering. - - - - - - - - - - - - - This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit. - - - - - - - - - 2D area that detects nodes that enter or exit it. Can override 2D physics properties within range. - - - 2D area that detects nodes that enter or exit it. Change the 'space_override' property SPACE_OVERRIDE_* to override physics parameters for nodes like [Rigidbody2D]. E.g. gravity, damping... See [CollisionObject2D] for usage. - - - - - - - Return the angular damp rate. - - - - - - - - - - - - - Return the physics layer this area is in. - - - - - - - - - Return an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer. - - - - - - - Return the physics layers this area will scan to determine collisions. - - - - - - - - - Return an individual bit on the collision mask. Describes whether this area will collide with others on the given layer. - - - - - - - Return the gravity intensity. - - - - - - - Return the falloff factor for point gravity. - - - - - - - Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. - - - - - - - Return the linear damp rate. - - - - - - - Returns a list of the [Area2D]s that intersect with this area. - - - - - - - Return a list of the [PhysicsBody2D]s that intersect with this area. - - - - - - - Return the processing order of this area. - - - - - - - Return the space override mode. - - - - - - - Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction. - - - - - - - Return whether this area can be detected by other, monitoring, areas. - - - - - - - Return whether this area detects bodies/areas entering/exiting it. - - - - - - - - - - - - - - - Return whether the area passed is totally or partially inside this area. - - - - - - - - - Return whether the body passed is totally or partially inside this area. - - - - - - - - - Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops. - In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. - - - - - - - - - - - - - - - - - - - - - - - - - Set the physics layers this area is in. - Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask]. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. - - - - - - - - - - - Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier. - - - - - - - - - Set the physics layers this area can scan for collisions. - - - - - - - - - - - Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. - - - - - - - - - Set the gravity intensity. This is useful to alter the force of gravity without altering its direction. - This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity). - - - - - - - - - Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance. - - - - - - - - - When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector]. - - - - - - - - - Set the gravity vector. This vector does not have to be normalized. - If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. - - - - - - - - - Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops. - In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. - - - - - - - - - Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so. - - - - - - - - - Set whether this area can detect bodies/areas entering/exiting it. - - - - - - - - - Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent. - Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important. - - - - - - - - - Set the space override mode. This mode controls how an area affects gravity and damp. - AREA_SPACE_OVERRIDE_DISABLED: 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: 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: 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: 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: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. - - - - - - The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'. - - - The name of the Area2D's audio bus. - - - If [code]true[/code], overrides the default audio bus with the Area2D's. Defaults to [code]false[/code]. - - - The physics layer this Area2D is in. - Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask]. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. - - - The physics layers this Area2D scans to determine collision detections. - - - The gravity intensity within the Area2D (ranges -1024 to 1024). This is useful to alter the force of gravity without altering its direction. - This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity). - - - The falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance. - - - If [code]true[/code], calculates gravity from a particular point during a space override (see [method set_space_override_mode]). If a point, [Vector2] position is set with [method set_gravity_vector]. Defaults to [code]false[/code]. - - - The gravitational direction/strength as a vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. - - - The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'. - - - If [code]true[/code], other monitoring areas can detect this Area2D (is it undetectable at the moment?). Defaults to [code]true[/code]. - - - If [code]true[/code], this detects bodies/areas entering/exiting it (can it detect others at the moment?). Defaults to [code]true[/code]. - - - The processing order for this priority. Ranges from 0 to 128. Defaults to 0. Higher priorities are processed first. - - - How to override gravity and damping calculations within this Area2D, if at all. Consult the SPACE_OVERRIDE_* constants for available options. - - - - - - - - This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area. - - - - - - - This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area. - - - - - - - - - - - - - This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering. - - - - - - - - - - - - - This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering. - - - - - - - This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area. - - - - - - - This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area. - - - - - - - - - - - - - This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering. - - - - - - - - - - - - - This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit. - - - - - - This area does not affect gravity/damp. These are areas that exist only to detect collisions and objects entering or exiting them. - - - 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. - - - 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. - - - This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. - - - This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. - - - - - - Generic array datatype. - - - Generic array, contains several elements of any type, accessible by numerical index starting at 0. Negative indices can be used to count from the right, like in Python. Arrays are always passed by reference. - - - - - - - - - Construct an array from a [PoolColorArray]. - - - - - - - - - Construct an array from a [PoolVector3Array]. - - - - - - - - - Construct an array from a [PoolVector2Array]. - - - - - - - - - Construct an array from a [PoolStringArray]. - - - - - - - - - Construct an array from a [PoolRealArray]. - - - - - - - - - Construct an array from a [PoolIntArray]. - - - - - - - - - Construct an array from a [PoolByteArray]. - - - - - - - Append an element at the end of the array (alias of [method push_back]). - - - - - Returns the last element of the array if the array is not empty (size>0). - - - - - Clear the array (resize to 0). - - - - - - - - - Return the amount of times an element is in the array. - - - - - - - - - - - - - Return true if the array is empty (size==0). - - - - - - - Remove the first occurrence of a value from the array. - - - - - - - - - - - Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed. - - - - - - - - - Searches the array in reverse order for a value and returns its index or -1 if not found. - - - - - Returns the first element of the array if the array is not empty (size>0). - - - - - - - - - Return true if the array contains given value. - [codeblock] - [ "inside", 7 ].has("inside") == true - [ "inside", 7 ].has("outside") == false - [ "inside", 7 ].has(7) == true - [ "inside", 7 ].has("7") == false - [/codeblock] - - - - - - - Return a hashed integer value representing the array contents. - - - - - - - - - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). - - - - - Reverse the order of the elements in the array (so first element will now be the last). - - - - - Remove the last element of the array. - - - - - Remove the first element of the array. - - - - - - - Append an element at the end of the array. - - - - - - - Add an element at the beginning of the array. - - - - - - - Remove an element from the array by index. - - - - - - - Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null. - - - - - - - - - - - Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. - - - - - - - Return the amount of elements in the array. - - - - - Sort the array using natural order. - - - - - - - - - Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create a new surface ([method get_surface_count] that will become surf_idx for this. - 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. (As a note, when using indices, it is recommended to only use just points, lines or triangles). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the amount of surfaces that the [ArrayMesh] holds. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the length in indices of the index array in the requested surface (see [method add_surface]). - - - - - - - - - Return the length in vertices of the vertex array in the requested surface (see [method add_surface]). - - - - - - - - - - - - - - - - - - - - - - - - - Return the format mask of the requested surface (see [method add_surface]). - - - - - - - - - Return a [Material] in a given surface. Surface is rendered using this material. - - - - - - - - - - - - - - - - - Return the primitive type of the requested surface (see [method add_surface]). - - - - - - - - - Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down. - - - - - - - - - - - - - - - - - - - - - Set a [Material] for a given surface. Surface will be rendered using this material. - - - - - - Default value used for index_array_len when no indices are present. - - - Amount of weights/bone indices per vertex (always 4). - - - Vertex array (array of [Vector3] vertices). - - - Normal array (array of [Vector3] normals). - - - Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. - - - Vertex array (array of [Color] colors). - - - UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)). - - - Second UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)). - - - Array of bone indices, as a float array. Each element in groups of 4 floats. - - - Array of bone weights, as a float array. Each element in groups of 4 floats. - - - Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size. - - - - - Array format will include vertices (mandatory). - - - Array format will include normals - - - Array format will include tangents - - - Array format will include a color array. - - - Array format will include UVs. - - - Array format will include another set of UVs. - - - Array format will include bone indices. - - - Array format will include bone weights. - - - Index array will be used. - - - - - - Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls. - - - Texture resource aimed at managing big textures files that pack multiple smaller textures. Consists of a Texture, a margin that defines the border width, and a Region - that defines the actual area of the AtlasTexture. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The texture that contains the atlas. Can be any Texture subtype. - - - The margin around the region. The Rect2's 'w' (width) and 'h' (height) resize the texture so it fits within the margin. - - - The AtlasTexture's used region. - - - - - - - - - - - - - - - - - - Audio Effect For Audio. - - - Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on. - - - - - - - - - Amplifies the volume of an audio source. - - - Amplifies the volume of an audio source. Increase gain of the audio being routed through the bus. - - - - - - - Returns the set maximum volume. - - - - - - - - - Sets the maximum volume. - - - - - - The effect's volume limit. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adds a chorus audio effect. - - - Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter. - - - - - - - Returns the set dry ratio. - - - - - - - Returns the set voice count. - - - - - - - - - Returns the voice's set cutoff frequency. - - - - - - - - - Returns the voice's set delay. - - - - - - - - - Returns the voice's set filter depth. - - - - - - - - - Returns the voice's set maximum volume. - - - - - - - - - Returns the voice's set pan. - - - - - - - - - Returns the voice filter's set rate in cycles. - - - - - - - Returns the set applied wetness of the effect. - - - - - - - - - Returns the set applied dryness of the effect. - - - - - - - - - Set the number of voices in the effect's filter. - - - - - - - - - - - Set the cutoff frequency of the voice. The maximum frequency the voice may affect. - - - - - - - - - - - Set the delay of the voice's signal. - - - - - - - - - - - Set the filter depth of the voice's signal. - - - - - - - - - - - Set the volume level of the voice. - - - - - - - - - - - Set the pan level of the voice. - - - - - - - - - - - Set the voice filter's rate. - - - - - - - - - Set the amount of effect. - - - - - - The effect's raw signal. - - - The voice's cutoff frequency. - - - The voice's signal delay. - - - The voice filter's depth. - - - The voice's volume. - - - The voice's pan level. - - - The voice's filter rate. - - - The voice's cutoff frequency. - - - The voice's signal delay. - - - The voice filter's depth. - - - The voice's volume. - - - The voice's pan level. - - - The voice's filter rate. - - - The voice's cutoff frequency. - - - The voice's signal delay. - - - The voice filter's depth. - - - The voice's volume. - - - The voice's pan level. - - - The voice's filter rate. - - - The voice's cutoff frequency. - - - The voice's signal delay. - - - The voice filter's depth. - - - The voice's volume. - - - The voice's pan level. - - - The voice's filter rate. - - - The amount of voices in the effect. - - - The effect's processed signal. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Server interface for low level audio access. - - - AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for audio streams. - - - Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or require more flexibility than a [Sample]. - - - - - - - - - OGG Vorbis audio stream driver. - - - OGG Vorbis audio stream driver. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with the texscreen() shader instruction. - - - Node for back-buffering the currently displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Accessing this buffer is done with the texscreen() shader instruction. - - - - - - - Return the copy mode currently applied to the BackBufferCopy (refer to constants section). - - - - - - - Return the area covered by the BackBufferCopy. - - - - - - - - - Set the copy mode of the BackBufferCopy (refer to constants section). - - - - - - - - - Defines the area covered by the BackBufferCopy. - - - - - - - - - - - - Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers. - - - Sets the copy mode to a region. - - - Sets the copy mode to the entire screen. - - - - - - Provides a base class for different kinds of buttons. - - - BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesn't display anything). Other types of buttons inherit from it. - - - - - - - Called when button is pressed. - - - - - - - - - Called when button is toggled (only if toggle_mode is active). - - - - - - - Return the current mode of action (see [method set_action_mode]) (one of the ACTION_MODE_* constants). - - - - - - - - - - - - - Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum. - - - - - - - Returns focus access mode used when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]). - - - - - - - - - - - - - Return whether the button is in disabled state (see [method set_disabled]). - - - - - - - Return true if mouse entered the button before it exit. - - - - - - - If toggle_mode is active, return whether the button is toggled. If toggle_mode is not active, return whether the button is pressed down. - - - - - - - Return the toggle_mode property (see [method set_toggle_mode]). - - - - - - - - - Set the current mode of action, determining when the button is considered clicked (see the ACTION_MODE_* constants). - - - - - - - - - - - - - - - - - Set the button into disabled state. When a button is disabled, it can't be clicked or toggled. - - - - - - - - - Sets the focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]). - - - - - - - - - Set the button to pressed state (only if toggle_mode is active). - - - - - - - - - - - - - - - - - Set the button toggle_mode property. Toggle mode makes the button flip state between pressed and unpressed each time its area is clicked. - - - - - - - - - - - - - - - - - - - - - - - Emitted when the button starts being held down. - - - - - Emitted when the button stops being held down. - - - - - This signal is emitted every time the button is toggled or pressed (i.e. activated, so on [code]button_down[/code] if "Click on press" is active and on [code]button_up[/code] otherwise). - - - - - - - This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]pressed[/i] argument. - - - - - - The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons. - - - The state of buttons are pressed. - - - The state of buttons are hovered. - - - The state of buttons are disabled. - - - Require just a press to consider the button clicked. - - - Require a press and a subsequent release before considering the button clicked. - - - - - - 3x3 matrix datatype. - - - 3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized. Almost always used as orthogonal basis for a [Transform]. - For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). - - - - - - - - - Create a rotation matrix from the given quaternion. - - - - - - - - - Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X-angle, Y-angle, Z-angle). - - - - - - - - - - - Create a rotation matrix which rotates around the given axis by the specified angle. The axis must be a normalized vector. - - - - - - - - - - - - - Create a matrix from 3 axis vectors. - - - - - - - Return the determinant of the matrix. - - - - - - - Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X-angle, Y-angle, Z-angle). - - - - - - - This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1,0 or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to Godot source code. - - - - - - - Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis. - - - - - - - Return the inverse of the matrix. - - - - - - - Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix. - - - - - - - - - - - Introduce an additional rotation around the given axis by phi (radians). Only relevant when the matrix is being used as a part of [Transform]. The axis must be a normalized vector. - - - - - - - - - Introduce an additional scaling specified by the given 3D scaling factor. Only relevant when the matrix is being used as a part of [Transform]. - - - - - - - - - Transposed dot product with the x axis of the matrix. - - - - - - - - - Transposed dot product with the y axis of the matrix. - - - - - - - - - Transposed dot product with the z axis of the matrix. - - - - - - - Return the transposed version of the matrix. - - - - - - - - - Return a vector transformed (multiplied) by the matrix. - - - - - - - - - Return a vector transformed (multiplied) by the transposed matrix. Note that this results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection. - - - - - - - - - - - - - - - - - Boolean matrix. - - - A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates. - - - - - - - - - Creates a bitmap with the specified size, filled with false. - - - - - - - - - Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is 0, and true in other case. - - - - - - - - - Returns bitmap's value at the specified position. - - - - - - - Returns bitmap's dimensions. - - - - - - - Returns the amount of bitmap elements that are set to true. - - - - - - - - - - - Sets the bitmap's element at the specified position, to the specified value. - - - - - - - - - - - Sets a rectangular portion of the bitmap to the specified value. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Add a character to the font, where [i]character[/i] is the unicode value, [i]texture[/i] is the texture index, [i]rect[/i] is the region in the texture (in pixels!), [i]align[/i] is the (optional) alignment for the character and [i]advance[/i] is the (optional) advance. - - - - - - - - - - - - - Add a kerning pair to the [BitmapFont] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. - - - - - - - - - Add a texture to the [BitmapFont]. - - - - - - - Clear all the font data. - - - - - - - - - - - - - - - - - - - Return the size of a character, optionally taking kerning into account if the next character is provided. - - - - - - - - - - - - - - - - - Return a kerning pair as a difference. - - - - - - - - - - - - - - - - - - - - - - - Set the font ascent (number of pixels above the baseline). - - - - - - - - - - - - - - - - - - - - - - - - - Set the total font height (ascent plus descent) in pixels. - - - - - - - - - - - - - - - - - - - - - - - - - A node that will attach to a bone. - - - This node must be the child of a [Skeleton] node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone. - - - - - - - Returns the name of the bone node attached to. - - - - - - - - - Changes the name of the bone node - - - - - - - - - Base class for Box containers. - - - Base class for Box containers. It arranges children controls vertically or horizontally, and rearranges them automatically when their minimum size changes. - - - - - - - - - Add a control to the box as a spacer. - If [i]begin[/i] is true the spacer control will be inserted in front of other children. - - - - - - - Return the alignment of children in the container. - - - - - - - - - Set the alignment of children in the container(Must be one of ALIGN_BEGIN, ALIGN_CENTER or ALIGN_END). - - - - - - - - - - Align children with beginning of the container. - - - Align children with center of the container. - - - Align children with end of the container. - - - - - - Box shape resource. - - - Box shape resource, which can be set into a [PhysicsBody] or area. - - - - - - - Return the half extents of the shape. - - - - - - - - - Set the half extents for the shape. - - - - - - - - - - - - - Standard themed Button. - - - Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Text alignment policy for the button's text, use one of the ALIGN_* constants. - - - When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default. - - - Flat buttons don't display decoration. - - - Button's icon, if text is present the icon will be placed before the text. - - - The button's text that will be displayed inside the button's area. - - - - - Align the text to the left. - - - Align the text to the center. - - - Align the text to the right. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Group of Buttons. - - - Group of [Button]. All direct and indirect children buttons become radios. Only one allows being pressed. - - - - - - - Return the pressed button. - - - - - - - - - - - - - Camera node, displays from a point of view. - - - Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides [i]3D[/i] display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed. - - - - - - - - - - - - - Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return whether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree). - - - - - - - - - - - - - - - Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added. - - - - - - - - - - - - - - - - - - - - - - - - - Return a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking. - - - - - - - - - Return a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) - - - - - - - - - - - - - Set the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. - - - - - - - - - - - - - - - - - Return how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle. - - - - - - Perspective Projection (object's size on the screen becomes smaller when far away). - - - Orthogonal Projection (objects remain the same size on the screen no matter how far away they are). - - - - - - - - - - - - - - - - Camera node for 2D scenes. - - - Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem] based nodes. - This node is intended to be a simple helper get get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport]. - - - - - - - Align the camera to the tracked node - - - - - - - - - - - - - Force the camera to update scroll immediately. - - - - - - - - - - - - - Return the camera position. - - - - - - - - - - - - - - - - - - - - - Return the margins needed to drag the camera (see [method set_drag_margin]). - - - - - - - - - - - - - - - - - - - - - Return the scrolling limit in pixels. - - - - - - - Return the scroll offset. - - - - - - - - - - - - - - - - - - - Return true of this is the current camera (see [method make_current]). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene. - - - - - - - Set the camera's position immediately to its current smoothing destination. - This has no effect if smoothing is disabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the margins needed to drag the camera (relative to the screen size). Margin uses the MARGIN_* enum. Drag margins of 0,0,0,0 will keep the camera at the center of the screen, while drag margins of 1,1,1,1 will only move when the camera is at the edges. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the scrolling limit in pixels. - - - - - - - - - - - - - - - - - Smooth camera when reaching camera limits. - This requires camera smoothing being enabled to have a noticeable effect. - - - - - - - - - - - - - - - - - Set the scroll offset. Useful for looking around or camera shake animations. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class of anything 2D. - - - Base class of anything 2D. Canvas items are laid out in a tree and children inherit and extend the transform of their parent. CanvasItem is extended by [Control], for anything GUI related, and by [Node2D] for anything 2D engine related. - Any CanvasItem can draw. For this, the "update" function must be called, then NOTIFICATION_DRAW will be received on idle time to request redraw. Because of this, canvas items don't need to be redraw on every frame, improving the performance significantly. Several functions for drawing on the CanvasItem are provided (see draw_* functions). They can only be used inside the notification, signal or _draw() overrides function, though. - Canvas items are draw in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything (this can be changed per item though). - Canvas items can also be hidden (hiding also their subtree). They provide many means for changing standard parameters such as opacity (for it and the subtree) and self opacity, blend mode. - Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. - - - - - - - Called (if exists) to draw the canvas item. - - - - - - - - - - - - - - - - - Draw a string character using a custom font. Returns the advance, depending on the char width and kerning with an optional next char. - - - - - - - - - - - - - Draw a colored circle. - - - - - - - - - - - - - - - - - - - Draw a colored polygon of any amount of points, convex or concave. - - - - - - - - - - - - - - - - - Draw a line from a 2D point to another, with a given color and width. It can be optionally antialiased. - - - - - - - - - - - - - - - - - - - Draw a polygon of any amount of points, convex or concave. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad. - - - - - - - - - - - - - Draw a colored rectangle. - - - - - - - - - - - - - Set a custom transform for drawing. Anything drawn afterwards will be transformed by this. - - - - - - - - - - - - - - - - - - - - - - - - - Draw a string using a custom font. - - - - - - - - - - - Draw a styled rectangle. - - - - - - - - - - - - - - - Draw a texture at a given position. - - - - - - - - - - - - - - - - - - - Draw a textured rectangle at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture. - - - - - - - - - - - - - - - - - - - - - Draw a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture. - - - - - - - Used for editing, returns an opaque value representing the transform state. - - - - - - - - - Used for editing, handle rotation. - - - - - - - - - - - - - - - - - Set the transform state of this CanvasItem. For [Node2D], this is an [Array] with (in order) a [Vector2] for position, a float for rotation (radians) and another [Vector2] for scale. For [Control] this is a [Rect2] with the position and size. - - - - - - - Return the [RID] of the [World2D] canvas where this item is in. - - - - - - - Return the canvas item RID used by [VisualServer] for this item. - - - - - - - Get the transform matrix of this item's canvas. - - - - - - - Get the global position of the mouse. - - - - - - - Get the global transform matrix of this item. - - - - - - - Get the global transform matrix of this item in relation to the canvas. - - - - - - - Get a [Rect2] with the boundaries of this item and its children. - - - - - - - Return a rect containing the editable boundaries of the item. - - - - - - - Get this item's light mask number. - - - - - - - Get the mouse position relative to this item's position. - - - - - - - Get the material of this item. - - - - - - - Get the modulate of the CanvasItem, which affects children items too. - - - - - - - Get the self-modulate of the CanvasItem. - - - - - - - Get the transform matrix of this item. - - - - - - - Get whether this item uses its parent's material. - - - - - - - Get the viewport's boundaries as a [Rect2]. - - - - - - - Get this item's transform in relation to the viewport. - - - - - - - Get the [World2D] where this item is in. - - - - - - - Hide the CanvasItem currently visible. - - - - - - - Return whether the item is drawn behind its parent. - - - - - - - - - - - - - Return if set as toplevel. See [method set_as_toplevel]. - - - - - - - - - - - - - Return true if this CanvasItem is visible. It may be invisible because itself or a parent canvas item is hidden. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set as top level. This means that it will not inherit transform from parent canvas items. - - - - - - - - - Set whether the canvas item is drawn behind its parent. - - - - - - - - - Set the ligtht mask number of this item. - - - - - - - - - Set the material of this item. - - - - - - - - - Set the modulate of the CanvasItem. This [i]affects[/i] the modulation of children items. - - - - - - - - - - - - - - - - - - - - - - - - - Set the self-modulate of the CanvasItem. This does not affect the modulation of children items. - - - - - - - - - Set whether or not this item should use its parent's material. - - - - - - - - - Set whether this item should be visible or not. - Note that a hidden CanvasItem will make all children hidden too, so no matter what is set here this item won't be shown if its parent or grandparents nodes are hidden. - - - - - - - Show the CanvasItem currently hidden. - - - - - - - Queue the CanvasItem for update. [code]NOTIFICATION_DRAW[/code] will be called on idle time to request redraw. - - - - - - - - - - - - - - - - - - - - - - - - - Emitted when the CanvasItem must redraw. This can only be connected realtime, as deferred will not allow drawing. - - - - - Emitted when becoming hidden. - - - - - Emitted when the item rect has changed. - - - - - Emitted when the visibility (hidden/visible) changes. - - - - - - Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. - - - Additive blending mode. - - - Subtractive blending mode. - - - Multiplicative blending mode. - - - Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. - - - CanvasItem is requested to draw. - - - Canvas item visibility has changed. - - - Canvas item has entered the canvas. - - - Canvas item has exited the canvas. - - - Canvas item transform has changed. Only received if requested. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Canvas Item layer. - - - Canvas Item layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). - - - - - - - - - - - - - Return the layer index, determines the draw order, a lower value will be below a higher one. - - - - - - - Return the base offset for this layer (helper). - - - - - - - Return the base rotation for this layer in radians (helper). - - - - - - - Return the base rotation for this layer in degrees. - - - - - - - Return the base scale for this layer (helper). - - - - - - - Return the base transform for this layer. - - - - - - - Return the [World2D] used by this layer. - - - - - - - - - - - - - - - - - Set the layer index, determines the draw order, a lower value will be below a higher one. - - - - - - - - - Set the base offset for this layer (helper). - - - - - - - - - Set the base rotation for this layer in radians (helper). - - - - - - - - - Set the base rotation for this layer in degrees (helper). - - - - - - - - - Set the base scale for this layer (helper). - - - - - - - - - Set the base transform for this layer. - - - - - - - - - - - - - - - - - - - Tint the entire canvas - - - CanvasModulate tints the canvas elements using its assigned color - - - - - - - Gets the canvas tint color - - - - - - - - - Sets the canvas tint color - - - - - - - - - - - - - Class representing a capsule-shaped [PrimitiveMesh]. - - - Class representing a capsule-shaped [PrimitiveMesh]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Height of the capsule mesh from the center point. Defaults to 1.0. - - - Number of radial segments on the capsule mesh. Defaults to 64. - - - Radius of the capsule mesh. Defaults to 1.0. - - - Number of rings along the height of the capsule. Defaults to 8. - - - - - - - - Capsule shape resource. - - - Capsule shape resource, which can be set into a [PhysicsBody] or area. - - - - - - - Return the capsule height. - - - - - - - Return the capsule radius. - - - - - - - - - Set the capsule height. - - - - - - - - - Set the capsule radius. - - - - - - - - - - - - - - - Capsule 2D shape resource for physics. - - - Capsule 2D shape resource for physics. A capsule (or sometimes called "pill") is like a line grown in all directions. It has a radius and a height, and is often useful for modeling biped characters. - - - - - - - Return the height of the [CapsuleShape2D]. - - - - - - - Return the radius of the [CapsuleShape2D]. - - - - - - - - - Set the height of the [CapsuleShape2D]. - - - - - - - - - Set the radius of the [CapsuleShape2D]. - - - - - - - - - - - - - - - Keeps children controls centered. - - - CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center. - - - - - - - Should put children to the top left corner instead of center of the container. - - - - - - - - - This function will anchor the container children to the top left corner of the the container boundaries, moving all its children to that position, (the children new center will be the top left corner of the container). - - - - - - - - - - - - - Binary choice user interface widget - - - A checkbox allows the user to make a binary choice (choosing only one of two posible options), for example Answer 'yes' or 'no'. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Checkable button. - - - CheckButton is a toggle button displayed as a check field. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Circular Shape for 2D Physics. - - - Circular Shape for 2D Physics. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. - - - - - - - Return the radius of the circle shape. - - - - - - - - - Set the radius of the circle shape. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Creates new holder for the shapes. Argument is a [CollisionShape] node. It will return owner_id which usually you will want to save for later use. - - - - - - - - - - - - - - - - - - - Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Will remove all the shapes associated with given owner. - - - - - - - - - - - - - - - - - - - Will return a [Shape]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count]. - - - - - - - - - Returns number of shapes to which given owner is associated to. - - - - - - - - - - - - - - - - - - - Will return [Transform] of an owner node. - - - - - - - - - - - Removes related shape from the owner. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base node for 2D collisionables. - - - CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing [CollisionShape2D] and/or [CollisionPolygon2D] nodes as children. Such nodes are for reference and not present outside the editor, so code should use the regular shape API. - - - - - - - - - - - - - - - - - - - - - Creates new holder for the shapes. Argument is a [CollisionShape2D] node. It will return owner_id which usually you will want to save for later use. - - - - - - - Return the RID of this object. - - - - - - - Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods. - - - - - - - Return whether this object is pickable. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set whether this object is pickable. A pickable object can detect the mouse pointer enter/leave it and, if the mouse is inside it, report input events. - - - - - - - - - - - - - - - - - - - - - - - - - - - Will remove all the shapes associated with given owner. - - - - - - - - - - - - - - - - - - - Will return a [Shape2D]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count]. - - - - - - - - - Returns number of shapes to which given owner is associated to. - - - - - - - - - - - - - - - - - - - Will return [Transform2D] of an owner node. - - - - - - - - - - - Removes related shape from the owner. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This event fires only once when the mouse pointer enters any shape of this object. - - - - - This event fires only once when the mouse pointer exits all shapes of this object. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Editor-only class for easy editing of collision polygons. - - - Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. This class is for editing custom shape polygons. - - - - - - - Return whether the polygon is a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]). - - - - - - - Return the list of points that define the polygon. - - - - - - - - - - - - - - - - - - - - - Set whether the polygon is to be a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]). - - - - - - - - - - - - - - - - - - - - - - - - - Set the array of points forming the polygon. - When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode==0[/code]), or a list of lines (for [code]build_mode==1[/code]). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point. - - - - - - - - - - - - - - - - - - - Node that represents collision shape data in 3D space. - - - 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 [Area] to give it a detection shape, or add it to a [PhysicsBody] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape. - - - - - - - - - - - - - - - - - - - Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry. - - - - - - - - - If this method exists within a script it will be called whenever the shape resource has been modified. - - - - - - - - - - - - - - - - - - - - - - A disabled collision shape has no effect in the world. - - - The actual shape owned by this collision shape. - - - - - - - - Node that represents collision shape data in 2D space. - - - 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 [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A disabled collision shape has no effect in the world. - - - Sets whether this collision shape should only detect collision on one side (top or bottom). - - - The actual shape owned by this collision shape. - - - - - - - - Color in RGBA format with some support for ARGB format. - - - 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. - - - - - - - - - - - - - - - Constructs a color from an RGBA profile using values between 0 and 1 (float). - [codeblock] - var c = Color(0.2, 1.0, .7, .8) # a color of an RGBA(51, 255, 178, 204) - [/codeblock] - - - - - - - - - - - - - Constructs a color from an RGB profile using values between 0 and 1 (float). Alpha will always be 1. - [codeblock] - var c = Color(0.2, 1.0, .7) # a color of an RGBA(51, 255, 178, 255) - [/codeblock] - - - - - - - - - Constructs a color from a 32-bit integer (each byte represents a component of the RGBA profile). - [codeblock] - var c = Color(274) # a color of an RGBA(0, 0, 1, 18) - [/codeblock] - - - - - - - - - Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. - The following string formats are supported: - [code]"#ff00ff00"[/code] - ARGB format with '#' - [code]"ff00ff00"[/code] - ARGB format - [code]"#ff00ff"[/code] - RGB format with '#' - [code]"ff00ff"[/code] - RGB format - [codeblock] - # The following code creates the same color of an 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 '#' - var c4 = Color("b2d90a") # RGB format - [/codeblock] - - - - - - - - - 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. - [codeblock] - var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50% - var fg = Color(1.0, 0.0, 0.0, .5) # Red with alpha of 50% - var blendedColor = bg.blend(fg) # Brown with alpha of 75% - [/codeblock] - - - - - - - Returns the most contrasting color. - [codeblock] - var c = Color(.3, .4, .9) - var contrastedColor = c.contrasted() # a color of an RGBA(204, 229, 102, 255) - [/codeblock] - - - - - - - Returns the color's grayscale. - The gray is calculated by (r + g + b) / 3. - [codeblock] - var c = Color(0.2, 0.45, 0.82) - var gray = c.gray() # a value of 0.466667 - [/codeblock] - - - - - - - Returns the inverted color (1-r, 1-g, 1-b, 1-a). - [codeblock] - var c = Color(.3, .4, .9) - var invertedColor = c.inverted() # a color of an RGBA(178, 153, 26, 255) - [/codeblock] - - - - - - - - - - - Returns the color of the linear interpolation with another color. The value t is between 0 and 1 (float). - [codeblock] - var c1 = Color(1.0, 0.0, 0.0) - var c2 = Color(0.0, 1.0, 0.0) - var li_c = c1.linear_interpolate(c2, 0.5) # a color of an RGBA(128, 128, 0, 255) - [/codeblock] - - - - - - - Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). More compatible with DirectX. - [codeblock] - var c = Color(1, .5, .2) - print(str(c.to_32())) # prints 4294934323 - [/codeblock] - - - - - - - - - Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]). - Optionally flag 'false' to not include alpha in hexadecimal string. - [codeblock] - var c = Color(1, 1, 1, .5) - var s1 = c.to_html() # Results "7fffffff" - var s2 = c.to_html(false) # Results 'ffffff' - [/codeblock] - - - - - - - Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). - [codeblock] - var c = Color(1, .5, .2) - print(str(c.to_32())) # prints 4294934323 - [/codeblock] - - [i]This is same as [method to_ARGB32] but may be changed later to support RGBA format instead[/i]. - - - - - - Alpha (0 to 1) - - - Alpha (0 to 255) - - - Blue (0 to 1) - - - Blue (0 to 255) - - - Green (0 to 1) - - - Green (0 to 255) - - - Hue (0 to 1) - - - Red (0 to 1) - - - Red (0 to 255) - - - Saturation (0 to 1) - - - Value (0 to 1) - - - - - - - - Color picker control. - - - This is a simple color picker [Control]. It's useful for selecting a color from an RGB/RGBA colorspace. - - - - - - - - - Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker. - - - - - - - Gets the current color. - - - - - - - Returns whether the color has transparency or not. - - - - - - - Returns whether this color picker is in raw mode or not, raw mode will allow the color R, G, B component values to go beyond 1, you have to consider that the max value for color components is 1, going beyond that value will not have effect in the color, but can be used for special operations that require it (like tinting without darkening or rendering sprites in HDR). - - - - - - - - - Set true if you want the color to have an alpha channel (transparency), or false if you want a solid color. - - - - - - - - - Select the current color. - - - - - - - - - Set whether this color picker is using raw mode or not, see [method is_raw_mode]. - - - - - - - - - Emitted when the color is changed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Button that pops out a [ColorPicker] - - - Encapsulates a [ColorPicker] making it accesible by pressing a button, pressing the button will toggle the [ColorPicker] visibility - - - - - - - - - - - - - - - - - - - See [method ColorPicker.is_edit_alpha] - - - - - - - - - See [method ColorPicker.set_edit_alpha] - - - - - - - - - Set new color to ColorRect. - - [codeblock] - var cr = get_node("colorrect_node") - cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red - [/codeblock] - - - - - - - - - - - - - - - Emitted when the color is changed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Colored rect for canvas. - - - An object that is represented on the canvas as a rect with color. [Color] is used to set or get color info for the rect. - - - - - - - Return the color in RGBA format. - [codeblock] - var cr = get_node("colorrect_node") - var c = cr.get_frame_color() # Default color is white - [/codeblock] - - - - - - - - - Set new color to ColorRect. - [codeblock] - var cr = get_node("colorrect_node") - cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red - [/codeblock] - - - - - - - - - - - - - Concave polygon shape. - - - Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles. - - - - - - - Return the faces (an array of triangles). - - - - - - - - - Set the faces (an array of triangles). - - - - - - - - - Concave polygon 2D shape resource for physics. - - - Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. - The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. - - - - - - - Return the array of segments. - - - - - - - - - Set the array of segments. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Helper class to handle INI-style files. - - - This helper class can be used to store [Variant] values on the filesystem using an INI-style formatting. The stored values as referenced by a section and a key. The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly with accessing the filesystem. - The following example shows how to parse a INI-style file from the system, read its contents and store new values in it: - [codeblock] - var config = ConfigFile.new() - var err = config.load("user://settings.cfg") - if err == OK: # if not, something went wrong with the file loading - # Look for the display/width pair, and default to 1024 if missing - var screen_width = get_value("display", "width", 1024) - # Store a variable if and only it hasn't been defined yet - if not config.has_section_key("audio", "mute"): - config.set_value("audio", "mute", false) - # Save the changes by overwriting the previous file - config.save("user://settings.cfg") - [/codeblock] - - - - - - - - - - - - - - - - - Return an array of all defined key identifiers in the specified section. - - - - - - - Return an array of all defined section identifiers. - - - - - - - - - - - - - Return the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional [i]default[/i] argument (and thus [code]NULL[/code] if not specified). - - - - - - - - - Check if the specified section exists. - - - - - - - - - - - Check if the specified section-key pair exists. - - - - - - - - - Load the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object from which the method was called. The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the load was successful, it returns OK). - - - - - - - - - Save the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. - The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the save was successful, it returns OK). - - - - - - - - - - - - - Assign a value to the specified key of the the specified section. If the section and/or the key do not exist, they are created. Passing a [code]NULL[/code] value deletes the specified key if it exists (and deletes the section if it ends up empty once the key has been removed). - - - - - - - - - Dialog for confirmation of actions. - - - Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order). - - - - - - - Return the cancel button. - - - - - - - - - Base node for containers. - - - Base node for containers. A [Container] contains other controls and automatically arranges them in a certain way. - A Control can inherit this to create custom container classes. - - - - - - - - - - - Fit a child control in a given rect. This is mainly a helper for creating custom container classes. - - - - - - - Queue resort of the contained children. This is called automatically anyway, but can be called upon request. - - - - - - - Emitted when sorting the children is needed. - - - - - - Notification for when sorting the children, it must be obeyed immediately. - - - - - - Base node for all User Interface components. - - - The base class Node for all User Interface components. Every UI node inherits from it. Any scene or portion of a scene tree composed of Control nodes is a User Interface. - Controls use anchors and margins to place themselves relative to their parent. They adapt automatically when their parent or the screen size changes. To build flexible UIs, use built-in [Container] nodes or create your own. - Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range. - Godot sends Input events to the root node first, via [method Node._input]. The method distributes it through the node tree and delivers the input events to the node under the mouse cursor or on focus with the keyboard. To do so, it calls [method MainLoop._input_event]. No need to enable [method Node.set_process_input] on Controls to receive input events. Call [method accept_event] to ensure no other node receives the event, not even [method Node._unhandled_input]. - Only the one Control node in focus receives keyboard events. To do so, the Control must get the focus mode with [method set_focus_mode]. It loses focus when another Control gets it, or if the current Control in focus is hidden. - You'll sometimes want Controls to ignore mouse or touch events. For example, if you place an icon on top of a button. Call [method set_ignore_mouse] for that. - [Theme] resources change the Control's appearance. If you change the [Theme] on a parent Control node, it will propagate to all of its children. You can override parts of the theme on each Control with the add_*_override methods, like [method add_font_override]. You can also override the theme from the editor. - - - - - - - Returns the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. - - - - - - - - - - - - - - - Marks the input event as handled. No other Control will receive it, and the input event will not propagate. Not even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input]. - - - - - - - - - - - - - - - - - - - - - Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared. - - - - - - - - - - - Override a single font (font) in the theme of this Control. If font is empty, override is cleared. - - - - - - - - - - - Override a single icon ([Texture]) in the theme of this Control. If texture is empty, override is cleared. - - - - - - - - - - - - - - - - - - - - - Override a single stylebox ([Stylebox]) in the theme of this Control. If stylebox is empty, override is cleared. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the cursor shape at a certain position in the control. - - - - - - - - - - - - - Return the default cursor shape for this control. See enum CURSOR_* for the list of shapes. - - - - - - - - - - - - - - - Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). - - - - - - - Returns the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL) (see [method set_focus_mode]). - - - - - - - - - Return the forced neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function. - - - - - - - Return which control is owning the keyboard focus, or null if no one. - - - - - - - - - - - - - - - - - Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode. - - - - - - - Return position and size of the Control, relative to the top-left corner of the [i]window[/i] Control. This is a helper (see [method get_global_position], [method get_size]). - - - - - - - - - - - - - Hint for containers, return horizontal positioning flags. - - - - - - - - - - - - - - - - - - - Return a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being returned depends on the anchor mode. - - - - - - - Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. - - - - - - - Return when the control is ignoring mouse events (even touchpad events send mouse events). - - - - - - - - - - - - - - - - - - - - - - - - - Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode. - - - - - - - Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see [method get_position], [method get_size]). - - - - - - - Return the rotation (in radians) - - - - - - - Return the rotation (in degrees) - - - - - - - - - - - - - Returns the size of the Control, computed from all margins, however the size returned will [b]never be smaller than the minimum size reported by[/b] [method get_minimum_size]. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, [method get_minimum_size], [method set_margin], [method set_anchor]). - - - - - - - Hint for containers, return the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big. - - - - - - - - - - - - - - - - - Return a [Theme] override, if one exists (see [method set_theme]). - - - - - - - - - Return the tooltip, which will appear when the cursor is resting over this control. - - - - - - - - - - - - - Hint for containers, return vertical positioning flags. - - - - - - - - - - - - - Steal the focus from another control and become the focused control (see [method set_focus_mode]). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return whether the Control is the current focused control (see [method set_focus_mode]). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Give up the focus, no other control will be able to receive keyboard input. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see [method set_anchor], [method set_margin]). - - - - - - - - - Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). - - - - - - - - - - - - - - - - - - - - - - - - - Set the default cursor shape for this control. See enum CURSOR_* for the list of shapes. - - - - - - - - - - - - - - - - - - - - - - - - - Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]). - - - - - - - - - Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals. - - - - - - - - - - - Force a neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function. - - - - - - - - - Move the Control to a new position, relative to the top-left corner of the [i]window[/i] Control, and without changing current anchor mode. (see [method set_margin]). - - - - - - - - - - - - - - - - - Hint for containers, set horizontal positioning flags. - - - - - - - - - - - Set a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being set depends on the anchor mode. - - - - - - - - - Set when the control is ignoring mouse events (even touchpad events send mouse events). (see the MOUSE_FILTER_* constants) - - - - - - - - - - - - - - - - - Move the Control to a new position, relative to the top-left corner of the parent Control, changing all margins if needed and without changing current anchor mode. This is a helper (see [method set_margin]). - - - - - - - - - Set the rotation (in radians). - - - - - - - - - Set the rotation (in degrees). - - - - - - - - - - - - - - - - - Changes MARGIN_RIGHT and MARGIN_BOTTOM to fit a given size. This is a helper (see [method set_margin]). - - - - - - - - - Hint for containers, set the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big. - - - - - - - - - Override whole the [Theme] for this Control and all its children controls. - - - - - - - - - Set a tooltip, which will appear when the cursor is resting over this control. - - - - - - - - - - - - - - - - - Hint for containers, set vertical positioning flags. - - - - - - - - - Display a Control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Emitted when the node gains keyboard focus. - - - - - Emitted when the node loses keyboard focus. - - - - - - - - - - - Emitted when the node's minimum size changes. - - - - - - - - - Emitted when the mouse enters the control's area. - - - - - Emitted when the mouse leaves the control's area. - - - - - Emitted when the control changes size. - - - - - Emitted when the size flags change. - - - - - - Control can't acquire focus. - - - Control can acquire focus only if clicked. - - - Control can acquire focus if clicked, or by pressing TAB/Directionals in the keyboard from another Control. - - - Control changed size (get_size() reports the new size). - - - Mouse pointer entered the area of the Control. - - - Mouse pointer exited the area of the Control. - - - Control gained focus. - - - Control lost focus. - - - Theme changed. Redrawing is desired. - - - Modal control was closed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP. - - - X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM. - - - - - - Convex Polygon Shape. - - - Convex polygon shape resource, which can be set into a [PhysicsBody] or area. - - - - - - - - - - - - - - - - - - - - - - - - - - - Convex Polygon Shape for 2D physics. - - - Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). - The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. - - - - - - - Return a list of points in either clockwise or counter clockwise order, forming a convex polygon. - - - - - - - - - Currently, this method does nothing. - - - - - - - - - Set a list of points in either clockwise or counter clockwise order, forming a convex polygon. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generate an axis-aligned cuboid [PrimitiveMesh]. - - - Generate an axis-aligned cuboid [PrimitiveMesh]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Size of the cuboid mesh. Defaults to (2, 2, 2). - - - Number of extra edge loops inserted along the z-axis. Defaults to 0. - - - Number of extra edge loops inserted along the y-axis. Defaults to 0. - - - Number of extra edge loops inserted along the x-axis. Defaults to 0. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Describes a Bezier curve in 2D space. - - - This class describes a Bezier curve in 2D space. It is mainly used to give a shape to a [Path2D], but can be manually sampled for other purposes. - It keeps a cache of precalculated points along the curve, to speed further calculations up. - - - - - - - - - - - - - - - Adds a point to a curve, at position "pos", with control points "in" and "out". - If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos <0 or atpos >= [method get_point_count]), the point will be appended at the end of the point list. - - - - - - - - - - - - - Returns the distance between two adjacent cached points. - - - - - - - Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough. - - - - - - - Returns the cache of points as a [PoolVector2Array]. - - - - - - - Returns the number of points describing the curve. - - - - - - - - - Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). - - - - - - - - - Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). - - - - - - - - - Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). - - - - - - - - - - - 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). - - - - - - - - - - - Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve. - To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false. - Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). - - - - - - - - - Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t". - - - - - - - - - Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds. - - - - - - - - - Sets the distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care. - - - - - - - - - - - Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. - - - - - - - - - - - Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. - - - - - - - - - - - Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. - - - - - - - - - - - Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. - This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. - "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! - "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. - - - - - - - - - - - - - - - Describes a Bezier curve in 3D space. - - - This class describes a Bezier curve in 3D space. It is mainly used to give a shape to a [Path], but can be manually sampled for other purposes. - It keeps a cache of precalculated points along the curve, to speed further calculations up. - - - - - - - - - - - - - - - Adds a point to a curve, at position "pos", with control points "in" and "out". - If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos <0 or atpos >= [method get_point_count]), the point will be appended at the end of the point list. - - - - - - - - - - - - - Returns the distance between two adjacent cached points. - - - - - - - Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough. - - - - - - - Returns the cache of points as a [PoolVector3Array]. - - - - - - - Returns the cache of tilts as a [RealArray]. - - - - - - - Returns the number of points describing the curve. - - - - - - - - - Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). - - - - - - - - - Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). - - - - - - - - - Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). - - - - - - - - - Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0. - - - - - - - - - - - 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). - - - - - - - - - - - Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve. - To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false. - Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). - - - - - - - - - Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t". - - - - - - - - - Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds. - - - - - - - - - Sets the distance in 3D units between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care. - - - - - - - - - - - Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. - - - - - - - - - - - Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. - - - - - - - - - - - Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. - - - - - - - - - - - Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console. - The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow], this tilt is an offset over the natural tilt the PathFollow calculates. - - - - - - - - - - - Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. - This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. - "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! - "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Class representing a cylindrical [PrimitiveMesh]. - - - Class representing a cylindrical [PrimitiveMesh]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Bottom radius of the cylinder. Defaults to 1.0. - - - Full height of the cylinder. Defaults to 2.0. - - - Number of radial segments on the cylinder. Defaults to 64. - - - Number of edge rings along the height of the cylinder. Defaults to 4. - - - Top radius of the cylinder. Defaults to 1.0. - - - - - - - - Damped spring constraint for 2D physics. - - - Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length. - - - - - - - Return 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). - - - - - - - Return the maximum length of the spring joint. - - - - - - - Return the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. - - - - - - - Return the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. - - - - - - - - - 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). - - - - - - - - - Set the maximum length of the spring joint. - - - - - - - - - Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. - - - - - - - - - Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. - - - - - - - - - - - - - - - - - - - Dictionary type. - - - Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference. - - - - - Clear the dictionary, removing all key/value pairs. - - - - - - - Return true if the dictionary is empty. - - - - - - - Erase a dictionary key/value pair by key. - - - - - - - - - Return true if the dictionary has a given key. - - - - - - - - - Return true if the dictionary has all of the keys in the given array. - - - - - - - Return a hashed integer value representing the dictionary contents. - - - - - - - Return the list of keys in the [Dictionary]. - - - - - - - Return the size of the dictionary (in pairs). - - - - - - - Return the list of values in the [Dictionary]. - - - - - - - - - Directional Light, such as the Sun or the Moon. - - - A DirectionalLight is a type of [Light] node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Type used to handle the filesystem. - - - Directory type. It is used to manage directories and their content (not restricted to the project folder). - Here is an example on how to iterate through the files of a directory: - [codeblock] - func dir_contents(path): - var dir = Directory.new() - if dir.open(path) == OK: - dir.list_dir_begin() - var file_name = dir.get_next() - while (file_name != ""): - if dir.current_is_dir(): - print("Found directory: " + file_name) - else: - print("Found file: " + file_name) - file_name = dir.get_next() - else: - print("An error occurred when trying to access the path.") - [/codeblock] - - - - - - - - - Change the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]). - The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*). - - - - - - - - - - - Copy the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. - Returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*). - - - - - - - Return whether the current item processed with the last [method get_next] call is a directory ([code].[/code] and [code]..[/code] are considered directories). - - - - - - - - - Return whether the target directory exists. The argument can be relative to the current directory, or an absolute path. - - - - - - - - - Return whether the target file exists. The argument can be relative to the current directory, or an absolute path. - - - - - - - Return the absolute path to the currently opened directory (e.g. [code]res://folder[/code] or [code]C:\tmp\folder[/code]). - - - - - - - - - - - - - - - On Windows, return the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not existed, the method returns an empty String. - - - - - - - On Windows, return the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0. - - - - - - - Return the next element (file or directory) in the current directory (including [code].[/code] and [code]..[/code], unless [code]skip_navigational[/code] was given to [method list_dir_begin]). - The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case). - - - - - - - On Unix desktop systems, return the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1. - - - - - - - - - - - Initialise the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end]. - If you pass [code]skip_navigational[/code], then [code].[/code] and [code]..[/code] would be filtered out. - If you pass [code]skip_hidden[/code], then hidden files would be filtered out. - - - - - - - Close the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter). - - - - - - - - - Create a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]). - The method returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*). - - - - - - - - - Create a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path. - Return one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*). - - - - - - - - - Open an existing directory of the filesystem. The [i]path[/i] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]). - The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*). - - - - - - - - - Delete the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. - Return one of the error code constants defined in [@Global Scope] (OK or FAILED). - - - - - - - - - - - Rename (move) the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. - Return one of the error code constants defined in [@Global Scope] (OK or FAILED). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resource filesystem, as the editor sees it. - - - This object holds information of all resources in the filesystem, their types, etc. - - - - - - - - - Get the type of the file, given the full path. - - - - - - - Get the root directory object. - - - - - - - - - - - - - - - Return the scan progress for 0 to 1 if the FS is being scanned. - - - - - - - Return true of the filesystem is being scanned. - - - - - - - Scan the filesystem for changes. - - - - - - - Check if the source of any imported resource changed. - - - - - - - - - Update a file information. Call this if an external program (not Godot) modified the file. - - - - - - - Emitted if the filesystem changed. - - - - - - - - - - - - - Emitted if the source of any imported file changed. - - - - - - - - - A diretory for the resource filesystem. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Used by the editor to extend its functionality. - - - 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. - - - - - - - - - - - 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 [method remove_control_from_bottom_panel]. - - - - - - - - - - - Add a custom control to a container (see CONTAINER_* enum). There are many locations where custom controls can be added in the editor UI. - 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. - - - - - - - - - - - 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 [method remove_control_from_docks]. - - - - - - - - - - - - - - - Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. - 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 [method EditorPlugin.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. - - - - - - - - - - - - - - - - - - - - - - - - - This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency. - This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object. - - - - - - - Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene. - - - - - - - - - This is used for plugins that create gizmos used by the spatial editor. Just check that the node passed in the "for_spatial" argument matches your plugin. - - - - - - - - - This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. - - - - - - - - - - - - - - - - - - - - - This function is called every time the 2D canvas editor draws (which overlays over the edited scene). Drawing over the supplied control will draw over the edited scene. To convert from control coordinates to edited scene coordinates (including zoom and offset), a transform is also provided. If you require this control to be redraw, call [method update_canvas]. - - - - - - - - - - - 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. - If you would like to always gets those input events then additionally use [method set_input_forwarding_always_enabled]. - - - - - - - This is for editors that edit script based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25 - - - - - - - - - - - - - - - - - - - Get the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). - - - - - - - Get the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. - - - - - - - - - Get the GUI layout of the plugin. This is used to save the project's editor layout when the [method EditorPlugin.queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock). - - - - - - - - - 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 [method EditorPlugin.edit] and [method EditorPlugin.make_visible] called when the editor requests them. - - - - - - - Return true if this is a main screen editor plugin (it goes in the main screen selector together with 2D, 3D, Script). - - - - - - - - - - - - - - - - - - - - - - - This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type. - Remember that you have to manage the visibility of all your editor controls manually. - - - - - - - Queue save the project's editor layout. - - - - - - - - - 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 dock. Don't forget to call this if you added one, so the editor can save the layout and remove it cleanly. - - - - - - - - - Remove a custom type added by [method EditorPlugin.add_custom_type] - - - - - - - - - - - - - - - This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources. - - - - - - - Use this method if you always want to receive inputs from 3D view screen inside [method forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene. - - - - - - - - - Restore the state saved by [method EditorPlugin.get_state]. - - - - - - - - - Restore the plugin GUI layout saved by [method EditorPlugin.get_window_layout]. - - - - - - - Updates the control used to draw the edited scene over the 2D canvas. This is used together with [method forward_canvas_input_event]. - - - - - - - - - Emitted when user change main screen view (2D, 3D, Script, AssetLib). Works also with screens which are defined by plugins. - - - - - - - Emitted when user change scene. The argument is a root node of freshly opened scene. - - - - - - - Emitted when user close scene. The argument is file path to a closed scene. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Helper to generate previews of reources or files. - - - This object is used to generate previews for resources of files. - - - - - - - - - Create an own, custom preview generator. - - - - - - - - - Check if the resource changed, if so it will be invalidated and the corresponding signal emitted. - - - - - - - - - - - - - - - Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. - - - - - - - - - - - - - - - Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. - - - - - - - - - Remove a custom preview generator. - - - - - - - - - If a preview was invalidated (changed) this signal will emit (using the path of the preview) - - - - - - - - - Custom generator of previews. - - - Custom code to generate previews. Please check "file_dialog/thumbnail_size" in EditorSettings to find out the right size to do previews at. - - - - - - - - - Generate a preview from a given resource. This must be always implemented. - Returning an empty texture is an OK way to fail and let another generator take care. - Care must be taken because this function is always called from a thread (not the main thread). - - - - - - - - - Generate a preview directly from a path, implementing this is optional, as default code will load and call generate() - Returning an empty texture is an OK way to fail and let another generator take care. - Care must be taken because this function is always called from a thread (not the main thread). - - - - - - - - - Return if your generator supports this resource type. - - - - - - - - - Simple script to perform changes in the currently edited scene. - - - This script can be run from the Scene -> Run Script menu option. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Manages the SceneTree selection in the editor. - - - This object manages the SceneTree selection in the editor. - - - - - - - - - Add a node to the selection. - - - - - - - Clear the selection. - - - - - - - Get the list of selectes nodes. - - - - - - - Get the list of selected nodes, optimized for transform operations (ie, moving them, rotating, etc). This list avoids situations where a node is selected and also chid/grandchild. - - - - - - - - - Remove a node from the selection. - - - - - - - Emitted when the selection changes. - - - - - - - - - Object that holds the project-independent editor settings. - - - Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu. - Accessing the settings is done by using the regular [Object] API, such as: - [codeblock] - settings.set(prop,value) - settings.get(prop) - list_of_settings = settings.get_property_list() - [/codeblock] - - - - - - - - - Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String]. - Example: - [codeblock] - editor_settings.set("category/property_name", 0) - - var property_info = { - "name": "category/property_name", - "type": TYPE_INT, - "hint": PROPERTY_HINT_ENUM, - "hint_string": "one,two,three" - } - - editor_settings.add_property_info(property_info) - [/codeblock] - - - - - - - - - Erase a given setting (pass full property path). - - - - - - - Get the list of favorite directories for this project. - - - - - - - Get the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved. - - - - - - - Get the list of recently visited folders in the file dialog for this project. - - - - - - - Get the global settings path for the engine. Inside this path you can find some standard paths such as: - settings/tmp - used for temporary storage of files - settings/templates - where export templates are located - - - - - - - - - Set the list of favorite directories for this project. - - - - - - - - - Set the list of recently visited folders in the file dialog for this project. - - - - - - - - - - - - - - - Custom gizmo for editing Spatial objects. - - - Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. These are created by [method EditorPlugin.create_spatial_gizmo]. - - - - - - - - - - - - - - - - - Add collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw]. - - - - - - - - - - - - - Add a list of handles (points) which can be used to deform the object being edited. - There are virtual functions which will be called upon editing of these handles. Call this function during [method redraw]. - - - - - - - - - - - - - Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw]. - - - - - - - - - - - - - - - - - - - - - - - Add an unscaled billboard for visualization. Call this function during [method redraw]. - - - - - - - - - - - - - - - - - - - Commit a handle being edited (handles must have been prevously added by [method add_handles]). - If the cancel parameter is true, an option to restore the edited value to the original is provided. - - - - - - - - - Get the name of an edited handle (handles must have been previously added by [method add_handles]). - Handles can be named for reference to the user when editing. - - - - - - - - - Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle] - - - - - - - This function is called when the Spatial this gizmo refers to changes (the [method Spatial.update_gizmo] is called). - - - - - - - - - - - - - This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates. - The [Camera] is also provided so screen coordinates can be converted to raycasts. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the total amount of frames drawn. - - - - - - - Returns the frames per second of the running game. - - - - - - - Return the amount of fixed iterations per second (for fixed process and physics). - - - - - - - Return the main loop object (see [MainLoop] and [SceneTree]). - - - - - - - - - - - - - - - - - - - Returns the current engine version information in a Dictionary. - - "major" - Holds the major version number as a String - "minor" - Holds the minor version number as a String - "patch" - Holds the patch version number as a String - "status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String - "revision" - Holds the revision (e.g. "custom-build") as a String - "string" - major + minor + patch + status + revision in a single String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the amount of fixed iterations per second (for fixed process and physics). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Type to handle file reading and writing operations. - - - File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example. - Here's a sample on how to write and read from a file: - [codeblock] - func save(content): - var file = File.new() - file.open("user://save_game.dat", file.WRITE) - file.store_string(content) - file.close() - - func load(): - var file = File.new() - file.open("user://save_game.dat", file.READ) - var content = file.get_as_text() - file.close() - return content - [/codeblock] - - - - - - - Close the currently opened file. - - - - - - - Return whether the file cursor reached the end of the file. - - - - - - - - - Get whether or not the file in the specified path exists. - - - - - - - Get the next 16 bits from the file as an integer. - - - - - - - Get the next 32 bits from the file as an integer. - - - - - - - Get the next 64 bits from the file as an integer. - - - - - - - Get the next 8 bits from the file as an integer. - - - - - - - Get the whole file as a [String]. - - - - - - - - - Get next len bytes of the file as a [PoolByteArray]. - - - - - - - - - Get the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma). - - - - - - - Get the next 64 bits from the file as a floating point number. - - - - - - - Get whether endian swap is enabled for this file. - - - - - - - Get the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope]. - - - - - - - Get the next 32 bits from the file as a floating point number. - - - - - - - Return the size of the file in bytes. - - - - - - - Get the next line of the file as a [String]. - - - - - - - - - Return a md5 String representing the file at the given path or an empty [String] on failure. - - - - - - - - - - - - - - - Get a [String] saved in Pascal format from the file. - - - - - - - Return the file cursor position. - - - - - - - Get the next bits from the file as a floating point number. - - - - - - - - - Return a sha256 String representing the file at the given path or an empty [String] on failure. - - - - - - - Get the next Variant value from the file. - - - - - - - Return whether the file is currently opened. - - - - - - - - - - - Open the file for writing or reading, depending on the flags. - - - - - - - - - - - - - Open a compressed file for reading or writing. The compression_mode can be set as one of the COMPRESSION_* constants. - - - - - - - - - - - - - Open an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. - - - - - - - - - - - - - Open an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. - - - - - - - - - Change the file reading/writing cursor to the specified position (in bytes from the beginning of the file). - - - - - - - - - Change the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file. - - - - - - - - - Set whether to swap the endianness of the file. Enable this if you're dealing with files written in big endian machines. - Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file. - - - - - - - - - Store an integer as 16 bits in the file. - - - - - - - - - Store an integer as 32 bits in the file. - - - - - - - - - Store an integer as 64 bits in the file. - - - - - - - - - Store an integer as 8 bits in the file. - - - - - - - - - Store the given array of bytes in the file. - - - - - - - - - Store a floating point number as 64 bits in the file. - - - - - - - - - Store a floating point number as 32 bits in the file. - - - - - - - - - Store the given [String] as a line in the file. - - - - - - - - - Store the given [String] as a line in the file in Pascal format (i.e. also store the length of the string). - - - - - - - - - Store a floating point number in the file. - - - - - - - - - Store the given [String] in the file. - - - - - - - - - Store any Variant value in the file. - - - - - - Open the file for reading. - - - Open the file for writing. Create it if the file not exists and truncate if it exists. - - - Open the file for reading and writing, without truncating the file. - - - Open the file for reading and writing. Create it if the file not exists and truncate if it exists. - - - Use the FastLZ compression method. - - - Use the Deflate compression method. - - - Use the Zstd compression method. - - - - - - - - Dialog for selecting files or directories in the filesystem. - - - FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. - - - - - - - - - Add a custom filter. Filter format is: "mask ; description", example (C++): dialog->add_filter("*.png ; PNG Images"); - - - - - - - Clear all the added filters in the dialog. - - - - - - - Return the file access permission of the dialog. - - - - - - - Get the current working directory of the file dialog. - - - - - - - Get the current selected file of the file dialog (empty if none). - - - - - - - Get the current selected path (directory and file) of the file dialog (empty if none). - - - - - - - - - - - - - Get the file dialog mode from the MODE_* enum. - - - - - - - Return the vertical box container of the dialog, custom controls can be added to it. - - - - - - - Invalidate and update the current dialog content list. - - - - - - - Return true if the diaog allows show hidden files. - - - - - - - - - Set the file access permission of the dialog(Must be one of [ACCESS_RESOURCES], [ACCESS_USERDATA] or [ACCESS_FILESYSTEM]). - - - - - - - - - Set the current working directory of the file dialog. - - - - - - - - - Set the current selected file name of the file dialog. - - - - - - - - - Set the current selected file path of the file dialog. - - - - - - - - - - - - - - - - - Set the file dialog mode from the MODE_* enum. - - - - - - - - - Set the dialog should show hidden files. - - - - - - - - - - - - - - - - - - - Event emitted when the user selects a directory. - - - - - - - Event emitted when the user selects a file (double clicks it or presses the OK button). - - - - - - - Event emitted when the user selects multiple files. - - - - - - The dialog allows the selection of one, and only one file. - - - The dialog allows the selection of multiple files. - - - The dialog functions as a folder selector, disallowing the selection of any file. - - - The dialog allows the selection of a file or a directory. - - - The dialog will warn when a file exists. - - - The dialog allows the selection of file and directory. - - - The dialog allows ascess files under [Resource] path(res://) . - - - The dialog allows ascess files in whole file system. - - - - - - - - - - - - - - Internationalized font and text drawing support. - - - Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc. - - - - - - - - - - - - - - - - - Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. - - - - - - - - - - - - - - - - - Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character. - - - - - - - Return the font ascent (number of pixels above the baseline). - - - - - - - Return the font descent (number of pixels below the baseline). - - - - - - - Return the total font height (ascent plus descent) in pixels. - - - - - - - - - Return the size of a string, taking kerning and advance into account. - - - - - - - - - - - - - After editing a font (changing size, ascent, char rects, etc.). Call this function to propagate changes to controls that might use it. - - - - - - - - - Reference to a function in an object. - - - In GDScript, functions are not [i]first-class objects[/i]. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments. - However, by creating a [FuncRef] using the [method @GDScript.funcref] function, a reference to a function in a given object can be created, passed around and called. - - - - - - - - - - - - - - - Set the name of the function to call on the object, without parentheses or any parameters. - - - - - - - - - Set the object on which to call the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary]. - - - - - - - - - State of a function call after yielding. - - - Calling [method @GDScript.yield] within a function will cause that function to yield and return its current state as an object of this type. The yielded function call can then be resumed later by calling [method resume] on this state object. - - - - - - - - - Check whether the function call may be resumed. This is not the case if the function state was already resumed. - If [code]extended_check[/code] is enabled, it also checks if the associated script and object still exist. The extended check is done in debug mode as part of [method GDFunctionState.resume], but you can use this if you know you may be trying to resume without knowing for sure the object and/or script have survived up to that point. - - - - - - - - - Resume execution of the yielded function call. - If handed an argument, return the argument from the [method @GDScript.yield] call in the yielded function call. You can pass e.g. an [Array] to hand multiple arguments. - This function returns what the resumed function call returns, possibly another function state if yielded again. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A script implemented in the GDScript programming language. - - - A script implemented in the GDScript programming language. The script exends the functionality of all objects that instance it. - [method new] creates a new instance of the script. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. - - - - - - - Returns byte code for the script source code. - - - - - - - Returns a new instance of the script. - For example: - [codeblock] - var MyClass = load("myclass.gd") - var instance = MyClass.new() - assert(instance.get_script() == MyClass) - [/codeblock] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base node for geometry based visual instances. - - - Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the material override for the whole geometry. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the material override for the whole geometry. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Color interpolator node - - - Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1. - - - - - - - - - - - Adds the specified color to the end of the ramp, with the specified offset - - - - - - - - - Returns the color of the ramp color at index [i]point[/i] - - - - - - - Returns the colors in the ramp - - - - - - - - - Returns the offset of the ramp color at index [i]point[/i] - - - - - - - Returns the offsets for the colors in this ramp - - - - - - - Returns the number of colors in the ramp - - - - - - - - - Returns the interpolated color specified by [i]offset[/i] - - - - - - - - - Removes the color at the index [i]offset[/i] - - - - - - - - - - - Sets the color of the ramp color at index [i]point[/i] - - - - - - - - - Sets the colors for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accommodate the new elements. - - - - - - - - - - - Sets the offset for the ramp color at index [i]point[/i] - - - - - - - - - Sets the offset for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accommodate the new elements, all new colors will be black by default. - - - - - - - - - - - - - - - Gradient filled texture. - - - Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [method set_width]). - - - - - - - - - - - - - - - - - - - - - - - - - - - - The [Gradient] that will be used to fill the texture. - - - The number of color samples that will be obtained from the [Gradient]. - - - - - - - - GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them. - - - GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default. - It is greatly advised to enable low processor usage mode (see [method OS.set_low_processor_usage_mode]) when using GraphEdits. - - - - - - - - - - - - - - - Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created. - - - - - - - - - - - - - - - Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists. - - - - - - - Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" } - - - - - - - Return the scroll offset. - - - - - - - - - - - - - Return the current zoom value. - - - - - - - - - - - - - - - Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode. - - - - - - - Return true is the disconnection of connections is enable in the visual GraphEdit. False otherwise. - - - - - - - - - - - - - - - Enable the disconnection of existing connections in the visual GraphEdit by left-clicking a connection and releasing into the void. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the zoom value of the GraphEdit. Zoom value is between [0.01; 1.728]. - - - - - - - Signal sent at the beginning of a GraphNode movement. - - - - - Signal sent at the end of a GraphNode movement. - - - - - - - - - - - - - Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be created. - - - - - - - - - - - - - - - Signal sent when a GraphNode is attempted to be removed from the GraphEdit. - - - - - - - - - - - - - Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be removed. - - - - - Signal sent when a GraphNode is attempted to be duplicated in the GraphEdit. - - - - - - - - - - - - - Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types. - - - A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. - - - - - - - Disable all input and output slots of the GraphNode. - - - - - - - - - Disable input and output slot whose index is 'idx'. - - - - - - - - - Return the color of the input connection 'idx'. - - - - - - - Return the number of enabled input slots (connections) to the GraphNode. - - - - - - - - - Return the position of the input connection 'idx'. - - - - - - - - - Return the type of the input connection 'idx'. - - - - - - - - - Return the color of the output connection 'idx'. - - - - - - - Return the number of enabled output slots (connections) of the GraphNode. - - - - - - - - - Return the position of the output connection 'idx'. - - - - - - - - - Return the type of the output connection 'idx'. - - - - - - - Return the offset of the GraphNode. - - - - - - - - - - - - - - - Return the color set to 'idx' left (input) slot. - - - - - - - - - Return the color set to 'idx' right (output) slot. - - - - - - - - - Return the (integer) type of left (input) 'idx' slot. - - - - - - - - - Return the (integer) type of right (output) 'idx' slot. - - - - - - - Return the title of the GraphNode. - - - - - - - Returns true if the close button is shown. False otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - Return true if left (input) slot 'idx' is enabled. False otherwise. - - - - - - - - - Return true if right (output) slot 'idx' is enabled. False otherwise. - - - - - - - - - - - - - - - - - Set the offset of the GraphNode. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Show the close button on the GraphNode if 'show' is true (disabled by default). If enabled, a connection on the signal close_request is needed for the close button to work. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the title of the GraphNode. - - - - - - - - - - - - - - - Signal sent on closing the GraphNode. - - - - - - - - - Signal sent when the GraphNode is dragged. - - - - - Signal sent when the GraphNode is moved. - - - - - Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Grid container used to arrange elements in a grid like layout - - - Grid container will arrange its children in a grid like structure, the grid columns are specified using the [method set_columns] method and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. - - - - - - - Returns the number of columns in this container - - - - - - - - - Sets the numbers of columns in the container, then reorder its children to accommodate the new layout - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Groove constraint for 2D physics. - - - Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another. - - - - - - - Set the final offset of the groove on body A. - - - - - - - Return the length of the groove. - - - - - - - - - Set the initial offset of the groove on body A. - - - - - - - - - Set the length of the groove. - - - - - - - - - - - - - - - Horizontal box container. - - - Horizontal box container. See [BoxContainer]. - - - - - - - - - - - - - Horizontal scroll bar. - - - Horizontal scroll bar. See [ScrollBar]. This one goes from left (min) to right (max). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Horizontal separator. - - - Horizontal separator. See [Separator]. It is used to separate objects vertically, though (but it looks horizontal!). - - - - - - - - - - - - - - - Horizontal slider. - - - Horizontal slider. See [Slider]. This one goes from left (min) to right (max). - - - - - - - - - - - - - - - - - - - - - - - - - - - Horizontal split container. - - - Horizontal split container. See [SplitContainer]. This goes from left to right. - - - - - - - - - - - - - - - - - - - Hyper-text transfer protocol client. - - - Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification. - Can be reused to connect to different hosts and make many requests. - - - - - - - Cloces the current connection, allows for reusal of [HTTPClient]. - - - - - - - - - - - - - - - Connect to a host. This needs to be done before any requests are sent. - The host should not have http:// prepended but will strip the protocol identifier if provided. - verify_host will check the SSL identity of the host if set to true. - - - - - - - Return current connection. - - - - - - - Return the response's body length. - - - - - - - Return the HTTP status code of the response. - - - - - - - Return the response headers. - - - - - - - Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. - Structure: ("key":"value1; value2") - Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) - - - - - - - Returns a STATUS_* enum constant. Need to call [method poll] in order to get status updates. - - - - - - - Return whether this [HTTPClient] has a response available. - - - - - - - Return whether blocking mode is enabled. - - - - - - - Return whether this [HTTPClient] has a response that is chunked. - - - - - - - This needs to be called in order to have any request processed. Check results with [method get_status] - - - - - - - - - Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: - [codeblock] - var fields = {"username": "user", "password": "pass"} - String queryString = httpClient.query_string_from_dict(fields) - returns:= "username=user&password=pass" - [/codeblock] - - - - - - - Reads one chunk from the response. - - - - - - - - - - - - - - - Sends a request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php". - Headers are HTTP request headers. - To create a POST request with query strings to push to the server, do: - [codeblock] - var fields = {"username" : "user", "password" : "pass"} - var queryString = httpClient.query_string_from_dict(fields) - var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())] - var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString) - [/codeblock] - - - - - - - - - - - - - - - Sends a raw request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php". - Headers are HTTP request headers. - Sends body raw, as a byte array, does not encode it in any way. - - - - - - - - - Stub function - - - - - - - - - Stub function - - - - - - - - - If set to true, execution will block until all data is read from the response. - - - - - - - - - Set connection to use, for this client. - - - - - - - - - Sets the size of the buffer used and maximum bytes to read per iteration. see [method read_response_body_chunk] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A Node with the ability to send HTTP requests. - - - A Node with the ability to send HTTP requests. Uses a [HTTPClient] internally, supports HTTPS. - Can be used to make HTTP requests or download files via HTTP. - - - - - - - Cancel the current request. - - - - - - - Return the response body length. - - - - - - - Return current body size limit. - - - - - - - Return the file this request will download into. - - - - - - - Return the amount of bytes this HTTPRequest downloaded. - - - - - - - Return the current status of the underlying [HTTPClient]. - - - - - - - Return the maximum amount of redirects that will be followed. - - - - - - - Whether this request is using threads. - - - - - - - - - - - - - - - - - - - - - - - - - Set the response body size limit. - - - - - - - - - Set the file to download into. Outputs the response body into the file. - - - - - - - - - Set the maximum amount of redirects the request will follow. - - - - - - - - - Make this HTTPRequest use threads. - - - - - - - - - - - - - - - - - - - - - - - This signal is emitted upon request completion. - - - - - - Request successful. - - - - - Request failed while connecting. - - - Request failed while resolving. - - - Request failed due to connection(read/write) error. - - - Request failed on SSL handshake. - - - Request does not have a response(yet). - - - Request exceded its maximum size limit, see [method set_body_size_limit]. - - - Request failed. (unused) - - - HTTPRequest couldn't open the download file. - - - HTTPRequest couldn't write to the download file. - - - Request reached its maximum redirect limit, see [method set_max_redirects]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IP Protocol support functions. - - - IP contains support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded. - - - - - - - - - Removes all of a "hostname"'s cached references. If no "hostname" is given then all cached IP addresses are removed. - - - - - - - - - Removes a given item "id" from the queue. This should be used to free a queue after it has completed to enable more queries to happen. - - - - - - - Returns all of the user's current IPv4 and IPv6 addresses as an array. - - - - - - - - - Returns a queued hostname's IP address, given its queue "id". Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). - - - - - - - - - Returns a queued hostname's status as a RESOLVER_STATUS_* constant, given its queue "id". - - - - - - - - - - - Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the TYPE_* constant given as "ip_type". - - - - - - - - - - - Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the TYPE_* constant given as "ip_type". Returns the queue ID if successful, or RESOLVER_INVALID_ID on error. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Image datatype. - - - Native image datatype. Contains image data, which can be converted to a texture, and several functions to interact with it. - - - - - - - - - - - - - Alpha-blends a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest". - - - - - - - - - - - - - - - Alpha-blends a "src_rect" [Rect2] from "src" [Image] to this [Image] using a "mask" [Image] on coordinates "dest". Alpha channels are required for both "src" and "mask", dest pixels and src pixels will blend if the corresponding mask pixel's alpha value is not 0. "src" [Image] and "mask" [Image] *must* have the same size (width and height) but they can have different formats - - - - - - - - - - - - - Copy a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest". - - - - - - - - - - - - - - - Blits a "src_rect" [Rect2] from "src" [Image] to this [Image] using a "mask" [Image] on coordinates "dest". Alpha channel is required for "mask", will copy src pixel onto dest if the corresponding mask pixel's alpha value is not 0. "src" [Image] and "mask" [Image] *must* have the same size (width and height) but they can have different formats - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create an empty image of a specific size and format. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fills an [Image] with a specified [Color] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the raw data of the [Image]. - - - - - - - Return the format of the [Image], one of [Image].FORMAT_*. - - - - - - - Return the height of the [Image]. - - - - - - - - - - - - - - - - - - - - - - - - - - - Return a new [Image] that is a copy of "area" in this [Image]. - - - - - - - - - - - - - Return the area of this [Image] that is used/visibly colored/opaque. - - - - - - - Return the width of the [Image]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Load an [Image]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Save this [Image] as a png. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A [Texture] based on an [Image]. - - - A [Texture] based on an [Image]. Can be created from an [Image]. - - - - - - - - - - - - - - - Create a new [ImageTexture] with "width" and "height". - "format" one of [Image].FORMAT_*. - "flags" one or more of [Texture].FLAG_*. - - - - - - - - - - - Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*. - - - - - - - Return the format of the [ImageTexture], one of [Image].FORMAT_*. - - - - - - - Return the storage quality for [ImageTexture].STORAGE_COMPRESS_LOSSY. - - - - - - - Return the storage type. One of [ImageTexture].STORAGE_*. - - - - - - - - - Load an [ImageTexure]. - - - - - - - - - Set the [Image] of this [ImageTexture]. - - - - - - - - - Set the storage quality in case of [ImageTexture].STORAGE_COMPRESS_LOSSY. - - - - - - - - - - - - - - - - - Set the storage type. One of [ImageTexture].STORAGE_*. - - - - - - [Image] data is stored raw and unaltered. - - - [Image] data is compressed with a lossy algorithm. You can set the storage quality with [method set_lossy_storage_quality]. - - - [Image] data is compressed with a lossless algorithm. - - - - - - Node to draw simple geometry from code, ala OpenGL 1.x - - - - - - - - - - - - - - - - - Simple helper to draw a uvsphere, with given latitudes, longitude and radius. - - - - - - - - - Add a vertex with the currently set color/uv/etc. - - - - - - - - - - - Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references. - For the type of primitive, use the [Mesh].PRIMITIVE_* enumerations. - - - - - - - Clear everything that was drawn using begin/end. - - - - - - - Call this when done adding a batch of geometry, otherwise it can't be displayed. - - - - - - - - - Set the color that the next vertex will use to be drawn. - - - - - - - - - Set the normal that the next vertex will use to be drawn. - - - - - - - - - Set the tangent (and binormal facing) that the next vertex will use to be drawn. - - - - - - - - - Set the UV that the next vertex will use to be drawn. - - - - - - - - - Set the second layer of UV that the next vertex will use to be drawn. - - - - - - - - - A Singleton that deals with inputs. - - - A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. - - - - - - - - - This will simulate pressing the specificed action. - - - - - - - - - If the specified action is already pressed, this will release it. - - - - - - - - - - - Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. - - - - - - - If the device has an accelerometer, this will return the movement. - - - - - - - Returns an [Array] containing the device IDs of all currently connected joypads. - - - - - - - - - - - - - If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's x, y, and z axis. - - - - - - - - - - - Returns the current value of the joypad axis at given index (see JOY_* constants in [@Global Scope]) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns a SDL2 compatible device guid on platforms that use gamepad remapping. Returns "Default Gamepad" otherwise. - - - - - - - - - Returns the name of the joypad at the specified device index - - - - - - - - - Returns the duration of the current vibration effect in seconds. - - - - - - - - - Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. - - - - - - - Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion. - - - - - - - If the device has a magnetometer, this will return the magnetic field strength in micro-Tesla for all axes. - - - - - - - Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time the bits are added together. - - - - - - - Return the mouse mode. See the constants for more information. - - - - - - - - - - - - - - - - - - - - - - - - - Returns true or false depending on whether the action event is pressed. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with [InputMap]. - - - - - - - - - - - Returns if the joypad button at the given index is currently pressed. (see JOY_* constants in [@Global Scope]) - - - - - - - - - Returns if the specified device is known by the system. This means that it sets all button and axis indices exactly as defined in the JOY_* constants (see [@Global Scope]). Unknown joypads are not expected to match these constants, but you can still retrieve events from them. - - - - - - - - - Returns true or false depending on whether the key is pressed or not. You can pass KEY_*, which are pre-defined constants listed in [@Global Scope]. - - - - - - - - - Returns true or false depending on whether mouse button is pressed or not. You can pass BUTTON_*, which are pre-defined constants listed in [@Global Scope]. - - - - - - - - - - - - - - - - - Removes all mappings from the internal db that match the given uid. - - - - - - - - - - - - - - - - - - - Set the mouse mode. See the constants for more information. - - - - - - - - - - - - - - - Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). - Note that not every hardware is compatible with long effect durations, it is recommended to restart an effect if in need to play it for more than a few seconds. - - - - - - - - - Stops the vibration of the joypad. - - - - - - - - - Sets the mouse position to the specified vector. - - - - - - - - - - - Emitted when a joypad device has been connected or disconnected - - - - - - Makes the mouse cursor visible if it is hidden. - - - Makes the mouse cursor hidden if it is visible. - - - 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. - - - - - - - - Default implementation of the [Input] class. - - - Default implementation of the [Input] class, used internally by the editor and games for default input management. - - - - - - - - - Generic input event - - - - - - - - - - - Returns true if this input event matches the event passed. - - - - - - - Returns a [String] representation of the event. - - - - - - - Returns the id of the device that generated the event. - - - - - - - Returns the id of the event. - - - - - - - - - Returns true if this input event matches a pre-defined action, no matter the type. - - - - - - - - - Returns true if the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. - - - - - - - - - Returns true if the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. - - - - - - - - - - - - - Returns true if this input event is an echo event (only for events of type KEY, it will return false for other types). - - - - - - - Returns true if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Input event type for actions. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Input event type for joypad button events. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Joypad button identifier, one of the JOY_BUTTON_* constants in [@Global Scope]. - - - Pressed state of the joypad button. - - - Intensity of the button pressure, ranges from 0 to 1.0. - - - - - - - - Input event type for joypad motion/axis events. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Joypad axis identifier, one of the JOY_AXIS_* constants in [@Global Scope]. - - - Position of the axis, ranging from -1.0 to 1.0. A value of 0 means that the axis is in its neutral position. - - - - - - - - Input event type for keyboard events. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Echo state of the key, i.e. whether it's a repeat event or not. - - - Pressed state of the key. - - - Scancode of the key, one of the KEY_* constants in [@Global Scope]. - - - Unicode identifier of the key (when relevant). - - - - - - - - Base input event type for mouse events. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope]. - - - Global position of the mouse click. - - - Local position of the mouse click. - - - - - - - - Input event type for mouse button events. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@Global Scope]. - - - Whether the event is a double-click. - - - - - Pressed state of the mouse button. - - - - - - - - Input event type for mouse motion events. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Position of the mouse pointer relative to the previous mouse position. - - - Speed of the mouse pointer. - - - - - - - - Input event type for screen drag events. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Drag event index in the case of a multi-drag event. - - - Position of the drag event. - - - Position of the drag event relative to its start position. - - - Speed of the drag event. - - - - - - - - Input event type for screen touch events. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Touch event index in the case of a multi-touch event. - - - Position of the touch event. - - - Pressed state of the touch event. - - - - - - - - Base class for input events with modifiers. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - State of the Alt modifier. - - - State of the Command modifier. - - - State of the Ctrl modifier. - - - State of the Meta modifier. - - - State of the Shift modifier. - - - - - - - - Singleton that manages actions. - - - - - - - - - - - - - Add an [InputEvent] to an action. This [InputEvent] will trigger the action. - - - - - - - - - - - Remove an [InputEvent] from an action. - - - - - - - - - - - Whether an action has an [InputEvent] associated with it. - - - - - - - - - Add an (empty) action to the [InputMap]. An [InputEvent] can then be added to this action with [method action_add_event]. - - - - - - - - - Remove an action from the [InputMap]. - - - - - - - - - - - Return whether the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. - - - - - - - - - Return an array of InputEvents associated with a given action. - - - - - - - Return an array of all actions in the [InputMap]. - - - - - - - - - Whether this InputMap has a registered action with the given name. - - - - - - - Clear the [InputMap] and load it anew from [ProjectSettings]. - - - - - - - - - Placeholder for the root [Node] of a [PackedScene]. - - - Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an InstacePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling [method replace_by_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively. - The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. - - - - - - - Retrieve the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance]. - - - - - - - - - - - - - - - - - Replace this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns. - - - This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, - or both text and icon. Tooltips are supported and may be different for every item in the list. Selectable items in the list - may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled - to allow use of popup context menus. Items may also be 'activated' with a double click (or Enter key). - - - - - - - - - - - Adds an item to the item list with no text, only an 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. - - - - - - - Remove all items from the list. - - - - - - - Ensure selection is visible, adjusting the scroll position as necessary. - - - - - - - Return whether or not items may be selected via right mouse clicking. - - - - - - - If column size has been fixed to a value, return that value. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Given a position within the control return the item (if any) at that point. - - - - - - - Return count of items currently in the item list. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the text for specified item index. - - - - - - - - - Return tooltip hint for specified item index. - - - - - - - Return total number of columns in use by the list. - - - - - - - Return total number of lines currently in use by the list. - - - - - - - - - - - - - Returns the list of selected indexes. - - - - - - - Returns the current vertical scroll bar for the List. - - - - - - - - - - - - - - - Returns whether or not the item at the specified index is disabled - - - - - - - - - Returns whether or not the item at the specified index is selectable. - - - - - - - - - Returns whether the tooptip is enabled for specified item index. - - - - - - - Returns whether or not all columns of the list are of the same size. - - - - - - - - - Returns whether or not item at the specified index is currently selected. - - - - - - - - - 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. - - - - - - - - - Allow (or disallow) selection of (selectable) items in the list using right mouse button. - - - - - - - - - - - - - - - - - Set the size (width) all columns in the list are to use. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Disable (or enable) item at specified index. - Disabled items are not be selectable and do not fire activation (Enter or double-click) signals. - - - - - - - - - - - Set (or replace) icon of the item at the specified index. - - - - - - - - - - - - - - - - - - - - - Sets a value (of any type) to be stored with the item at the specified index. - - - - - - - - - - - Allow or disallow selection of the item at the specified index. - - - - - - - - - - - Sets text of item at specified index. - - - - - - - - - - - Sets tooltip hint for item at specified index. - - - - - - - - - - - Sets whether the tooltip is enabled for specified item index. - - - - - - - - - Set maximum number of columns to use for the list. - - - - - - - - - Set maximum number of lines to use for the list. - - - - - - - - - Sets a fixed size (width) to use for all columns of the list. - - - - - - - - - - - - - - - Sorts items in the list by their text. - - - - - - - - - Ensure item at specified index is not selected. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fired when specified list item is activated via double click or Enter. - - - - - - - - - Fired when specified list item has been selected via right mouse clicking. - The click position is also provided to allow appropriate popup of context menus - at the correct location. - - - - - - - Fired when specified item has been selected. - - - - - - - - - Fired when a multiple selection is altered on a list allowing mutliple selection. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base node for all joint constraints in 2D physics. - - - Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint. - - - - - - - - - - - - - - - - - - - Return the path to the A node for the joint. - - - - - - - Return the path to the B node for the joint. - - - - - - - - - - - - - - - - - - - - - - - - - Set the path to the A node for the joint. Must be of type [PhysicsBody2D]. - - - - - - - - - Set the path to the B node for the joint. Must be of type [PhysicsBody2D]. - - - - - - - - - - - - - - - - - - - Kinematic body 3D node. - - - Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses: - Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - Kinematic Characters: KinematicBody also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Kinematic body 2D node. - - - Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses: - Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - Kinematic Characters: KinematicBody2D also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the velocity of the body that collided with this one. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Move the body in the given direction, stopping if there is an obstacle. If as a result of a movement there will be any collision then informations about this collision will be in returned dictionary. Dictionary will contains those keys: - - "position" - collision position - - "normal" - collision normal - - "local_shape" - id of this kinematic body shape that took part in a collision - - "travel" - traveled movement before being stopped - - "remainder" - remaining movement before being stopped - - "collider_id" - id of the collider, it can be used when dealing with [Physics2DServer] - - "collider" - colliding body - - "collider_shape_index" - index of the colliding shape, inside collider body "collider_metadata" - If the body did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead. Please note that this method is less user friendly than [method move_and_slide]. If you don't want to program each edge case manually, then it's recommended to use [method move_and_slide] instead. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return true if there would be a collision if the body moved from the given point in the given direction. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Control that displays formatted text. - - - Label is a control that displays formatted text, optionally autowrapping it to the [Control] area. It inherits from range to be able to scroll wrapped text vertically. - - - - - - - Return the alignment mode (any of the ALIGN_* enumeration values). - - - - - - - Return the amount of lines. - - - - - - - Return the height of a line. - - - - - - - Return the the number of lines to skipped before displaying. - - - - - - - Return the restricted number of lines to display. Returns -1 if unrestricted. - - - - - - - Return the restricted number of characters to display (as a percentage of the total text). - - - - - - - Return the label text. Text can contain newlines. - - - - - - - Return the total length of the text. - - - - - - - Return the vertical alignment mode (any of the VALIGN_* enumeration values). - - - - - - - Return the restricted number of characters to display. Returns -1 if unrestricted. - - - - - - - - - - - - - Return the state of the [i]autowrap[/i] mode (see [method set_autowrap]). - - - - - - - Return true if text would be cut off if it is too wide. - - - - - - - Return true if text is displayed in all capitals. - - - - - - - - - Sets the alignment mode to any of the ALIGN_* enumeration values. - - - - - - - - - Set [i]autowrap[/i] mode. When enabled, autowrap will fit text to the control width, breaking sentences when they exceed the available horizontal space. When disabled, the label minimum width becomes the width of the longest row, and the minimum height large enough to fit all rows. - - - - - - - - - Cuts off the rest of the text if it is too wide. - - - - - - - - - Sets the number of lines to skip before displaying. Useful for scrolling text. - - - - - - - - - Restricts the number of lines to display. Set to -1 to disable. - - - - - - - - - Restricts the number of characters to display (as a percentage of the total text). - - - - - - - - - Set the label text. Text can contain newlines. - - - - - - - - - Display text in all capitals. - - - - - - - - - Sets the vertical alignment mode to any of the VALIGN_* enumeration values. - - - - - - - - - Restricts the number of characters to display. Set to -1 to disable. - - - - - - - - - - - - - - - - - - - - - - - - - - Align rows to the left (default). - - - Align rows centered. - - - Align rows to the right (default). - - - Expand row whitespaces to fit the width. - - - Align the whole text to the top. - - - Align the whole text to the center. - - - Align the whole text to the bottom. - - - Align the whole text by spreading the rows. - - - - - - - - - - - - - - - - - - - - - - - - A Texture capable of storing many smaller Textures with offsets. - - - A Texture capable of storing many smaller Textures with offsets. - You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets. - - - - - - - - - - - Add another [Texture] to this [LargeTexture], starting on offset "ofs". - - - - - - - Clear the [LargeTexture]. - - - - - - - Return the number of pieces currently in this [LargeTexture]. - - - - - - - - - Return the offset of the piece with index "idx". - - - - - - - - - Return the [Texture] of the piece with index "idx". - - - - - - - - - - - Set the offset of the piece with index "idx" to "ofs". - - - - - - - - - - - Set the [Texture] of the piece with index "idx" to "ofs". - - - - - - - - - Set the size of this [LargeTexture]. - - - - - - - - - - - - - Provides a base class for different kinds of light nodes. - - - Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Node that casts light in a 2D environment. - - - Node that casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask. - - - - - - - Return the color of the Light2D. - - - - - - - Return the energy value of the Light2D. - - - - - - - Return the height of the Light2D. Used with 2D normalmapping. - - - - - - - - - - - - - - - - - - - Set the maximum layer value of objects of the scene that are affected by the Light2D. - - - - - - - Get the minimum layer value of objects of the scene that are affected by the Light2D. - - - - - - - Return the current mode set to the Light2D. - - - - - - - Return the shadow buffer size. - - - - - - - Return the color of casted shadows for this Light2D. - - - - - - - - - - - - - - - - - - - - - - - - - Return the texture of the Light2D. - - - - - - - Return the offset of the light texture. - - - - - - - Return the scale value of the light texture. - - - - - - - Get the maximum Z value that objects of the scene can be in order to be affected by the Light2D. - - - - - - - Get the minimum Z value that objects of the scene have to be in order to be affected by the Light2D. - - - - - - - - - - - - - Return true if the Light2D is enabled, false if it is not. - - - - - - - Return true if shadow casting is enabled for this Light2D, else return false. - - - - - - - - - Set the color of the Light2D. - - - - - - - - - - - - - - - - - Switches the Light2D on or off, depending on the 'enabled' parameter. - - - - - - - - - Set the energy value of the Light2D. The bigger the value, the stronger the light. - - - - - - - - - Set the height of the Light2D. Used with 2D normalmapping. - - - - - - - - - Set the item mask of the Light2D to 'item_mask' value. - - - - - - - - - Set the item shadow mask to 'item_shadow_mask' value. - - - - - - - - - Set the maximum layer value of objects of the scene that are affected by the Light2D. - - - - - - - - - Set the minimum layer value of objects of the scene that are affected by the Light2D. - - - - - - - - - Set the behaviour mode of the Light2D. Use constants defined in the constants section. - - - - - - - - - Set the shadow buffer size. - - - - - - - - - Set the color of casted shadows for this Light2D. - - - - - - - - - Enable or disable shadows casting from this Light2D according to the 'enabled' parameter. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the texture of the Light2D. - - - - - - - - - Set the offset of the light texture. - - - - - - - - - Set the scale value of the light texture. - - - - - - - - - Set the maximum Z value that objects of the scene can be in order to be affected by the Light2D. - - - - - - - - - Set the minimum Z value that objects of the scene have to be in order to be affected by the Light2D. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light. - - - Subtract the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. - - - Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation. - - - 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. - - - - - - Occludes light cast by a Light2D, casting shadows. - - - Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed. - - - - - - - Return the light mask of the LightOccluder2D. - - - - - - - Return the OccluderPolygon2D that defines the LightOccluder2D. - - - - - - - - - Set the LightOccluder2D light mask. The LightOccluder2D will cast shadows only from Light2Ds that belong to the same light mask(s). - - - - - - - - - Set the OccluderPolygon2D that defines the LightOccluder2D. - - - - - - The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s). - - - The [OccluderPolygon2D] used to compute the shadow. - - - - - - - - A 2D line. - - - A line through several points in 2D space. - - - - - - - - - Add a point at the x/y position in the supplied [Vector2] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Remove the point at index 'i' from the line. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Control that provides single line string editing. - - - LineEdit provides a single line string editor, used for text fields. - - - - - - - - - Append text at cursor, scrolling the [LineEdit] when needed. - - - - - - - Clear the [LineEdit] text. - - - - - - - Gets whether the line edit caret is blinking. - - - - - - - Gets the line edit caret blink speed. - - - - - - - - - Set the line edit caret to blink. - - - - - - - - - Set the line edit caret blink speed. Cannot be less then or equal to 0. - - - - - - - Return the align mode of the [LineEdit]. - - - - - - - Return the cursor position inside the [LineEdit]. - - - - - - - - - - - - - Return the maximum amount of characters the [LineEdit] can edit. If 0 is returned, no limit exists. - - - - - - - Return the [PopupMenu] of this [LineEdit]. - - - - - - - Return the placeholder text. - - - - - - - Return transparency of the placeholder text. - - - - - - - Return the text in the [LineEdit]. - - - - - - - Return the [i]editable[/i] status of the [LineEdit] (see [method set_editable]). - - - - - - - Return the [i]secret[/i] status of the [LineEdit] (see [method set_secret]). - - - - - - - - - Execute a given action as defined in the MENU_* enum. - - - - - - - - - - - Select the text inside [LineEdit] by the given character positions. [code]from[/code] is default to the beginning. [code]to[/code] is default to the end. - [codeblock] - select() # select all - select(5) # select from the fifth character to the end. - select(2, 5) # select from the second to the fifth character. - [/codeblock] - - - - - - - Select the whole string. - - - - - - - - - Set text alignment of the [LineEdit]. - - - - - - - - - Set the cursor position inside the [LineEdit], causing it to scroll if needed. - - - - - - - - - Set the [i]editable[/i] status of the [LineEdit]. When disabled, existing text can't be modified and new text can't be added. - - - - - - - - - - - - - - - - - Set the maximum amount of characters the [LineEdit] can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit. - - - - - - - - - Set the placeholder text. - - - - - - - - - Set transparency of the placeholder text. - - - - - - - - - Set the [i]secret[/i] status of the [LineEdit]. When enabled, every character is displayed as "*". - - - - - - - - - Set the text in the [LineEdit], clearing the existing one and the selection. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - When the text changes, this signal is emitted. - - - - - - - This signal is emitted when the user presses KEY_ENTER on the [LineEdit]. This signal is often used as an alternate confirmation mechanism in dialogs. - - - - - - Align left. - - - Align center. - - - Align right. - - - Align fill. - - - Cut (Copy and clear). - - - Copy the selected text. - - - Paste the clipboard text over the selected text. - - - Clear the text. - - - Select all text. - - - Undo an action. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Line shape for 2D collision objects. - - - Line shape for 2D collision objects. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. - - - - - - - Return the line distance from the origin. - - - - - - - Return the line normal. - - - - - - - - - Set the line distance from the origin. - - - - - - - - - Set the line normal. - - - - - - - - - - - - - - - Simple button used to represent a link to some resource - - - This kind of buttons are primarily used when the interaction with the button causes a context change (like linking to a web page). - - - - - - - Returns the text of the button. - - - - - - - Returns the underline mode for this button. - - - - - - - - - Sets the text of the button. - - - - - - - - - Sets the underline mode for this button, the argument must be one of the [LinkButton] constants (see constants section). - - - - - - - - - - - - The LinkButton will always show an underline at the bottom of its text - - - The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. - - - The LinkButton will never show an underline at the bottom of its text. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Main loop is the abstract main loop base class. - - - Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [MainLoop] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneTree] is created), unless a main [Script] is supplied, which may or not create and return a [MainLoop]. - - - - - - - - - - - - - - - - - Called before the program exits. - - - - - - - - - Called each idle frame with time since last call as an only argument. - - - - - - - Called once during initialization. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Simple margin container. - - - Simple margin container. Adds a left margin to anything contained. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return [PoolByteArray] of a given base64 encoded String. - - - - - - - - - Return utf8 String of a given base64 encoded String. - - - - - - - - - Return [Variant] of a given base64 encoded String. - - - - - - - - - Return base64 encoded String of a given [PoolByteArray]. - - - - - - - - - Return base64 encoded String of a given utf8 String. - - - - - - - - - Return base64 encoded String of a given [Variant]. - - - - - - - - - Abstract base [Resource] for coloring and shading geometry. - - - Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Special button that brings up a [PopupMenu] when clicked. - - - Special button that brings up a [PopupMenu] when clicked. That's pretty much all it does, as it's just a helper class when building GUIs. - - - - - - - Return the [PopupMenu] contained in this button. - - - - - - - - - - - Emitted when [PopupMenu] of this MenuButton is about to show. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A [Resource] that contains vertex-array based geometry. - - - Mesh is a type of [Resource] that contains vertex-array based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. - - - - - - - Calculate a [ConvexPolygonShape] from the mesh. - - - - - - - - - Calculate an outline mesh at a defined offset (margin) from the original mesh. Note: Typically returns the vertices in reverse order (e.g. clockwise to anti-clockwise). - - - - - - - Calculate a [ConcavePolygonShape] from the mesh. - - - - - - - Generate a [TriangleMesh] from the mesh. - - - - - - - Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle. - - - - - - Render array as points (one vertex equals one point). - - - Render array as lines (every two vertices a line is created). - - - Render array as line strip. - - - Render array as line loop (like line strip, but closed). - - - Render array as triangles (every three vertices a triangle is created). - - - Render array as triangle strips. - - - Render array as triangle fans. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Node that instances meshes into a scenario. - - - MeshInstance is a [Node] that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance] instead. - - - - - - - This helper creates a [StaticBody] child [Node] with a [ConvexPolygonShape] [CollisionShape] calculated from the mesh geometry. It's mainly used for testing. - - - - - - - - - - - - - This helper creates a [StaticBody] child [Node] with a [ConcavePolygonShape] [CollisionShape] calculated from the mesh geometry. It's mainly used for testing. - - - - - - - Returns the current [Mesh] resource for the instance. - - - - - - - - - - - - - - - Returns the [Material] for a surface of the [Mesh] resource. - - - - - - - - - - - - - - - - - - - - - - - - - - - Sets the [Material] for a surface of the [Mesh] resource. - - - - - - The [Mesh] resource for the instance. - - - [NodePath] to the [Skeleton] associated with the instance. - - - - - - - - Library of meshes. - - - Library of meshes. Contains a list of [Mesh] resources, each with name and ID. Useful for GridMap or painting Terrain. - - - - - - - Clear the library. - - - - - - - - - Create a new item in the library, supplied an id. - - - - - - - - - - - - - - - Return the list of items. - - - - - - - - - Return the mesh of the item. - - - - - - - - - Return the name of the item. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get an unused id for a new item. - - - - - - - - - Remove the item. - - - - - - - - - - - Set the mesh of the item. - - - - - - - - - - - Set the name of the item. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Provides high performance mesh instancing. - - - MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory. - For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead. - As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object). - Since instances may have any behavior, the Rect3 used for visibility must be provided by the user. - - - - - - - Return the visibility Rect3. - - - - - - - - - - - - - - - Get the color of a specific instance. - - - - - - - Return the amount of instances that is going to be drawn. - - - - - - - - - Return the transform of a specific instance. - - - - - - - Return the [Mesh] resource drawn as multiple instances. - - - - - - - - - - - - - - - - - - - - - - - - - Set the color of a specific instance. - - - - - - - - - Set the amount of instances that is going to be drawn. Changing this number will erase all the existing instance transform and color data. - - - - - - - - - - - Set the transform for a specific instance. - - - - - - - - - Set the [Mesh] resource to be drawn in multiple instances. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Node that instances a [MultiMesh]. - - - MultiMeshInstance is a [Node] that takes a [MultiMesh] resource and adds it to the current scenario by creating an instance of it (yes, this is an instance of instances). - - - - - - - Return the [MultiMesh] that is used for instancing. - - - - - - - - - Set the [MultiMesh] to be instanced. - - - - - - - - - - - - - A synchronization Mutex. - - - A synchronization Mutex. Element used in multi-threadding. Basically a binary [Semaphore]. Guarantees that only one thread has this lock, can be used to protect a critical section. - - - - - - - Lock this [Mutex], blocks until it is unlocked by the current owner. - - - - - - - Try locking this [Mutex], does not block. Returns [OK] on success else [ERR_BUSY]. - - - - - - - Unlock this [Mutex], leaving it to others threads. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PacketPeer implementation using the ENet library. - - - A connection (or a listening server) that should be passed to [method SceneTree.set_network_peer]. Socket events can be handled by connecting to [SceneTree] signals. - - - - - - - - - - - - - - - - - - - - - Create client that connects to a server at address [code]ip[/code] using specified [code]port[/code]. - - - - - - - - - - - - - - - Create server that listens to connections via [code]port[/code]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return whether this [NetworkedMultiplayerPeer] is refusing new connections. - - - - - - - - - - - - - - - If [code]endable[/code] is true, this [NetworkedMultiplayerPeer] will refuse new connections. - - - - - - - - - - - - - - - - - - - - - - - Emitted when failed to connect to server. - - - - - Emitted when successfully connected to server. - - - - - - - Emitted by the server when a client is connected. - - - - - - - Emitted by the server when a client is disconnected. - - - - - Emitted by clients when server is disconnected. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for all the [i]scene[/i] elements. - - - Nodes are the base bricks with which Godot games are developed. They can be set as children of other nodes, resulting in a tree arrangement. A given node can contain any number of nodes as children (but there is only one scene tree root node) with the requirement that all siblings (direct children of a node) should have unique names. - Any tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. Nodes can optionally be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group) to perform grouped actions. - [b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the NOTIFICATION_ENTER_TREE notification and its [method _enter_tree] callback is triggered. Children nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's. - Once all nodes have been added in the scene tree, they receive the NOTIFICATION_READY notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, from the children up to the parent nodes. - It means that when adding a scene to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (and that recursively for the whole scene). - [b]Processing:[/b] Nodes can be set to the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] is variable. Fixed processing (callback [method _fixed_process], toggled with [method set_fixed_process]) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics. - Nodes can also process input events. When set, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it. - To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with [method set_owner]. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. - Finally, when a node is freed with [method free] or [method queue_free], it will also free all its children. - [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling [method rpc] with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) on the receiving peer. To identify which [Node] receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers). - - - - - - - Called when the node enters the [SceneTree] (e.g. upon instancing, scene changing or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children. - Corresponds to the NOTIFICATION_ENTER_TREE notification in [method Object._notification]. - - - - - - - Called when the node leaves the [SceneTree] (e.g. upon freeing, scene changing or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree. - Corresponds to the NOTIFICATION_EXIT_TREE notification in [method Object._notification]. - - - - - - - - - Called during the fixed processing step of the main loop. Fixed processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant. - It is only called if fixed processing has been enabled with [method set_fixed_process]. - Corresponds to the NOTIFICATION_FIXED_PROCESS notification in [method Object._notification]. - - - - - - - - - Called when there is a change to input devices. Propagated through the node tree until a Node consumes it. - - - - - - - - - Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant. - It is only called if processing has been enabled with [method set_process]. - Corresponds to the NOTIFICATION_PROCESS notification in [method Object._notification]. - - - - - - - Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callback gets triggered first, and the node will receive the ready notification only afterwards. - Corresponds to the NOTIFICATION_READY notification in [method Object._notification]. - - - - - - - - - Propagated to all nodes when the previous InputEvent is not consumed by any nodes. - - - - - - - - - - - - - - - - - - - Add a child [Node]. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node. - The optional boolean argument enforces creating child nodes with human-readable names, based on the name of the node being instanced instead of its type only. - - - - - - - - - - - - - - - - - - - - - - - Add a node to a group. Groups are helpers to name and organize a subset of nodes, like for example "enemies" or "collectables". A [Node] can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see [method is_inside_tree]). - - - - - - - Return true if the node can process, i.e. whether its pause mode allows processing while the scene tree is paused (see [method set_pause_mode]). Always returns true if the scene tree is not paused, and false if the node is not in the tree. FIXME: Why FAIL_COND? - - - - - - - - - Duplicate the node, returning a new [Node]. - You can fine-tune the behavior using the [code]flags[/code], which are based on the DUPLICATE_* constants. - - - - - - - - - - - - - Find a descendant of this node whose name matches [code]mask[/code] as in [method 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. - - - - - - - - - Return a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node. - - - - - - - Return the amount of child nodes. - - - - - - - Return an array of references ([Node]) to the child nodes. - - - - - - - Return a filename that may be contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see [method set_filename]). - - - - - - - Return the time elapsed since the last fixed frame (see [method _fixed_process]). This is always the same in fixed processing unless the frames per second is changed in [OS]. - - - - - - - Return an array listing the groups that the node is part of. - - - - - - - Get the node index, i.e. its position among the siblings of its parent. - - - - - - - Return the name of the node. This name is unique among the siblings (other child nodes from the same parent). - - - - - - - - - - - - - - - Fetch a node. The [NodePath] must be valid (or else an error will be raised) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node. - Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]). - [i]Example:[/i] Assume your current node is Character and the following tree: - [codeblock] - /root - /root/Character - /root/Character/Sword - /root/Character/Backpack/Dagger - /root/MyGame - /root/Swamp/Alligator - /root/Swamp/Mosquito - /root/Swamp/Goblin - [/codeblock] - Possible paths are: - [codeblock] - get_node("Sword") - get_node("Backpack/Dagger") - get_node("../Swamp/Alligator") - get_node("/root/MyGame") - [/codeblock] - - - - - - - - - - - - - - - Get the node owner (see [method set_owner]). - - - - - - - Return the parent node of the current node, or an empty [Node] if the node lacks a parent. - - - - - - - Return the absolute path of the current node. This only works if the current node is inside the scene tree (see [method is_inside_tree]). - - - - - - - - - Return the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail. - - - - - - - Return the pause mode (PAUSE_MODE_*) of this Node. - - - - - - - Return the order in the node tree branch, i.e. if called by the first child Node, return 0. - - - - - - - Return the time elapsed (in seconds) since the last process callback. This is almost always different each time. - - - - - - - - - - - - - Return a [SceneTree] that this node is inside. - - - - - - - - - - - - - - - Return whether the node that a given [NodePath] points too exists. - - - - - - - - - - - - - - - - - Return [i]true[/i] if the "node" argument is a direct or indirect child of the current node, otherwise return [i]false[/i]. - - - - - - - - - - - - - Return true if fixed processing is enabled (see [method set_fixed_process]). - - - - - - - - - - - - - - - Return [i]true[/i] if "node" occurs later in the scene hierarchy than the current node, otherwise return [i]false[/i]. - - - - - - - - - Return whether this Node is in the specified group. - - - - - - - Return whether this Node is inside a [SceneTree]. - - - - - - - - - - - - - Return whether processing is enabled in the current node (see [method set_process]). - - - - - - - Return true if the node is processing input (see [method set_process_input]). - - - - - - - - - - - - - Return true if the node is processing unhandled input (see [method set_process_unhandled_input]). - - - - - - - - - - - - - - - - - Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. - - - - - - - - - - - - - Print the scene to stdout. Used mainly for debugging purposes. - - - - - - - - - - - - - Calls the method (if present) with the arguments given in "args" on this Node and recursively on all children. If the parent_first argument is true then the method will be called on the current [Node] first, then on all children. If it is false then the children will get called first. - - - - - - - - - Notify the current node and all its children recursively by calling notification() in all of them. - - - - - - - Queues a node for deletion at the end of the current frame. When deleted, all of its children nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to [method Object.free]. Use [method Object.is_queued_for_deletion] to know whether a node will be deleted at the end of the frame. - - - - - - - Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree. - - - - - - - Remove a node and set all its children as children of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed. - - - - - - - - - Remove a child [Node]. Node is NOT deleted and will have to be deleted manually. - - - - - - - - - Remove a node from a group. - - - - - - - - - - - Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost. - - - - - - - Request that [code]_ready[/code] be called again. - - - - - - - - - Send a remote procedure call request to all peers on the network (and locally), optionally sending additional data as arguments. Call request will be received by nodes with the same [NodePath]. - - - - - - - - - - - Change the method's RPC mode (one of RPC_MODE_* constants). - - - - - - - - - - - Send a [method rpc] to a specific peer identified by [i]peer_id[/i]. - - - - - - - - - Send a [method rpc] using an unreliable protocol. - - - - - - - - - - - Send a [method rpc] to a specific peer identified by [i]peer_id[/i] using an unreliable protocol. - - - - - - - - - - - Remotely change property's value on other peers (and locally). - - - - - - - - - - - Change the property's RPC mode (one of RPC_MODE_* constants). - - - - - - - - - - - - - Remotely change property's value on a specific peer identified by [i]peer_id[/i]. - - - - - - - - - - - Remotely change property's value on other peers (and locally) using an unreliable protocol. - - - - - - - - - - - - - Remotely change property's value on a specific peer identified by [i]peer_id[/i] using an unreliable protocol. - - - - - - - - - - - - - - - - - A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded. - - - - - - - - - Enables or disables node fixed framerate processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS at a fixed (usually 60 fps, check [OS] to change that) interval (and the [method _fixed_process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_fixed_process_delta_time]. - - - - - - - - - - - - - - - - - Set the name of the [Node]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed. - - - - - - - - - - - - - - - - - - - Set the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing. - - - - - - - - - Set pause mode (PAUSE_MODE_*) of this Node. - - - - - - - - - Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_process_delta_time]. - - - - - - - - - Enable input processing for node. This is not required for GUI controls! It hooks up the node to receive all input (see [method _input]). - - - - - - - - - - - - - - - - - Enable unhandled input processing for node. This is not required for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a [Control]). (see [method _unhandled_input]). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Emitted when the node is renamed. - - - - - Emitted when Node enters the tree. - - - - - Emitted when Node exits the tree. - - - - - - - - - - - - - - - - Notification received every frame when the process flag is set (see [method set_process]). - - - 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 received when a node is unparented (parent removed it from the list of children). - - - - - - - - - - - - - - - - - - - - - - - Call a method remotely. - - - Call a method both remotely and locally. - - - Call a method if the Node is Master. - - - Call a method if the Node is Slave. - - - Inherits pause mode from parent. For root node, it is equivalent to PAUSE_MODE_STOP. - - - Stop processing when SceneTree is paused. - - - Continue to process regardless of SceneTree pause state. - - - - - - - - - - - - - - A 2D game object, parent of all 2D related nodes. Has a position, rotation, scale and Z-index. - - - A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order. - - - - - - - - - Multiplies the current scale by the 'ratio' vector. - - - - - - - - - Set the pivot position of the 2D node to 'pivot' value. Only some Node2Ds implement this method. - - - - - - - - - Returns the angle between the node and the 'point' in radians. - - - - - - - Returns the node's global position. - - - - - - - Returns the node's global rotation in radians. - - - - - - - Return the node's global rotation in degrees. - - - - - - - Returns the node's global scale. - - - - - - - Returns the node's position. - - - - - - - - - Returns the [Transform2D] relative to this node's parent. - - - - - - - Returns the node's rotation in radians. - - - - - - - Returns the node's rotation in degrees. - - - - - - - Returns the node's scale. - - - - - - - Returns the node's Z-index. - - - - - - - - - Adds the 'offset' vector to the node's global position. - - - - - - - Returns true if this node's Z-index is relative to its parent's. Else, returns false. - - - - - - - - - Rotates the node so it points towards the 'point'. - - - - - - - - - - - Apply a local translation on the node's X axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement. - - - - - - - - - - - Apply a local translation on the node's Y axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement. - - - - - - - - - Apply a rotation to the node, in radians, starting from its current rotation. - - - - - - - - - Set the node's global position. - - - - - - - - - Set the node's global rotation in radians. - - - - - - - - - Set the node's global rotation in degrees. - - - - - - - - - Set the node's global scale. - - - - - - - - - Set the node's global [Transform2D]. - - - - - - - - - Set the node's position. - - - - - - - - - Set the node's rotation in radians. - - - - - - - - - Set the node's rotation in degrees. - - - - - - - - - Set the node's scale. - - - - - - - - - Set the node's local [Transform2D]. - - - - - - - - - Set the node's Z-index. - - - - - - - - - Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. - - - - - - - - - - - - - - - - - - - - - - - - - Translate the node locally by the 'offset' vector, starting from its current local position. - - - - - - Global position. - - - Global rotation in radians. - - - Global rotation in degrees. - - - Global scale. - - - Global [Transform2D]. - - - Position, relative to the node's parent. - - - Rotation in radians. - - - Rotation in degrees. - - - Rotation in degrees. - - - Local [Transform2D]. - - - Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others. - - - Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. - - - - - - - - Pre-parsed scene tree path. - - - A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code] would refer to the size property of the texture resource on the node named "Sprite" which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name. - You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]@"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful. - A [NodePath] is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource. - - - - - - - - - Create a NodePath from a string, e.g. "Path2D/PathFollow2D/Sprite:texture:size". A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent. - - - - - - - - - Get the node name indicated by [code]idx[/code] (0 to [method get_name_count]) - - - - - - - Get the number of node names which make up the path. - - - - - - - Get the path's property name, or an empty string if the path doesn't have a property. - - - - - - - - - Get the resource name indicated by [code]idx[/code] (0 to [method get_subname_count]) - - - - - - - Get the number of resource names in the path. - - - - - - - Return true if the node path is absolute (not relative). - - - - - - - Return true if the node path is empty. - - - - - - - - - Operating System functions. - - - Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: mouse grabbing, mouse cursors, clipboard, video mode, date and time, timers, environment variables, execution of binaries, command line, etc. - - - - - - - - - - - Displays a modal dialog box utilizing the host OS. - - - - - - - Return true if the host OS allows drawing. - - - - - - - Returns if the current host platform is using multiple threads. - - - - - - - - - Delay executing of the current thread by given milliseconds. - - - - - - - - - Delay executing of the current thread by given microseconds. - - - - - - - - - Dumps the memory allocation ringlist to a file (only works in debug). - Entry format per line: "Address - Size - Description" - - - - - - - - - Dumps all used resources to file (only works in debug). - Entry format per line: "Resource Type : Resource Location" - At the end of the file is a statistic of all used Resource Types. - - - - - - - - - - - - - - - Execute the binary file in given path, optionally blocking until it returns. A process ID is returned. - - - - - - - - - Returns the scancode of the given string (e.g. "Escape") - - - - - - - Returns true if the current window is borderless. - - - - - - - Get clipboard from the host OS. - - - - - - - Return the commandline passed to the engine. - - - - - - - Returns the current screen index (0 padded). - - - - - - - Return the absolute directory path of user data path([user://]). - - - - - - - - - Returns current date as a dictionary of keys: year, month, day, weekday, dst (daylight savings time). - - - - - - - - - Returns current datetime as a dictionary of keys: year, month, day, weekday, dst (daylight savings time), hour, minute, second. - - - - - - - - - Get a dictionary of time values when given epoch time. - Dictionary Time values will be a union of values from [method get_time] and [method get_date] dictionaries (with the exception of dst = day light standard time, as it cannot be determined from epoch). - - - - - - - Return the total amount of dynamic memory used (only works in debug). - - - - - - - - - Return an environment variable. - - - - - - - Return the path to the current engine executable. - - - - - - - - - - - - - Returns the current latin keyboard variant as a String. - Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO" or "ERROR" - - - - - - - Return the host OS locale. - - - - - - - Returns the model name of the current device. - - - - - - - Return the name of the host OS. Possible values are: "Android", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11". - - - - - - - - - - - - - - - - - - - - - - - - - Returns the game process ID - - - - - - - Returns the number of cores available in the host machine. - - - - - - - - - Returns the given scancode as a string (e.g. Return values: "Escape", "Shift+Escape"). - - - - - - - Returns the number of displays attached to the host machine - - - - - - - - - Returns the dots per inch density of the specified screen. - - On Android Devices, the actual screen densities are grouped into six generalized densities: - ldpi - 120 dpi - mdpi - 160 dpi - hdpi - 240 dpi - xhdpi - 320 dpi - xxhdpi - 480 dpi - xxxhdpi - 640 dpi - - - - - - - Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class. - - - - - - - - - - - - - - - - - Returns the dimensions in pixels of the specified screen. - - - - - - - - - - - - - Return the max amount of static memory used (only works in debug). - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the amount of time passed in milliseconds since the engine started. - - - - - - - - - Returns current time as a dictionary of keys: hour, minute, second - - - - - - - - - - - - - - - - - - - Return the current unix timestamp. - - - - - - - - - Get an epoch time value from a dictionary of time values. - [code]datetime[/code] must be populated with the following keys: year, month, day, hour, minute, second. - You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight savings time (dst), if present, is ignored. - - - - - - - Returns the window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. - - - - - - - Returns the size of the window (without counting window manager decorations). - - - - - - - - - Return true if an environment variable exists. - - - - - - - - - - - - - Returns true if the platform has a virtual keyboard, false otherwise. - - - - - - - Hides the virtual keyboard if it is shown, does nothing otherwise. - - - - - - - - - - - - - Return true if low cpu usage mode is enabled. - - - - - - - Returns whether the screen is being kept on or not. - - - - - - - - - - - - - - - - - - - - - Return true if the engine was executed with -v (verbose stdout). - - - - - - - - - - - - - Returns whether the window is in fullscreen mode or not. - - - - - - - Return true if the window is maximized. - - - - - - - Return true if the window is minimized. - - - - - - - Returns whether the window is resizable or not. - - - - - - - - - Kill a process ID (this method can be used to kill processes that were not spawned by the game). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX. - - - - - - - - - - - - - - - - - Set clipboard to the OS. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS) - - - - - - - - - Set to true to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. This way, editors using the engine UI only use very little cpu. - - - - - - - - - Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sets window fullscreen mode to the [i]enabled[/i] argument, [i]enabled[/i] is a toggle for the fullscreen mode, calling the function with [i]enabled[/i] true when the screen is not on fullscreen mode will cause the screen to go to fullscreen mode, calling the function with [i]enabled[/i] false when the screen is in fullscreen mode will cause the window to exit the fullscreen mode. - - - - - - - - - Set the window size to maximized. - - - - - - - - - Set whether the window is minimized. - - - - - - - - - Sets the position of the window to the specified position (this function could be restricted by the window manager, meaning that there could be some unreachable areas of the screen). - - - - - - - - - Set the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings. - - - - - - - - - Sets the window size to the specified size. - - - - - - - - - Sets the window title to the specified string. - - - - - - - - - - - - - - - - - Shows the virtual keyboard if the platform has one. The [i]existing_text[/i] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for all non built-in types. - - - Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class. - Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++). - Some derivates add memory management, such as [Reference] (which keeps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted. - Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them. - Objects also receive notifications ([method _notification]). Notifications are a simple way to notify the object about simple events, so they can all be handled together. - - - - - - - - - Return a property, return null if the property does not exist. - - - - - - - Return the property list, array of dictionaries, dictionaries must contain: name:String, type:int (see TYPE_* enum in [@Global Scope]) and optionally: hint:int (see PROPERTY_HINT_* in [@Global Scope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@Global Scope]). - - - - - - - - - - - - - - - Notification request, the notification id is received. - - - - - - - - - - - Set a property. Return true if the property was found. - - - - - - - - - - - Add a user signal (can be added anytime). Arguments are optional, but can be added as an array of dictionaries, each containing "name" and "type" (from [@Global Scope] TYPE_*). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return true if this object can translate strings. - - - - - - - - - - - - - - - - - Connect a signal to a method at a target (member function). Binds are optional and are passed as extra arguments to the call. Flags specify optional deferred or one shot connections, see enum CONNECT_*. A signal can only be connected once to a method, and it will throw an error if already connected. If you want to avoid this, use [method is_connected] to check. - - - - - - - - - - - - - Disconnect a signal from a method. - - - - - - - - - - - - - - - - - - - - - - - Get a property from the object. - - - - - - - Return the class of the object as a string. - - - - - - - Returns an [Array] of dictionaries with informations about signals that are connected to this object. - Inside each [Dictionary] there are 3 fields: - - "source" is a reference to signal emitter. - - "signal_name" is name of connected signal. - - "method_name" is a name of method to which signal is connected. - - - - - - - Return the instance ID. All objects have a unique instance ID. - - - - - - - - - Return a metadata from the object. - - - - - - - Return the list of metadata in the object. - - - - - - - - - - - - - Return the list of properties as an array of dictionaries, dictionaries contain: name:String, type:int (see TYPE_* enum in [@Global Scope]) and optionally: hint:int (see PROPERTY_HINT_* in [@Global Scope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@Global Scope]). - - - - - - - Return the object script (or null if it doesn't have one). - - - - - - - - - - - - - - - Return the list of signals as an array of dictionaries. - - - - - - - - - Return true if a metadata is found with the requested name. - - - - - - - - - - - - - - - - - - - - - - - Return true if signal emission blocking is enabled. - - - - - - - - - Check the class of the object against a string (including inheritance). - - - - - - - - - - - - - Return true if a connection exists for a given signal and target/method. - - - - - - - - - - - - - - - - - Notify the object of something. - - - - - - - - - - - - - - - - - Set property into the object. - - - - - - - - - If set to true, signal emission is blocked. - - - - - - - - - Define whether this object can translate strings (with calls to [method tr]). Default is true. - - - - - - - - - - - Set a metadata into the object. Metadata is serialized. Metadata can be [i]anything[/i]. - - - - - - - - - Set a script into the object, scripts extend the object functionality. - - - - - - - - - Translate a message. Only works if message translation is enabled (which it is by default). See [method set_message_translation]. - - - - - - - - - - - - Called right when the object is initialized. Not available in script. - - - Called before the object is about to be deleted. - - - Connect a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time. - - - Persisting connections are saved when the object is serialized to file. - - - One shot connections disconnect themselves after emission. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OmniDirectional Light, such as a light bulb or a candle. - - - An OmniDirectional light is a type of [Light] node that emits lights in all directions. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Button control that provides selectable options when pressed. - - - OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text. - - - - - - - - - - - - - Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. - - - - - - - - - - - Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. - - - - - - - Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. - - - - - - - Clear all the items in the [OptionButton]. - - - - - - - Return the amount of items in the OptionButton. - - - - - - - - - Return the icon of the item at index "idx". - - - - - - - - - Return the ID of the item at index "idx". - - - - - - - - - - - - - - - - - Return the text of the item at index "idx". - - - - - - - Return the current item index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select an item by index and make it the current item. - - - - - - - - - - - - - - - - - - - - - Set the icon of an item at index "idx". - - - - - - - - - - - Set the ID of an item at index "idx". - - - - - - - - - - - - - - - - - - - - - Set the text of an item at index "idx". - - - - - - - - - - - - - - - This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Optimized translation. - - - Optimized translation. Uses real-time compressed translations, which results in very small dictionaries. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TODO: explain ownership, and that node does not need to own itself - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Pack will ignore any sub-nodes not owned by given node. See [method Node.set_owner]. - - - - - - - - - - - - - - - - - - - Abstraction and base class for packet-based protocols. - - - PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering. - - - - - - - Return the number of packets currently available in the ring-buffer. - - - - - - - Get a raw packet. - - - - - - - Return the error state of the last packet received (via [method get_packet] and [method get_var]). - - - - - - - Get a Variant. - - - - - - - - - - - - - - - Send a raw packet. - - - - - - - - - Send a Variant as a packet. - - - - - - - - - - - - - - - - - Wrapper to use a PacketPeer over a StreamPeer. - - - PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the [StreamPeer] object to be wrapped. - - - - - - - - - UDP packet peer. - - - UDP packet peer. Can be used to send raw UDP packets as well as [Variant]\ s. - - - - - - - Close the UDP socket the [PacketPeerUDP] is currently listening on. - - - - - - - Return the IP of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]). - - - - - - - Return the port of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]). - - - - - - - Return whether this [PacketPeerUDP] is listening. - - - - - - - - - - - - - Make this [PacketPeerUDP] listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size". - If "bind_address" is set as "*" (default), the peer will listen on all available addresses (both IPv4 and IPv6). - If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the peer will listen on all available addresses matching that IP type. - If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). - - - - - - - - - - - Set the destination address and port for sending packets and variables, a hostname will be resolved using if valid. - - - - - - - Wait for a packet to arrive on the listening port, see [method listen]. - - - - - - - - - Provides an opaque background for [Control] children. - - - Panel is a [Control] that displays an opaque background. It's commonly used as a parent and container for other types of [Control] nodes. - - - - - - - - - - - - - - - - - Panel container type. - - - Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A node used to create a parallax scrolling background. - - - A ParallaxBackground will use one or more [ParallaxLayer] nodes to create a parallax scrolling background. Each [ParallaxLayer] can be set to move at different speeds relative to the camera movement, this can be used to create an illusion of depth in a 2D game. - - - - - - - Return the beginning limit. - - - - - - - Return the ending limit. - - - - - - - Return the base offset. - - - - - - - Return the base motion scale. - - - - - - - - - - - - - Return ignoring camera zoom. - - - - - - - - - Set to true for all child [ParallaxLayer] nodes to not be affected by the zoom level of the camera. - - - - - - - - - Set the left and top limits in pixels for scrolling to begin. If the camera is outside of this limit the background will not continue to scroll. If an axis is greater than or equal to the corresponding axis of limit_end, then it will not limit scrolling for that axis. - - - - - - - - - Set the right and bottom limits in pixels for scrolling to end. If the camera is outside of this limit the background will not continue to scroll. If an axis is less than or equal to the corresponding axis of limit_begin, then it will not limit scrolling for that axis. - - - - - - - - - Set the base offset in pixels of all children [ParallaxLayer] nodes. - - - - - - - - - Set the base motion scale of all children [ParallaxLayer] nodes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A parallax scrolling layer to be used with [ParallaxBackground]. - - - A ParallaxLayer must be the child of a [ParallaxBackground] node. All child nodes will be affected by the parallax scrolling of this layer. - - - - - - - Return the mirroring of the ParallaxLayer. - - - - - - - - - - - - - Return the motion scale of the ParallaxLayer. - - - - - - - - - Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring. - - - - - - - - - - - - - - - - - Set the motion scale of the ParallaxLayer. If an axis is set to 0 then it will not move at all, it will stick with the camera. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2D Particle emitter - - - Particles2D is a particle system 2D [Node] that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility bounding box (although helpers to create one automatically exist). - - - - - - - - - - - - - Returns the amount of particles spawned at each emission - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gets the amount of seconds that each particle will be visible. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns the texture for emitted particles - - - - - - - - - - - - - - - - - - - - - - - - - Returns whether this emitter is currently emitting or not - - - - - - - - - - - - - - - Sets the amount of particles spawned at each emission - - - - - - - - - - - - - - - - - If this is set to true then the particle emitter will emit particles, if its false it will not. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sets the amount of seconds that each particle will be visible. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Container for a [Curve3D]. - - - This class is a container/Node-ification of a [Curve3D], so it can have [Spatial] properties and [Node] info. - - - - - - - Returns the [Curve3D] contained. - - - - - - - - - Sets the [Curve3D]. - - - - - - - - - - - - - Container for a [Curve2D]. - - - This class is a container/Node-ification of a [Curve2D], so it can have [Node2D] properties and [Node] info. - - - - - - - Returns the [Curve2D] contained. - - - - - - - - - Sets the [Curve2D]. - - - - - - - - - - - - - Point sampler for a [Path]. - - - This node takes its parent [Path], and returns the coordinates of a point within it, given a distance from the first vertex. - It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly. - - - - - - - This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly. - - - - - - - Returns the X displacement this node has from its parent [Path]. - - - - - - - Returns the distance along the path in 3D units. - - - - - - - Returns the rotation mode. The constants below list which axes are allowed to rotate for each mode. - - - - - - - Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). - - - - - - - Returns the Y displacement this node has from its parent [Path]. - - - - - - - Returns whether this node wraps its offsets around, or truncates them to the path ends. - - - - - - - - - The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. - There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. - This method controls whether the position between two cached points is interpolated linearly, or cubicly. - - - - - - - - - Moves this node in the X axis. As this node's position will be set every time its offset is set, this allows many PathFollow to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset. - A similar effect may be achieved moving the this node's descendants. - - - - - - - - - If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths. - - - - - - - - - Sets the distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path. - - - - - - - - - Allows or forbids rotation on one or more axes, per the constants below. - - - - - - - - - Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. - - - - - - - - - Moves this node in the Y axis, for the same reasons of [method set_h_offset]. - - - - - - Forbids the PathFollow to rotate. - - - Allows the PathFollow to rotate in the Y axis only. - - - Allows the PathFollow to rotate in both the X, and Y axes. - - - Allows the PathFollow to rotate in any axis. - - - - - - Point sampler for a [Path2D]. - - - This node takes its parent [Path2D], and returns the coordinates of a point within it, given a distance from the first vertex. - It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly. - - - - - - - This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly. - - - - - - - Returns the horizontal displacement this node has from its parent [Path2D]. - - - - - - - Returns the distance along the path in pixels. - - - - - - - Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). - - - - - - - Returns the vertical displacement this node has from its parent [Path2D]. - - - - - - - Returns whether this node wraps its offsets around, or truncates them to the path ends. - - - - - - - Returns whether this node rotates to follow the path. - - - - - - - - - The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. - There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. - This method controls whether the position between two cached points is interpolated linearly, or cubicly. - - - - - - - - - Moves this node horizontally. As this node's position will be set every time its offset is set, this allows many PathFollow2D to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset. - A similar effect may be achieved moving this node's descendants. - - - - - - - - - If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths. - - - - - - - - - Sets the distance from the first vertex, measured in pixels along the path. This sets this node's position to a point within the path. - - - - - - - - - If set, this node rotates to follow the path, making its descendants rotate. - - - - - - - - - Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. - - - - - - - - - Moves the PathFollow2D vertically, for the same reasons of [method set_h_offset]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Direct access object to a physics body in the [Physics2DServer]. - - - Direct access object to a physics body in the [Physics2DServer]. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. - - - - - - - Return the angular velocity of the body. - - - - - - - - - Return the [RID] of the collider. - - - - - - - - - Return the object id of the collider. - - - - - - - - - Return the collider object, this depends on how it was created (will return a scene node if such was used to create it). - - - - - - - - - Return the contact position in the collider. - - - - - - - - - Return the collider shape index. - - - - - - - - - Return the metadata of the collided shape. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - - - - - - - - - Return the linear velocity vector at contact point of the collider. - - - - - - - Return the amount of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts. - - - - - - - - - Return the local normal (of this body) of the contact point. - - - - - - - - - Return the local position (of this body) of the contact point. - - - - - - - - - Return the local shape index of the collision. - - - - - - - Return the inverse of the inertia of the body. - - - - - - - Return the inverse of the mass of the body. - - - - - - - Return the current linear velocity of the body. - - - - - - - Return the current state of space, useful for queries. - - - - - - - Return the timestep (delta) used for the simulation. - - - - - - - Return the rate at which the body stops rotating, if there are not any other forces moving it. - - - - - - - Return the total gravity vector being currently applied to this body. - - - - - - - Return the rate at which the body stops moving, if there are not any other forces moving it. - - - - - - - Return the transform matrix of the body. - - - - - - - Call the built-in force integration code. - - - - - - - Return true if this body is currently sleeping (not active). - - - - - - - - - Change the angular velocity of the body. - - - - - - - - - Change the linear velocity of the body. - - - - - - - - - Set the sleeping state of the body, only affects character/rigid bodies. - - - - - - - - - Change the transform matrix of the body. - - - - - - - - - Software implementation of [Physics2DDirectBodyState]. - - - Software implementation of [Physics2DDirectBodyState]. This object exposes no new methods or properties and should not be used, as [Physics2DDirectBodyState] selects the best implementation available. - - - - - - - - - Direct access object to a space in the [Physics2DServer]. - - - Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space. - - - - - - - - - Check whether the shape can travel to a point. If it can, the method will return an array with two floats: The first is the distance the shape can move in that direction without colliding, and the second is the distance at which it will collide. - If the shape can not move, the array will be empty. - - - - - - - - - - - Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. - - - - - - - - - Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] 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: - pointo: Place where the shapes intersect. - normal: Normal of the object at the point where the shapes intersect. - shape: Shape index within the object against which the shape intersected. - metadata: Metadata of the shape against which the shape intersected. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - collider_id: Id of the object against which the shape intersected. - collider: Object against which the shape intersected. - rid: [RID] of the object against which the shape intersected. - linear_velocity: The movement vector of the object the shape intersected, if it was a body. If it was an area, it is (0,0). - If the shape did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead. - - - - - - - - - - - - - - - - - Check whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: - shape: Shape index within the object the point is in. - metadata: Metadata of the shape the point is in. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - collider_id: Id of the object the point is in. - collider: Object the point is inside of. - rid: [RID] of the object the point is in. - Additionally, the method can take an array of objects or [RID]\ s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants). - - - - - - - - - - - - - - - - - Intersect a ray in a given space. The returned object is a dictionary with the following fields: - position: Place where ray is stopped. - normal: Normal of the object at the point where the ray was stopped. - shape: Shape index within the object against which the ray was stopped. - metadata: Metadata of the shape against which the ray was stopped. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - collider_id: Id of the object against which the ray was stopped. - collider: Object against which the ray was stopped. - rid: [RID] of the object against which the ray was stopped. - If the ray did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead. - Additionally, the method can take an array of objects or [RID]\ s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants). - - - - - - - - - - - Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: - shape: Shape index within the object the shape intersected. - metadata: Metadata of the shape intersected by the shape given through the [Physics2DShapeQueryParameters]. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - collider_id: Id of the object the shape intersected. - collider: Object the shape intersected. - rid: [RID] of the object the shape intersected. - The number of intersections can be limited with the second parameter, to reduce the processing time. - - - - - - Check for collisions with static bodies. - - - Check for collisions with kinematic bodies. - - - Check for collisions with rigid bodies. - - - Check for collisions with rigid bodies in character mode. - - - Check for collisions with areas. - - - Check for collisions with any kind of bodies (but not areas). - - - - - - Physics 2D Server. - - - Physics 2D Server is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. - - - - - - - - - - - - - Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. - - - - - - - - - - - Assign the area to a descendant of [Object], so it can exist in the node tree. - - - - - - - - - Remove all shapes from an area. It does not delete the shapes, so they can be reassigned later. - - - - - - - Create an [Area2D]. - - - - - - - - - Get the instance ID of the object the area is assigned to. - - - - - - - - - - - Return an area parameter value. - - - - - - - - - - - Return the [RID] of the nth shape of an area. - - - - - - - - - Return the number of shapes assigned to an area. - - - - - - - - - - - Return the transform matrix of a shape within an area. - - - - - - - - - Return the space assigned to the area. - - - - - - - - - Return the space override mode for the area. - - - - - - - - - Return the transform matrix for an area. - - - - - - - - - - - Remove a shape from an area. It does not delete the shape, so it can be reassigned later. - - - - - - - - - - - Assign the area to one or many physics layers. - - - - - - - - - - - Set which physics layers the area will monitor. - - - - - - - - - - - - - Set the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: - 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. - 2: [RID] of the object that entered/exited the area. - 3: Instance ID of the object that entered/exited the area. - 4: The shape index of the object that entered/exited the area. - 5: The shape index of the area where the object entered/exited. - - - - - - - - - - - - - Set the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants. - - - - - - - - - - - - - Substitute a given area shape by another. The old shape is selected by its index, the new one by its [RID]. - - - - - - - - - - - - - - - - - - - - - - - - - Set the transform matrix for an area shape. - - - - - - - - - - - Assign a space to the area. - - - - - - - - - - - Set the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*. - - - - - - - - - - - Set the transform matrix for an area. - - - - - - - - - - - Add a body to the list of bodies exempt from collisions. - - - - - - - - - - - - - Add a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. - - - - - - - - - - - - - Add a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. - - - - - - - - - - - - - Add a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. - - - - - - - - - - - Assign the area to a descendant of [Object], so it can exist in the node tree. - - - - - - - - - Remove all shapes from a body. - - - - - - - - - - - Create a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. - - - - - - - - - Return the physics layer or layers a body belongs to. - - - - - - - - - Return the physics layer or layers a body can collide with. - - - - - - - - - Return the continuous collision detection mode. - - - - - - - - - Return the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. - - - - - - - - - Return the body mode. - - - - - - - - - Get the instance ID of the object the area is assigned to. - - - - - - - - - - - Return the value of a body parameter. - - - - - - - - - - - Return the [RID] of the nth shape of a body. - - - - - - - - - Return the number of shapes assigned to a body. - - - - - - - - - - - Return the metadata of a shape of a body. - - - - - - - - - - - Return the transform matrix of a body shape. - - - - - - - - - Return the [RID] of the space assigned to a body. - - - - - - - - - - - Return a body state. - - - - - - - - - Return whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). - - - - - - - - - - - Remove a body from the list of bodies exempt from collisions. - - - - - - - - - - - Remove a shape from a body. The shape is not deleted, so it can be reused afterwards. - - - - - - - - - - - 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. - - - - - - - - - - - Set the physics layer or layers a body belongs to. - - - - - - - - - - - Set the physics layer or layers a body can collide with. - - - - - - - - - - - Set the continuous collision detection mode from any of the CCD_MODE_* constants. - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. - - - - - - - - - - - - - - - Set the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force integration]). - - - - - - - - - - - Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. - - - - - - - - - - - Set the body mode, from one of the constants BODY_MODE*. - - - - - - - - - - - Set whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). - - - - - - - - - - - - - Set a body parameter (see BODY_PARAM* constants). - - - - - - - - - - - - - Substitute a given body shape by another. The old shape is selected by its index, the new one by its [RID]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries. - - - - - - - - - - - - - Set the transform matrix for a body shape. - - - - - - - - - - - Assign a space to the body (see [method create_space]). - - - - - - - - - - - - - Set a body state (see BODY_STATE* constants). - - - - - - - - - - - - - - - - - Return whether a body can move from a given point in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in. - - - - - - - - - - - - - - - Create a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself. - - - - - - - - - - - Return the value of a damped spring joint parameter. - - - - - - - - - - - - - Set a damped spring joint parameter. Parameters are explained in the DAMPED_STRING* constants. - - - - - - - - - Destroy any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console. - - - - - - - - - Return information about the current state of the 2D physics engine. The states are listed under the INFO_* constants. - - - - - - - - - - - - - - - - - Create a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself. - - - - - - - - - - - Return the value of a joint parameter. - - - - - - - - - Return the type of a joint (see JOINT_* constants). - - - - - - - - - - - - - Set a joint parameter. Parameters are explained in the JOINT_PARAM* constants. - - - - - - - - - - - - - Create a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself. - - - - - - - - - Activate or deactivate the 2D physics engine. - - - - - - - - - Create a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. - - - - - - - - - Return the shape data. - - - - - - - - - Return the type of shape (see SHAPE_* constants). - - - - - - - - - - - Set the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. - - - - - - - Create a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. - - - - - - - - - Return the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries. - - - - - - - - - - - Return the value of a space parameter. - - - - - - - - - Return whether the space is active. - - - - - - - - - - - Mark a space as active. It will not have an effect, unless it is assigned to an area or body. - - - - - - - - - - - - - Set the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants. - - - - - - Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. - - - Constant to set/get the maximum distance a shape can be from another before they are considered separated. - - - Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. - - - - - - - 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. - - - 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. - - - 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. - - - 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. - - - 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. - - - 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. - - - 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. - - - 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 [method CollisionPolygon2D.set_polygon], polygons modified with [method shape_set_data] do not verify that the points supplied form, in fact, a convex polygon. - - - 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. - - - This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. - - - Constant to set/get gravity strength in an area. - - - Constant to set/get gravity vector/center in an area. - - - Constant to set/get whether the gravity vector of an area is a direction, or a center point. - - - 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. - - - This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. - - - Constant to set/get the linear dampening factor of an area. - - - Constant to set/get the angular dampening factor of an area. - - - Constant to set/get the priority (order of processing) of an area. - - - This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. - - - 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. - - - 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. - - - This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. - - - This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. - - - Constant for static bodies. - - - Constant for kinematic bodies. - - - Constant for rigid bodies. - - - Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. - - - Constant to set/get a body's bounce factor. - - - Constant to set/get a body's friction. - - - Constant to set/get a body's mass. - - - Constant to set/get a body's inertia. - - - Constant to set/get a body's gravity multiplier. - - - Constant to set/get a body's linear dampening factor. - - - Constant to set/get a body's angular dampening factor. - - - This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. - - - Constant to set/get the current transform matrix of the body. - - - Constant to set/get the current linear velocity of the body. - - - Constant to set/get the current angular velocity of the body. - - - Constant to sleep/wake up a body, or to get whether it is sleeping. - - - Constant to set/get whether the body can sleep. - - - Constant to create pin joints. - - - Constant to create groove joints. - - - Constant to create damped spring joints. - - - Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. - - - Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. - - - 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). - - - Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. - - - Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. - - - Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. - - - The value of the first parameter and area callback function receives, when an object enters one of its shapes. - - - The value of the first parameter and area callback function receives, when an object exits one of its shapes. - - - Constant to get the number of objects that are not sleeping. - - - Constant to get the number of possible collisions. - - - Constant to get the number of space regions where a collision could occur. - - - - - - Software implementation of [Physics2DServer]. - - - Software implementation of [Physics2DServer]. This class exposes no new methods or properties and should not be used, as [Physics2DServer] automatically selects the best implementation available. - - - - - - - - - Parameters to be sent to a 2D shape physics query. - - - This class contains the shape and other parameters for intersection/collision queries. - - - - - - - Return the physics layer the shape belongs to. - - - - - - - Return the list of objects, or object [RID]\ s, that will be excluded from collisions. - - - - - - - Return the collision margin for the shape. - - - - - - - Return the current movement speed of the shape. - - - - - - - Return the type of object the shape belongs to. - - - - - - - Return the [RID] of the shape queried. - - - - - - - Return the transform matrix of the shape queried. - - - - - - - - - Set the physics layer the shape belongs to. - - - - - - - - - Set the list of objects, or object [RID]\ s, that will be excluded from collisions. - - - - - - - - - Set the collision margin for the shape. A collision margin is an amount (in pixels) that the shape will grow when computing collisions, to account for numerical imprecision. - - - - - - - - - Set the current movement speed of the shape. - - - - - - - - - Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK_*). - - - - - - - - - Set the [Shape2D] that will be used for collision/intersection queries. - - - - - - - - - Set the [RID] of the shape to be used in queries. - - - - - - - - - Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for different types of Physics bodies. - - - PhysicsBody is an abstract base class for implementing a physics body. All PhysicsBody types inherit from it. - - - - - - - - - Adds a body to the collision exception list. This list contains bodies that this body will not collide with. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Removes a body from the collision exception list. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for all objects affected by physics. - - - PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it. - - - - - - - - - - - - - - - Return the physics layer this area is in. - - - - - - - - - Return an individual bit on the collision mask. - - - - - - - Return the physics layers this area can scan for collisions. - - - - - - - - - Return an individual bit on the collision mask. - - - - - - - - - - - - - - - - - Set the physics layers this area is in. - Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask]. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. - - - - - - - - - - - Set/clear individual bits on the layer mask. This makes getting a body in/out of only one layer easier. - - - - - - - - - Set the physics layers this area can scan for collisions. - - - - - - - - - - - Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. - - - 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. - - - 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. - - - This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. - - - This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Result of a shape query in Physics2DServer. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Pin Joint for 2D Shapes. - - - Pin Joint for 2D Rigid Bodies. It pins 2 bodies (rigid or static) together, or a single body to a fixed position in space. - - - - - - - - - - - - - - - - - - - - - - - - - - - Plane in hessian form. - - - Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. - - - - - - - - - - - - - - - Creates a plane from the three parameters "a", "b", "c" and "d". - - - - - - - - - - - - - Creates a plane from three points. - - - - - - - - - - - Creates a plane from the normal and the plane's distance to the origin. - - - - - - - Returns the center of the plane. - - - - - - - - - Returns the shortest distance from the plane to the position "point". - - - - - - - Returns a point on the plane. - - - - - - - - - - - Returns true if "point" is inside the plane (by a very minimum threshold). - - - - - - - - - - - Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned. - - - - - - - - - - - Returns the intersection point of a ray consisting of the position "from" and the direction normal "dir" with this plane. If no intersection is found null is returned. - - - - - - - - - - - Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned. - - - - - - - - - Returns true if "point" is located above the plane. - - - - - - - Returns a copy of the plane, normalized. - - - - - - - - - Returns the orthogonal projection of point "p" into a point in the plane. - - - - - - - - - - - - - - - - - - - - - Class representing a planar [PrimitiveMesh]. - - - Class representing a planar [PrimitiveMesh]. This flat mesh does not have a thickness. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Size of the generated plane. Defaults to (2.0, 2.0). - - - Number of subdivision along the z-axis. Defaults to 0. - - - Number of subdivision along the x-axis. Defaults to 0. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2D polygon representation - - - A Polygon2D is defined by a set of n vertices connected together by line segments, meaning that the vertex 1 will be connected with vertex 2, vertex 2 with vertex 3 ..., vertex n-1 with vertex n and vertex n with vertex 1 in order to close the loop and define a polygon. - - - - - - - - - - - - - Return the polygon fill color. - - - - - - - Return whether this polygon is inverted or not. - - - - - - - Return the added padding around the bounding box. - - - - - - - Return the offset for the polygon vertices. - - - - - - - Return the set of vertices that defines this polygon. - - - - - - - Return the polygon texture - - - - - - - Return the polygon texture offset. - - - - - - - Return the rotation in radians of the texture polygon. - - - - - - - Return the uv coordinate multiplier. - - - - - - - Return the texture coordinates associated with every vertex of the polygon. - - - - - - - Return the list of vertex colors. - - - - - - - - - - - - - - - - - Set the polygon fill color. If the polygon has a texture defined, the defined texture will be multiplied by the polygon fill color. This, also, is the default color for those vertices that are not defined by [method get_vertex_colors]. - - - - - - - - - Set the polygon as the defined polygon bounding box minus the defined polygon (the defined polygon will appear as a hole on the square that contains the defined polygon). - - - - - - - - - Add extra padding around the bounding box, making it bigger. Too small a value can make the polygon triangulate strangely, due to numerical imprecision. - - - - - - - - - Set the an offset that will be added to the vertices' position. E.g. if the offset is set to (10,10) then all the polygon points will move 10 units to the right and 10 units to the bottom. - - - - - - - - - Define the set of vertices that will represent the polygon. - - - - - - - - - - - - - - - - - Set the offset of the polygon texture. Initially the texture will appear anchored to the polygon position, the offset is used to move the texture location away from that point (notice that the texture origin is set to its top left corner, so when offset is 0,0 the top left corner of the texture is at the polygon position), for example setting the offset to 10, 10 will move the texture 10 units to the left and 10 units to the top. - - - - - - - - - Set the amount of rotation of the polygon texture, [code]texture_rotation[/code] is specified in radians and clockwise rotation. - - - - - - - - - Set the value that will multiply the uv coordinates ([method get_uv]) when applying the texture. Larger values make the texture smaller, and vice versa. - - - - - - - - - Set the texture coordinates for every vertex of the polygon. There should be one uv vertex for every vertex in the polygon. If there are less, the undefined ones will be assumed to be (0,0). Extra uv vertices are ignored. - - - - - - - - - Set the color for each vertex of the polygon. There should be one color for every vertex in the polygon. If there are less, the undefined ones will be assumed to be [method get_color]. Extra color entries are ignored. - Colors are interpolated between vertices, resulting in smooth gradients when they differ. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Raw byte array. - - - Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory. - - - - - - - - - Create from a generic array. - - - - - - - Append an element at the end of the array (alias of [method push_back]). - - - - - - - Append a [PoolByteArray] at the end of this array. - - - - - - - - - Returns a new [PoolByteArray] with the data compressed. Set the compression mode using one of [File]'s COMPRESS_* constants. - - - - - - - - - - - Returns a new [PoolByteArray] with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of [File]'s COMPRESS_* constants. - - - - - - - Returns a copy of the array's contents as [String]. Fast alternative to [method PoolByteArray.get_string_from_utf8] if the content is ASCII-only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method PoolByteArray.get_string_from_utf8]. - - - - - - - Returns a copy of the array's contents as [String]. Slower than [method PoolByteArray.get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. - - - - - - - - - - - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). - - - - - Reverse the order of the elements in the array (so first element will now be the last). - - - - - - - Append an element at the end of the array. - - - - - - - Remove an element from the array by index. - - - - - - - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. - - - - - - - - - Change the byte at the given index. - - - - - - - Return the size 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. - - - - - - - - - Array of Colors - - - Array of Color, Contains colors. Optimized for memory usage, can't fragment the memory. - - - - - - - - - Create from a generic array. - - - - - - - Append an element at the end of the array (alias of [method push_back]). - - - - - - - Append a [PoolColorArray] at the end of this array. - - - - - - - - - - - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). - - - - - Reverse the order of the elements in the array (so first element will now be the last). - - - - - - - Append a value to the array. - - - - - - - Remove an element from the array by index. - - - - - - - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. - - - - - - - - - Change the [Color] at the given index. - - - - - - - Return the size of the array. - - - - - - - - - Integer Array. - - - Integer Array. Contains integers. Optimized for memory usage, can't fragment the memory. - - - - - - - - - Create from a generic array. - - - - - - - Append an element at the end of the array (alias of [method push_back]). - - - - - - - Append an [PoolIntArray] at the end of this array. - - - - - - - - - - - Insert a new int at a given position in the array. The position must be valid, or at the end of the array (pos==size()). - - - - - Reverse the order of the elements in the array (so first element will now be the last). - - - - - - - Append a value to the array. - - - - - - - Remove an element from the array by index. - - - - - - - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. - - - - - - - - - Change the int at the given index. - - - - - - - Return the array size. - - - - - - - - - Real Array. - - - Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory. - - - - - - - - - Create from a generic array. - - - - - - - Append an element at the end of the array (alias of [method push_back]). - - - - - - - Append an [RealArray] at the end of this array. - - - - - - - - - - - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). - - - - - Reverse the order of the elements in the array (so first element will now be the last). - - - - - - - Append an element at the end of the array. - - - - - - - Remove an element from the array by index. - - - - - - - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. - - - - - - - - - Change the float at the given index. - - - - - - - Return the size of the array. - - - - - - - - - String Array. - - - String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory. - - - - - - - - - Create from a generic array. - - - - - - - Append an element at the end of the array (alias of [method push_back]). - - - - - - - Append an [StringArray] at the end of this array. - - - - - - - - - - - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). - - - - - Reverse the order of the elements in the array (so first element will now be the last). - - - - - - - - - Returns a [String] with each element of the array joined with the delimiter. - - - - - - - Append a string element at end of the array. - - - - - - - Remove an element from the array by index. - - - - - - - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. - - - - - - - - - Change the [String] at the given index. - - - - - - - Return the size of the array. - - - - - - - - - An Array of Vector2. - - - An Array specifically designed to hold Vector2. - - - - - - - - - Construct a new [PoolVector2Array]. Optionally, you can pass in an Array that will be converted. - - - - - - - Append an element at the end of the array (alias of [method push_back]). - - - - - - - Append an [PoolVector2Array] at the end of this array. - - - - - - - - - - - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). - - - - - Reverse the order of the elements in the array (so first element will now be the last). - - - - - - - Insert a [Vector2] at the end. - - - - - - - Remove an element from the array by index. - - - - - - - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. - - - - - - - - - Change the [Vector2] at the given index. - - - - - - - Return the size of the array. - - - - - - - - - An Array of Vector3. - - - An Array specifically designed to hold Vector3. - - - - - - - - - Construct a new PoolVector3Array. Optionally, you can pass in an Array that will be converted. - - - - - - - Append an element at the end of the array (alias of [method push_back]). - - - - - - - Append an [PoolVector3Array] at the end of this array. - - - - - - - - - - - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). - - - - - Reverse the order of the elements in the array (so first element will now be the last). - - - - - - - Insert a [Vector3] at the end. - - - - - - - Remove an element from the array by index. - - - - - - - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. - - - - - - - - - Change the [Vector3] at the given index. - - - - - - - Return the size of the array. - - - - - - - - - Base container control for popups and dialogs. - - - Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. - - - - - - - Returns whether the popup will hide other popups when shown on the screen. - - - - - - - - - Popup (show the control in modal form). - - - - - - - - - Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by "size". - - - - - - - - - Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than [code]minsize[/code]. - - - - - - - - - Popup (show the control in modal form) in the center of the screen, scaled at a ratio of size of the screen. - - - - - - - - - Make the popup hide other popups when shown on the screen. - - - - - - - - - - - This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context). - - - - - This signal is emitted when a popup is hidden. - - - - - - Notification sent right after the popup is shown. - - - Notification sent right after the popup is hidden. - - - - - - Base class for Popup Dialogs. - - - PopupDialog is a base class for popup dialogs, along with [WindowDialog]. - - - - - - - - - PopupMenu displays a list of options. - - - PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus. - - - - - - - - - - - - - Add a new checkable item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. - - - - - - - - - - - - - - - - - - - - - - - - - - - Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be - created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. - - - - - - - - - - - - - - - - - - - - - - - - - - - Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. - - - - - - - Add a separator between items. Separators also occupy an index. - - - - - - - - - - - - - - - - - - - - - - - - - Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index. - - - - - - - Clear the popup menu, in effect removing all items. - - - - - - - - - Return the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused. - - - - - - - Return the amount of items. - - - - - - - - - Return the icon of the item at index "idx". - - - - - - - - - Return the id of the item at index "idx". - - - - - - - - - Find and return the index of the item containing a given id. - - - - - - - - - Return the metadata of an item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items. - - - - - - - - - - - - - - - - - Return the submenu name of the item at index "idx". - - - - - - - - - Return the text of the item at index "idx". - - - - - - - - - - - - - - - Returns a boolean that indicates whether or not the PopupMenu will hide on checkable item selection. - - - - - - - Returns a boolean that indicates whether or not the PopupMenu will hide on item selection. - - - - - - - - - Return whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. - - - - - - - - - Return the checkstate status of the item at index "idx". - - - - - - - - - Return whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked. - - - - - - - - - Return whether the item is a seperator. If it is, it would be displayed as a line. - - - - - - - - - Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one. - - - - - - - - - Sets whether or not the PopupMenu will hide on checkable item selection. - - - - - - - - - Sets whether or not the PopupMenu will hide on item selection. - - - - - - - - - - - Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused. - - - - - - - - - - - Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. - - - - - - - - - - - Mark the item at index "idx" as a seperator, which means that it would be displayed as a mere line. - - - - - - - - - - - Set the checkstate status of the item at index "idx". - - - - - - - - - - - Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked. - - - - - - - - - - - - - - - - - - - - - Set the id of the item at index "idx". - - - - - - - - - - - Sets the metadata of an item, which might be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items. - - - - - - - - - - - - - - - - - - - - - - - Sets the submenu of the item at index "idx". The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. - - - - - - - - - - - Set the text of the item at index "idx". - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This event is emitted when an item of some id is pressed or its accelerator is activated. - - - - - - - This event is emitted when an item of some index is pressed or its accelerator is activated. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Class for displaying popups with a panel background. - - - Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [WindowDialog]. - - - - - - - - - - - - - Generic 2D Position hint for editing. - - - Generic 2D Position hint for editing. It's just like a plain [Node2D] but displays as a cross in the 2D-Editor at all times. - - - - - - - - - Generic 3D Position hint for editing - - - Generic 3D Position hint for editing. It's just like a plain [Spatial] but displays as a cross in the 3D-Editor at all times. - - - - - - - - - Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. - - - Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. - - - - - - - - - - - - - - - - - - - - - - - - - - The current [Material] of the primitive mesh. - - - - - - - - Class representing a prism-shaped [PrimitiveMesh]. - - - Class representing a prism-shaped [PrimitiveMesh]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Displacement of of the upper edge along the x-axis. 0.0 positions edge straight above the bottome left edge. Defaults to 0.5 (positioned on the midpoint). - - - Size of the prism. Defaults to (2.0, 2.0, 2.0). - - - Number of added edge loops along the z-axis. Defaults to 0. - - - Number of added edge loops along the y-axis. Defaults to 0. - - - Number of added edge loops along the x-axis. Defaults to 0. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - General purpose progress bar. - - - General purpose progress bar. Shows fill percentage from right to left. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Contains global variables accessible from everywhere. - - - Contains global variables accessible from everywhere. Use the normal [Object] API, such as "ProjectSettings.get(variable)", "ProjectSettings.set(variable,value)" or "ProjectSettings.has(variable)" to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. - - - - - - - - - Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String]. - Example: - [codeblock] - ProjectSettings.set("category/property_name", 0) - - var property_info = { - "name": "category/property_name", - "type": TYPE_INT, - "hint": PROPERTY_HINT_ENUM, - "hint_string": "one,two,three" - } - - ProjectSettings.add_property_info(property_info) - [/codeblock] - - - - - - - - - Clear the whole configuration (not recommended, may break things). - - - - - - - - - Return the order of a configuration value (influences when saved to the config file). - - - - - - - - - - - - - - - - - Convert a localized path (res://) to a full native OS path. - - - - - - - - - Return true if a configuration value is present. - - - - - - - - - - - - - - - - - - - - - - - - - Convert a path to a localized path (res:// path). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the order of a configuration value (influences when saved to the config file). - - - - - - - - - General purpose proximity-detection node. - - - General purpose proximity-detection node. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Class representing a square mesh. - - - Class representing a square mesh with size (2,2,0). Consider using a [PlaneMesh] if you require a differently sized plane. - - - - - - - - - Quaternion. - - - Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between two rotations. Multiplying quaternions also cheaply reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues. - - - - - - - - - - - - - - - - - - - - - - - - - Returns a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. - - - - - - - - - Returns the rotation matrix corresponding to the given quaternion. - - - - - - - - - - - - - - - - - - - - - - - Returns the dot product of two quaternions. - - - - - - - Returns the inverse of the quaternion. - - - - - - - Returns whether the quaternion is normalized or not. - - - - - - - Returns the length of the quaternion. - - - - - - - Returns the length of the quaternion, squared. - - - - - - - Returns a copy of the quaternion, normalized to unit length. - - - - - - - - - - - Perform a spherical-linear interpolation with another quaternion. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Handle for a [Resource]'s unique ID. - - - 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 [VisualServer]. - - - - - - - - - Create a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0. - - - - - - - Retrieve the ID of the referenced resource. - - - - - - - - - Abstract base class for range-based controls. - - - Range is a base class for [Control] nodes that change a floating point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar]. - - - - - - - Return value mapped to 0 to 1 range. - - - - - - - Return the maximum value. - - - - - - - Return the minimum value. - - - - - - - Return the page size, if page is 0, paging is disabled. - - - - - - - Return the stepping, if step is 0, stepping is disabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max. - - - - - - - - - - - - - - - - - - - - - - - - - Set minimum value, clamped range value to it if it's less. - - - - - - - - - Set page size. Page is mainly used for scrollbars or anything that controls text scrolling. - - - - - - - - - Set step value. If step is 0, stepping will be disabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This signal is emitted when min, max, range or step change. - - - - - - - This signal is emitted when value changes. - - - - - - - - - Query the closest object intersecting a ray. - - - A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 3D space in order to find the closest object along the path of the ray. - - RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks. - - Only enabled raycasts will be able to query the space and report collisions. - - RayCast calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast. - - - - - - - - - Adds a collision exception so the ray does not report collisions with the specified node. - - - - - - - - - Adds a collision exception so the ray does not report collisions with the specified [RID]. - - - - - - - Removes all collision exceptions for this ray. - - - - - - - Updates the collision information for the ray. - Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. - - - - - - - Return the destination point of this ray object. - - - - - - - Return the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. - Example: - [codeblock] - if RayCast.is_colliding(): - var collider = RayCast.get_collider() - [/codeblock] - - - - - - - Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. - Example: - [codeblock] - if RayCast.is_colliding(): - var shape = RayCast.get_collider_shape() - [/codeblock] - - - - - - - Returns the collision layer for this ray. - - - - - - - Returns the normal of the intersecting object's shape at the collision point. - - - - - - - Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system. - - - - - - - Returns the type mask (types of objects to detect) for this ray. The value is a sum (bitwise OR'd) of constants available for [PhysicsDirectSpaceState]. - - - - - - - Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length). - - - - - - - Returns whether the ray is enabled or not. - - - - - - - - - Removes a collision exception so the ray does report collisions with the specified node. - - - - - - - - - Removes a collision exception so the ray does report collisions with the specified [RID]. - - - - - - - - - Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code]. - - - - - - - - - Set the mask to filter objects. Only objects with at least the same mask element set will be detected. - - - - - - - - - Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions. - - - - - - - - - Set the types of objects to detect. For [code]mask[/code] use a logic sum (OR operation) of constants defined in [PhysicsDirectSpaceState], eg. [code]PhysicsDirectSpaceState.TYPE_MASK_STATIC_BODY | PhysicsDirectSpaceState.TYPE_MASK_KINEMATIC_BODY[/code] to detect only those two types. - - - - - - The ray's destination point, relative to the RayCast's [code]position[/code]. - - - The RayCast's collison layer(s). Only bodies in the same collision layer(s) will be detected. - - - If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. - - - Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState]. - Example: - [codeblock] - RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY - [/codeblock] - - - - - - - - Query the closest object intersecting a ray. - - - A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 2D space in order to find the closest object along the path of the ray. - RayCast2D can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks. - Only enabled raycasts will be able to query the space and report collisions. - RayCast2D calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast. - - - - - - - - - Adds a collision exception so the ray does not report collisions with the specified node. - - - - - - - - - Adds a collision exception so the ray does not report collisions with the specified [RID]. - - - - - - - Removes all collision exceptions for this ray. - - - - - - - Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. - - - - - - - Return the destination point of this ray object. - - - - - - - Returns the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. - Example: - [codeblock] - if RayCast2D.is_colliding(): - var collider = RayCast2D.get_collider() - [/codeblock] - - - - - - - Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. - Example: - [codeblock] - if RayCast2D.is_colliding(): - var shape = RayCast2D.get_collider_shape() - [/codeblock] - - - - - - - Returns the collision layer for this ray. - - - - - - - Returns the normal of the intersecting object's shape at the collision point. - - - - - - - Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system. - - - - - - - Returns whether this ray should hit your parent node, if it's a body. - - - - - - - Returns the type mask (types of objects to detect) for this ray. The value is a sum (bitwise OR'd) of constants available for [Physics2DDirectSpaceState]. - - - - - - - Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length). - - - - - - - Returns whether this raycast is enabled or not. - - - - - - - - - Removes a collision exception so the ray does report collisions with the specified node. - - - - - - - - - Removes a collision exception so the ray does report collisions with the specified [RID]. - - - - - - - - - Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code] - - - - - - - - - Set the mask to filter objects. Only objects with at least the same mask element set will be detected. - - - - - - - - - Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions. - - - - - - - - - Toggle whether this ray should hit your parent node, if it's a body. - - - - - - - - - Set the types of objects to detect. For [code]mask[/code] use a logic sum (OR operation) of constants defined in [Physics2DDirectSpaceState], eg. [code]Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY[/code] to detect only those two types. - - - - - - The ray's destination point, relative to the RayCast's [code]position[/code]. - - - The RayCast2D's collison layer(s). Only bodies in the same collision layer(s) will be detected. - - - If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. - - - If [code]true[/code], the parent node will be excluded from collision detection. Default value: [code]true[/code]. - - - Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState]. - Example: - [codeblock] - RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY - [/codeblock] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ray 2D shape resource for physics. - - - Ray 2D shape resource for physics. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - - - - - - - Return the length of the ray. - - - - - - - - - Set the length of the ray. - - - - - - - - - - - - - 2D Axis-aligned bounding box. - - - Rect2 provides an 2D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. - - - - - - - - - - - Construct a [Rect2] by position and size. - - - - - - - - - - - - - - - Construct a [Rect2] by x, y, width and height. - - - - - - - - - Returns the intersection of this [Rect2] and b. - - - - - - - - - Returns true if this [Rect2] completely encloses another one. - - - - - - - - - Return this [Rect2] expanded to include a given point. - - - - - - - Get the area of the [Rect2]. - - - - - - - - - Return a copy of the [Rect2] grown a given amount of units towards all the sides. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return true if the [Rect2] is flat or empty. - - - - - - - - - Return true if the [Rect2] contains a point. - - - - - - - - - Return true if the [Rect2] overlaps with another. - - - - - - - - - Combine this [Rect2] with another, a larger one is returned that contains both. - - - - - - Ending corner. - - - Position (starting corner). - - - Size from position to end. - - - - - - - - Axis-Aligned Bounding Box. - - - Rect3 provides an 3D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for simple (fast) overlap tests. - - - - - - - - - - - Optional constructor, accepts position and size. - - - - - - - - - Return true if this [Rect3] completely encloses another one. - - - - - - - - - Return this [Rect3] expanded to include a given point. - - - - - - - Get the area of the [Rect3]. - - - - - - - - - Get the position of the 8 endpoints of the [Rect3] in space. - - - - - - - Return the normalized longest axis of the [Rect3]. - - - - - - - Return the index of the longest axis of the [Rect3] (according to [Vector3]::AXIS* enum). - - - - - - - Return the scalar length of the longest axis of the [Rect3]. - - - - - - - Return the normalized shortest axis of the [Rect3]. - - - - - - - Return the index of the shortest axis of the [Rect3] (according to [Vector3]::AXIS* enum). - - - - - - - Return the scalar length of the shortest axis of the [Rect3]. - - - - - - - - - Return the support point in a given direction. This is useful for collision detection algorithms. - - - - - - - - - Return a copy of the [Rect3] grown a given amount of units towards all the sides. - - - - - - - Return true if the [Rect3] is flat or empty. - - - - - - - Return true if the [Rect3] is empty. - - - - - - - - - Return true if the [Rect3] contains a point. - - - - - - - - - Return the intersection between two [Rect3]. An empty Rect3 (size 0,0,0) is returned on failure. - - - - - - - - - Return true if the [Rect3] overlaps with another. - - - - - - - - - Return true if the [Rect3] is at both sides of a plane. - - - - - - - - - - - Return true if the [Rect3] intersects the line segment between from and to - - - - - - - - - Combine this [Rect3] with another, a larger one is returned that contains both. - - - - - - Ending corner. - - - - - Size from position to end. - - - - - - - - Rectangle Shape for 2D Physics. - - - Rectangle Shape for 2D Physics. This shape is useful for modeling box-like 2D objects. - - - - - - - Return the half extents, the actual width and height of this shape is twice the half extents. - - - - - - - - - Set the half extents, the actual width and height of this shape is twice the half extents. - - - - - - - - - - - - - Base class for anything that keeps a reference count. - - - Base class for anything that keeps a reference count. Resource and many other helper objects inherit this. References keep an internal reference counter so they are only released when no longer in use. - - - - - - - - - - - - - Increase the internal reference counter. Use this only if you really know what you are doing. - - - - - - - Decrease the internal reference counter. Use this only if you really know what you are doing. - - - - - - - - - Reference frame for GUI. - - - Reference frame for GUI. It's just like an empty control, except a red box is displayed while editing around its size at all times. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Simple regular expression matcher. - - - Class for finding text patterns in a string using regular expressions. It can not perform replacements. Regular expressions are a way to define patterns of text to be searched. Details on writing patterns are too long to explain here but the Internet is full of tutorials and detailed explanations. - Once created, the RegEx object needs to be compiled with the pattern before it can be used. The pattern must be escaped first for gdscript before it is escaped for the expression. For example: - [code]var exp = RegEx.new()[/code] - [code]exp.compile("\\d+")[/code] - would be read by RegEx as [code]\d+[/code] - Similarly: - [code]exp.compile("\"(?:\\\\.|[^\"])*\"")[/code] - would be read as [code]"(?:\\.|[^"])*"[/code] - Currently supported features: - * Capturing [code]()[/code] and non-capturing [code](?:)[/code] groups - * Named capturing groups [code](?P<name>)[/code] - * Any character [code].[/code] - * Shorthand character classes [code]\w \W \s \S \d \D[/code] - * User-defined character classes such as [code][A-Za-z][/code] - * Simple quantifiers [code]?[/code], [code]*[/code] and [code]+[/code] - * Range quantifiers [code]{x,y}[/code] - * Lazy (non-greedy) quantifiers [code]*?[/code] - * Beginning [code]^[/code] and end [code]$[/code] anchors - * Alternation [code]|[/code] - * Backreferences [code]\1[/code], [code]\g{1}[/code], and [code]\g<name>[/code] - * POSIX character classes [code][[:alnum:]][/code] - * Lookahead [code](?=)[/code], [code](?!)[/code] and lookbehind [code](?<=)[/code], [code](?<!)[/code] - * ASCII [code]\xFF[/code] and Unicode [code]\uFFFF[/code] code points (in a style similar to Python) - * Word boundaries [code]\b[/code], [code]\B[/code] - - - - - - - This method resets the state of the object, as it was freshly created. Namely, it unassigns the regular expression of this object. - - - - - - - - - Compiles and assign the regular expression pattern to use. - - - - - - - Returns the number of numeric capturing groups. - - - - - - - Returns an array of names of named capturing groups. - - - - - - - Returns the expression used to compile the code. - - - - - - - Returns whether this object has a valid regular expression assigned. - - - - - - - - - - - - - Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching reult if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be. - - - - - - - - - - - - - - - - - Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as [code]\1[/code] and [code]\g<name>[/code] expanded and resolved. By default only the first instance is replaced but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be. - - - - - - - - - - - - - - - - - - - Returns the end position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). - - - - - - - Returns the number of numeric capturing groups. - - - - - - - Returns an array of names of named capturing groups. - - - - - - - - - Returns the starting position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). - - - - - - - - - Returns the result of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for all resources. - - - Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only. - - - - - - - Return the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. - - - - - - - Return the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID. - - - - - - - - - - - - - - - - - - - - - - - Set the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only. - - - - - - - - - Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. Fails if another [Resource] already has path "path". - - - - - - - - - - - - - - - Set the path of the resource. Differs from set_path(), if another [Resource] exists with "path" it over-takes it, instead of failing. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Interactive Resource Loader. - - - Interactive Resource Loader. This object is returned by ResourceLoader when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying load bars/percentages. - - - - - - - Return the loaded resource (only if loaded). Otherwise, returns null. - - - - - - - Return the load stage. The total amount of stages can be queried with [method get_stage_count] - - - - - - - Return the total amount of stages (calls to [method poll]) needed to completely load this resource. - - - - - - - Poll the load. If OK is returned, this means poll will have to be called again. If ERR_FILE_EOF is returned, them the load has finished and the resource can be obtained by calling [method get_resource]. - - - - - - - - - - - - - - - Resource Loader. - - - Resource Loader. This is a static object accessible as [ResourceLoader]. GDScript has a simplified load() function, though. - - - - - - - - - - - - - - - - - Return the list of recognized extensions for a resource type. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Load a resource interactively, the returned object allows to load with high granularity. - - - - - - - - - Change the behavior on missing sub-resources. Default is to abort load. - - - - - - - - - Resource Preloader Node. - - - Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here. - - - - - - - - - - - - - - - - - - - Return the resource given a text-id. - - - - - - - Return the list of resources inside the preloader. - - - - - - - - - Return true if the preloader has a given resource. - - - - - - - - - Remove a resource from the preloader by text id. - - - - - - - - - - - Rename a resource inside the preloader, from a text-id to a new text-id. - - - - - - - - - - - - - Resource Saving Interface. - - - Resource Saving Interface. This interface is used for saving resources to disk. - - - - - - - - - Return the list of extensions available for saving a resource of a given type. - - - - - - - - - - - - - Save a resource to disk, to a given path. - - - - - - - - - - - - - - - - - - - - - Label that displays rich text. - - - Label that displays rich text. Rich text can contain custom text, fonts, images and some basic formatting. It also adapts itself to given width/heights. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns the raw text, stripping out the formatting information. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return true if selecting the text inside this richtext is allowed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set to true if selecting the text inside this richtext is allowed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Rigid body node. - - - Rigid body node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift mode between regular Rigid body, Kinematic, Character or Static. - - - - - - - - - Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body. - - - - - - - - - - - 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 offset from the body origin are in global coordinates. - - - - - - - Return the current body angular damp. Default is -1. - - - - - - - Return the current body angular velocity. - - - - - - - Return the current axis lock of the body. One of AXIS_LOCK_* enum. - - - - - - - Return the current body bounciness. - - - - - - - Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. - - - - - - - Return the current body friction, from 0 (frictionless) to 1 (max friction). - - - - - - - Return the current body gravity scale. - - - - - - - Return the current body linear damp. Default is -1. - - - - - - - Return the current body linear velocity. - - - - - - - Return the current body mass. - - - - - - - Return the maximum contacts that can be reported. See [method set_max_contacts_reported]. - - - - - - - Return the current body mode, see [method set_mode]. - - - - - - - Return the current body weight, given standard earth-weight (gravity 9.8). - - - - - - - Return whether the body has the ability to fall asleep when not moving. See [method set_can_sleep]. - - - - - - - Return whether contact monitoring is enabled. - - - - - - - Return whether the body is sleeping. - - - - - - - Return whether this body is using continuous collision detection. - - - - - - - Return whether the body is using a custom integrator. - - - - - - - - - Set the angular damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any angular damp derived from the world or areas will be overridden. - - - - - - - - - Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state. - - - - - - - - - Set the axis lock of the body, from the AXIS_LOCK_* enum. Axis lock stops the body from moving along the specified axis(X/Y/Z) and rotating along the other two axes. - - - - - - - - - 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. - - - - - - - - - Set the body bounciness, from 0 (no bounciness) to 1 (max bounciness). - - - - - - - - - Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene. - Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body. - - - - - - - - - Enable contact monitoring. This allows the body to emit signals when it collides with another. - - - - - - - - - Set the body friction, from 0 (frictionless) to 1 (max friction). - - - - - - - - - Set the gravity factor. This factor multiplies gravity intensity just for this body. - - - - - - - - - Set the linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden. - - - - - - - - - Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state. - - - - - - - - - Set the body mass. - - - - - - - - - Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. - - - - - - - - - Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body. - - - - - - - - - Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] wakes them up. Until then, they behave like a static body. - - - - - - - - - Set the continuous collision detection mode from the enum CCD_MODE_*. - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects. - - - - - - - - - Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. - - - - - - - - - Set the body weight given standard earth-weight (gravity 9.8). - - - - - - Dampens rotational forces of the Rigid body by the 'angular_damp' rate. - - - The current rotational velocity of the Rigid body - - - Locks the rotational forces to a particular axis, preventing rotations on other axes. - - - Bounciness of the Rigid body. - - - If true, the Rigid body will no longer calculate forces when there is no movement and will act as a static body. It will wake up when other forces are applied through other collisions or when the 'apply_impulse' method is used. - - - If true, the Rigid body will emit signals when it collides with another Rigid body. - - - The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. - - - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects. - - - If true, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. - - - The body friction, from 0 (frictionless) to 1 (max friction). - - - The 'gravity_scale' for this Rigid body will be multiplied by the global 3d gravity setting found in "Project > Project Settings > Physics > 3d". A value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. - - - The linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden. - - - The body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. - - - The body mass. - - - The body mode from the MODE_* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER. - - - The current 'sleeping' state of the Rigid body. - - - The body weight given standard earth-weight (gravity 9.8). - - - - - - - - Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. - - - - - - - Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. - - - - - - - - - - - - - Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. - This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with. - - - - - - - - - - - - - Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. - This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with. - - - - - Emitted when the body changes its sleeping state. Either by sleeping or waking up. - - - - - - Static mode. The body behaves like a [StaticBody], and can only move by user code. - - - Kinematic body. The body behaves like a [KinematicBody], and can only move by user code. - - - 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. - - - Character body. This behaves like a rigid body, but can not rotate. - - - - - - Rigid body 2D node. - - - Rigid body 2D node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift state between regular Rigid body, Kinematic, Character or Static. - Character mode forbids the node from being rotated. This node can have a custom force integrator function, for writing complex physics motion behavior per node. - As a warning, don't change this node position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior. - - - - - - - - - Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body. - - - - - - - - - - - Add a positioned force to the applied force and torque. As with [method apply_impulse], both the force and the offset from the body origin are in global coordinates. - - - - - - - - - - - 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 offset from the body origin are in global coordinates. - - - - - - - Return the angular damp for this body. - - - - - - - Return the body angular velocity. This changes by physics granularity. See [method set_angular_velocity]. - - - - - - - Return the applied force vector. - - - - - - - Return the torque which is being applied to this body. - - - - - - - Return the body bounciness. - - - - - - - Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. You must also enable contact monitor, see [method set_contact_monitor] - - - - - - - Return whether this body is using continuous collision detection. - - - - - - - Return the body friction. - - - - - - - Return the gravity factor. - - - - - - - Return the body's moment of inertia. This is usually automatically computed from the mass and the shapes. Note that this doesn't seem to work in a [code]_ready[/code] function: it apparently has not been auto-computed yet. - - - - - - - Return the linear damp for this body. - - - - - - - Return the body linear velocity. This changes by physics granularity. See [method set_linear_velocity]. - - - - - - - Return the body mass. - - - - - - - Return the maximum contacts that can be reported. See [method set_max_contacts_reported]. - - - - - - - Return the current body mode, see [method set_mode]. - - - - - - - Return the body weight given standard earth-weight (gravity 9.8). - - - - - - - Return true if the body has the ability to fall asleep when not moving. See [method set_can_sleep]. - - - - - - - Return whether contact monitoring is enabled. - - - - - - - Return whether the body is sleeping. - - - - - - - Return true if the body is not doing any built-in force integration. - - - - - - - - - Set the angular damp for this body. If this value is different from -1, any angular damp derived from the world or areas will be overridden. - - - - - - - - - Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state. - - - - - - - - - Set the applied force vector. This is the equivalent of pushing a box over the ground: the force applied is applied constantly. - - - - - - - - - Set a constant torque which will be applied to this body. - - - - - - - - - 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. - - - - - - - - - Set the body bounciness, from 0 (no bounce) to 1 (full bounce). - - - - - - - - - Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene. - Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body. - - - - - - - - - Enable contact monitoring. This allows the body to emit signals when it collides with another. - - - - - - - - - Set the continuous collision detection mode from the enum CCD_MODE_*. - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects. - - - - - - - - - Set the body friction, from 0 (frictionless) to 1 (full friction). - - - - - - - - - Set the gravity factor. This factor multiplies gravity intensity just for this body. - - - - - - - - - Set the body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it. - - - - - - - - - Set the linear damp for this body. If this value is different from -1, any linear damp derived from the world or areas will be overridden. - - - - - - - - - Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state. - - - - - - - - - Set the body mass. - - - - - - - - - Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. - - - - - - - - - Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body. - - - - - - - - - Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body. - - - - - - - - - Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. - - - - - - - - - Set the body weight given standard earth-weight (gravity 9.8). Not really useful for 2D since most measures for this node are in pixels. - - - - - - - - - - - - - Return whether the body would collide, if it tried to move in the given vector. This method allows two extra parameters: A margin, which increases slightly the size of the shapes involved in the collision detection, and an object of type [Physics2DTestMotionResult], which will store additional information about the collision (should there be one). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. - - - - - - - Emitted when a body exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. - - - - - - - - - - - - - Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. - This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with. - - - - - - - - - - - - - Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. - This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with. - - - - - Emitted when the body changes its sleeping state. Either by sleeping or waking up. - - - - - - Static mode. The body behaves like a [StaticBody2D], and can only move by user code. - - - Kinematic body. The body behaves like a [KinematicBody2D], and can only move by user code. - - - 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. - - - Character body. This behaves like a rigid body, but can not rotate. - - - Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. - - - Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. - - - Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns true if there is a [NetworkedMultiplayerPeer] set (with [method SceneTree.set_network_peer]). - - - - - - - - - - - - - - - - - - - - - - - - - Returns true if this SceneTree's [NetworkedMultiplayerPeer] is in server mode (listening for connections). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the peer object to handle the RPC system (effectively enabling networking). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to slave. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A class stored as a resource. - - - A class stored as a resource. The script exends the functionality of all objects that instance it. - The 'new' method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. - - - - - - - Returns true if the script can be instanced. - - - - - - - - - - - - - Returns the script source code, or an empty string if source code is not available. - - - - - - - - - Returns true if the script, or a base class, defines a signal with the given name. - - - - - - - Returns true if the script contains non-empty source code. - - - - - - - - - Returns true if 'base_object' is an instance of this script. - - - - - - - Returns true if the script is a tool script. A tool script can run in the editor. - - - - - - - - - Reloads the script's class implementation. Returns an error code. - - - - - - - - - Sets the script source code. Does not reload the class implementation. - - - - - - - - - - - - - - - - - Returns a [Script] that is currently active in editor. - - - - - - - Returns an array with all [Script] objects which are currently open in editor. - - - - - - - - - Emitted when user changed active script. Argument is a freshly activated [Script]. - - - - - - - Emitted when editor is about to close the active script. Argument is a [Script] that is going to be closed. - - - - - - - - - Base class for scroll bars. - - - Scrollbars are a [Range] based [Control], that display a draggable area (the size of the page). Horizontal ([HScrollBar]) and Vertical ([VScrollBar]) versions are available. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A helper node for displaying scrollable elements (e.g. lists). - - - A ScrollContainer node with a [Control] child and scrollbar child ([HScrollbar], [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 [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). - - - - - - - Return current horizontal scroll value. - - - - - - - Return current vertical scroll value. - - - - - - - Return true if horizontal scroll is allowed. - - - - - - - Return true if vertical scroll is allowed. - - - - - - - - - Set allows horizontal scroll. - - - - - - - - - Set allows vertical scroll. - - - - - - - - - Set horizontal scroll value. - - - - - - - - - Set vertical scroll value. - - - - - - - - - - - - - - - Segment Shape for 2D Collision Detection. - - - Segment Shape for 2D Collision Detection, consists of two points, 'a' and 'b'. - - - - - - - Return the first point's position. - - - - - - - Return the second point's position. - - - - - - - - - Set the first point's position. - - - - - - - - - Set the second point's position. - - - - - - - - - - - - - - - A synchronization Semaphore. - - - A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation. - - - - - - - Lowers the [Semaphore], allowing one more thread in. - - - - - - - Tries to wait for the [Semaphore], if its value is zero, blocks until non-zero. - - - - - - - - - Base class for separators. - - - Separator is a [Control] used for separating other controls. It's purely a visual decoration. Horizontal ([HSeparator]) and Vertical ([VSeparator]) versions are available. - - - - - - - - - To be changed, ignore. - - - To be changed, ignore. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for all 2D Shapes. - - - Base class for all 2D Shapes. All 2D shape types inherit from this. - - - - - - - - - - - - - Return whether this shape is colliding with another. - This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]). - - - - - - - - - - - - - Return a list of the points where this shape touches another. If there are no collisions, the list is empty. - This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]). - - - - - - - - - - - - - - - - - Return whether this shape would collide with another, if a given movement was applied. - This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). - - - - - - - - - - - - - - - - - Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty. - This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). - - - - - - - Return the custom solver bias. - - - - - - - - - Use a custom solver bias. No need to change this unless you really know what you are doing. - The solver bias is a factor controlling how much two objects "rebound" off each other, when colliding, to avoid them getting into each other because of numerical imprecision. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Skeleton for characters and animated objects. - - - Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). Skeleton will support rag doll dynamics in the future. - - - - - - - - - Add a bone, with name "name". [method get_bone_count] will become the bone index. - - - - - - - - - - - Deprecated soon. - - - - - - - Clear all the bones in this skeleton. - - - - - - - - - Return the bone index that matches "name" as its name. - - - - - - - Return the amount of bones in the skeleton. - - - - - - - - - - - - - - - - - - - - - - - - - Return the name of the bone at index "index" - - - - - - - - - Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx". - - - - - - - - - Return the pose transform for bone "bone_idx". - - - - - - - - - Return the rest transform for a bone "bone_idx". - - - - - - - - - - - - - - - - - Deprecated soon. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx". - - - - - - - - - - - Return the pose transform for bone "bone_idx". - - - - - - - - - - - Set the rest transform for bone "bone_idx" - - - - - - - - - - - Deprecated soon. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for GUI Sliders. - - - Base class for GUI Sliders. - - - - - - - Return amounts of ticks to display on slider. - - - - - - - Return true if ticks are visible on borders. - - - - - - - - - - - - - - - - - - - - - - - Set amount of ticks to display in slider. - - - - - - - - - Set true if ticks are visible on borders. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Most basic 3D game object, parent of all 3D related nodes. - - - Most basic 3D game object, with a 3D [Transform] and visibility settings. All 3D physics nodes and sprites inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project. - - - - - - - Return the SpatialGizmo for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. - - - - - - - Return the global transform, relative to worldspace. - - - - - - - Return the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial]. - - - - - - - Return the rotation (in radians). - - - - - - - Return the rotation (in degrees). - - - - - - - - - - - - - Return the local transform, relative to the bone parent. - - - - - - - - - - - - - Return current [World] resource this Spatial node is registered to. - - - - - - - - - - - Rotate current node along normal [Vector3] by angle in radians in Global space. - - - - - - - - - Move current node by [Vector3] offset in Global space. - - - - - - - Disable rendering of this node. Change Spatial Visible property to false. - - - - - - - Returns whether node sends notification that its local transformation changed. Spatial will not propagate this by default. - - - - - - - Returns whether this node is set as Toplevel, ignoring its parent node transformations. - - - - - - - Returns whether node sends notification that its transformation changed. Spatial will not propagate this by default. - - - - - - - Returns whether this node is set to be visible. - - - - - - - Returns whether this node is visible, taking into consideration that its parents visibility. - - - - - - - - - - - Rotates itself to point into direction of target position. Operations take place in global space. - - - - - - - - - - - - - Moves itself to specified position and then rotates itself to point into direction of target position. Operations take place in global space. - - - - - - - Reset this node transformations (like scale, skew and taper) preserving its rotation and translation. Performs orthonormalization on this node [Transform3D]. - - - - - - - - - - - Rotates node in local space on given normal [Vector3] by angle in radians. - - - - - - - - - Rotates node in local space on X axis by angle in radians. - - - - - - - - - Rotates node in local space on Y axis by angle in radians. - - - - - - - - - Rotates node in local space on Z axis by angle in radians. - - - - - - - - - Makes this node ignore its parents tranformations. Node tranformations are only in global space. - - - - - - - - - Set [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. - - - - - - - - - Set the transform globally, relative to world space. - - - - - - - Reset all tranformations for this node. Set its [Transform3D] to identity matrix. - - - - - - - - - Set whether this node ignores notification that its transformation changed. - - - - - - - - - Set whether this node sends notification that its local transformation changed. Spatial will not propagate this by default. - - - - - - - - - Set whether this node sends notification that its transformation changed. Spatial will not propagate this by default. - - - - - - - - - Set the rotation (in radians). - - - - - - - - - Set the rotation (in degrees). - - - - - - - - - Set the scale. - - - - - - - - - Set the transform locally, relative to the parent spatial node. - - - - - - - - - - - - - - - - - - - - - - - Enable rendering of this node. Change Spatial Visible property to false. - - - - - - - - - Tranform [Vector3] from this node local space to world space. - - - - - - - - - Tranform [Vector3] from world space to this node local space. - - - - - - - - - Change node position by given offset [Vector3]. - - - - - - - Update [SpatialGizmo] of this node. - - - - - - World space (global) [Transform] of this node. - - - Local euler rotation in radians of this node. - - - Local euler rotation in degrees of this node. - - - Local scale of this node. - - - Local space [Transform] of this node. - - - Local translation of this node. - - - Visibility of this node. Toggles if this node is rendered. - - - - - - Emitted when node visibility changed. - - - - - - Spatial nodes receive 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). - - - Spatial nodes receive this notification when they are registered to new [World] resource. - - - Spatial nodes receive this notification when they are unregistered from current [World] resource. - - - Spatial nodes receive this notification when their visibility changes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Class representing a spherical [PrimitiveMesh]. - - - Class representing a spherical [PrimitiveMesh]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Full height of the sphere. Defaults to 2.0. - - - Determines whether a full sphere or a hemisphere is created. Attention: To get a regular hemisphere the height and radius of the sphere have to equal. Defaults to false. - - - Number of radial segments on the sphere. Defaults to 64. - - - Radius of sphere. Defaults to 1.0. - - - Number of segments along the height of the sphere. Defaults to 32. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Numerical input text field. - - - SpinBox is a numerical input text field. It allows entering integers and floats. - - - - - - - - - - - - - - - - - - - Return the specific suffix. - - - - - - - Return if the spinbox is editable. - - - - - - - - - Set whether the spinbox is editable. - - - - - - - - - Set a prefix. - - - - - - - - - Set a specific suffix. - - - - - - - - - - - - - - - - - - - - - Container for splitting and adjusting. - - - Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. - - - - - - - Return visibility of the split dragger (one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]). - - - - - - - Return the split offset. - - - - - - - Return true if the split is collapsed. - - - - - - - - - Set if the split must be collapsed. - - - - - - - - - Set visibility of the split dragger ([i]mode[/i] must be one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]). - - - - - - - - - Set the split offset. - - - - - - - - - - - - - - - - - Emitted when the dragger is dragged by user. - - - - - - The split dragger is visible. - - - The split dragger is invisible. - - - The split dragger is invisible and collapsed. - - - - - - Spotlight [Light], such as a reflector spotlight or a lantern. - - - A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight. - - - - - - - - - - - - - - - - - - - General purpose Sprite node. - - - General purpose Sprite node. This Sprite node can show any texture as a sprite. The texture can be used as a spritesheet for animation, or only a region from a bigger texture can referenced, like an atlas. - - - - - - - Return the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1. - - - - - - - Return the amount of horizontal frames. See [method set_hframes]. - - - - - - - - - - - - - Return sprite draw offset. - - - - - - - Return the region rect to read from. - - - - - - - Return the base texture for the sprite. - - - - - - - Return the amount of vertical frames. See [method set_vframes]. - - - - - - - Return if the sprite is centered at the local origin. - - - - - - - Return true if the sprite is flipped horizontally. - - - - - - - Return true if the sprite is flipped vertically. - - - - - - - Return if the sprite reads from a region. - - - - - - - - - - - - - - - Set whether the sprite should be centered on the origin. - - - - - - - - - Set true to flip the sprite horizontally. - - - - - - - - - Set true to flip the sprite vertically. - - - - - - - - - Set the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1. - - - - - - - - - Set the amount of horizontal frames and converts the sprite into a sprite-sheet. This is useful for animation. - - - - - - - - - - - - - - - - - Set the sprite draw offset, useful for setting rotation pivots. - - - - - - - - - Set the sprite as a sub-region of a bigger texture. Useful for texture-atlases. - - - - - - - - - - - - - - - - - Set the region rect to read from. - - - - - - - - - Set the base texture for the sprite. - - - - - - - - - Set the amount of vertical frames and converts the sprite into a sprite-sheet. This is useful for animation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sprite frame library for AnimatedSprite. - - - Sprite frame library for [AnimatedSprite]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Static body for 3D Physics. - - - Static body for 3D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody3D] so they are great for scenario collision. - A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. - Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). - - - - - - - Return the body bounciness. - - - - - - - Return the constant angular velocity for the body. - - - - - - - Return the constant linear velocity for the body. - - - - - - - Return the body friction. - - - - - - - - - Set the body bounciness, from 0 (not bouncy) to 1 (bouncy). - - - - - - - - - Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating. - - - - - - - - - Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving. - - - - - - - - - Set the body friction, from 0 (frictionless) to 1 (full friction). - - - - - - The body bounciness. - - - The constant angular velocity for the body. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. - - - The constant linear velocity for the body. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. - - - The body friction, from 0 (frictionless) to 1 (full friction). - - - - - - - - Static body for 2D Physics. - - - Static body for 2D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody2D] so they are great for scenario collision. - A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. - Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). - - - - - - - Return the body bounciness. - - - - - - - Return the constant angular velocity for the body. - - - - - - - Return the constant linear velocity for the body. - - - - - - - Return the body friction. - - - - - - - - - Set the body bounciness, from 0 (not bouncy) to 1 (bouncy). - - - - - - - - - Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating. - - - - - - - - - Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving. - - - - - - - - - Set the body friction, from 0 (frictionless) to 1 (full friction). - - - - - - - - - - - - - - - - - - - Abstraction and base class for stream-based protocols. - - - StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or Unix Sockets). It provides an API for sending and receiving data through streams as raw data or strings. - - - - - - - Get a signed 16 bit value from the stream. - - - - - - - Get a signed 32 bit value from the stream. - - - - - - - Get a signed 64 bit value from the stream. - - - - - - - Get a signed byte from the stream. - - - - - - - Return the amount of bytes this [StreamPeer] has available. - - - - - - - - - Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an Error code and a data array. - - - - - - - Get a double-precision float from the stream. - - - - - - - Get a single-precision float from the stream. - - - - - - - - - Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an Error code, and a data array. - - - - - - - - - Get a string with byte-length "bytes" from the stream. - - - - - - - Get an unsigned 16 bit value from the stream. - - - - - - - Get an unsigned 32 bit value from the stream. - - - - - - - Get an unsigned 16 bit value from the stream. - - - - - - - Get an unsigned byte from the stream. - - - - - - - - - Get a utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8). - - - - - - - Get a Variant from the stream. - - - - - - - Return whether this [StreamPeer] is using big-endian format. - - - - - - - - - Put a signed 16 bit value into the stream. - - - - - - - - - Put a signed 32 bit value into the stream. - - - - - - - - - Put a signed 64 bit value into the stream. - - - - - - - - - Put a signed byte into the stream. - - - - - - - - - Send a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an Error code. - - - - - - - - - Put a double-precision float into the stream. - - - - - - - - - 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. - - - - - - - - - Put an unsigned 16 bit value into the stream. - - - - - - - - - Put an unsigned 32 bit value into the stream. - - - - - - - - - Put an unsigned 64 bit value into the stream. - - - - - - - - - Put an unsigned byte into the stream. - - - - - - - - - Put a zero-terminated utf8 string into the stream. - - - - - - - - - Put a Variant into the stream. - - - - - - - - - Set this [StreamPeer] to use big-endian format. Default is false. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SSL Stream peer. - - - SSL Stream peer. This object can be used to connect to SSL servers. - - - - - - - - - - - - - - - - - - - - - Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname". - - - - - - - Disconnect from host. - - - - - - - Return the status of the connection, one of STATUS_* enum. - - - - - - A status representing a [StreamPeerSSL] that is disconnected. - - - A status representing a [StreamPeerSSL] that is connected to a host. - - - An errot status that shows the peer did not present a SSL certificate and validation was requested. - - - An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation. - - - - - - TCP Stream peer. - - - TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a tcp server. - - - - - - - - - - - Connect to the specified host:port pair. A hostname will be resolved if valid. Returns [OK] on success or [FAILED] on failure. - - - - - - - Disconnect from host. - - - - - - - Return the IP of this peer. - - - - - - - Return the port of this peer. - - - - - - - Return the status of the connection, one of STATUS_* enum. - - - - - - - - - - - - The initial status of the [StreamPeerTCP], also the status after a disconnect. - - - A status representing a [StreamPeerTCP] that is connecting to a host. - - - A status representing a [StreamPeerTCP] that is connected to a host. - - - A staus representing a [StreamPeerTCP] in error state. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Built-in string class. - - - This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return true if the strings begins with the given string. - - - - - - - Return the bigrams (pairs of consecutive letters) of this string. - - - - - - - Return a copy of the string with special characters escaped using the C language standard. - - - - - - - Return a copy of the string with escaped characters replaced by their meanings according to the C language standard. - - - - - - - Change the case of some letters. Replace underscores with spaces, convert all letters to lowercase then capitalize first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code]. - - - - - - - - - Perform a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater. - - - - - - - Return true if the string is empty. - - - - - - - - - Return true if the strings ends with the given string. - - - - - - - - - Erase [code]chars[/code] characters from the string starting from [code]pos[/code]. - - - - - - - - - - - Find the first occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. - - - - - - - - - Find the last occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. - - - - - - - - - - - Find the first occurrence of a substring but search as case-insensitive, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. - - - - - - - - - - - - - - - - - If the string is a path to a file, return the base directory. - - - - - - - If the string is a path to a file, return the path to the file without the extension. - - - - - - - If the string is a path to a file, return the extension. - - - - - - - If the string is a path to a file, return the file and ignore the base directory. - - - - - - - Hash the string and return a 32 bits integer. - - - - - - - Convert a string containing a hexadecimal number into an int. - - - - - - - - - - - Insert a substring at a given position. - - - - - - - If the string is a path to a file or directory, return true if the path is absolute. - - - - - - - If the string is a path to a file or directory, return true if the path is relative. - - - - - - - - - Check whether this string is a subsequence of the given string. - - - - - - - - - Check whether this string is a subsequence of the given string, without considering case. - - - - - - - Check whether the string contains a valid float. - - - - - - - Check whether the string contains a valid color in HTML notation. - - - - - - - Check whether the string is a valid identifier. As is common in programming languages, a valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit. - - - - - - - Check whether the string contains a valid integer. - - - - - - - Check whether the string contains a valid IP address. - - - - - - - Return a copy of the string with special characters escaped using the JSON standard. - - - - - - - - - Return an amount of characters from the left of the string. - - - - - - - Return the length of the string in characters. - - - - - - - - - Do a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'. - - - - - - - - - Do a simple case insensitive expression match, using ? and * wildcards (see [method match]). - - - - - - - Return the MD5 hash of the string as an array of bytes. - - - - - - - Return the MD5 hash of the string as a string. - - - - - - - - - Perform a case-insensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater. - - - - - - - - - Return the character code at position [code]at[/code]. - - - - - - - - - Format a number to have an exact number of [code]digits[/code] after the decimal point. - - - - - - - - - Format a number to have an exact number of [code]digits[/code] before the decimal point. - - - - - - - Decode a percent-encoded string. See [method percent_encode]. - - - - - - - Percent-encode a string. This is meant to encode parameters in a URL when sending a HTTP GET request and bodies of form-urlencoded POST request. - - - - - - - - - If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code]. - - - - - - - - - - - Replace occurrences of a substring for different ones inside the string. - - - - - - - - - - - Replace occurrences of a substring for different ones inside the string, but search case-insensitive. - - - - - - - - - - - Perform a search for a substring, but start from the end of the string instead of the beginning. - - - - - - - - - - - Perform a search for a substring, but start from the end of the string instead of the beginning. Also search case-insensitive. - - - - - - - - - Return the right side of the string from a given position. - - - - - - - - - - - - - Return the SHA-256 hash of the string as a string. - - - - - - - - - Return the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar. - - - - - - - - - - - Split the string by a divisor string, return an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",". - - - - - - - - - - - Split the string in floats by using a divisor string, return an array of the substrings. Example "1,2.5,3" will return [1,2.5,3] if split by ",". - - - - - - - - - - - Return a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. - - - - - - - - - - - Return part of the string from the position [code]from[/code], with length [code]len[/code]. - - - - - - - Convert the String (which is a character array) to PoolByteArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters. - - - - - - - Convert a string, containing a decimal number, into a [code]float[/code]. - - - - - - - Convert a string, containing an integer number, into an [code]int[/code]. - - - - - - - Return the string converted to lowercase. - - - - - - - Return the string converted to uppercase. - - - - - - - Convert the String (which is an array of characters) to PoolByteArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). - - - - - - - Return a copy of the string with special characters escaped using the XML standard. - - - - - - - Return a copy of the string with escaped characters replaced by their meanings according to the XML standard. - - - - - - - - - Base class for drawing stylized boxes for the UI. - - - StyleBox is [Resource] that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below. - - - - - - - - - - - - - - - - - - - - - - - - - Return the default offset of the margin "margin" (see MARGIN_* enum) of a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded. - - - - - - - - - Return the offset of margin "margin" (see MARGIN_* enum). - - - - - - - Return the minimum size that this stylebox can be shrunk to. - - - - - - - Return the "offset" of a stylebox, this is a helper function, like writing [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code]. - - - - - - - - - - - Set the default offset "offset" of the margin "margin" (see MARGIN_* enum) for a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded. - - - - - - - - - - - Test a position in a rectangle, return whether it passes the mask test. - - - - - - - - - - - - - - - - - - - Empty stylebox (does not display anything). - - - Empty stylebox (really does not display anything). - - - - - - - - - Customizable Stylebox with a given set of parameters. (no texture required) - - - This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: - - Color - - Border width (individual width for each border) - - Rounded corners (individual radius for each corner) - - Shadow - - About corner radius: - You may use high values for 'corner radius'. As soon as corners would overlap the stylebox will switch to a relative system. Example: - [codeblock] - height = 30 - corner_radius_top_left = 50 - corner_raidus_bottom_left = 100 - [/codeblock] - The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result: - [codeblock] - corner_radius_top_left: 10 - corner_raidus_bottom_left: 20 - [/codeblock] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Anti Aliasing draws a small ring around edges. This ring fades to transparent. As a result edges look much smoother. This is only noticable when using rounded corners. - - - This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. - - - The background color of the stylebox. - - - When set to true, the border will fade into the background color. - - - Sets the color of the border. - - - Border width for the bottom border. - - - Border width for the left border. - - - Border width for the right border. - - - Border width for the top border. - - - This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius]) into account. - For corner radius smaller than 10: 4-5 should be enough - For corner radius smaller than 30: 8-12 should be enough ... - - - The corner radius of the bottom left corner. When set to 0 the corner is not rounded. - - - The corner radius of the bottom right corner. When set to 0 the corner is not rounded. - - - The corner radius of the top left corner. When set to 0 the corner is not rounded. - - - The corner radius of the top right corner. When set to 0 the corner is not rounded. - - - Toggels drawing of the inner part of the stylebox. - - - Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with border_width_bottom. To draw a border outside the control rect. - - - Expands the stylebox outside of the control rect on the left edge. Useful in combination with border_width_left. To draw a border outside the control rect. - - - Expands the stylebox outside of the control rect on the right edge. Useful in combination with border_width_right. To draw a border outside the control rect. - - - Expands the stylebox outside of the control rect on the top edge. Useful in combination with border_width_top. To draw a border outside the control rect. - - - The color of the shadow. (This has no effect when shadow_size < 1) - - - The shadow size in pixels. - - - - - - - - Texture Based 3x3 scale style. - - - Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Helper tool to create geometry. - - - The [SurfaceTool] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from script. All properties except index need to be added before a call to [method add_vertex]. For example adding vertex colors and UVs looks like - [codeblock] - var st = SurfaceTool.new() - st.begin(Mesh.PRIMITIVE_TRIANGLES) - st.add_color(Color(1, 0, 0)) - st.add_uv(Vector2(0, 0)) - st.add_vertex(Vector3(0, 0, 0)) - [/codeblock] - The [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calls to [method add_uv] or [method add_color] then the last values would be used. - It is very important that vertex attributes are passed [b]before[/b] the call to [method add_vertex], failure to do this will result in an error when committing the vertex information to a mesh. - - - - - - - - - Add an array of bones for the next Vertex to use. - - - - - - - - - Specify a [Color] for the next Vertex to use. - - - - - - - - - Adds an index to index array if you are using indexed Vertices. Does not need to be called before adding Vertex. - - - - - - - - - Specify a normal for the next Vertex to use. - - - - - - - - - Specify whether current Vertex (if using only Vertex arrays) or current index (if also using index arrays) should utilize smooth normals for normal calculation. - - - - - - - - - Specify a Tangent for the next Vertex to use. - - - - - - - - - - - - - - - - - - - - - - - - - - - Insert a triangle fan made of array data into [Mesh] being constructed. - - - - - - - - - Specify UV Coordinate for next Vertex to use. - - - - - - - - - Specify an optional second set of UV coordinates for next Vertex to use. - - - - - - - - - Specify position of current Vertex. Should be called after specifying other vertex properties (e.g. Color, UV). - - - - - - - - - Specify weight value for next Vertex to use. - - - - - - - - - - - - - - - - - - - - - Called before adding any Vertices. Takes the primitive type as an argument (e.g. Mesh.PRIMITIVE_TRIANGLES). - - - - - - - Clear all information passed into the surface tool so far. - - - - - - - - - Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. - - - - - - - - - - - - - - - - - Removes index array by expanding Vertex array. - - - - - - - Generates normals from Vertices so you do not have to do it manually. - - - - - - - - - - - - - Shrinks Vertex array by creating an index array. Avoids reusing Vertices. - - - - - - - - - Sets [Material] to be used by the [Mesh] you are constructing. - - - - - - - - - TCP Server. - - - TCP Server class. Listens to connections on a port and returns a [StreamPeerTCP] when got a connection. - - - - - - - Return true if a connection is available for taking. - - - - - - - - - - - Listen on the "port" binding to "bind_address". - If "bind_address" is set as "*" (default), the server will listen on all available addresses (both IPv4 and IPv6). - If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the server will listen on all available addresses matching that IP type. - If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists). - - - - - - - Stop listening. - - - - - - - If a connection is available, return a StreamPeerTCP with the connection/ - - - - - - - - - Tabbed Container. - - - Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one. - Children controls of this one automatically. - - - - - - - Return whether the tabs should be visible or hidden. - - - - - - - Return the current tab index that is being shown. - - - - - - - - - - - - - - - - - - - Return the previous tab index that was being shown. - - - - - - - Return tab alignment, from the ALIGN_* enum. - - - - - - - - - Return the current tab control that is being shown. - - - - - - - Return the amount of tabs. - - - - - - - - - - - - - - - - - - - - - - - - - Return the title for the tab. Tab titles are by default the children node name, but this can be overridden. - - - - - - - - - Bring a tab (and the Control it represents) to the front, and hide the rest. - - - - - - - - - - - - - - - - - Set tab alignment, from the ALIGN_* enum. Moves tabs to the left, right or center. - - - - - - - - - - - - - - - - - - - - - Set an icon for a tab. - - - - - - - - - - - Set a title for the tab. Tab titles are by default the children node name, but this can be overridden. - - - - - - - - - Set whether the tabs should be visible or hidden. - - - - - - - - - - - - - - - - - - - - - Emitted only when the current tab changes. - - - - - - - Emitted when a tab is being selected, even if it is the same tab. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Tabs Control. - - - Simple tabs control, similar to [TabContainer] but is only in charge of drawing tabs, not interact with children. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns tab [Rect2] with local position and size. - - - - - - - - - - - - - - - - - - - Rearrange tab. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Multiline text editing control. - - - TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo. - - - - - - - - - - - - - - - Add color region (given the delimiters) and its colors. - - - - - - - - - - - Add a keyword and its color. - - - - - - - Clear all the syntax coloring information. - - - - - - - Clear the undo history. - - - - - - - Copy the current selection. - - - - - - - Gets whether the text editor caret is blinking. - - - - - - - Gets the text editor caret blink speed. - - - - - - - Return the column the editing cursor is at. - - - - - - - Return the line the editing cursor is at. - - - - - - - Gets whether the text editor caret is in block mode. - - - - - - - - - Set the text editor caret to blink. - - - - - - - - - Set the text editor caret blink speed. Cannot be less then or equal to 0. - - - - - - - - - Set the text editor caret to block mode. - - - - - - - - - - - - - - - - - - - - - - - - - - - Cut the current selection. - - - - - - - - - Return the text of a specific line. - - - - - - - Return the amount of total lines in the text. - - - - - - - - - - - - - Return the selection begin column. - - - - - - - Return the selection begin line. - - - - - - - Return the text inside the selection. - - - - - - - Return the selection end column. - - - - - - - Return the selection end line. - - - - - - - Return the whole text. - - - - - - - - - - - - - - - - - - - - - Insert a given text at the cursor position. - - - - - - - Returns true if highlight all occurrences is enabled. - - - - - - - Return true if the selection is active. - - - - - - - Returns true if line numbers are enabled. - - - - - - - - - - - - - Return true if the syntax coloring is enabled. - - - - - - - - - - - - - - - Paste the current selection. - - - - - - - Perform redo operation. - - - - - - - - - - - - - - - Perform a search inside the text. Search flags can be specified in the SEARCH_* enum. - - - - - - - - - - - - - - - Perform selection, from line/column to line/column. - - - - - - - Select all the text. - - - - - - - - - Set to enable highlighting all occurrences of the current selection. - - - - - - - - - Set the maximum amount of characters editable. - - - - - - - - - Set the text editor as read-only. Text can be displayed but not edited. - - - - - - - - - Set to enable showing line numbers. - - - - - - - - - - - - - - - - - Set to enable the syntax coloring. - - - - - - - - - Set the entire text. - - - - - - - - - - - - - - - - - Enable text wrapping when it goes beyond he edge of what is visible. - - - - - - - Perform undo operation. - - - - - - - - - - - - - - - - - - - - - - - - - - - Emitted when a breakpoint is placed via the breakpoint gutter. - - - - - Emitted when the cursor changes. - - - - - - - - - - - - - - - - - - - Emitted when the text changes. - - - - - - Match case when searching. - - - Match whole words when searching. - - - Search from end to beginning. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Texture for 2D and 3D. - - - A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the current texture flags. - - - - - - - Return the texture height. - - - - - - - Return the texture size. - - - - - - - Return the texture width. - - - - - - - - - - - - - - - Change the texture flags. - - - - - - Generate mipmaps, to enable smooth zooming out of the texture. - - - Repeat (instead of clamp to edge). - - - Turn on magnifying filter, to enable smooth zooming in of the texture. - - - Texture is a video surface. - - - Default flags. Generate mipmaps, repeat, and filter are enabled. - - - - - - - - - - - - Button that can be themed with textures. - - - Button that can be themed with textures. This is like a regular [Button] but can be themed by assigning textures to it. This button is intended to be easy to theme, however a regular button can expand (that uses styleboxes) and still be better if the interface is expect to have internationalization of texts. - Only the normal texture is required, the others are optional. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Textured progress bar implementation. - - - [ProgressBar] implementation that is easier to theme (by just passing a few textures). - - - - - - - - - - - - - - - - - - - Returns true if textures are stretched as nine-patches or false otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return nine-patch texture offset for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set if textures should be stretched as nine-patches. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set nine-patch texture offset for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Control that draws a texture. - - - Control that draws a texture. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If [code]true[/code] texture will expand to fit. Default value: [code]false[/code]. - - - Stretch mode of the texture. Use STRETCH_* constants as value. - - - The [Texture] resource for the node. - - - - - - - - - - - - - - - - - - - - - - - - Theme for controls. - - - Theme for skinning controls. Controls can be skinned individually, but for complex applications it's more efficient to just create a global theme that defines everything. This theme can be applied to any [Control], and it and its children will automatically use it. - Theme resources can be alternatively loaded by writing them in a .theme file, see docs for more info. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A unit of execution in a process. - - - A unit of execution in a process. Can run methods on [Object]\ s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects. - - - - - - - Returns the current [Thread]\ s id, uniquely identifying it among all threads. - - - - - - - Returns true if this [Thread] is currently active. An active [Thread] cannot start work on a new method but can be joined with [method wait_to_finish]. - - - - - - - - - - - - - - - Starts a new [Thread] that runs "method" on object "instance" with "userdata" passed as an argument. The "priority" of the [Thread] can be changed by passing a PRIORITY_* enum. - Returns OK on success, or ERR_CANT_CREATE on failure. - - - - - - - Joins the [Thread] and waits for it to finish. Returns what the method called returned. - - - - - - - - - - - - - - - Node for 2D tile-based maps. - - - Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. - - - - - - - Clear all cells. - - - - - - - - - - - Return the tile index of the referenced cell. - - - - - - - Return the cell size. - - - - - - - - - Return the tile index of the cell referenced by a Vector2. - - - - - - - Return true if tiles are to be centered in x coordinate (by default this is false and they are drawn from upper left cell corner). - - - - - - - Return true if tiles are to be centered in y coordinate (by default this is false and they are drawn from upper left cell corner). - - - - - - - Return the collision bounce parameter. - - - - - - - Return the collision friction parameter. - - - - - - - Return the collision layer. - - - - - - - - - - - - - - - Return the collision mask. - - - - - - - - - - - - - - - Return whether the tilemap handles collisions as a kinematic body. - - - - - - - Return the custom transform matrix. - - - - - - - Return the current half offset configuration. - - - - - - - Return the orientation mode. - - - - - - - - - - - - - Return the quadrant size. - - - - - - - Return the tile origin configuration. - - - - - - - Return the current tileset. - - - - - - - Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1). - - - - - - - - - - - - - - - - - - - - - - - - - Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector). - - - - - - - - - - - Return whether the referenced cell is flipped over the X axis. - - - - - - - - - - - Return whether the referenced cell is flipped over the Y axis. - - - - - - - Return the Y sort mode. - - - - - - - - - - - Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument. - Optionally, the tilemap's potential half offset can be ignored. - - - - - - - - - - - - - - - - - - - Set the tile index for the cell referenced by its grid-based X and Y coordinates. - A tile index of -1 clears the cell. - Optionally, the tile can also be flipped over the X and Y coordinates or transposed. - - - - - - - - - Set the cell size. - - - - - - - - - - - - - - - - - Set the tile index for the cell referenced by a Vector2 of grid-based coordinates. - A tile index of -1 clears the cell. - Optionally, the tile can also be flipped over the X and Y axes or transposed. - - - - - - - - - Set tiles to be centered in x coordinate. (by default this is false and they are drawn from upper left cell corner). - - - - - - - - - Set tiles to be centered in y coordinate. (by default this is false and they are drawn from upper left cell corner). - - - - - - - - - Set the collision bounce parameter. Allowable values range from 0 to 1. - - - - - - - - - Set the collision friction parameter. Allowable values range from 0 to 1. - - - - - - - - - Set the collision layer. - Layers are referenced by binary indexes, so allowable values to describe the 20 available layers range from 0 to 2^20-1. - - - - - - - - - - - - - - - - - - - Set the collision masks. - Masks are referenced by binary indexes, so allowable values to describe the 20 available masks range from 0 to 2^20-1. - - - - - - - - - - - - - - - - - - - Set the tilemap to handle collisions as a kinematic body (enabled) or a static body (disabled). - - - - - - - - - Set custom transform matrix, to use in combination with the custom orientation mode. - - - - - - - - - Set a half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument). - Half offset sets every other tile off by a half tile size in the specified direction. - - - - - - - - - Set the orientation mode as square, isometric or custom (use MODE_* constants as argument). - - - - - - - - - - - - - - - - - Set the quadrant size, this optimizes drawing by batching chunks of map at draw/cull time. - Allowed values are integers ranging from 1 to 128. - - - - - - - - - Set the tile origin to the tile center or its top-left corner (use TILE_ORIGIN_* constants as argument). - - - - - - - - - Set the current tileset. - - - - - - - - - Set the Y sort mode. Enabled Y sort mode means that children of the tilemap will be drawn in the order defined by their Y coordinate. - A tile with a higher Y coordinate will therefore be drawn later, potentially covering up the tile(s) above it if its sprite is higher than its cell size. - - - - - - - - - Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument. - - - - - - The custom [Transform2D] to be applied to the TileMap's cells. - - - Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED. - - - The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16. - - - The TileMap's cell size. - - - Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT. - - - If [code]true[/code] the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code]. - - - Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0. - - - Friction value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 1. - - - The collision layer(s) for all colliders in the TileMap. - - - The collision mask(s) for all colliders in the TileMap. - - - If [code]true[/code] TileMap collisions will be handled as a kinematic body. If [code]false[/code] collisions will be handled as static body. Default value: [code]false[/code]. - - - The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE. - - - 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). - - - A [PoolIntArray] containing - - - The assigned [TileSet]. - - - - - - Emitted when a tilemap setting has changed. - - - - - - Returned when a cell doesn't exist. - - - Orthogonal orientation mode. - - - Isometric orientation mode. - - - Custom orientation mode. - - - Half offset on the X coordinate. - - - Half offset on the Y coordinate. - - - Half offset disabled. - - - Tile origin at its top-left corner. - - - Tile origin at its center. - - - - - - - - Tile library for tilemaps. - - - A TileSet is a library of tiles for a [TileMap]. It contains a list of tiles, each consisting of a sprite and optional collision shapes. - Tiles are referenced by a unique integer ID. - - - - - - - Clear all tiles. - - - - - - - - - Create a new tile which will be referenced by the given ID. - - - - - - - - - Find the first tile matching the given name. - - - - - - - Return the ID following the last currently used ID, useful when creating a new tile. - - - - - - - Return an array of all currently used tile IDs. - - - - - - - - - Remove the tile referenced by the given ID. - - - - - - - - - - - - - - - - - - - - - - - Return the light occluder of the tile. - - - - - - - - - Return the material of the tile. - - - - - - - - - Return the name of the tile. - - - - - - - - - Return the navigation polygon of the tile. - - - - - - - - - Return the offset of the tile's navigation polygon. - - - - - - - - - - - - - - - - - Return the offset of the tile's light occluder. - - - - - - - - - Return the tile sub-region in the texture. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the array of shapes of the tile. - - - - - - - - - Return the texture of the tile. - - - - - - - - - Return the texture offset of the tile. - - - - - - - - - - - Set a light occluder for the tile. - - - - - - - - - - - Set the material of the tile. - - - - - - - - - - - Set the name of the tile, for descriptive purposes. - - - - - - - - - - - Set a navigation polygon for the tile. - - - - - - - - - - - Set an offset for the tile's navigation polygon. - - - - - - - - - - - - - - - - - - - - - Set an offset for the tile's light occluder. - - - - - - - - - - - Set the tile sub-region in the texture. This is common in texture atlases. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set an array of shapes for the tile, enabling physics to collide with it. - - - - - - - - - - - Set the texture of the tile. - - - - - - - - - - - Set the texture offset of the tile. - - - - - - - - - A countdown timer. - - - Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one shot" mode. - - - - - - - Return the time left for timeout in seconds if the timer is active, 0 otherwise. - - - - - - - Return the timer's processing mode. - - - - - - - Return the wait time in seconds. - - - - - - - Return true if set to automatically start when entering the scene. - - - - - - - Return true if configured as one-shot. - - - - - - - Return if the timer is paused or not. - - - - - - - - - - - - - - - Set to automatically start when entering the scene. - - - - - - - - - Set as one-shot. If enabled, the timer will stop after timeout, otherwise it will automatically restart. - - - - - - - - - Set whether the timer is paused or not. A paused timer will be inactive until it is unpaused again. - - - - - - - - - Set the timer's processing mode (fixed or idle, use TIMER_PROCESS_* constants as argument). - - - - - - - - - Set wait time in seconds. When the time is over, it will emit the timeout signal. - - - - - - - Start the Timer. - - - - - - - Stop (cancel) the Timer. - - - - - - If [code]true[/code], Timer will automatically start when entering the scene tree. Default value: [code]false[/code]. - - - If [code]true[/code], Timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code]. - - - Processing mode. Uses TIMER_PROCESS_* constants as value. - - - Wait time in seconds. - - - - - - Emitted when the Timer reaches 0. - - - - - - Update the Timer at fixed intervals (framerate processing). - - - Update the Timer during the idle time at each frame. - - - - - - Flat button helper class. - - - This is a helper class to generate a flat [Button] (see [method Button.set_flat]), creating a ToolButton is equivalent to: - - [codeblock] - var btn = Button.new() - btn.set_flat(true) - [/codeblock] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3D Transformation. 3x4 matrix. - - - Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [Basis] "basis" and an [Vector3] "origin". It is similar to a 3x4 matrix. - - - - - - - - - - - - - - - Construct the Transform from four [Vector3]. Each axis corresponds to local basis vectors (some of which may be scaled). - - - - - - - - - - - Construct the Transform from a [Basis] and [Vector3]. - - - - - - - - - Construct the Transform from a [Transform2D]. - - - - - - - - - Construct the Transform from a [Quat]. The origin will be Vector3(0, 0, 0). - - - - - - - - - Construct the Transform from a [Basis]. The origin will be Vector3(0, 0, 0). - - - - - - - Returns the inverse of the transfrom, under the assumption that the transformation is composed of rotation, scaling and translation. - - - - - - - - - - - Interpolate to other Transform by weight amount (0-1). - - - - - - - Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). - - - - - - - - - - - Rotate the transform around the up vector to face the target. - - - - - - - Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors. - - - - - - - - - - - Rotate the transform around given axis by phi. The axis must be a normalized vector. - - - - - - - - - Scale the transform by the specified 3D scaling factors. - - - - - - - - - Translate the transform by the specified offset. - - - - - - - - - Transforms the given vector "v" by this transform. - - - - - - - - - Inverse-transforms vector "v" by this transform. - - - - - - The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. - - - The translation offset of the transform. - - - - - - - - 2D Transformation. 3x2 matrix. - - - Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a two [Vector2] x, y and [Vector2] "origin". It is similar to a 3x2 matrix. - - - - - - - - - Constructs the [Transform2D] from a 3D [Transform]. - - - - - - - - - - - - - Constructs the [Transform2D] from 3 [Vector2] consisting of rows x, y and origin. - - - - - - - - - - - Constructs the [Transform2D] from rotation angle in radians and position [Vector2]. - - - - - - - Returns the inverse of the matrix. - - - - - - - - - Transforms the given vector "v" by this transform basis (no translation). - - - - - - - - - Inverse-transforms vector "v" by this transform basis (no translation). - - - - - - - Return the origin [Vector2] (translation). - - - - - - - Return the rotation (in radians). - - - - - - - Return the scale. - - - - - - - - - - - Interpolate to other Transform2D by weight amount (0-1). - - - - - - - Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). - - - - - - - Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors. - - - - - - - - - Rotate the transform by phi. - - - - - - - - - Scale the transform by the specified 2D scaling factors. - - - - - - - - - Translate the transform by the specified offset. - - - - - - - - - Transforms the given vector "v" by this transform. - - - - - - - - - Inverse-transforms the given vector "v" by this transform. - - - - - - The translation offset of the transform. - - - The X axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. - - - The Y axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. - - - - - - - - Language Translation. - - - Translations are resources that can be loaded/unloaded on demand. They map a string to another string. - - - - - - - - - - - Add a message for translation. - - - - - - - - - Erase a message. - - - - - - - Return the locale of the translation. - - - - - - - - - Return a message for translation. - - - - - - - - - - - - - Return all the messages (keys). - - - - - - - - - Set the locale of the translation. - - - - - - - - - - - - - - - Server that manages all translations. Translations can be set to it and removed from it. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Control to show a tree of items. - - - This shows a tree of items that can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like text editing, buttons and popups. It can be useful for structural displaying and interactions. - Trees are built via code, using [TreeItem] objects to create the structure. They have a single root but multiple root can be simulated if a dummy hidden root is added. - [codeblock] - func _ready(): - var tree = Tree.new() - var root = tree.create_item() - tree.set_hide_root(true) - var child1 = tree.create_item(root) - var child2 = tree.create_item(root) - var subchild1 = tree.create_item(child1) - subchild1.set_text(0, "Subchild1") - [/codeblock] - - - - - - - Get whether the column titles are being shown. - - - - - - - Clear the tree. This erases all of the items. - - - - - - - - - Create an item in the tree and add it as the last child of [code]parent[/code]. If parent is not given, it will be added as the last child of the root, or it'll the be the root itself if the tree is empty. - - - - - - - Make the current selected item visible. This will scroll the tree to make sure the selected item is in sight. - - - - - - - - - - - - - Get whether a right click can select items. - - - - - - - - - Get the column index under the given point. - - - - - - - - - Get the title of the given column. - - - - - - - - - Get the width of the given column in pixels. - - - - - - - Get the amount of columns. - - - - - - - Get the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode]. - - - - - - - Get the flags of the current drop mode. - - - - - - - Get the current edited item. This is only available for custom cell mode. - - - - - - - Get the column of the cell for the current edited icon. This is only available for custom cell mode. - - - - - - - - - - - Get the rectangle area of the the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. - - - - - - - - - Get the tree item at the specified position (relative to the tree origin position). - - - - - - - - - Get the next selected item after the given one. - - - - - - - Get the index of the last pressed button. - - - - - - - Get the root item of the tree. - - - - - - - Get the current scrolling position. - - - - - - - Get the currently selected item. - - - - - - - Get the column number of the current selection. - - - - - - - Get whether the folding arrow is hidden. - - - - - - - - - - - - - - - - - Set whether or not a right mouse button click can select items. - - - - - - - - - - - Set whether a column will have the "Expand" flag of [Control]. - - - - - - - - - - - Set the minimum width of a column. - - - - - - - - - - - Set the title of a column. - - - - - - - - - Set whether the column titles visibility. - - - - - - - - - Set the amount of columns. - - - - - - - - - Set the drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. - - - - - - - - - Set whether the folding arrow should be hidden. - - - - - - - - - Set whether the root of the tree should be hidden. - - - - - - - - - Set the selection mode. Use one of the [code]SELECT_*[/code] constants. - - - - - - - - - - - - - Emitted when a button on the tree was pressed (see [method TreeItem.add_button]). - - - - - Emitted when a cell is selected. - - - - - - - - - - - - - Emitted when a cell with the [code]CELL_MODE_CUSTOM[/code] is clicked to be edited. - - - - - - - Emitted when the right mouse button is pressed if RMB selection is active and the tree is empty. - - - - - Emitted when an item is activated (double-clicked). - - - - - - - Emitted when an item is collapsed by a click on the folding arrow. - - - - - - - - - - - - - Emitted when an item is editted. - - - - - - - - - - - Emitted when an item is selected with right mouse button. - - - - - Emitted when an item is selected with right mouse button. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Node useful for animations with unknown start and end points. - - - Node useful for animations with unknown start and end points, procedural animations, making one node follow another, and other simple behavior. - Because it is easy to get it wrong, here is a quick usage example: - [codeblock] - var tween = get_node("Tween") - tween.interpolate_property(get_node("Node2D_to_move"), "transform/pos", Vector2(0,0), Vector2(100,100), 1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) - tween.start() - [/codeblock] - Some of the methods of this class require a property name. You can get the property name by hovering over the property in the inspector of the editor. - Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an TRANS_* constant, and refers to the way the timing of the animation is handled (you might want to see [code]http://easings.net/[/code] for some examples). The second accepts an EASE_* constant, and controls the where [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transision and easing to pick, you can try different TRANS_* constants with EASE_IN_OUT, and use the one that looks best. - - - - - - - - - - - - - - - - - - - - - - - - - Follow [code]method[/code] of [code]object[/code] and apply the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are animated by calling them with consequitive values. - [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. - - - - - - - - - - - - - - - - - - - - - - - - - Follow [code]property[/code] of [code]object[/code] and apply it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Note that [code]target:target_property[/code] would equal [code]object:property[/code] at the end of the tween. - [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. - - - - - - - Returns the time needed for all tweens to end in seconds, measured from the start. Thus, if you have two tweens, one ending 10 seconds after the start and the other - 20 seconds, it would return 20 seconds, as by that time all tweens would have finished. - - - - - - - Returns the speed that has been set from editor GUI or [method set_repeat]. - - - - - - - Returns the process mode that has been set from editor GUI or [method set_tween_process_mode] - - - - - - - - - - - - - - - - - - - - - - - Call [code]callback[/code] of [code]object[/code] after [code]duration[/code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback. - - - - - - - - - - - - - - - - - - - - - - - Call [code]callback[/code] of [code]object[/code] after [code]duration[/code] on the main thread (similar to [methog Object.call_deferred). [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback. - - - - - - - - - - - - - - - - - - - - - - - Animate [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values. - [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. - - - - - - - - - - - - - - - - - - - - - - - Animate [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. - [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. - - - - - - - Returns true if any tweens are currently running, and false otherwise. Note that this method doesn't consider tweens that have ended. - - - - - - - Returns true if repeat has been set from editor GUI or [method set_repeat]. - - - - - - - - - - - Stop animating and completely remove a tween, given its object and property/method pair. Passing empty String as key will remove all tweens for given object. - - - - - - - Stop animating and completely remove all tweens. - - - - - - - - - - - Resets a tween to the initial value (the one given, not the one before the tween), given its object and property/method pair. Passing empty String as key will reset all tweens for given object. - - - - - - - Resets all tweens to their initial values (the ones given, not those before the tween). - - - - - - - - - - - Continue animating a stopped tween, given its object and property/method pair. Passing empty String as key will resume all tweens for given object. - - - - - - - Continue animating all stopped tweens. - - - - - - - - - Seek the animation to the given [code]time[/code] in seconds. - - - - - - - - - Activate/deactivate the tween. You can use this for pausing animations, though [method stop_all] and [method resume_all] might be more fit for this. - - - - - - - - - Make the tween repeat after all tweens have finished. - - - - - - - - - Set the speed multiplier of the tween. Set it to 1 for normal speed, 2 for two times nromal speed, and 0.5 for half of the normal speed. Setting it to 0 would pause the animation, but you might consider using [method set_active] or [method stop_all] and [method resume_all] for this. - - - - - - - - - Set whether the Tween uses [code]_process[/code] or [code]_fixed_process[/code] (accepts TWEEN_PROCESS_IDLE and TWEEN_PROCESS_FIXED constants, respectively). - - - - - - - Start the tween node. You can define tweens both before and after this. - - - - - - - - - - - Stop animating a tween, given its object and property/method pair. Passing empty String as key will stop all tweens for given object. - - - - - - - Stop animating all tweens. - - - - - - - - - - - - - - - - - - - - - - - - - Animate [code]method[/code] of [code]object[/code] from the value returned by [code]initial.initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values. - [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. - - - - - - - - - - - - - - - - - - - - - - - - - Animate [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. - [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. - - - - - - - Returns the current time of the tween. - - - - - - - - - - - - - - - This signal is emitted when a tween ends. - - - - - - - - - This signal is emitted when a tween starts. - - - - - - - - - - - - - This signal is emitted each step of the tweening. - - - - - - The [Tween] should use [code]_fixed_process[/code] for timekeeping when this is enabled. - - - The [Tween] should use [code]_process[/code] for timekeeping when this is enabled (default). - - - Means that the animation is interpolated linearly. - - - Means that the animation is interpolated using a sine wave. - - - Means that the animation is interpolated with a quinary (to the power of 5) function. - - - Means that the animation is interpolated with a quartic (to the power of 4) function. - - - Means that the animation is interpolated with a quadratic (to the power of 2) function. - - - Means that the animation is interpolated with an exponential (some number to the power of x) function. - - - Means that the animation is interpolated with elasticity, wiggling around the edges. - - - Means that the animation is interpolated with a cubic (to the power of 3) function. - - - Means that the animation is interpolated with a function using square roots. - - - Means that the animation is interpolated by bouncing at, but never surpassing, the end. - - - Means that the animation is interpolated backing out at edges. - - - Signifies that the interpolation should be focused in the beginning. - - - Signifies that the interpolation should be focused in the end. - - - Signifies that the interpolation should be focused in both ends. - - - Signifies that the interpolation should be focused in both ends, but they should be switched (a bit hard to explain, try it for yourself to be sure). - - - - - - Helper to manage UndoRedo in the editor or custom tools. - - - Helper to manage UndoRedo in the editor or custom tools. It works by storing calls to functions in both 'do' an 'undo' lists. - Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action. - - - - - - - - - - - - - - - - - - - - - - - Set a property with a custom value. - - - - - - - - - Add a 'do' reference that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources. - - - - - - - - - - - - - - - - - - - - - - - Undo setting of a property with a custom value. - - - - - - - - - Add an 'undo' reference that will be erased if the 'undo' history is lost. This is useful mostly for nodes removed with the 'do' call (not the 'undo' call!). - - - - - - - Clear the undo/redo history and associated references. - - - - - - - Commit the action. All 'do' methods/properties are called/set when this function is called. - - - - - - - - - - - Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property] and [method add_undo_property]. - - - - - - - Get the name of the current action. - - - - - - - Get the version, each time a new action is committed, the version number of the UndoRedo is increased automatically. - This is useful mostly to check if something changed from a saved version. - - - - - - - - - - - - - - - Vertical box container. - - - Vertical box container. See [BoxContainer]. - - - - - - - - - - - - - Vertical version of [ScrollBar], which goes from left (min) to right (max). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Vertical version of [Separator]. - - - Vertical version of [Separator]. It is used to separate objects horizontally, though (but it looks vertical!). - - - - - - - - - - - - - - - Vertical slider. - - - Vertical slider. See [Slider]. This one goes from left (min) to right (max). - - - - - - - - - - - - - - - - - - - - - - - - - - - Vertical split container. - - - Vertical split container. See [SplitContainer]. This goes from left to right. - - - - - - - - - - - - - - - - - - - The most important data type in Godot. - - - A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time, instead they are used mainly for communication, editing, serialization and moving data around. - - - - - - - - - Vector used for 2D Math. - - - 2-element structure that can be used to represent positions in 2d-space, or any other pair of numeric values. - - - - - - - - - - - Constructs a new Vector2 from the given x and y. - - - - - - - Returns a new vector with all components in absolute values (i.e. positive). - - - - - - - Returns the result of atan2 when called with the Vector's x and y as parameters (Math::atan2(x,y)). - Be aware that it therefore returns an angle oriented clockwise with regard to the (0, 1) unit vector, and not an angle oriented counter-clockwise with regard to the (1, 0) unit vector (which would be the typical trigonometric representation of the angle when calling Math::atan2(y,x)). - - - - - - - - - Returns the angle in radians between the two vectors. - - - - - - - - - Returns the angle in radians between the line connecting the two points and the x coordinate. - - - - - - - Returns the ratio of X to Y. - - - - - - - - - Bounce returns the vector "bounced off" from the given plane, specified by its normal vector. - - - - - - - - - Returns the vector with a maximum length. - - - - - - - - - - - - - - - Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t". - - - - - - - - - Returns the squared distance to vector "b". Prefer this function over "distance_to" if you need to sort vectors or need the squared distance for some formula. - - - - - - - - - Returns the distance to vector "b". - - - - - - - - - Returns the dot product with vector "b". - - - - - - - Remove the fractional part of x and y. - - - - - - - Returns whether the vector is normalized or not. - - - - - - - Returns the length of the vector. - - - - - - - Returns the squared length of the vector. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. - - - - - - - - - - - Returns the result of the linear interpolation between this vector and "b", by amount "t". - - - - - - - Returns a normalized vector to unit length. - - - - - - - - - Reflects the vector along the given plane, specified by its normal vector. - - - - - - - - - Rotates the vector by "phi" radians. - - - - - - - - - Slide returns the component of the vector along the given plane, specified by its normal vector. - - - - - - - - - Snaps the vector to a grid with the given size. - - - - - - - Returns a perpendicular vector. - - - - - - X component of the vector. - - - Y component of the vector. - - - - - - - - Vector class, which performs basic 3D vector math operations. - - - Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations. - - - - - - - - - - - - - Returns a Vector3 with the given components. - - - - - - - Returns a new vector with all components in absolute values (i.e. positive). - - - - - - - - - - - - - - - - - Bounce returns the vector "bounced off" from the given plane, specified by its normal vector. - - - - - - - Returns a new vector with all components rounded up. - - - - - - - - - Return the cross product with b. - - - - - - - - - - - - - - - Perform a cubic interpolation between vectors pre_a, a, b, post_b (a is current), by the given amount (t). - - - - - - - - - Return the squared distance (distance minus the last square root) to b. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula. - - - - - - - - - Return the distance to b. - - - - - - - - - Return the dot product with b. - - - - - - - Returns a new vector with all components rounded down. - - - - - - - Returns the inverse of the vector. This is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z ) - - - - - - - Returns whether the vector is normalized or not. - - - - - - - Return the length of the vector. - - - - - - - Return the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. - - - - - - - - - - - Linearly interpolates the vector to a given one (b), by the given amount (t). - - - - - - - Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the largest. - - - - - - - Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the smallest. - - - - - - - Return a copy of the normalized vector to unit length. This is the same as v / v.length(). - - - - - - - - - Return the outer product with b. - - - - - - - - - Reflects the vector along the given plane, specified by its normal vector. - - - - - - - - - - - Rotates the vector around some axis by phi radians. The axis must be a normalized vector. - - - - - - - - - Slide returns the component of the vector along the given plane, specified by its normal vector. - - - - - - - - - Return a copy of the vector, snapped to the lowest neared multiple. - - - - - - - Return a diagonal matrix with the vector as main diagonal. - - - - - - X component of the vector. - - - Y component of the vector. - - - Z component of the vector. - - - - - Enumerated value for the X axis. Returned by functions like max_axis or min_axis. - - - Enumerated value for the Y axis. - - - Enumerated value for the Z axis. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example: - [codeblock] - # vehicle is an instance of VehicleBody - var speed = vehicle.get_linear_velocity().length() - [/codeblock] - - - - - - - - - - - - - Return the steering angle (in radians). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the steering angle (in radians). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Control to play video files. - - - This control has the ability to play video streams. The only format accepted is the OGV Theora, so any other format must be converted before using in a project. - - - - - - - Get the selected audio track (for multitrack videos). - - - - - - - Get the amount of miliseconds to store in buffer while playing. - - - - - - - Get the video stream. - - - - - - - Get the name of the video stream. - - - - - - - Get the current position of the stream, in seconds. - - - - - - - Get the current frame of the video as a [Texture]. - - - - - - - Get the volume of the audio track as a linear value. - - - - - - - Get the volume of the audio track in decibels. - - - - - - - Get whether or not the video is set as autoplay. - - - - - - - Get whether or not the expand property is set. - - - - - - - Get whether or not the video is paused. - - - - - - - Get whether or not the video is playing. - - - - - - - Start the video playback. - - - - - - - - - Set the audio track (for multitrack videos). - - - - - - - - - Set whether this node should start playing automatically. - - - - - - - - - Set the amount of miliseconds to buffer during playback. - - - - - - - - - Set the expand property. If enabled, the video will grow or shrink to fit the player size, otherwise it will play at the stream resolution. - - - - - - - - - Set whether the video should pause the playback. - - - - - - - - - Set the video stream for this player. - - - - - - - - - Set the audio volume as a linear value. - - - - - - - - - Set the audio volume in decibels. - - - - - - - Stop the video playback. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Creates a sub-view into the screen. - - - A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too. - Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports. - If a viewport is a child of a [Control], it will automatically take up its same rect and position, otherwise they must be set manually. - Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it. - Also, viewports can be assigned to different screens in case the devices have multiple screens. - Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw. - - - - - - - Return the 3D world of the viewport, or if no such present, the one of the parent viewport. - - - - - - - Return the 2D world of the viewport. - - - - - - - Return the active 3D camera. - - - - - - - Get the canvas transform of the viewport. - - - - - - - - - - - - - - - - - - - Get the total transform of the viewport. - - - - - - - Get the global canvas transform of the viewport. - - - - - - - Get whether the rendered texture has filters enabled. - - - - - - - Get the mouse position, relative to the viewport. - - - - - - - - - - - - - Get whether picking for all physics objects inside the viewport is enabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the viewport rect. If the viewport is child of a control, it will use the same rect as the parent. Otherwise, if the rect is empty, the viewport will use all the allowed space. - - - - - - - Get the size override set with [method set_size_override]. - - - - - - - Get the viewport's texture, for use with various objects that you want to texture with the viewport. - - - - - - - Get when the viewport would be updated, will be one of the [code]UPDATE_*[/code] constants. - - - - - - - - - - - - - Set whether the render target is flipped on the Y axis. - - - - - - - Get the viewport RID from the [VisualServer]. - - - - - - - Return the final, visible rect in global screen coordinates. - - - - - - - Return the 3D world of the viewport. - - - - - - - Return the 2D world of the viewport. - - - - - - - Returs the drag data from the GUI, that was previously returned by [method Control.get_drag_data]. - - - - - - - Returs whether there are shown modals on-screen. - - - - - - - Return whether the viewport lets whatever is behind it to show. - - - - - - - - - - - - - - - - - - - - - Returns whether the viewport sends sounds to the speakers. - - - - - - - Returns whether the viewport sends soundsfrom 2D emitters to the speakers. - - - - - - - Return whether input to the viewport is disabled. - - - - - - - Get the enabled status of the size override set with [method set_size_override]. - - - - - - - Get the enabled status of the size strech override set with [method set_size_override_stretch]. - - - - - - - - - - - - - Return whether the viewport is using a world separate from the parent viewport's world. - - - - - - - - - Makes the viewport send sounds to the speakers. - - - - - - - - - Makes the viewport send sounds from 2D emitters to the speakers. - - - - - - - - - - - - - - - - - Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]\ s. This is relative to the global canvas transform of the viewport. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set whether input to the viewport is disabled. - - - - - - - - - Set the global canvas transform of the viewport. The canvas transform is relative to this. - - - - - - - - - - - - - - - - - - - - - - - - - Enable/disable picking for all physics objects inside the viewport. - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the size of the viewport. - - - - - - - - - - - - - Set the size override of the viewport. If the enable parameter is true, it would use the override, otherwise it would use the default size. If the size parameter is equal to [code](-1, -1)[/code], it won't update the size. - - - - - - - - - Set whether the size override affects stretch as well. - - - - - - - - - - - - - - - - - If this viewport is a child of another viewport, keep the previously drawn background visible. - - - - - - - - - Set when the render target would be updated, using the [code]UPDATE_*[/code] constants - - - - - - - - - - - - - - - - - If true this viewport will be bound to our ARVR Server. - If this is our main Godot viewport our AR/VR output will be displayed on screen. - If output is redirected to an HMD we'll see the output of just one of the eyes without any distortion applied else we'll see the stereo buffer with distortion applied if applicable - If this is an extra viewport output will only work if redirection to an HMD is supported by the interface. The render target will allow you to use the undistorted output for the right eye in the display. - - - - - - - - - Make the viewport use a world separate from the parent viewport's world. - - - - - - - - - Set whether the viewport is flipped on the Y axis. - - - - - - - - - Change the 3D world of the viewport. - - - - - - - - - - - - - - - - - - - - - - - Force update of the 2D and 3D worlds. - - - - - - - Returns whether this viewport is using our ARVR Server - - - - - - - - - Warp the mouse to a position, relative to the viewport. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means. - - - - - - Do not update the render target. - - - Update the render target once, then switch to [code]UPDATE_DISABLED[/code] - - - Update the render target only when it is visible. This is the default value. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Enable certain nodes only when visible. - - - The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself. - - - - - - - - - Returns whether the specified enabler was set to true or not. - - - - - - - - - - - Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler is not in view. See the constants for enablers and what they affect. - - - - - - - - - - - - This enabler will freeze [RigidBody] nodes. - - - This enabler will pause [AnimationPlayer] nodes. - - - - - - - - Enable certain nodes only when visible. - - - The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler2D itself. - - - - - - - - - Returns whether the specified enabler was set to true or not. - - - - - - - - - - - Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler2D is not in view. See the constants for enablers and what they affect. - - - - - - - - - - - - - - - - - - - - This enabler will freeze [RigidBody2D] nodes. - - - This enabler will pause [AnimationPlayer] nodes. - - - This enabler will stop [Particles2D] nodes. - - - - - This enabler will stop the parent's _process function. - - - This enabler will stop the parent's _fixed_process function. - - - - - - - - Detect when the node is visible on screen. - - - The VisibilityNotifier is used to notify when its bounding box enters the screen, is visible on the screen, or when it exits the screen. - - - - - - - Return the visibility bounding box of the VisibilityNotifier. - - - - - - - Return true if any part of the bounding box is on the screen. - - - - - - - - - Set the visibility bounding box of the VisibilityNotifier. - - - - - - - - - - - - - Emitted when the VisibilityNotifier enters a [Camera]'s view. - - - - - - - Emitted when the VisibilityNotifier exits a [Camera]'s view. - - - - - Emitted when the VisibilityNotifier enters the screen. - - - - - Emitted when the VisibilityNotifier exits the screen. - - - - - - - - - Detect when the node is visible on screen. - - - The VisibilityNotifier2D is used to notify when its bounding rectangle enters the screen, is visible on the screen, or when it exits the screen. - - - - - - - Return the visibility bounding rectangle of the VisibilityNotifier2D. - - - - - - - Return true if any part of the bounding rectangle is on the screen. - - - - - - - - - Set the visibility bounding rectangle of the VisibilityNotifier2D. - - - - - - - - - - - Emitted when the VisibilityNotifier2D enters the screen. - - - - - Emitted when the VisibilityNotifier2D exits the screen. - - - - - - - Emitted when the VisibilityNotifier2D enters a [Viewport]'s view. - - - - - - - Emitted when the VisibilityNotifier2D exits a [Viewport]'s view. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Server for anything visible. - - - Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. - The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Holds an [Object], but does not contribute to the reference count if the object is a reference. - - - A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GDScript.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to eachother. Without weakrefs, using these classes could lead to memory leaks, since both references keep eachother from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. - - - - - - - Returns the [Object] this weakref is referring to. - - - - - - - - - Base class for window dialogs. - - - Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel [Control] that draws a window decoration and allows motion and resizing. - - - - - - - Return the close [TextureButton]. - - - - - - - - - - - - - Return the title of the window. - - - - - - - - - - - - - - - - - Set the title of the window. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Class that has everything pertaining to a world. - - - Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Class that has everything pertaining to a 2D world. - - - Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world. - - - - - - - Retrieve the [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing. - - - - - - - Retrieve the state of this world's physics space. This allows arbitrary querying for collision. - - - - - - - Retrieve the [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area. - - - - - - - - - Sets environment properties for the entire scene - - - The [WorldEnvironment] node can be added to a scene in order to set default [Environment] variables for the scene. The [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time. The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). - - - - - - - Return the [Environment] currently bound. - - - - - - - - - Set the currently bound [Environment] to the one specified. - - - - - - - - - - - - - Low-level class for creating parsers for XML files. - - - This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low level so it can be applied to any possible schema. - - - - - - - Get the amount of attributes in the current element. - - - - - - - - - Get the name of the attribute specified by the index in [code]idx[/code] argument. - - - - - - - - - Get the value of the attribute specified by the index in [code]idx[/code] argument. - - - - - - - Get the current line in the parsed file (currently not implemented). - - - - - - - - - Get the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute. - - - - - - - - - Get the value of a certain attribute of the current element by name. This will return an empty [String] if the attribute is not found. - - - - - - - Get the contents of a text node. This will raise an error in any other type of node. - - - - - - - Get the name of the current element node. This will raise an error if the current node type is not [code]NODE_ELEMENT[/code] nor [code]NODE_ELEMENT_END[/code] - - - - - - - Get the byte offset of the current node since the beginning of the file or buffer. - - - - - - - Get the type of the current node. Compare with [code]NODE_*[/code] constants. - - - - - - - - - Check whether or not the current element has a certain attribute. - - - - - - - Check whether the current element is empty (this only works for completely empty tags, e.g. <element \>). - - - - - - - - - Open a XML file for parsing. This returns an error code. - - - - - - - - - Open a XML raw buffer for parsing. This returns an error code. - - - - - - - Read the next node of the file. This returns an error code. - - - - - - - - - Move the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code. - - - - - - - Skips the current section. If the node contains other elements, they will be ignored and the cursor will go to the closing of the current element. - - - - - - There's no node (no file or buffer opened) - - - Element (tag) - - - End of element - - - Text node - - - Comment node - - - CDATA content - - - Unknown node - - - - - - Sort all child nodes based on their Y positions. - - - Sort all child nodes based on their Y positions. The child node must inherit from [CanvasItem] for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position. - - - - - - - Returns true if the children nodes are being sorted. - - - - - - - - - Set whether the children nodes are sorted or not. (default true) - - - - - - - - - - - - - Boolean built-in type - - - Boolean built-in type. - - - - - - - - - Cast an [int] value to a boolean value, this method will return true if called with an integer value different to 0 and false in other case. - - - - - - - - - Cast a [float] value to a boolean value, this method will return true if called with a floating point value different to 0 and false in other case. - - - - - - - - - Cast a [String] value to a boolean value, this method will return true if called with a non empty string and false in other case. Examples: [code]bool('False')[/code] returns true, [code]bool('')[/code]. returns false - - - - - - - - - Float built-in type - - - Float built-in type. - - - - - - - - - Cast a [bool] value to a floating point value, [code]float(true)[/code] will be equals to 1.0 and [code]float(false)[/code] will be equals to 0.0. - - - - - - - - - Cast an [int] value to a floating point value, [code]float(1)[/code] will be equals to 1.0. - - - - - - - - - Cast a [String] value to a floating point value. This method accepts float value strings like [code] '1.23' [/code] and exponential notation strings for its parameter so calling [code] float('1e3') [/code] will return 1000.0 and calling [code] float('1e-3') [/code] will return -0.001. - - - - - - - - - Integer built-in type. - - - Integer built-in type. - - - - - - - - - Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0. - - - - - - - - - Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. - - - - - - - - - Cast a [String] value to an integer value, this method is an integer parser from a string, so calling this method with an invalid integer string will return 0, a valid string will be something like [code]'1.7'[/code]. This method will ignore all non-number characters, so calling [code]int('1e3')[/code] will return 13. - - - - - - - diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml new file mode 100644 index 0000000000..0eb1247bbc --- /dev/null +++ b/doc/classes/@GDScript.xml @@ -0,0 +1,911 @@ + + + + Built-in GDScript functions. + + + This contains the list of built-in gdscript functions. Mostly math functions and other utilities. Everything else is expanded by objects. + + + + + + + + + + + + + + + + + + + Returns a 32 bit color with red, green, blue and alpha channels. Each channel has 8bits of information ranging from 0 to 255. + 'r8' red channel + 'g8' green channel + 'b8' blue channel + 'a8' alpha channel + [codeblock] + red = Color8(255, 0, 0) + [/codeblock] + + + + + + + + + + + Returns color 'name' with alpha ranging from 0 to 1. Note: 'name' is defined in color_names.inc. + [codeblock] + red = ColorN('red') + [/codeblock] + + + + + + + + + Returns the absolute value of parameter 's' (i.e. unsigned value, works for integer and float). + [codeblock] + # a is 1 + a = abs(-1) + [/codeblock] + + + + + + + + + Returns the arc cosine of 's' in radians. Use to get the angle of cosine 's'. + [codeblock] + # c is 0.523599 or 30 degrees if converted with rad2deg(s) + c = acos(0.866025) + [/codeblock] + + + + + + + + + Returns the arc sine of 's' in radians. Use to get the angle of sine 's'. + [codeblock] + # s is 0.523599 or 30 degrees if converted with rad2deg(s) + s = asin(0.5) + [/codeblock] + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the arc tangent of y/x in radians. Use to get the angle of tangent y/x. To compute the value, the function takes into account the sign of both arguments in order to determine the quadrant. + [codeblock] + # a is 3.141593 + a = atan(0,-1) + [/codeblock] + + + + + + + + + Decode a byte array back to a value. + + + + + + + + + Rounds 's' upward, returning the smallest integral value that is not less than 's'. + [codeblock] + # i is 2 + i = ceil(1.45) + # i is 2 + i = ceil(1.001) + [/codeblock] + + + + + + + + + Returns a character as String of the given ASCII code. + [codeblock] + # a is 'A' + a = char(65) + # a is 'a' + a = char(65+32) + [/codeblock] + + + + + + + + + + + + + Clamp 'val' and return a value not less than 'min' and not more than 'max'. + [codeblock] + speed = 1000 + # a is 20 + a = clamp(speed, 1, 20) + + speed = -10 + # a is 1 + a = clamp(speed, 1, 20) + [/codeblock] + + + + + + + + + + + Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in [@Global Scope]. + [codeblock] + a = Vector2(1, 0) + # prints 1 + print(a.length()) + a = convert(a, TYPE_STRING) + # prints 6 + # (1, 0) is 6 characters + print(a.length()) + [/codeblock] + + + + + + + + + Returns the cosine of angle 's' in radians. + [codeblock] + # prints 1 and -1 + print(cos(PI*2)) + print(cos(PI)) + [/codeblock] + + + + + + + + + Returns the hyperbolic cosine of 's' in radians. + [codeblock] + # prints 1.543081 + print(cosh(1)) + [/codeblock] + + + + + + + + + Convert from decibels to linear energy (audio). + + + + + + + + + Returns the number of digit places after the decimal that the first non-zero digit occurs. + [codeblock] + # n is 2 + n = decimals(0.035) + [/codeblock] + + + + + + + + + + + + + Returns the result of 'value' decreased by 'step' * 'amount'. + [codeblock] + # a = 59 + a = dectime(60, 10, 0.1)) + [/codeblock] + + + + + + + + + Returns degrees converted to radians. + [codeblock] + # r is 3.141593 + r = deg2rad(180) + [/codeblock] + + + + + + + + + Convert a previously converted instance to dictionary back into an instance. Useful for deserializing. + + + + + + + + + + + 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. + + + + + + + + + Returns [b]e[/b] raised to the power of 's'. [b]e[/b] sometimes called "Euler's number" is a mathematical constant whose value is approximately 2.71828. + + + + + + + + + Returns the largest integer value (rounded down) that is less than or equal to 's'. + + + + + + + + + + + Returns the floating-point remainder of x/y (rounded towards zero): + [codeblock] + fmod = x - tquot * y + [/codeblock] + Where tquot is the truncated (i.e., rounded towards zero) result of: x/y. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the integer hash of the variable passed. + [codeblock] + # print 177670 + print(hash("a")) + [/codeblock] + + + + + + + + + Returns the passed instance converted a dictionary (useful for serializing). + [codeblock] + var foo = "bar" + func _ready(): + var d = inst2dict(self) + print(d.keys()) + print(d.values()) + [/codeblock] + Prints out: + [codeblock] + [@subpath, @path, foo] + [, res://test.gd, bar] + [/codeblock] + + + + + + + + + Returns the Object that corresponds to 'instance_id'. All Objects have a unique instance ID. + [codeblock] + var foo = "bar" + func _ready(): + var id = get_instance_id() + var inst = instance_from_id(id) + print(inst.foo) + [/codeblock] + Prints "bar" + + + + + + + + + + + + + Returns a normalized value considering the given range. + [codeblock] + inverse_lerp(3, 5, 4) # return 0.5 + [/codeblock] + + + + + + + + + Returns True/False whether 's' is an infinity value (either positive infinity or negative infinity). + + + + + + + + + Returns True/False whether 's' is a NaN (Not-A-Number) value. + + + + + + + + + Returns length of Variant 'var'. Length is the character count of String, element count of Array, size of Dictionary, etc. Note: Generates a fatal error if Variant can not provide a length. + [codeblock] + a = [1, 2, 3, 4] + print(len(a)) + [/codeblock] + Prints 4 + + + + + + + + + + + + + Linear interpolates between two values by a normalized value. + + + + + + + + + Convert from linear energy to decibels (audio). + + + + + + + + + Load a resource from the filesystem located at 'path'. Note: resource paths can be obtained by right clicking on a resource in the Assets Pannel and choosing "Copy Path". + [codeblock] + # load a scene called main located in the root of the project directory + var main = load("res://main.tscn") + [/codeblock] + + + + + + + + + Natural logarithm. The amount of time needed to reach a certain level of continuous growth. Note: This is not the same as the log funcation on your calculator which is a base 10 logarithm. + [codeblock] + # a is 2.302585 + a = log(10) + [/codeblock] + + + + + + + + + + + Returns the maximum of two values. + [codeblock] + # a is 2 + a = max(1,2) + # a is -3.99 + a = max(-3.99, -4) + [/codeblock] + + + + + + + + + + + Returns the minimum of two values. + [codeblock] + # a is 1 + a = min(1,2) + # a is -4 + a = min(-3.99, -4) + [/codeblock] + + + + + + + + + Returns the nearest larger power of 2 for an integer. + [codeblock] + # a is 4 + a = nearest_po2(3) + # a is 4 + a = nearest_po2(4) + # a is 8 + a = nearest_po2(5) + [/codeblock] + + + + + + + + + Parse JSON text to a Variant (use [method typeof] to check if it is what you expect). + Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert every numerical values to [float] types. + [codeblock] + p = parse_json('["a", "b", "c"]') + if typeof(p) == TYPE_ARRAY: + print(p[0]) + else: + print("unexpected results") + [/codeblock] + + + + + + + + + + + Returns the result of 'x' raised to the power of 'y'. + [codeblock] + # a is 32 + a = pow(2,5) + [/codeblock] + + + + + + + + + Returns a resource from the filesystem that is loaded during script parsing. Note: resource paths can be obtained by right clicking on a resource in the Assets Pannel and choosing "Copy Path". + [codeblock] + # load a scene called main located in the root of the project directory + var main = preload("res://main.tscn") + + + + + + + Converts one or more arguments to strings in the best way possible and prints them to the console. + [codeblock] + a = [1,2,3] + print("a","b",a) + [/codeblock] + Prints ab[1, 2, 3] + + + + + + + Print a stack track at code location, only works when running with debugger turned on. + + + + + + + Print one or more arguments to strings in the best way possible to standard error line. + + + + + + + Print one or more arguments to strings in the best way possible to console. No newline is added at the end. + + + + + + + Print one or more arguments to the console with a space between each argument. + + + + + + + Print one or more arguments to the console with a tab between each argument. + + + + + + + + + Convert from radians to degrees. + + + + + + + + + + + Random range, any floating point value between 'from' and 'to'. + + + + + + + + + Random from seed: pass a seed, and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits. + + + + + + + Return a random floating point value between 0 and 1. + + + + + + + Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use remainder. For example, to get a random integer between 0 and 19 inclusive, you can use randi() % 20. + + + + + + + Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. + + + + + + + Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment). + + + + + + + + + + + + + + + + + Maps a value from range [istart, istop] to [ostart, ostop]. + [codeblock] + range_lerp(75, 0, 100, -1, 1) # returns 0.5 + [/codeblock] + + + + + + + + + Returns the integral value that is nearest to s, with halfway cases rounded away from zero. + + + + + + + + + Set seed for the random number generator. + + + + + + + + + Return sign (-1 or +1). + + + + + + + + + Returns the sine of an angle of s radians. + + + + + + + + + Returns the hyperbolic sine of s. + + + + + + + + + Returns the square root of s. + + + + + + + + + + + Snap float value to a given step. + + + + + + + Convert one or more arguments to string in the best way possible. + + + + + + + + + Convert a formatted string that was returned by [method var2str] to the original value. + + + + + + + + + Returns the tangent of an angle of s radians. + + + + + + + + + Returns the hyperbolic tangent of s. + + + + + + + + + Convert a Variant to json text. + + + + + + + + + Returns whether the given class is exist in [ClassDB]. + [codeblock] + type_exists("Sprite") # returns true + type_exists("Variant") # returns false + [/codeblock] + + + + + + + + + Return the internal type of the given Variant object, using the TYPE_* enum in [@Global Scope]. + + + + + + + + + This method is used to validate the structure and data types of a piece of JSON, similar to XML Schema for XML. + + + + + + + + + Encode a variable value to a byte array. + + + + + + + + + Convert a value to a formatted string that can later be parsed using [method str2var]. + + + + + + + + + Return a weak reference to an object. + A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it. + + + + + + + + + + + Stop the function execution and return the current state. Call [method GDFunctionState.resume] on the state to resume execution. This invalidates the state. + Returns anything that was passed to the resume function call. If passed an object and a signal, the execution is resumed when the object's signal is emitted. + + + + + + Constant that represents how many times the diameter of a circumference fits around its perimeter. + + + A positive infinity. (For negative infinity, use -INF). + + + 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. + + + diff --git a/doc/classes/@Global Scope.xml b/doc/classes/@Global Scope.xml new file mode 100644 index 0000000000..22c9b58c48 --- /dev/null +++ b/doc/classes/@Global Scope.xml @@ -0,0 +1,1233 @@ + + + + Global scope constants and variables. + + + Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. It's not much. + Singletons are also documented here, since they can be accessed from anywhere. + + + + + + + + + + [ARVRServer] singleton + + + [AudioServer] singleton + + + [ClassDB] singleton + + + [Engine] singleton + + + [Geometry] singleton + + + [IP] singleton + + + [Input] singleton + + + [InputMap] singleton + + + [Marshalls] singleton + + + [OS] singleton + + + [Performance] singleton + + + [Physics2DServer] singleton + + + [PhysicsServer] singleton + + + [ProjectSettings] singleton + + + [ResourceLoader] singleton + + + [ResourceSaver] singleton + + + [TranslationServer] singleton + + + [VisualServer] singleton + + + + + Left margin, used usually for [Control] or [StyleBox] derived classes. + + + Top margin, used usually for [Control] or [StyleBox] derived classes. + + + Right margin, used usually for [Control] or [StyleBox] derived classes. + + + Bottom margin, used usually for [Control] or [StyleBox] derived classes. + + + General vertical alignment, used usually for [Separator], [ScrollBar], [Slider], etc. + + + General horizontal alignment, used usually for [Separator], [ScrollBar], [Slider], etc. + + + Horizontal left alignment, usually for text-derived classes. + + + Horizontal center alignment, usually for text-derived classes. + + + Horizontal right alignment, usually for text-derived classes. + + + Vertical top alignment, usually for text-derived classes. + + + Vertical center alignment, usually for text-derived classes. + + + Vertical bottom alignment, usually for text-derived classes. + + + Scancodes with this bit applied are non printable. + + + Escape Key + + + Tab Key + + + Shift-Tab Key + + + Backspace Key + + + Return Key (On Main Keyboard) + + + Enter Key (On Numpad) + + + Insert Key + + + Delete Key + + + Pause Key + + + Printscreen Key + + + + + + + Home Key + + + End Key + + + Left Arrow Key + + + Up Arrow Key + + + Right Arrow Key + + + Down Arrow Key + + + Pageup Key + + + Pagedown Key + + + Shift Key + + + Control Key + + + + + Alt Key + + + Capslock Key + + + Numlock Key + + + Scrolllock Key + + + F1 Key + + + F2 Key + + + F3 Key + + + F4 Key + + + F5 Key + + + F6 Key + + + F7 Key + + + F8 Key + + + F9 Key + + + F10 Key + + + F11 Key + + + F12 Key + + + F13 Key + + + F14 Key + + + F15 Key + + + F16 Key + + + Multiply Key on Numpad + + + Divide Key on Numpad + + + Subtract Key on Numpad + + + Period Key on Numpad + + + Add Key on Numpad + + + Number 0 on Numpad + + + Number 1 on Numpad + + + Number 2 on Numpad + + + Number 3 on Numpad + + + Number 4 on Numpad + + + Number 5 on Numpad + + + Number 6 on Numpad + + + Number 7 on Numpad + + + Number 8 on Numpad + + + Number 9 on Numpad + + + Super Left key (windows key) + + + Super Left key (windows key) + + + Context menu key + + + + + + + Help key + + + + + + + Back key + + + Forward key + + + Stop key + + + Refresh key + + + Volume down key + + + Mute volume key + + + Volume up key + + + + + + + + + + + + + Media play key + + + Media stop key + + + Previous song key + + + Next song key + + + Media record key + + + Home page key + + + Favorites key + + + Search key + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Space Key + + + ! key + + + " key + + + # key + + + $ key + + + % key + + + & key + + + ' key + + + ( key + + + ) key + + + * key + + + + key + + + , key + + + - key + + + . key + + + / key + + + Number 0 + + + Number 1 + + + Number 2 + + + Number 3 + + + Number 4 + + + Number 5 + + + Number 6 + + + Number 7 + + + Number 8 + + + Number 9 + + + : key + + + ; key + + + Lower than key + + + = key + + + Greater than key + + + ? key + + + @ key + + + A Key + + + B Key + + + C Key + + + D Key + + + E Key + + + F Key + + + G Key + + + H Key + + + I Key + + + J Key + + + K Key + + + L Key + + + M Key + + + N Key + + + O Key + + + P Key + + + Q Key + + + R Key + + + S Key + + + T Key + + + U Key + + + V Key + + + W Key + + + X Key + + + Y Key + + + Z Key + + + [ key + + + \ key + + + ] key + + + ^ key + + + _ key + + + + + { key + + + | key + + + } key + + + ~ key + + + + + + + ¢ key + + + + + + + + + ¦ key + + + § key + + + ¨ key + + + © key + + + + + « key + + + » key + + + ‐ key + + + ® key + + + + + ° key + + + ± key + + + ² key + + + ³ key + + + ´ key + + + µ key + + + + + · key + + + ¬ key + + + + + + + + + + + ½ key + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Left Mouse Button + + + Right Mouse Button + + + Middle Mouse Button + + + Mouse wheel up + + + Mouse wheel down + + + Mouse wheel left button + + + Mouse wheel right button + + + + + + + + + Joypad Button 0 + + + Joypad Button 1 + + + Joypad Button 2 + + + Joypad Button 3 + + + Joypad Button 4 + + + Joypad Button 5 + + + Joypad Button 6 + + + Joypad Button 7 + + + Joypad Button 8 + + + Joypad Button 9 + + + Joypad Button 10 + + + Joypad Button 11 + + + Joypad Button 12 + + + Joypad Button 13 + + + Joypad Button 14 + + + Joypad Button 15 + + + Joypad Button 16 + + + DUALSHOCK circle button + + + DUALSHOCK X button + + + DUALSHOCK square button + + + DUALSHOCK triangle button + + + XBOX controller B button + + + XBOX controller A button + + + XBOX controller X button + + + XBOX controller Y button + + + + + + + + + + + Joypad Button Select + + + Joypad Button Start + + + Joypad DPad Up + + + Joypad DPad Down + + + Joypad DPad Left + + + Joypad DPad Right + + + Joypad Left Shoulder Button + + + Joypad Left Trigger + + + Joypad Left Stick Click + + + Joypad Right Shoulder Button + + + Joypad Right Trigger + + + Joypad Right Stick Click + + + Joypad Left Stick Horizontal Axis + + + Joypad Left Stick Vertical Axis + + + Joypad Right Stick Horizontal Axis + + + Joypad Right Stick Vertical Axis + + + + + + + Joypad Left Trigger Analog Axis + + + Joypad Right Trigger Analog Axis + + + + + Joypad Left Stick Horizontal Axis + + + Joypad Left Stick Vertical Axis + + + Joypad Right Stick Horizontal Axis + + + Joypad Right Stick Vertical Axis + + + + + + + Functions that return Error return OK when everything went ok. Most functions don't return error anyway and/or just print errors to stdout. + + + Generic fail return error. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No hint for edited property. + + + Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats. + + + 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 for an enumerated value, like "Hello,Something,Else". This is valid for integer, float and string properties. + + + + + + + + + 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. + + + + + + + + + + + String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc". + + + String property is a directory (so pop up a file dialog when edited). + + + + + + + String property is a resource, so open the resource popup menu when edited. + + + + + + + + + + + Property will be used as storage (default). + + + Property will be visible in editor (default). + + + + + + + + + + + + + + + + + + + + + + + + + + + Default usage (storage and editor). + + + + + + + + + + + + + + + + + + + + + + + Variable is of type nil (only applied for null). + + + Variable is of type [bool]. + + + Variable is of type [int]. + + + Variable is of type [float]/real. + + + Variable is of type [String]. + + + Variable is of type [Vector2]. + + + Variable is of type [Rect2]. + + + Variable is of type [Vector3]. + + + Variable is of type [Transform2D]. + + + Variable is of type [Plane]. + + + Variable is of type [Quat]. + + + Variable is of type [Rect3]. + + + Variable is of type [Basis]. + + + Variable is of type [Transform]. + + + Variable is of type [Color]. + + + Variable is of type [NodePath]. + + + Variable is of type [RID]. + + + Variable is of type [Object]. + + + Variable is of type [Dictionary]. + + + Variable is of type [Array]. + + + Variable is of type [PoolByteArray]. + + + Variable is of type [PoolIntArray]. + + + Variable is of type [PoolRealArray]. + + + Variable is of type [PoolStringArray]. + + + Variable is of type [PoolVector2Array]. + + + Variable is of type [PoolVector3Array]. + + + Variable is of type [PoolColorArray]. + + + + + diff --git a/doc/classes/@NativeScript.xml b/doc/classes/@NativeScript.xml new file mode 100644 index 0000000000..03e6416b19 --- /dev/null +++ b/doc/classes/@NativeScript.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/@VisualScript.xml b/doc/classes/@VisualScript.xml new file mode 100644 index 0000000000..2392e3ecca --- /dev/null +++ b/doc/classes/@VisualScript.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml new file mode 100644 index 0000000000..3856326155 --- /dev/null +++ b/doc/classes/ARVRAnchor.xml @@ -0,0 +1,60 @@ + + + + Anchor point in AR Space + + + The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. + This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognised. + Keep in mind that as long as plane detection is enable the size, placing and orientation of an anchor will be updates as the detection logic learns more about the real world out there especially if only part of the surface is in view. + + + + + + + + + + + Returns the anchor id for this anchor. + + + + + + + Returns the name given to this anchor. + + + + + + + Returns true if the anchor is being tracked and false if no anchor with this id is currently known. + + + + + + + Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table. + + + + + + + + + Binds this anchor node to an anchor with this id. You can set this before the anchor itself exists. The first anchor that is identified gets id 1, the second id 2, etc. When anchors get removed that slot remains free and can be assigned to the next anchor that is identified. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merge them. + + + + + + + + + + diff --git a/doc/classes/ARVRCamera.xml b/doc/classes/ARVRCamera.xml new file mode 100644 index 0000000000..e6817d3417 --- /dev/null +++ b/doc/classes/ARVRCamera.xml @@ -0,0 +1,18 @@ + + + + A camera node with a few overrules for AR/VR applied such as location tracking. + + + This is a helper spatial node for our camera, note that if stereoscopic rendering is applicable (VR-HMD) most of the camera properties are ignored as the HMD information overrides them. The only properties that can be trusted are the near and far planes. + The position and orientation of this node is automatically updated by the ARVR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that in contrast to the ARVR Controller the render thread has access to the most up to date tracking data of the HMD and the location of the ARVRCamera can lag a few milliseconds behind what is used for rendering as a result. + + + + + + + + + + diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml new file mode 100644 index 0000000000..0e7c5be4f0 --- /dev/null +++ b/doc/classes/ARVRController.xml @@ -0,0 +1,100 @@ + + + + A spatial node representing a spatially tracked controller. + + + This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy pass throughs to the state of buttons and such on the controllers. + 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. + + + + + + + + + + + Returns the controller id currently assigned to this node. + + + + + + + If active, returns the name of the associated controller if provided by the AR/VR SDK used. + + + + + + + + + + + + + Returns true if the controller bound to this node is currently active and being tracked. + + + + + + + + + Returns the value of the given axis for things like triggers, touchpads, etc. that are embedded into the controller. + + + + + + + Returns the ID of the joystick object bound to this. Every controller tracked by the ARVR Server that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry. + + + + + + + + + Is the given button currently pressed? + + + + + + + + + Changes the id that identifies the controller bound to this node. The first controller that the ARVR Server detects will have id 1, the second id 2, the third id 3, etc. When a controller is turned off that slot is freed ensuring that controllers will keep the same id while it is turned on even when controllers with lower ids are turned off. + + + + + + + + + + + + + When a button on this controller is pressed, this signal is given. + + + + + + + When a button on this controller is released, this signal is given. + + + + + + diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml new file mode 100644 index 0000000000..ee3a4be51d --- /dev/null +++ b/doc/classes/ARVRInterface.xml @@ -0,0 +1,107 @@ + + + + Base class for ARVR interface implementation. + + + This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass ARVRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. + Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through ARVRServer. + + + + + + + + + + + Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc). + + + + + + + Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform. + + + + + + + Returns true if an HMD is available for this interface. + + + + + + + Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. + After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. + Note that you must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. + If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different. + While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However at this point in time only one interface can render to an HMD. + + + + + + + Returns true if this interface is active. + + + + + + + Returns true if this interface has been installed. Say your game is designed to work with OpenVR so you are using the OpenVR interface but the user hasn't installed SteamVR, this would return false. + + + + + + + Returns true if this interface is currently the primary interface (the interface responsible for showing the output). + + + + + + + + + Set this interface to the primary interface (unset the old one). + + + + + + + Returns true if this interface supports HMDs and by extension uses stereo scopic rendering. + + + + + + + Turns the interface off. + + + + + + + + + + Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. + + + Left eye output, this is mostly used internally when rendering the image for the left eye and obtaining positioning and projection information. + + + Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information. + + + diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/ARVROrigin.xml new file mode 100644 index 0000000000..888bb6ba18 --- /dev/null +++ b/doc/classes/ARVROrigin.xml @@ -0,0 +1,42 @@ + + + + Our origin point in AR/VR. + + + This is a special node within the AR/VR system that maps the physical location of the center of our tracking space to the virtual location within our game world. + There should be only one of these nodes in your scene and you must have one. All the ARVRCamera, ARVRController and ARVRAnchor nodes should be direct children of this node for spatial tracking to work correctly. + It is the position of this node that you update when you're character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point. + So say that your character is driving a car, the ARVROrigin node should be a child node of this car. If you implement a teleport system to move your character, you change the position of this node. Etc. + + + + + + + + + + + Get the world scale applied to our positioning. + + + + + + + + + Changes the world scaling factor. + Most AR/VR platforms will assume a unit size of 1 unit in your game world = 1 meter in the real world. This scale allows you to adjust this to the unit system you use in your game. + Note that this method is a passthrough to the ARVRServer itself. + + + + + + + + + + diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml new file mode 100644 index 0000000000..1379677344 --- /dev/null +++ b/doc/classes/ARVRPositionalTracker.xml @@ -0,0 +1,89 @@ + + + + A tracked object + + + An instance of this object represents a device that is tracked such as a controller or anchor point. HMDs aren't represented here as they are fully handled internally. + As controllers are turned on and the AR/VR interface detects them instances of this object are automatically added to this list of active tracking objects accessible through the ARVRServer + The ARVRController and ARVRAnchor both consume objects of this type and should be the objects you use in game. The positional trackers are just the under the hood objects that make this all work and are mostly exposed so GDNative based interfaces can interact with them. + + + + + + + + + + + + + + + + + If this is a controller that is being tracked the controller will also be represented by a joystick entry with this id. + + + + + + + If available this returns the name of the controller or anchor point. + + + + + + + Returns the orientation matrix of the controller. + + + + + + + Returns the position of the controller adjusted by world scale. + + + + + + + Returns true if the orientation of this device is being tracked. + + + + + + + Returns true if the position of this device is being tracked. + + + + + + + + + Returns the transform combining the orientation and position of this device. + + + + + + + Type of tracker. + + + + + + + + + + + + diff --git a/doc/classes/ARVRScriptInterface.xml b/doc/classes/ARVRScriptInterface.xml new file mode 100644 index 0000000000..54415539e0 --- /dev/null +++ b/doc/classes/ARVRScriptInterface.xml @@ -0,0 +1,109 @@ + + + + Base class for GDNative based ARVR interfaces. + + + This class is used as a base class/interface class for implementing GDNative based ARVR interfaces and as a result exposes more of the internals of the ARVR server. + + + + + + + + + + + Should return the projection 4x4 matrix for the requested eye. + + + + + + + + + + + Outputs a finished render buffer to the AR/VR device for the given eye. + + + + + + + Returns the size at which we should render our scene to get optimal quality on the output device. + + + + + + + + + + + Get the location and orientation transform used when rendering a specific eye. + + + + + + + Return true is an HMD is available. + + + + + + + Initialize this interface. + + + + + + + Returns true if this interface has been initialized and is active. + + + + + + + Returns true if the required middleware is installed. + + + + + + + Returns true if we require stereoscopic rendering for this interface. + + + + + + + Gets called before rendering each frame so tracking data gets updated in time. + + + + + + + Returns true if this interface supports HMDs. + + + + + + + Turn this interface off. + + + + + + diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml new file mode 100644 index 0000000000..8c6b5d8437 --- /dev/null +++ b/doc/classes/ARVRServer.xml @@ -0,0 +1,184 @@ + + + + This is our AR/VR Server. + + + The AR/VR Server is the heart of our AR/VR solution and handles all the processing. + + + + + + + + + + + + + Mostly exposed for GDNative based interfaces, this is called to register an available interface with the AR/VR server. + + + + + + + + + Find an interface by its name. Say that you're making a game that uses specific capabilities of an AR/VR platform you can find the interface for that platform by name and initialize it. + + + + + + + + + Get the interface registered at a given index in our list of interfaces. + + + + + + + Get the number of interfaces currently registered with the AR/VR server. If you're game supports multiple AR/VR platforms you can look throught the available interface and either present the user with a selection or simply try an initialize each interface and use the first one that returns true. + + + + + + + Gets our reference frame transform, mostly used internally and exposed for GDNative build interfaces. + + + + + + + + + Get the positional tracker at the given ID. + + + + + + + Get the number of trackers currently registered. + + + + + + + Returns our world scale (see ARVROrigin for more information). + + + + + + + + + Removes a registered interface, again exposed mostly for GDNative based interfaces. + + + + + + + + + + + This is a really important function to understand correctly. AR and VR platforms all handle positioning slightly differently. + For platforms that do not offer spatial tracking our origin point (0,0,0) is the location of our HMD but you have little control over the direction the player is facing in the real world. + For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera. + This method allows you to create a reference frame, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world. + For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game. + You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism. + + + + + + + + + Changes the primary interface to the specified interface. Again mostly exposed for GDNative interfaces. + + + + + + + + + Changing the world scale, see the ARVROrigin documentation for more information. + + + + + + + + + + + + + Signal send when a new interface has been added. + + + + + + + Signal send when an interface is removed. + + + + + + + + + + + Signal send when a new tracker has been added. If you don't use a fixed number of controllers or if you're using ARVRAnchors for an AR solution it is important to react to this signal and add the appropriate ARVRController or ARVRAnchor node related to this new tracker. + + + + + + + + + + + Signal send when a tracker is removed, you should remove any ARVRController or ARVRAnchor points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one). + + + + + + Our tracker tracks the location of a controller. + + + Our tracker tracks the location of a base station. + + + Our tracker tracks the location and size of an AR anchor. + + + Used internally if we haven't set the tracker type yet. + + + Used internally to filter trackers of any known type. + + + Used interally to select all trackers. + + + diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml new file mode 100644 index 0000000000..d94b8355ba --- /dev/null +++ b/doc/classes/AStar.xml @@ -0,0 +1,226 @@ + + + + AStar class representation that uses vectors as edges. + + + A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting an efficiently directed path between multiple points. It enjoys widespread use due to its performance and accuracy. Godot's A* implementation make use of vectors as points. + You must add points manually with [method AStar.add_point] and create segments manually with [method AStar.connect_points]. So you can test if there is a path between two points with the [method AStar.are_points_connected] function, get the list of existing ids in the found path with [method AStar.get_id_path], or the points list with [method AStar.get_point_path]. + + + + + + + + + + + + + + + Called when computing the cost between two connected points. + + + + + + + + + + + Called when estimating the cost between a point and the path's ending point. + + + + + + + + + + + + + Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. + [codeblock] + var as = AStar.new() + + as.add_point(1, Vector3(1,0,0), 4) # Adds the point (1,0,0) with weight_scale=4 and id=1 + [/codeblock] + + + + + + + + + + + Returns whether there is a connection/segment between the given points. + + + + + + + Clears all the points and segments. + + + + + + + + + + + + + Creates a segment between the given points. + [codeblock] + var as = AStar.new() + + as.add_point(1, Vector3(1,1,0)) + as.add_point(2, Vector3(0,5,0)) + + as.connect_points(1, 2, false) # If bidirectional=false it's only possible to go from point 1 to point 2 + # and not from point 2 to point 1. + [/codeblock] + + + + + + + + + + + Deletes the segment between the given points. + + + + + + + Returns an id with no point associated to it. + + + + + + + + + Returns the id of the closest point to [code]to_pos[/code]. Returns -1 if there are no points in the points pool. + + + + + + + + + Returns the closest position to [code]to_pos[/code] that resides inside a segment between two connected points. + [codeblock] + var as = AStar.new() + + as.add_point(1, Vector3(0,0,0)) + as.add_point(2, Vector3(0,5,0)) + + as.connect_points(1, 2) + + var res = as.get_closest_pos_in_segment(Vector3(3,3,0)) # returns (0, 3, 0) + [/codeblock] + The result is in the segment that goes from [code]y=0[/code] to [code]y=5[/code]. It's the closest position in the segment to the given point. + + + + + + + + + + + Returns an array with the ids of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. + [codeblock] + var as = AStar.new() + + as.add_point(1, Vector3(0,0,0)) + as.add_point(2, Vector3(0,1,0), 1) # default weight is 1 + as.add_point(3, Vector3(1,1,0)) + as.add_point(4, Vector3(2,0,0)) + + as.connect_points(1, 2, false) + as.connect_points(2, 3, false) + as.connect_points(4, 3, false) + as.connect_points(1, 4, false) + as.connect_points(5, 4, false) + + var res = as.get_id_path(1, 3) # returns [1, 2, 3] + [/codeblock] + If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. + + + + + + + + + + + Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. + + + + + + + + + Returns the position of the point associated with the given id. + + + + + + + + + Returns the weight scale of the point associated with the given id. + + + + + + + + + + + + + + + Returns whether a point associated with the given id exists. + + + + + + + + + Removes the point associated with the given id from the points pool. + + + + + + diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml new file mode 100644 index 0000000000..e042e4d360 --- /dev/null +++ b/doc/classes/AcceptDialog.xml @@ -0,0 +1,115 @@ + + + + Base dialog for user notification. + + + This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result. + + + + + + + + + + + + + + + + + Add custom button to the dialog and return the created button. + The button titled with [i]text[/i] and the [i]action[/i] will be passed to [custom_action] signal when it is pressed. + + + + + + + + + Add custom cancel button to the dialog and return the created button. + + + + + + + Return true if the dialog will be hidden when accepted (default true). + + + + + + + Return the label used for built-in text. + + + + + + + Return the OK Button. + + + + + + + Return the built-in label text. + + + + + + + + + Register a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted. + + + + + + + + + Set whether the dialog is hidden when accepted (default true). + + + + + + + + + Set the built-in label text. + + + + + + + + + + + + + Emitted when accepted. + + + + + + + Emitted with a custom button is added. + + + + + + diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml new file mode 100644 index 0000000000..1f39693a0e --- /dev/null +++ b/doc/classes/AnimatedSprite.xml @@ -0,0 +1,182 @@ + + + + Sprite node that can use multiple textures for animation. + + + Sprite node that can use multiple textures for animation. + + + + + + + + + + + Return the name of the current animation set to the node. + + + + + + + Return the visible frame index. + + + + + + + Return the offset of the sprite in the node origin. + + + + + + + Get the [SpriteFrames] resource, which contains all frames. + + + + + + + Return true when centered. See [method set_centered]. + + + + + + + Return true if sprite is flipped horizontally. + + + + + + + Return true if sprite is flipped vertically. + + + + + + + Return true if an animation if currently being played. + + + + + + + + + Play the animation set in parameter. If no parameter is provided, the current animation is played. + + + + + + + + + Set the current animation of the node and reinits the frame counter of the animation. + + + + + + + + + When turned on, offset at (0,0) is the center of the sprite, when off, the top-left corner is. + + + + + + + + + If true, sprite is flipped horizontally. + + + + + + + + + If true, sprite is flipped vertically. + + + + + + + + + Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource). + + + + + + + + + Set the offset of the sprite in the node origin. Position varies depending on whether it is centered or not. + + + + + + + + + Set the [SpriteFrames] resource, which contains all frames. + + + + + + + Stop the current animation (does not reset the frame counter). + + + + + + + + + + + + + + + + + + + + + + + + + Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn, before looping. + + + + + Emitted when frame is changed. + + + + + + diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml new file mode 100644 index 0000000000..f8acc8cf1b --- /dev/null +++ b/doc/classes/AnimatedSprite3D.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + Return the name of the current animation set to the node. + + + + + + + Return the visible frame index. + + + + + + + Get the [SpriteFrames] resource, which contains all frames. + + + + + + + Return true if an animation if currently being played. + + + + + + + + + Play the animation set in parameter. If no parameter is provided, the current animation is played. + + + + + + + + + Set the current animation of the node and reinits the frame counter of the animation. + + + + + + + + + Set the visible sprite frame index (from the list of frames inside the [SpriteFrames] resource). + + + + + + + + + Set the [SpriteFrames] resource, which contains all frames. + + + + + + + Stop the current animation (does not reset the frame counter). + + + + + + + + + + + + + + + + + Emitted when frame is changed. + + + + + + diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml new file mode 100644 index 0000000000..b80edb24da --- /dev/null +++ b/doc/classes/Animation.xml @@ -0,0 +1,455 @@ + + + + Contains data used to animate everything in the engine. + + + 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 [AnimationPlayer] or [AnimationTreePlayer] to be played back. + + + + + + + + + + + + + + + Add a track to the Animation. The track type must be specified as any of the values in the TYPE_* enumeration. + + + + + + + Clear the animation (clear all tracks and reset all). + + + + + + + + + Return the index of the specified track. If the track is not found, return -1. + + + + + + + Return the total length of the animation (in seconds). + + + + + + + Get the animation step value. + + + + + + + Return the amount of tracks in the animation. + + + + + + + Return whether the animation has the loop flag set. + + + + + + + + + + + + + Return all the key indices of a method track, given a position and delta time. + + + + + + + + + + + Return the method name of a method track. + + + + + + + + + + + Return the arguments values to be called on a method track for a given key in a given track. + + + + + + + + + Remove a track by specifying the track index. + + + + + + + + + Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. + + + + + + + + + Set a flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. + + + + + + + + + Set the animation step value. + + + + + + + + + + + + + Find the key index by time in a given track. Optionally, only find it if the exact time is given. + + + + + + + + + + + + + + + + + Return the interpolation type of a given track, from the INTERPOLATION_* enum. + + + + + + + + + Return the amount of keys in a given track. + + + + + + + + + + + Return the time at which the key is located. + + + + + + + + + + + Return the transition curve (easing) for a specific key (see built-in math function "ease"). + + + + + + + + + + + Return the value of a given key in a given track. + + + + + + + + + Get the path of a track. for more information on the path format, see [method track_set_path] + + + + + + + + + Get the type of a track. + + + + + + + + + + + + + + + Insert a generic key in a given track. + + + + + + + + + Return true if the given track is imported. Else, return false. + + + + + + + + + Move a track down. + + + + + + + + + Move a track up. + + + + + + + + + + + Remove a key by index in a given track. + + + + + + + + + + + Remove a key by position (seconds) in a given track. + + + + + + + + + + + Set the given track as imported or not. + + + + + + + + + + + + + + + + + + + + + Set the interpolation type of a given track, from the INTERPOLATION_* enum. + + + + + + + + + + + + + Set the transition curve (easing) for a specific key (see built-in math function "ease"). + + + + + + + + + + + + + Set the value of an existing key. + + + + + + + + + + + Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local" + + + + + + + + + + + + + + + + + Insert a transform key for a transform track. + + + + + + + + + + + Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]). + + + + + + + + + + + + + Return all the key indices of a value track, given a position and delta time. + + + + + + + + + Return the update mode of a value track. + + + + + + + + + + + Set the update mode (UPDATE_*) of a value track. + + + + + + Value tracks set values in node properties, but only those which can be Interpolated. + + + Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated. + + + Method tracks call functions with given arguments per key. + + + No interpolation (nearest value). + + + Linear interpolation. + + + Cubic interpolation. + + + Update between keyframes. + + + Update at the keyframes and hold the value. + + + Update at the keyframes. + + + diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml new file mode 100644 index 0000000000..81d207a1fc --- /dev/null +++ b/doc/classes/AnimationPlayer.xml @@ -0,0 +1,390 @@ + + + + Container and player of [Animation] resources. + + + An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels. + + + + + + + + + + + + + + + Add an animation resource to the player, which will be later referenced by the "name" argument. + + + + + + + + + Used to skip ahead or skip back in an animation. Delta is the time in seconds to skip. + + + + + + + + + Return the name of the next animation in the queue. + + + + + + + + + + + Set the name of an animation that will be played after. + + + + + + + The animation player creates caches for faster access to the nodes it will animate. However, if a specific node is removed, it may not notice it, so clear_caches will force the player to search for the nodes again. + + + + + + + If animations are queued to play, clear them. + + + + + + + + + Find an animation name by resource. + + + + + + + + + Get an [Animation] resource by requesting a name. + + + + + + + Get the list of names of the animations stored in the player. + + + + + + + Return the mode in which the animation player processes. See [method set_animation_process_mode]. + + + + + + + Return the name of the animation that will be automatically played when the scene is loaded. + + + + + + + + + + + Get the blend time between two animations, referenced by their names. + + + + + + + Return the name of the animation being played. + + + + + + + Get the length (in seconds) of the currently being played animation. + + + + + + + Get the position (in seconds) of the currently being played animation. + + + + + + + Return the default blend time between animations. + + + + + + + Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided). + + + + + + + Return path to root node (see [method set_root]). + + + + + + + Get the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling). + + + + + + + + + Request whether an [Animation] name exist within the player. + + + + + + + Return true if the player is active. + + + + + + + Return whether an animation is playing. + + + + + + + + + + + + + + + Play a given animation by the animation name. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards. + + + + + + + + + + + Play a given animation by the animation name in reverse. + + + + + + + + + Queue an animation for playback once the current one is done. + + + + + + + + + Remove an animation from the player (by supplying the same name used to add it). + + + + + + + + + + + Rename an existing animation. + + + + + + + + + + + Seek the animation to a given position in time (in seconds). If 'update' is true, the animation will be updated too, otherwise it will be updated at process time. + + + + + + + + + Set the player as active (playing). If false, it will do nothing. + + + + + + + + + Set the mode in which the animation player processes. By default, it processes on idle time (framerate dependent), but using fixed time works well for animating static collision bodies in 2D and 3D. See enum ANIMATION_PROCESS_*. + + + + + + + + + Set the name of the animation that will be automatically played when the scene is loaded. + + + + + + + + + + + + + Specify a blend time (in seconds) between two animations, referenced by their names. + + + + + + + + + Set the current animation (even if no playback occurs). Using set_current_animation() and set_active() are similar to calling play(). + + + + + + + + + Set the default blend time between animations. + + + + + + + + + AnimationPlayer resolves animation track paths from this node (which is relative to itself), by default root is "..", but it can be changed. + + + + + + + + + Set a speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling). + + + + + + + + + Stop the currently playing animation. + + + + + + + Stop playback of animations (deprecated). + + + + + + + + + + + + + + + + + + + If the currently being played animation changes, this signal will notify of such change. + + + + + + + Notifies when an animation finished playing. + + + + + + + Notifies when an animation starts playing. + + + + + + Process animation on fixed process. This is specially useful when animating kinematic bodies. + + + Process animation on idle process. + + + diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml new file mode 100644 index 0000000000..a096e4063e --- /dev/null +++ b/doc/classes/AnimationTreePlayer.xml @@ -0,0 +1,663 @@ + + + + Animation Player that uses a node graph for the blending. + + + Animation Player that uses a node graph for the blending. This kind of player is very useful when animating character or other skeleton based rigs, because it can combine several animations to form a desired pose. + + + + + + + + + + + + + + + Add a node of a given type in the graph with given id. + + + + + + + + + + + + + + + + + Returns an animation given its name. + + + + + + + + + + + + + + + + + + + Set the animation for an animation node. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns whether node [code]id[/code] and [code]dst_id[/code] are connected at the specified slot. + + + + + + + + + Returns the blend amount of a Blend2 node given its name. + + + + + + + + + + + Sets the blend amount of a Blend2 node given its name and value. + + + + + + + + + + + + + + + + + + + + + Returns the blend amount of a Blend3 node given its name. + + + + + + + + + + + Sets the blend amount of a Blend3 node given its name and value. + + + + + + + + + Returns the blend amount of a Blend4 node given its name. + + + + + + + + + + + Sets the blend amount of a Blend4 node given its name and value. + + + + + + + + + + + + + Connects node [code]id[/code] to [code]dst_id[/code] at the specified input slot. + + + + + + + + + + + Disconnects nodes connected to [code]id[/code] at the specified input slot. + + + + + + + Returns playback process mode of this AnimationTreePlayer. + + + + + + + + + + + + + + + + + + + Returns a PoolStringArray containing the name of all nodes. + + + + + + + Returns whether this AnimationTreePlayer is active. + + + + + + + + + Returns mix amount of a Mix node given its name. + + + + + + + + + + + Sets mix amount of a Mix node given its name and value. + + + + + + + + + Check if a node exists (by name). + + + + + + + + + Return the input count for a given node. Different types of nodes have different amount of inputs. + + + + + + + + + + + Return the input source for a given node input. + + + + + + + + + Returns position of a node in the graph given its name. + + + + + + + + + Get the node type, will return from NODE_* enum. + + + + + + + + + + + Rename a node in the graph. + + + + + + + + + + + Sets position of a node in the graph given its name and position. + + + + + + + + + Returns autostart delay of a OneShot node given its name. + + + + + + + + + Returns autostart random delay of a OneShot node given its name. + + + + + + + + + Returns fade in time of a OneShot node given its name. + + + + + + + + + Returns fade out time of a OneShot node given its name. + + + + + + + + + Returns whether a OneShot node will auto restart given its name. + + + + + + + + + Returns whether a OneShot node is active given its name. + + + + + + + + + + + Sets autorestart property of a OneShot node given its name and value. + + + + + + + + + + + Sets autorestart delay of a OneShot node given its name and value in seconds. + + + + + + + + + + + Sets autorestart random delay of a OneShot node given its name and value in seconds. + + + + + + + + + + + Sets fade in time of a OneShot node given its name and value in seconds. + + + + + + + + + + + Sets fade out time of a OneShot node given its name and value in seconds. + + + + + + + + + + + + + + + + + + + + + Starts a OneShot node given its name. + + + + + + + + + Stops a OneShot node given its name. + + + + + + + + + + + + + + + + + + + + + Resets this AnimationTreePlayer. + + + + + + + + + Sets whether this AnimationTreePlayer is active. AnimationTreePlayer will start processing if set to active. + + + + + + + + + Sets process mode (ANIMATION_PROCESS_*) of this AnimationTreePlayer. + + + + + + + + + Sets base path of this AnimationTreePlayer. + + + + + + + + + + + + + + + + + Returns time scale value of a TimeScale node given its name. + + + + + + + + + + + Sets time scale value of a TimeScale node given its name and value. + + + + + + + + + + + Sets time seek value of a TimeSeek node given its name and value. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Output node. + + + Animation node. + + + OneShot node. + + + Mix node. + + + Blend2 node. + + + Blend3 node. + + + Blend4 node. + + + TimeScale node. + + + TimeSeek node. + + + Transition node. + + + diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml new file mode 100644 index 0000000000..12f02f8a6c --- /dev/null +++ b/doc/classes/Area.xml @@ -0,0 +1,497 @@ + + + + General purpose area detection and influence for 3D physics. + + + General purpose area detection for 3D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass. + + + + + + + + + + + Return the angular damp rate. + + + + + + + + + + + + + Return the physics layer this area is in. + + + + + + + + + Return an individual bit on the layer mask. + + + + + + + Return the physics layers this area can scan for collisions. + + + + + + + + + Return an individual bit on the collision mask. + + + + + + + Return the gravity intensity. + + + + + + + Return the falloff factor for point gravity. + + + + + + + Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. + + + + + + + Return the linear damp rate. + + + + + + + Return a list of the areas that are totally or partially inside this area. + + + + + + + Return a list of the bodies ([PhysicsBody]) that are totally or partially inside this area. + + + + + + + Return the processing order of this area. + + + + + + + + + + + + + + + + + + + + + + + + + Return the space override mode. + + + + + + + Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction. + + + + + + + Return whether this area can be detected by other, monitoring, areas. + + + + + + + Return whether this area detects bodies/areas entering/exiting it. + + + + + + + + + + + + + + + + + + + + + Return whether the area passed is totally or partially inside this area. + + + + + + + + + Return whether the body passed is totally or partially inside this area. + + + + + + + + + Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops. + In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. + + + + + + + + + + + + + + + + + + + + + + + + + Set the physics layers this area is in. + Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask]. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + + + + + + + + + + + Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier. + + + + + + + + + Set the physics layers this area can scan for collisions. + + + + + + + + + + + Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. + + + + + + + + + Set the gravity intensity. This is useful to alter the force of gravity without altering its direction. + This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity). + + + + + + + + + Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance. + + + + + + + + + When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector]. + + + + + + + + + Set the gravity vector. This vector does not have to be normalized. + If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. + + + + + + + + + Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops. + In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. + + + + + + + + + Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so. + + + + + + + + + Set whether this area can detect bodies/areas entering/exiting it. + + + + + + + + + Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent. + Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the space override mode. This mode controls how an area affects gravity and damp. + AREA_SPACE_OVERRIDE_DISABLED: 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: 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: 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: 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: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area. + + + + + + + This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area. + + + + + + + + + + + + + This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering. + + + + + + + + + + + + + This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering. + + + + + + + This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area. + + + + + + + This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area. + + + + + + + + + + + + + This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering. + + + + + + + + + + + + + This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit. + + + + + + diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml new file mode 100644 index 0000000000..283ea2e392 --- /dev/null +++ b/doc/classes/Area2D.xml @@ -0,0 +1,465 @@ + + + + 2D area that detects nodes that enter or exit it. Can override 2D physics properties within range. + + + 2D area that detects nodes that enter or exit it. Change the 'space_override' property SPACE_OVERRIDE_* to override physics parameters for nodes like [Rigidbody2D]. E.g. gravity, damping... See [CollisionObject2D] for usage. + + + + + + + + + + + Return the angular damp rate. + + + + + + + + + + + + + Return the physics layer this area is in. + + + + + + + + + Return an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer. + + + + + + + Return the physics layers this area will scan to determine collisions. + + + + + + + + + Return an individual bit on the collision mask. Describes whether this area will collide with others on the given layer. + + + + + + + Return the gravity intensity. + + + + + + + Return the falloff factor for point gravity. + + + + + + + Return the gravity vector. If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. + + + + + + + Return the linear damp rate. + + + + + + + Returns a list of the [Area2D]s that intersect with this area. + + + + + + + Return a list of the [PhysicsBody2D]s that intersect with this area. + + + + + + + Return the processing order of this area. + + + + + + + Return the space override mode. + + + + + + + Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction. + + + + + + + Return whether this area can be detected by other, monitoring, areas. + + + + + + + Return whether this area detects bodies/areas entering/exiting it. + + + + + + + + + + + + + + + Return whether the area passed is totally or partially inside this area. + + + + + + + + + Return whether the body passed is totally or partially inside this area. + + + + + + + + + Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops. + In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. + + + + + + + + + + + + + + + + + + + + + + + + + Set the physics layers this area is in. + Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask]. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + + + + + + + + + + + Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier. + + + + + + + + + Set the physics layers this area can scan for collisions. + + + + + + + + + + + Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. + + + + + + + + + Set the gravity intensity. This is useful to alter the force of gravity without altering its direction. + This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity). + + + + + + + + + Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance. + + + + + + + + + When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use [method set_gravity_vector]/[method get_gravity_vector]. + + + + + + + + + Set the gravity vector. This vector does not have to be normalized. + If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. + + + + + + + + + Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops. + In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. + + + + + + + + + Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so. + + + + + + + + + Set whether this area can detect bodies/areas entering/exiting it. + + + + + + + + + Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent. + Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important. + + + + + + + + + Set the space override mode. This mode controls how an area affects gravity and damp. + AREA_SPACE_OVERRIDE_DISABLED: 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: 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: 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: 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: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + + + + + + The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'. + + + The name of the Area2D's audio bus. + + + If [code]true[/code], overrides the default audio bus with the Area2D's. Defaults to [code]false[/code]. + + + The physics layer this Area2D is in. + Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask]. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. + + + The physics layers this Area2D scans to determine collision detections. + + + The gravity intensity within the Area2D (ranges -1024 to 1024). This is useful to alter the force of gravity without altering its direction. + This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity). + + + The falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance. + + + If [code]true[/code], calculates gravity from a particular point during a space override (see [method set_space_override_mode]). If a point, [Vector2] position is set with [method set_gravity_vector]. Defaults to [code]false[/code]. + + + The gravitational direction/strength as a vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. + + + The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'. + + + If [code]true[/code], other monitoring areas can detect this Area2D (is it undetectable at the moment?). Defaults to [code]true[/code]. + + + If [code]true[/code], this detects bodies/areas entering/exiting it (can it detect others at the moment?). Defaults to [code]true[/code]. + + + The processing order for this priority. Ranges from 0 to 128. Defaults to 0. Higher priorities are processed first. + + + How to override gravity and damping calculations within this Area2D, if at all. Consult the SPACE_OVERRIDE_* constants for available options. + + + + + + + + This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area. + + + + + + + This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area. + + + + + + + + + + + + + This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering. + + + + + + + + + + + + + This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering. + + + + + + + This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area. + + + + + + + This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area. + + + + + + + + + + + + + This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering. + + + + + + + + + + + + + This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit. + + + + + + This area does not affect gravity/damp. These are areas that exist only to detect collisions and objects entering or exiting them. + + + 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. + + + 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. + + + This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + + + This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + + + diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml new file mode 100644 index 0000000000..042dfb3e12 --- /dev/null +++ b/doc/classes/Array.xml @@ -0,0 +1,257 @@ + + + + Generic array datatype. + + + Generic array, contains several elements of any type, accessible by numerical index starting at 0. Negative indices can be used to count from the right, like in Python. Arrays are always passed by reference. + + + + + + + + + + + + + Construct an array from a [PoolColorArray]. + + + + + + + + + Construct an array from a [PoolVector3Array]. + + + + + + + + + Construct an array from a [PoolVector2Array]. + + + + + + + + + Construct an array from a [PoolStringArray]. + + + + + + + + + Construct an array from a [PoolRealArray]. + + + + + + + + + Construct an array from a [PoolIntArray]. + + + + + + + + + Construct an array from a [PoolByteArray]. + + + + + + + Append an element at the end of the array (alias of [method push_back]). + + + + + Returns the last element of the array if the array is not empty (size>0). + + + + + Clear the array (resize to 0). + + + + + + + + + Return the amount of times an element is in the array. + + + + + + + + + + + + + Return true if the array is empty (size==0). + + + + + + + Remove the first occurrence of a value from the array. + + + + + + + + + + + Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed. + + + + + + + + + Searches the array in reverse order for a value and returns its index or -1 if not found. + + + + + Returns the first element of the array if the array is not empty (size>0). + + + + + + + + + Return true if the array contains given value. + [codeblock] + [ "inside", 7 ].has("inside") == true + [ "inside", 7 ].has("outside") == false + [ "inside", 7 ].has(7) == true + [ "inside", 7 ].has("7") == false + [/codeblock] + + + + + + + Return a hashed integer value representing the array contents. + + + + + + + + + Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + + + + + Reverse the order of the elements in the array (so first element will now be the last). + + + + + Remove the last element of the array. + + + + + Remove the first element of the array. + + + + + + + Append an element at the end of the array. + + + + + + + Add an element at the beginning of the array. + + + + + + + Remove an element from the array by index. + + + + + + + Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null. + + + + + + + + + + + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + + + + + + + Return the amount of elements in the array. + + + + + Sort the array using natural order. + + + + + + + + + Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. + + + + + + diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml new file mode 100644 index 0000000000..36f8494c44 --- /dev/null +++ b/doc/classes/ArrayMesh.xml @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create a new surface ([method get_surface_count] that will become surf_idx for this. + 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. (As a note, when using indices, it is recommended to only use just points, lines or triangles). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the amount of surfaces that the [ArrayMesh] holds. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the length in indices of the index array in the requested surface (see [method add_surface]). + + + + + + + + + Return the length in vertices of the vertex array in the requested surface (see [method add_surface]). + + + + + + + + + + + + + + + + + + + + + + + + + Return the format mask of the requested surface (see [method add_surface]). + + + + + + + + + Return a [Material] in a given surface. Surface is rendered using this material. + + + + + + + + + + + + + + + + + Return the primitive type of the requested surface (see [method add_surface]). + + + + + + + + + Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down. + + + + + + + + + + + + + + + + + + + + + Set a [Material] for a given surface. Surface will be rendered using this material. + + + + + + Default value used for index_array_len when no indices are present. + + + Amount of weights/bone indices per vertex (always 4). + + + Vertex array (array of [Vector3] vertices). + + + Normal array (array of [Vector3] normals). + + + Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. + + + Vertex array (array of [Color] colors). + + + UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)). + + + Second UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)). + + + Array of bone indices, as a float array. Each element in groups of 4 floats. + + + Array of bone weights, as a float array. Each element in groups of 4 floats. + + + Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size. + + + + + Array format will include vertices (mandatory). + + + Array format will include normals + + + Array format will include tangents + + + Array format will include a color array. + + + Array format will include UVs. + + + Array format will include another set of UVs. + + + Array format will include bone indices. + + + Array format will include bone weights. + + + Index array will be used. + + + diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml new file mode 100644 index 0000000000..4375833612 --- /dev/null +++ b/doc/classes/AtlasTexture.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml new file mode 100644 index 0000000000..e5b17b8dfb --- /dev/null +++ b/doc/classes/AudioBusLayout.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml new file mode 100644 index 0000000000..627d243f25 --- /dev/null +++ b/doc/classes/AudioEffect.xml @@ -0,0 +1,17 @@ + + + + Audio Effect For Audio. + + + Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on. + + + + + + + + + + diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml new file mode 100644 index 0000000000..637ffa30a6 --- /dev/null +++ b/doc/classes/AudioEffectAmplify.xml @@ -0,0 +1,38 @@ + + + + Amplifies the volume of an audio source. + + + Amplifies the volume of an audio source. Increase gain of the audio being routed through the bus. + + + + + + + + + + + Returns the set maximum volume. + + + + + + + + + Sets the maximum volume. + + + + + + The effect's volume limit. + + + + + diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml new file mode 100644 index 0000000000..96f95fbffd --- /dev/null +++ b/doc/classes/AudioEffectBandLimitFilter.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml new file mode 100644 index 0000000000..4437961cc6 --- /dev/null +++ b/doc/classes/AudioEffectBandPassFilter.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml new file mode 100644 index 0000000000..4f29703654 --- /dev/null +++ b/doc/classes/AudioEffectChorus.xml @@ -0,0 +1,268 @@ + + + + Adds a chorus audio effect. + + + Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter. + + + + + + + + + + + Returns the set dry ratio. + + + + + + + Returns the set voice count. + + + + + + + + + Returns the voice's set cutoff frequency. + + + + + + + + + Returns the voice's set delay. + + + + + + + + + Returns the voice's set filter depth. + + + + + + + + + Returns the voice's set maximum volume. + + + + + + + + + Returns the voice's set pan. + + + + + + + + + Returns the voice filter's set rate in cycles. + + + + + + + Returns the set applied wetness of the effect. + + + + + + + + + Returns the set applied dryness of the effect. + + + + + + + + + Set the number of voices in the effect's filter. + + + + + + + + + + + Set the cutoff frequency of the voice. The maximum frequency the voice may affect. + + + + + + + + + + + Set the delay of the voice's signal. + + + + + + + + + + + Set the filter depth of the voice's signal. + + + + + + + + + + + Set the volume level of the voice. + + + + + + + + + + + Set the pan level of the voice. + + + + + + + + + + + Set the voice filter's rate. + + + + + + + + + Set the amount of effect. + + + + + + The effect's raw signal. + + + The voice's cutoff frequency. + + + The voice's signal delay. + + + The voice filter's depth. + + + The voice's volume. + + + The voice's pan level. + + + The voice's filter rate. + + + The voice's cutoff frequency. + + + The voice's signal delay. + + + The voice filter's depth. + + + The voice's volume. + + + The voice's pan level. + + + The voice's filter rate. + + + The voice's cutoff frequency. + + + The voice's signal delay. + + + The voice filter's depth. + + + The voice's volume. + + + The voice's pan level. + + + The voice's filter rate. + + + The voice's cutoff frequency. + + + The voice's signal delay. + + + The voice filter's depth. + + + The voice's volume. + + + The voice's pan level. + + + The voice's filter rate. + + + The amount of voices in the effect. + + + The effect's processed signal. + + + + + diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml new file mode 100644 index 0000000000..58c3fc09ab --- /dev/null +++ b/doc/classes/AudioEffectCompressor.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml new file mode 100644 index 0000000000..44a4c883b4 --- /dev/null +++ b/doc/classes/AudioEffectDelay.xml @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml new file mode 100644 index 0000000000..e8dc941fed --- /dev/null +++ b/doc/classes/AudioEffectDistortion.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml new file mode 100644 index 0000000000..94d5c696c3 --- /dev/null +++ b/doc/classes/AudioEffectEQ.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml new file mode 100644 index 0000000000..004236dfde --- /dev/null +++ b/doc/classes/AudioEffectEQ10.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml new file mode 100644 index 0000000000..e4faa9bb0c --- /dev/null +++ b/doc/classes/AudioEffectEQ21.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml new file mode 100644 index 0000000000..b74cc5d285 --- /dev/null +++ b/doc/classes/AudioEffectEQ6.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml new file mode 100644 index 0000000000..105b075f45 --- /dev/null +++ b/doc/classes/AudioEffectFilter.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml new file mode 100644 index 0000000000..641f7cfee2 --- /dev/null +++ b/doc/classes/AudioEffectHighPassFilter.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml new file mode 100644 index 0000000000..a2504d6808 --- /dev/null +++ b/doc/classes/AudioEffectHighShelfFilter.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml new file mode 100644 index 0000000000..0af47ba716 --- /dev/null +++ b/doc/classes/AudioEffectLimiter.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml new file mode 100644 index 0000000000..fcaf32d761 --- /dev/null +++ b/doc/classes/AudioEffectLowPassFilter.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml new file mode 100644 index 0000000000..8cf1a63c81 --- /dev/null +++ b/doc/classes/AudioEffectLowShelfFilter.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml new file mode 100644 index 0000000000..f90577fa5a --- /dev/null +++ b/doc/classes/AudioEffectNotchFilter.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml new file mode 100644 index 0000000000..dc747d630d --- /dev/null +++ b/doc/classes/AudioEffectPanner.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml new file mode 100644 index 0000000000..1e96ea39d0 --- /dev/null +++ b/doc/classes/AudioEffectPhaser.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml new file mode 100644 index 0000000000..6afa1d1984 --- /dev/null +++ b/doc/classes/AudioEffectPitchShift.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml new file mode 100644 index 0000000000..84dd9d8d44 --- /dev/null +++ b/doc/classes/AudioEffectReverb.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml new file mode 100644 index 0000000000..280316fed0 --- /dev/null +++ b/doc/classes/AudioEffectStereoEnhance.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml new file mode 100644 index 0000000000..7856537804 --- /dev/null +++ b/doc/classes/AudioServer.xml @@ -0,0 +1,311 @@ + + + + Server interface for low level audio access. + + + AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml new file mode 100644 index 0000000000..b4a98b2d8c --- /dev/null +++ b/doc/classes/AudioStream.xml @@ -0,0 +1,17 @@ + + + + Base class for audio streams. + + + Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or require more flexibility than a [Sample]. + + + + + + + + + + diff --git a/doc/classes/AudioStreamOGGVorbis.xml b/doc/classes/AudioStreamOGGVorbis.xml new file mode 100644 index 0000000000..64b3bed42b --- /dev/null +++ b/doc/classes/AudioStreamOGGVorbis.xml @@ -0,0 +1,67 @@ + + + + OGG Vorbis audio stream driver. + + + OGG Vorbis audio stream driver. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml new file mode 100644 index 0000000000..30a9a8f070 --- /dev/null +++ b/doc/classes/AudioStreamPlayback.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml new file mode 100644 index 0000000000..9c05f277c1 --- /dev/null +++ b/doc/classes/AudioStreamPlayer.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml new file mode 100644 index 0000000000..0761f07cfa --- /dev/null +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml new file mode 100644 index 0000000000..7d60873393 --- /dev/null +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml new file mode 100644 index 0000000000..e9eaf82ebc --- /dev/null +++ b/doc/classes/AudioStreamRandomPitch.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml new file mode 100644 index 0000000000..30975200b3 --- /dev/null +++ b/doc/classes/AudioStreamSample.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml new file mode 100644 index 0000000000..82d9c80785 --- /dev/null +++ b/doc/classes/BackBufferCopy.xml @@ -0,0 +1,64 @@ + + + + Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with the texscreen() shader instruction. + + + Node for back-buffering the currently displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Accessing this buffer is done with the texscreen() shader instruction. + + + + + + + + + + + Return the copy mode currently applied to the BackBufferCopy (refer to constants section). + + + + + + + Return the area covered by the BackBufferCopy. + + + + + + + + + Set the copy mode of the BackBufferCopy (refer to constants section). + + + + + + + + + Defines the area covered by the BackBufferCopy. + + + + + + + + + + + + Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers. + + + Sets the copy mode to a region. + + + Sets the copy mode to the entire screen. + + + diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml new file mode 100644 index 0000000000..2d5a0b4502 --- /dev/null +++ b/doc/classes/BaseButton.xml @@ -0,0 +1,213 @@ + + + + Provides a base class for different kinds of buttons. + + + BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesn't display anything). Other types of buttons inherit from it. + + + + + + + + + + + Called when button is pressed. + + + + + + + + + Called when button is toggled (only if toggle_mode is active). + + + + + + + Return the current mode of action (see [method set_action_mode]) (one of the ACTION_MODE_* constants). + + + + + + + + + + + + + Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum. + + + + + + + Returns focus access mode used when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]). + + + + + + + + + + + + + Return whether the button is in disabled state (see [method set_disabled]). + + + + + + + Return true if mouse entered the button before it exit. + + + + + + + If toggle_mode is active, return whether the button is toggled. If toggle_mode is not active, return whether the button is pressed down. + + + + + + + Return the toggle_mode property (see [method set_toggle_mode]). + + + + + + + + + Set the current mode of action, determining when the button is considered clicked (see the ACTION_MODE_* constants). + + + + + + + + + + + + + + + + + Set the button into disabled state. When a button is disabled, it can't be clicked or toggled. + + + + + + + + + Sets the focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]). + + + + + + + + + Set the button to pressed state (only if toggle_mode is active). + + + + + + + + + + + + + + + + + Set the button toggle_mode property. Toggle mode makes the button flip state between pressed and unpressed each time its area is clicked. + + + + + + + + + + + + + + + + + + + + + + + Emitted when the button starts being held down. + + + + + Emitted when the button stops being held down. + + + + + This signal is emitted every time the button is toggled or pressed (i.e. activated, so on [code]button_down[/code] if "Click on press" is active and on [code]button_up[/code] otherwise). + + + + + + + This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]pressed[/i] argument. + + + + + + The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons. + + + The state of buttons are pressed. + + + The state of buttons are hovered. + + + The state of buttons are disabled. + + + Require just a press to consider the button clicked. + + + Require a press and a subsequent release before considering the button clicked. + + + diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml new file mode 100644 index 0000000000..2bdc941bdf --- /dev/null +++ b/doc/classes/Basis.xml @@ -0,0 +1,182 @@ + + + + 3x3 matrix datatype. + + + 3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized. Almost always used as orthogonal basis for a [Transform]. + For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). + + + + + + + + + + + + + Create a rotation matrix from the given quaternion. + + + + + + + + + Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X-angle, Y-angle, Z-angle). + + + + + + + + + + + Create a rotation matrix which rotates around the given axis by the specified angle. The axis must be a normalized vector. + + + + + + + + + + + + + Create a matrix from 3 axis vectors. + + + + + + + Return the determinant of the matrix. + + + + + + + Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X-angle, Y-angle, Z-angle). + + + + + + + This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1,0 or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to Godot source code. + + + + + + + Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis. + + + + + + + Return the inverse of the matrix. + + + + + + + Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix. + + + + + + + + + + + Introduce an additional rotation around the given axis by phi (radians). Only relevant when the matrix is being used as a part of [Transform]. The axis must be a normalized vector. + + + + + + + + + Introduce an additional scaling specified by the given 3D scaling factor. Only relevant when the matrix is being used as a part of [Transform]. + + + + + + + + + Transposed dot product with the x axis of the matrix. + + + + + + + + + Transposed dot product with the y axis of the matrix. + + + + + + + + + Transposed dot product with the z axis of the matrix. + + + + + + + Return the transposed version of the matrix. + + + + + + + + + Return a vector transformed (multiplied) by the matrix. + + + + + + + + + Return a vector transformed (multiplied) by the transposed matrix. Note that this results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection. + + + + + + + + + + + + + + diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml new file mode 100644 index 0000000000..55af521aa1 --- /dev/null +++ b/doc/classes/BitMap.xml @@ -0,0 +1,84 @@ + + + + Boolean matrix. + + + A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates. + + + + + + + + + + + + + Creates a bitmap with the specified size, filled with false. + + + + + + + + + Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is 0, and true in other case. + + + + + + + + + Returns bitmap's value at the specified position. + + + + + + + Returns bitmap's dimensions. + + + + + + + Returns the amount of bitmap elements that are set to true. + + + + + + + + + + + Sets the bitmap's element at the specified position, to the specified value. + + + + + + + + + + + Sets a rectangular portion of the bitmap to the specified value. + + + + + + + + + + diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml new file mode 100644 index 0000000000..e5569ec68d --- /dev/null +++ b/doc/classes/BitmapFont.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + Add a character to the font, where [i]character[/i] is the unicode value, [i]texture[/i] is the texture index, [i]rect[/i] is the region in the texture (in pixels!), [i]align[/i] is the (optional) alignment for the character and [i]advance[/i] is the (optional) advance. + + + + + + + + + + + + + Add a kerning pair to the [BitmapFont] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. + + + + + + + + + Add a texture to the [BitmapFont]. + + + + + + + Clear all the font data. + + + + + + + + + + + + + + + + + + + Return the size of a character, optionally taking kerning into account if the next character is provided. + + + + + + + + + + + + + + + + + Return a kerning pair as a difference. + + + + + + + + + + + + + + + + + + + + + + + Set the font ascent (number of pixels above the baseline). + + + + + + + + + + + + + + + + + + + + + + + + + Set the total font height (ascent plus descent) in pixels. + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/BoneAttachment.xml b/doc/classes/BoneAttachment.xml new file mode 100644 index 0000000000..9297c0e1b1 --- /dev/null +++ b/doc/classes/BoneAttachment.xml @@ -0,0 +1,33 @@ + + + + A node that will attach to a bone. + + + This node must be the child of a [Skeleton] node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone. + + + + + + + + + + + Returns the name of the bone node attached to. + + + + + + + + + Changes the name of the bone node + + + + + + diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml new file mode 100644 index 0000000000..313c11b04e --- /dev/null +++ b/doc/classes/BoxContainer.xml @@ -0,0 +1,56 @@ + + + + Base class for Box containers. + + + Base class for Box containers. It arranges children controls vertically or horizontally, and rearranges them automatically when their minimum size changes. + + + + + + + + + + + + + Add a control to the box as a spacer. + If [i]begin[/i] is true the spacer control will be inserted in front of other children. + + + + + + + Return the alignment of children in the container. + + + + + + + + + Set the alignment of children in the container(Must be one of ALIGN_BEGIN, ALIGN_CENTER or ALIGN_END). + + + + + + + + + + Align children with beginning of the container. + + + Align children with center of the container. + + + Align children with end of the container. + + + diff --git a/doc/classes/BoxShape.xml b/doc/classes/BoxShape.xml new file mode 100644 index 0000000000..29abd03a0f --- /dev/null +++ b/doc/classes/BoxShape.xml @@ -0,0 +1,37 @@ + + + + Box shape resource. + + + Box shape resource, which can be set into a [PhysicsBody] or area. + + + + + + + + + + + Return the half extents of the shape. + + + + + + + + + Set the half extents for the shape. + + + + + + + + + + diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml new file mode 100644 index 0000000000..200d948d98 --- /dev/null +++ b/doc/classes/Button.xml @@ -0,0 +1,137 @@ + + + + Standard themed Button. + + + Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Text alignment policy for the button's text, use one of the ALIGN_* constants. + + + When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default. + + + Flat buttons don't display decoration. + + + Button's icon, if text is present the icon will be placed before the text. + + + The button's text that will be displayed inside the button's area. + + + + + Align the text to the left. + + + Align the text to the center. + + + Align the text to the right. + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml new file mode 100644 index 0000000000..c2c999f9d8 --- /dev/null +++ b/doc/classes/ButtonGroup.xml @@ -0,0 +1,28 @@ + + + + Group of Buttons. + + + Group of [Button]. All direct and indirect children buttons become radios. Only one allows being pressed. + + + + + + + + + + + Return the pressed button. + + + + + + + + + + diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml new file mode 100644 index 0000000000..2302c39e35 --- /dev/null +++ b/doc/classes/Camera.xml @@ -0,0 +1,251 @@ + + + + Camera node, displays from a point of view. + + + Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides [i]3D[/i] display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed. + + + + + + + + + + + + + + + + + Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return whether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree). + + + + + + + + + + + + + + + Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added. + + + + + + + + + + + + + + + + + + + + + + + + + Return a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking. + + + + + + + + + Return a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) + + + + + + + + + + + + + Set the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. + + + + + + + + + + + + + + + + + Return how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle. + + + + + + Perspective Projection (object's size on the screen becomes smaller when far away). + + + Orthogonal Projection (objects remain the same size on the screen no matter how far away they are). + + + + + + + + + + + + + diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml new file mode 100644 index 0000000000..e2000ffc1e --- /dev/null +++ b/doc/classes/Camera2D.xml @@ -0,0 +1,375 @@ + + + + Camera node for 2D scenes. + + + Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem] based nodes. + This node is intended to be a simple helper get get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport]. + + + + + + + + + + + Align the camera to the tracked node + + + + + + + + + + + + + Force the camera to update scroll immediately. + + + + + + + + + + + + + Return the camera position. + + + + + + + + + + + + + + + + + + + + + Return the margins needed to drag the camera (see [method set_drag_margin]). + + + + + + + + + + + + + + + + + + + + + Return the scrolling limit in pixels. + + + + + + + Return the scroll offset. + + + + + + + + + + + + + + + + + + + Return true of this is the current camera (see [method make_current]). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene. + + + + + + + Set the camera's position immediately to its current smoothing destination. + This has no effect if smoothing is disabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the margins needed to drag the camera (relative to the screen size). Margin uses the MARGIN_* enum. Drag margins of 0,0,0,0 will keep the camera at the center of the screen, while drag margins of 1,1,1,1 will only move when the camera is at the edges. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the scrolling limit in pixels. + + + + + + + + + + + + + + + + + Smooth camera when reaching camera limits. + This requires camera smoothing being enabled to have a noticeable effect. + + + + + + + + + + + + + + + + + Set the scroll offset. Useful for looking around or camera shake animations. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml new file mode 100644 index 0000000000..84c94fad1e --- /dev/null +++ b/doc/classes/CanvasItem.xml @@ -0,0 +1,671 @@ + + + + Base class of anything 2D. + + + Base class of anything 2D. Canvas items are laid out in a tree and children inherit and extend the transform of their parent. CanvasItem is extended by [Control], for anything GUI related, and by [Node2D] for anything 2D engine related. + Any CanvasItem can draw. For this, the "update" function must be called, then NOTIFICATION_DRAW will be received on idle time to request redraw. Because of this, canvas items don't need to be redraw on every frame, improving the performance significantly. Several functions for drawing on the CanvasItem are provided (see draw_* functions). They can only be used inside the notification, signal or _draw() overrides function, though. + Canvas items are draw in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything (this can be changed per item though). + Canvas items can also be hidden (hiding also their subtree). They provide many means for changing standard parameters such as opacity (for it and the subtree) and self opacity, blend mode. + Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. + + + + + + + + + + + Called (if exists) to draw the canvas item. + + + + + + + + + + + + + + + + + Draw a string character using a custom font. Returns the advance, depending on the char width and kerning with an optional next char. + + + + + + + + + + + + + Draw a colored circle. + + + + + + + + + + + + + + + + + + + Draw a colored polygon of any amount of points, convex or concave. + + + + + + + + + + + + + + + + + Draw a line from a 2D point to another, with a given color and width. It can be optionally antialiased. + + + + + + + + + + + + + + + + + + + Draw a polygon of any amount of points, convex or concave. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad. + + + + + + + + + + + + + Draw a colored rectangle. + + + + + + + + + + + + + Set a custom transform for drawing. Anything drawn afterwards will be transformed by this. + + + + + + + + + + + + + + + + + + + + + + + + + Draw a string using a custom font. + + + + + + + + + + + Draw a styled rectangle. + + + + + + + + + + + + + + + Draw a texture at a given position. + + + + + + + + + + + + + + + + + + + Draw a textured rectangle at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture. + + + + + + + + + + + + + + + + + + + + + Draw a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture. + + + + + + + Used for editing, returns an opaque value representing the transform state. + + + + + + + + + Used for editing, handle rotation. + + + + + + + + + + + + + + + + + Set the transform state of this CanvasItem. For [Node2D], this is an [Array] with (in order) a [Vector2] for position, a float for rotation (radians) and another [Vector2] for scale. For [Control] this is a [Rect2] with the position and size. + + + + + + + Return the [RID] of the [World2D] canvas where this item is in. + + + + + + + Return the canvas item RID used by [VisualServer] for this item. + + + + + + + Get the transform matrix of this item's canvas. + + + + + + + Get the global position of the mouse. + + + + + + + Get the global transform matrix of this item. + + + + + + + Get the global transform matrix of this item in relation to the canvas. + + + + + + + Get a [Rect2] with the boundaries of this item and its children. + + + + + + + Return a rect containing the editable boundaries of the item. + + + + + + + Get this item's light mask number. + + + + + + + Get the mouse position relative to this item's position. + + + + + + + Get the material of this item. + + + + + + + Get the modulate of the CanvasItem, which affects children items too. + + + + + + + Get the self-modulate of the CanvasItem. + + + + + + + Get the transform matrix of this item. + + + + + + + Get whether this item uses its parent's material. + + + + + + + Get the viewport's boundaries as a [Rect2]. + + + + + + + Get this item's transform in relation to the viewport. + + + + + + + Get the [World2D] where this item is in. + + + + + + + Hide the CanvasItem currently visible. + + + + + + + Return whether the item is drawn behind its parent. + + + + + + + + + + + + + Return if set as toplevel. See [method set_as_toplevel]. + + + + + + + + + + + + + Return true if this CanvasItem is visible. It may be invisible because itself or a parent canvas item is hidden. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set as top level. This means that it will not inherit transform from parent canvas items. + + + + + + + + + Set whether the canvas item is drawn behind its parent. + + + + + + + + + Set the ligtht mask number of this item. + + + + + + + + + Set the material of this item. + + + + + + + + + Set the modulate of the CanvasItem. This [i]affects[/i] the modulation of children items. + + + + + + + + + + + + + + + + + + + + + + + + + Set the self-modulate of the CanvasItem. This does not affect the modulation of children items. + + + + + + + + + Set whether or not this item should use its parent's material. + + + + + + + + + Set whether this item should be visible or not. + Note that a hidden CanvasItem will make all children hidden too, so no matter what is set here this item won't be shown if its parent or grandparents nodes are hidden. + + + + + + + Show the CanvasItem currently hidden. + + + + + + + Queue the CanvasItem for update. [code]NOTIFICATION_DRAW[/code] will be called on idle time to request redraw. + + + + + + + + + + + + + + + + + + + + + + + + + Emitted when the CanvasItem must redraw. This can only be connected realtime, as deferred will not allow drawing. + + + + + Emitted when becoming hidden. + + + + + Emitted when the item rect has changed. + + + + + Emitted when the visibility (hidden/visible) changes. + + + + + + Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. + + + Additive blending mode. + + + Subtractive blending mode. + + + Multiplicative blending mode. + + + Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. + + + CanvasItem is requested to draw. + + + Canvas item visibility has changed. + + + Canvas item has entered the canvas. + + + Canvas item has exited the canvas. + + + Canvas item transform has changed. Only received if requested. + + + diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml new file mode 100644 index 0000000000..7c6eca8691 --- /dev/null +++ b/doc/classes/CanvasItemMaterial.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml new file mode 100644 index 0000000000..b7014b4512 --- /dev/null +++ b/doc/classes/CanvasLayer.xml @@ -0,0 +1,144 @@ + + + + Canvas Item layer. + + + Canvas Item layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). + + + + + + + + + + + + + + + + + Return the layer index, determines the draw order, a lower value will be below a higher one. + + + + + + + Return the base offset for this layer (helper). + + + + + + + Return the base rotation for this layer in radians (helper). + + + + + + + Return the base rotation for this layer in degrees. + + + + + + + Return the base scale for this layer (helper). + + + + + + + Return the base transform for this layer. + + + + + + + Return the [World2D] used by this layer. + + + + + + + + + + + + + + + + + Set the layer index, determines the draw order, a lower value will be below a higher one. + + + + + + + + + Set the base offset for this layer (helper). + + + + + + + + + Set the base rotation for this layer in radians (helper). + + + + + + + + + Set the base rotation for this layer in degrees (helper). + + + + + + + + + Set the base scale for this layer (helper). + + + + + + + + + Set the base transform for this layer. + + + + + + + + + + + + + + + + diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml new file mode 100644 index 0000000000..8dd6de75a4 --- /dev/null +++ b/doc/classes/CanvasModulate.xml @@ -0,0 +1,37 @@ + + + + Tint the entire canvas + + + CanvasModulate tints the canvas elements using its assigned color + + + + + + + + + + + Gets the canvas tint color + + + + + + + + + Sets the canvas tint color + + + + + + + + + + diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml new file mode 100644 index 0000000000..609898efd4 --- /dev/null +++ b/doc/classes/CapsuleMesh.xml @@ -0,0 +1,87 @@ + + + + Class representing a capsule-shaped [PrimitiveMesh]. + + + Class representing a capsule-shaped [PrimitiveMesh]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Height of the capsule mesh from the center point. Defaults to 1.0. + + + Number of radial segments on the capsule mesh. Defaults to 64. + + + Radius of the capsule mesh. Defaults to 1.0. + + + Number of rings along the height of the capsule. Defaults to 8. + + + + + diff --git a/doc/classes/CapsuleShape.xml b/doc/classes/CapsuleShape.xml new file mode 100644 index 0000000000..4260d14ec3 --- /dev/null +++ b/doc/classes/CapsuleShape.xml @@ -0,0 +1,55 @@ + + + + Capsule shape resource. + + + Capsule shape resource, which can be set into a [PhysicsBody] or area. + + + + + + + + + + + Return the capsule height. + + + + + + + Return the capsule radius. + + + + + + + + + Set the capsule height. + + + + + + + + + Set the capsule radius. + + + + + + + + + + + + diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml new file mode 100644 index 0000000000..976f51d639 --- /dev/null +++ b/doc/classes/CapsuleShape2D.xml @@ -0,0 +1,55 @@ + + + + Capsule 2D shape resource for physics. + + + Capsule 2D shape resource for physics. A capsule (or sometimes called "pill") is like a line grown in all directions. It has a radius and a height, and is often useful for modeling biped characters. + + + + + + + + + + + Return the height of the [CapsuleShape2D]. + + + + + + + Return the radius of the [CapsuleShape2D]. + + + + + + + + + Set the height of the [CapsuleShape2D]. + + + + + + + + + Set the radius of the [CapsuleShape2D]. + + + + + + + + + + + + diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml new file mode 100644 index 0000000000..18f5f5f281 --- /dev/null +++ b/doc/classes/CenterContainer.xml @@ -0,0 +1,37 @@ + + + + Keeps children controls centered. + + + CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center. + + + + + + + + + + + Should put children to the top left corner instead of center of the container. + + + + + + + + + This function will anchor the container children to the top left corner of the the container boundaries, moving all its children to that position, (the children new center will be the top left corner of the container). + + + + + + + + + + diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml new file mode 100644 index 0000000000..6258eb503f --- /dev/null +++ b/doc/classes/CheckBox.xml @@ -0,0 +1,51 @@ + + + + Binary choice user interface widget + + + A checkbox allows the user to make a binary choice (choosing only one of two posible options), for example Answer 'yes' or 'no'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml new file mode 100644 index 0000000000..bb4e6fc0cb --- /dev/null +++ b/doc/classes/CheckButton.xml @@ -0,0 +1,47 @@ + + + + Checkable button. + + + CheckButton is a toggle button displayed as a check field. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml new file mode 100644 index 0000000000..57251fb5a7 --- /dev/null +++ b/doc/classes/CircleShape2D.xml @@ -0,0 +1,37 @@ + + + + Circular Shape for 2D Physics. + + + Circular Shape for 2D Physics. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. + + + + + + + + + + + Return the radius of the circle shape. + + + + + + + + + Set the radius of the circle shape. + + + + + + + + + + diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml new file mode 100644 index 0000000000..3e647446da --- /dev/null +++ b/doc/classes/ClassDB.xml @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml new file mode 100644 index 0000000000..4ce0bf43c3 --- /dev/null +++ b/doc/classes/CollisionObject.xml @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creates new holder for the shapes. Argument is a [CollisionShape] node. It will return owner_id which usually you will want to save for later use. + + + + + + + + + + + + + + + + + + + Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Will remove all the shapes associated with given owner. + + + + + + + + + + + + + + + + + + + Will return a [Shape]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count]. + + + + + + + + + Returns number of shapes to which given owner is associated to. + + + + + + + + + + + + + + + + + + + Will return [Transform] of an owner node. + + + + + + + + + + + Removes related shape from the owner. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml new file mode 100644 index 0000000000..cc42f56481 --- /dev/null +++ b/doc/classes/CollisionObject2D.xml @@ -0,0 +1,233 @@ + + + + Base node for 2D collisionables. + + + CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing [CollisionShape2D] and/or [CollisionPolygon2D] nodes as children. Such nodes are for reference and not present outside the editor, so code should use the regular shape API. + + + + + + + + + + + + + + + + + + + + + + + + + Creates new holder for the shapes. Argument is a [CollisionShape2D] node. It will return owner_id which usually you will want to save for later use. + + + + + + + Return the RID of this object. + + + + + + + Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods. + + + + + + + Return whether this object is pickable. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set whether this object is pickable. A pickable object can detect the mouse pointer enter/leave it and, if the mouse is inside it, report input events. + + + + + + + + + + + + + + + + + + + + + + + + + + + Will remove all the shapes associated with given owner. + + + + + + + + + + + + + + + + + + + Will return a [Shape2D]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count]. + + + + + + + + + Returns number of shapes to which given owner is associated to. + + + + + + + + + + + + + + + + + + + Will return [Transform2D] of an owner node. + + + + + + + + + + + Removes related shape from the owner. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This event fires only once when the mouse pointer enters any shape of this object. + + + + + This event fires only once when the mouse pointer exits all shapes of this object. + + + + + + diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml new file mode 100644 index 0000000000..7fde8f8958 --- /dev/null +++ b/doc/classes/CollisionPolygon.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml new file mode 100644 index 0000000000..6b86d205b1 --- /dev/null +++ b/doc/classes/CollisionPolygon2D.xml @@ -0,0 +1,88 @@ + + + + Editor-only class for easy editing of collision polygons. + + + Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. This class is for editing custom shape polygons. + + + + + + + + + + + Return whether the polygon is a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]). + + + + + + + Return the list of points that define the polygon. + + + + + + + + + + + + + + + + + + + + + Set whether the polygon is to be a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]). + + + + + + + + + + + + + + + + + + + + + + + + + Set the array of points forming the polygon. + When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode==0[/code]), or a list of lines (for [code]build_mode==1[/code]). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point. + + + + + + + + + + + + + + + + diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml new file mode 100644 index 0000000000..7e7ea2e3e6 --- /dev/null +++ b/doc/classes/CollisionShape.xml @@ -0,0 +1,69 @@ + + + + Node that represents collision shape data in 3D space. + + + 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 [Area] to give it a detection shape, or add it to a [PhysicsBody] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape. + + + + + + + + + + + + + + + + + + + + + + + Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry. + + + + + + + + + If this method exists within a script it will be called whenever the shape resource has been modified. + + + + + + + + + + + + + + + + + + + + + + A disabled collision shape has no effect in the world. + + + The actual shape owned by this collision shape. + + + + + diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml new file mode 100644 index 0000000000..7453e9b17f --- /dev/null +++ b/doc/classes/CollisionShape2D.xml @@ -0,0 +1,70 @@ + + + + Node that represents collision shape data in 2D space. + + + 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 [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A disabled collision shape has no effect in the world. + + + Sets whether this collision shape should only detect collision on one side (top or bottom). + + + The actual shape owned by this collision shape. + + + + + diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml new file mode 100644 index 0000000000..d97376bd21 --- /dev/null +++ b/doc/classes/Color.xml @@ -0,0 +1,222 @@ + + + + Color in RGBA format with some support for ARGB format. + + + 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. + + + + + + + + + + + + + + + + + + + Constructs a color from an RGBA profile using values between 0 and 1 (float). + [codeblock] + var c = Color(0.2, 1.0, .7, .8) # a color of an RGBA(51, 255, 178, 204) + [/codeblock] + + + + + + + + + + + + + Constructs a color from an RGB profile using values between 0 and 1 (float). Alpha will always be 1. + [codeblock] + var c = Color(0.2, 1.0, .7) # a color of an RGBA(51, 255, 178, 255) + [/codeblock] + + + + + + + + + Constructs a color from a 32-bit integer (each byte represents a component of the RGBA profile). + [codeblock] + var c = Color(274) # a color of an RGBA(0, 0, 1, 18) + [/codeblock] + + + + + + + + + Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. + The following string formats are supported: + [code]"#ff00ff00"[/code] - ARGB format with '#' + [code]"ff00ff00"[/code] - ARGB format + [code]"#ff00ff"[/code] - RGB format with '#' + [code]"ff00ff"[/code] - RGB format + [codeblock] + # The following code creates the same color of an 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 '#' + var c4 = Color("b2d90a") # RGB format + [/codeblock] + + + + + + + + + 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. + [codeblock] + var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50% + var fg = Color(1.0, 0.0, 0.0, .5) # Red with alpha of 50% + var blendedColor = bg.blend(fg) # Brown with alpha of 75% + [/codeblock] + + + + + + + Returns the most contrasting color. + [codeblock] + var c = Color(.3, .4, .9) + var contrastedColor = c.contrasted() # a color of an RGBA(204, 229, 102, 255) + [/codeblock] + + + + + + + Returns the color's grayscale. + The gray is calculated by (r + g + b) / 3. + [codeblock] + var c = Color(0.2, 0.45, 0.82) + var gray = c.gray() # a value of 0.466667 + [/codeblock] + + + + + + + Returns the inverted color (1-r, 1-g, 1-b, 1-a). + [codeblock] + var c = Color(.3, .4, .9) + var invertedColor = c.inverted() # a color of an RGBA(178, 153, 26, 255) + [/codeblock] + + + + + + + + + + + Returns the color of the linear interpolation with another color. The value t is between 0 and 1 (float). + [codeblock] + var c1 = Color(1.0, 0.0, 0.0) + var c2 = Color(0.0, 1.0, 0.0) + var li_c = c1.linear_interpolate(c2, 0.5) # a color of an RGBA(128, 128, 0, 255) + [/codeblock] + + + + + + + Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). More compatible with DirectX. + [codeblock] + var c = Color(1, .5, .2) + print(str(c.to_32())) # prints 4294934323 + [/codeblock] + + + + + + + + + Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]). + Optionally flag 'false' to not include alpha in hexadecimal string. + [codeblock] + var c = Color(1, 1, 1, .5) + var s1 = c.to_html() # Results "7fffffff" + var s2 = c.to_html(false) # Results 'ffffff' + [/codeblock] + + + + + + + Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). + [codeblock] + var c = Color(1, .5, .2) + print(str(c.to_32())) # prints 4294934323 + [/codeblock] + + [i]This is same as [method to_ARGB32] but may be changed later to support RGBA format instead[/i]. + + + + + + Alpha (0 to 1) + + + Alpha (0 to 255) + + + Blue (0 to 1) + + + Blue (0 to 255) + + + Green (0 to 1) + + + Green (0 to 255) + + + Hue (0 to 1) + + + Red (0 to 1) + + + Red (0 to 255) + + + Saturation (0 to 1) + + + Value (0 to 1) + + + + + diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml new file mode 100644 index 0000000000..87414eb03a --- /dev/null +++ b/doc/classes/ColorPicker.xml @@ -0,0 +1,103 @@ + + + + Color picker control. + + + This is a simple color picker [Control]. It's useful for selecting a color from an RGB/RGBA colorspace. + + + + + + + + + + + + + Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker. + + + + + + + Gets the current color. + + + + + + + Returns whether the color has transparency or not. + + + + + + + Returns whether this color picker is in raw mode or not, raw mode will allow the color R, G, B component values to go beyond 1, you have to consider that the max value for color components is 1, going beyond that value will not have effect in the color, but can be used for special operations that require it (like tinting without darkening or rendering sprites in HDR). + + + + + + + + + Set true if you want the color to have an alpha channel (transparency), or false if you want a solid color. + + + + + + + + + Select the current color. + + + + + + + + + Set whether this color picker is using raw mode or not, see [method is_raw_mode]. + + + + + + + + + Emitted when the color is changed. + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml new file mode 100644 index 0000000000..8b8c120384 --- /dev/null +++ b/doc/classes/ColorPickerButton.xml @@ -0,0 +1,98 @@ + + + + Button that pops out a [ColorPicker] + + + Encapsulates a [ColorPicker] making it accesible by pressing a button, pressing the button will toggle the [ColorPicker] visibility + + + + + + + + + + + + + + + + + + + + + + + See [method ColorPicker.is_edit_alpha] + + + + + + + + + See [method ColorPicker.set_edit_alpha] + + + + + + + + + Set new color to ColorRect. + + [codeblock] + var cr = get_node("colorrect_node") + cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red + [/codeblock] + + + + + + + + + + + + + + + Emitted when the color is changed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml new file mode 100644 index 0000000000..eb029a8a5b --- /dev/null +++ b/doc/classes/ColorRect.xml @@ -0,0 +1,45 @@ + + + + Colored rect for canvas. + + + An object that is represented on the canvas as a rect with color. [Color] is used to set or get color info for the rect. + + + + + + + + + + + Return the color in RGBA format. + [codeblock] + var cr = get_node("colorrect_node") + var c = cr.get_frame_color() # Default color is white + [/codeblock] + + + + + + + + + Set new color to ColorRect. + [codeblock] + var cr = get_node("colorrect_node") + cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red + [/codeblock] + + + + + + + + + + diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape.xml new file mode 100644 index 0000000000..0b1cbf9c21 --- /dev/null +++ b/doc/classes/ConcavePolygonShape.xml @@ -0,0 +1,33 @@ + + + + Concave polygon shape. + + + Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles. + + + + + + + + + + + Return the faces (an array of triangles). + + + + + + + + + Set the faces (an array of triangles). + + + + + + diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml new file mode 100644 index 0000000000..c2170b8410 --- /dev/null +++ b/doc/classes/ConcavePolygonShape2D.xml @@ -0,0 +1,38 @@ + + + + Concave polygon 2D shape resource for physics. + + + Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. + The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. + + + + + + + + + + + Return the array of segments. + + + + + + + + + Set the array of segments. + + + + + + + + + + diff --git a/doc/classes/ConeTwistJoint.xml b/doc/classes/ConeTwistJoint.xml new file mode 100644 index 0000000000..4a5a5e512c --- /dev/null +++ b/doc/classes/ConeTwistJoint.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml new file mode 100644 index 0000000000..c2d1ec1355 --- /dev/null +++ b/doc/classes/ConfigFile.xml @@ -0,0 +1,119 @@ + + + + Helper class to handle INI-style files. + + + This helper class can be used to store [Variant] values on the filesystem using an INI-style formatting. The stored values as referenced by a section and a key. The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly with accessing the filesystem. + The following example shows how to parse a INI-style file from the system, read its contents and store new values in it: + [codeblock] + var config = ConfigFile.new() + var err = config.load("user://settings.cfg") + if err == OK: # if not, something went wrong with the file loading + # Look for the display/width pair, and default to 1024 if missing + var screen_width = get_value("display", "width", 1024) + # Store a variable if and only it hasn't been defined yet + if not config.has_section_key("audio", "mute"): + config.set_value("audio", "mute", false) + # Save the changes by overwriting the previous file + config.save("user://settings.cfg") + [/codeblock] + + + + + + + + + + + + + + + + + + + + + Return an array of all defined key identifiers in the specified section. + + + + + + + Return an array of all defined section identifiers. + + + + + + + + + + + + + Return the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional [i]default[/i] argument (and thus [code]NULL[/code] if not specified). + + + + + + + + + Check if the specified section exists. + + + + + + + + + + + Check if the specified section-key pair exists. + + + + + + + + + Load the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object from which the method was called. The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the load was successful, it returns OK). + + + + + + + + + Save the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. + The return value is one of the OK, FAILED or ERR_* constants listed in [@Global Scope] (if the save was successful, it returns OK). + + + + + + + + + + + + + Assign a value to the specified key of the the specified section. If the section and/or the key do not exist, they are created. Passing a [code]NULL[/code] value deletes the specified key if it exists (and deletes the section if it ends up empty once the key has been removed). + + + + + + diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml new file mode 100644 index 0000000000..84de287519 --- /dev/null +++ b/doc/classes/ConfirmationDialog.xml @@ -0,0 +1,24 @@ + + + + Dialog for confirmation of actions. + + + Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order). + + + + + + + + + + + Return the cancel button. + + + + + + diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml new file mode 100644 index 0000000000..844c17a1d9 --- /dev/null +++ b/doc/classes/Container.xml @@ -0,0 +1,46 @@ + + + + Base node for containers. + + + Base node for containers. A [Container] contains other controls and automatically arranges them in a certain way. + A Control can inherit this to create custom container classes. + + + + + + + + + + + + + + + Fit a child control in a given rect. This is mainly a helper for creating custom container classes. + + + + + + + Queue resort of the contained children. This is called automatically anyway, but can be called upon request. + + + + + + + Emitted when sorting the children is needed. + + + + + + Notification for when sorting the children, it must be obeyed immediately. + + + diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml new file mode 100644 index 0000000000..1f74c8df18 --- /dev/null +++ b/doc/classes/Control.xml @@ -0,0 +1,1062 @@ + + + + Base node for all User Interface components. + + + The base class Node for all User Interface components. Every UI node inherits from it. Any scene or portion of a scene tree composed of Control nodes is a User Interface. + Controls use anchors and margins to place themselves relative to their parent. They adapt automatically when their parent or the screen size changes. To build flexible UIs, use built-in [Container] nodes or create your own. + Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range. + Godot sends Input events to the root node first, via [method Node._input]. The method distributes it through the node tree and delivers the input events to the node under the mouse cursor or on focus with the keyboard. To do so, it calls [method MainLoop._input_event]. No need to enable [method Node.set_process_input] on Controls to receive input events. Call [method accept_event] to ensure no other node receives the event, not even [method Node._unhandled_input]. + Only the one Control node in focus receives keyboard events. To do so, the Control must get the focus mode with [method set_focus_mode]. It loses focus when another Control gets it, or if the current Control in focus is hidden. + You'll sometimes want Controls to ignore mouse or touch events. For example, if you place an icon on top of a button. Call [method set_ignore_mouse] for that. + [Theme] resources change the Control's appearance. If you change the [Theme] on a parent Control node, it will propagate to all of its children. You can override parts of the theme on each Control with the add_*_override methods, like [method add_font_override]. You can also override the theme from the editor. + + + + + + + + + + + Returns the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. + + + + + + + + + + + + + + + Marks the input event as handled. No other Control will receive it, and the input event will not propagate. Not even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input]. + + + + + + + + + + + + + + + + + + + + + Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared. + + + + + + + + + + + Override a single font (font) in the theme of this Control. If font is empty, override is cleared. + + + + + + + + + + + Override a single icon ([Texture]) in the theme of this Control. If texture is empty, override is cleared. + + + + + + + + + + + + + + + + + + + + + Override a single stylebox ([Stylebox]) in the theme of this Control. If stylebox is empty, override is cleared. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the cursor shape at a certain position in the control. + + + + + + + + + + + + + Return the default cursor shape for this control. See enum CURSOR_* for the list of shapes. + + + + + + + + + + + + + + + Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). + + + + + + + Returns the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL) (see [method set_focus_mode]). + + + + + + + + + Return the forced neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function. + + + + + + + Return which control is owning the keyboard focus, or null if no one. + + + + + + + + + + + + + + + + + Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode. + + + + + + + Return position and size of the Control, relative to the top-left corner of the [i]window[/i] Control. This is a helper (see [method get_global_position], [method get_size]). + + + + + + + + + + + + + Hint for containers, return horizontal positioning flags. + + + + + + + + + + + + + + + + + + + Return a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being returned depends on the anchor mode. + + + + + + + Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. + + + + + + + Return when the control is ignoring mouse events (even touchpad events send mouse events). + + + + + + + + + + + + + + + + + + + + + + + + + Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode. + + + + + + + Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see [method get_position], [method get_size]). + + + + + + + Return the rotation (in radians) + + + + + + + Return the rotation (in degrees) + + + + + + + + + + + + + Returns the size of the Control, computed from all margins, however the size returned will [b]never be smaller than the minimum size reported by[/b] [method get_minimum_size]. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, [method get_minimum_size], [method set_margin], [method set_anchor]). + + + + + + + Hint for containers, return the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big. + + + + + + + + + + + + + + + + + Return a [Theme] override, if one exists (see [method set_theme]). + + + + + + + + + Return the tooltip, which will appear when the cursor is resting over this control. + + + + + + + + + + + + + Hint for containers, return vertical positioning flags. + + + + + + + + + + + + + Steal the focus from another control and become the focused control (see [method set_focus_mode]). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return whether the Control is the current focused control (see [method set_focus_mode]). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Give up the focus, no other control will be able to receive keyboard input. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see [method set_anchor], [method set_margin]). + + + + + + + + + Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). + + + + + + + + + + + + + + + + + + + + + + + + + Set the default cursor shape for this control. See enum CURSOR_* for the list of shapes. + + + + + + + + + + + + + + + + + + + + + + + + + Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]). + + + + + + + + + Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals. + + + + + + + + + + + Force a neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function. + + + + + + + + + Move the Control to a new position, relative to the top-left corner of the [i]window[/i] Control, and without changing current anchor mode. (see [method set_margin]). + + + + + + + + + + + + + + + + + Hint for containers, set horizontal positioning flags. + + + + + + + + + + + Set a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being set depends on the anchor mode. + + + + + + + + + Set when the control is ignoring mouse events (even touchpad events send mouse events). (see the MOUSE_FILTER_* constants) + + + + + + + + + + + + + + + + + Move the Control to a new position, relative to the top-left corner of the parent Control, changing all margins if needed and without changing current anchor mode. This is a helper (see [method set_margin]). + + + + + + + + + Set the rotation (in radians). + + + + + + + + + Set the rotation (in degrees). + + + + + + + + + + + + + + + + + Changes MARGIN_RIGHT and MARGIN_BOTTOM to fit a given size. This is a helper (see [method set_margin]). + + + + + + + + + Hint for containers, set the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big. + + + + + + + + + Override whole the [Theme] for this Control and all its children controls. + + + + + + + + + Set a tooltip, which will appear when the cursor is resting over this control. + + + + + + + + + + + + + + + + + Hint for containers, set vertical positioning flags. + + + + + + + + + Display a Control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Emitted when the node gains keyboard focus. + + + + + Emitted when the node loses keyboard focus. + + + + + + + + + + + Emitted when the node's minimum size changes. + + + + + + + + + Emitted when the mouse enters the control's area. + + + + + Emitted when the mouse leaves the control's area. + + + + + Emitted when the control changes size. + + + + + Emitted when the size flags change. + + + + + + Control can't acquire focus. + + + Control can acquire focus only if clicked. + + + Control can acquire focus if clicked, or by pressing TAB/Directionals in the keyboard from another Control. + + + Control changed size (get_size() reports the new size). + + + Mouse pointer entered the area of the Control. + + + Mouse pointer exited the area of the Control. + + + Control gained focus. + + + Control lost focus. + + + Theme changed. Redrawing is desired. + + + Modal control was closed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP. + + + X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM. + + + diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml new file mode 100644 index 0000000000..ff1a67acbd --- /dev/null +++ b/doc/classes/ConvexPolygonShape.xml @@ -0,0 +1,35 @@ + + + + Convex Polygon Shape. + + + Convex polygon shape resource, which can be set into a [PhysicsBody] or area. + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml new file mode 100644 index 0000000000..98443d6d6a --- /dev/null +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -0,0 +1,47 @@ + + + + Convex Polygon Shape for 2D physics. + + + Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). + The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. + + + + + + + + + + + Return a list of points in either clockwise or counter clockwise order, forming a convex polygon. + + + + + + + + + Currently, this method does nothing. + + + + + + + + + Set a list of points in either clockwise or counter clockwise order, forming a convex polygon. + + + + + + + + + + diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml new file mode 100644 index 0000000000..ac2ff3fc57 --- /dev/null +++ b/doc/classes/CubeMap.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/CubeMesh.xml b/doc/classes/CubeMesh.xml new file mode 100644 index 0000000000..7ae5d9b392 --- /dev/null +++ b/doc/classes/CubeMesh.xml @@ -0,0 +1,87 @@ + + + + Generate an axis-aligned cuboid [PrimitiveMesh]. + + + Generate an axis-aligned cuboid [PrimitiveMesh]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Size of the cuboid mesh. Defaults to (2, 2, 2). + + + Number of extra edge loops inserted along the z-axis. Defaults to 0. + + + Number of extra edge loops inserted along the y-axis. Defaults to 0. + + + Number of extra edge loops inserted along the x-axis. Defaults to 0. + + + + + diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml new file mode 100644 index 0000000000..94f75329a5 --- /dev/null +++ b/doc/classes/Curve.xml @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml new file mode 100644 index 0000000000..797145e8ce --- /dev/null +++ b/doc/classes/Curve2D.xml @@ -0,0 +1,200 @@ + + + + Describes a Bezier curve in 2D space. + + + This class describes a Bezier curve in 2D space. It is mainly used to give a shape to a [Path2D], but can be manually sampled for other purposes. + It keeps a cache of precalculated points along the curve, to speed further calculations up. + + + + + + + + + + + + + + + + + + + Adds a point to a curve, at position "pos", with control points "in" and "out". + If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos <0 or atpos >= [method get_point_count]), the point will be appended at the end of the point list. + + + + + + + + + + + + + Returns the distance between two adjacent cached points. + + + + + + + Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough. + + + + + + + Returns the cache of points as a [PoolVector2Array]. + + + + + + + Returns the number of points describing the curve. + + + + + + + + + Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). + + + + + + + + + Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). + + + + + + + + + Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). + + + + + + + + + + + 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). + + + + + + + + + + + Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve. + To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false. + Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). + + + + + + + + + Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t". + + + + + + + + + Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds. + + + + + + + + + Sets the distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care. + + + + + + + + + + + Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. + + + + + + + + + + + Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. + + + + + + + + + + + Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. + + + + + + + + + + + Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. + This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. + "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + + + + + + + + + + + + diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml new file mode 100644 index 0000000000..6c403b243a --- /dev/null +++ b/doc/classes/Curve3D.xml @@ -0,0 +1,228 @@ + + + + Describes a Bezier curve in 3D space. + + + This class describes a Bezier curve in 3D space. It is mainly used to give a shape to a [Path], but can be manually sampled for other purposes. + It keeps a cache of precalculated points along the curve, to speed further calculations up. + + + + + + + + + + + + + + + + + + + Adds a point to a curve, at position "pos", with control points "in" and "out". + If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos <0 or atpos >= [method get_point_count]), the point will be appended at the end of the point list. + + + + + + + + + + + + + Returns the distance between two adjacent cached points. + + + + + + + Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough. + + + + + + + Returns the cache of points as a [PoolVector3Array]. + + + + + + + Returns the cache of tilts as a [RealArray]. + + + + + + + Returns the number of points describing the curve. + + + + + + + + + Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). + + + + + + + + + Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). + + + + + + + + + Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). + + + + + + + + + Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0. + + + + + + + + + + + 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). + + + + + + + + + + + Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve. + To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false. + Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). + + + + + + + + + Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t". + + + + + + + + + Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds. + + + + + + + + + Sets the distance in 3D units between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care. + + + + + + + + + + + Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. + + + + + + + + + + + Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. + + + + + + + + + + + Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. + + + + + + + + + + + Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console. + The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow], this tilt is an offset over the natural tilt the PathFollow calculates. + + + + + + + + + + + Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. + This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. + "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + + + + + + + + + + + + diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml new file mode 100644 index 0000000000..25cbe43e0b --- /dev/null +++ b/doc/classes/CurveTexture.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml new file mode 100644 index 0000000000..9ef68e03ed --- /dev/null +++ b/doc/classes/CylinderMesh.xml @@ -0,0 +1,104 @@ + + + + Class representing a cylindrical [PrimitiveMesh]. + + + Class representing a cylindrical [PrimitiveMesh]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bottom radius of the cylinder. Defaults to 1.0. + + + Full height of the cylinder. Defaults to 2.0. + + + Number of radial segments on the cylinder. Defaults to 64. + + + Number of edge rings along the height of the cylinder. Defaults to 4. + + + Top radius of the cylinder. Defaults to 1.0. + + + + + diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml new file mode 100644 index 0000000000..feed1bed5f --- /dev/null +++ b/doc/classes/DampedSpringJoint2D.xml @@ -0,0 +1,91 @@ + + + + Damped spring constraint for 2D physics. + + + Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length. + + + + + + + + + + + Return 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). + + + + + + + Return the maximum length of the spring joint. + + + + + + + Return the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. + + + + + + + Return the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. + + + + + + + + + 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). + + + + + + + + + Set the maximum length of the spring joint. + + + + + + + + + Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. + + + + + + + + + Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. + + + + + + + + + + + + + + + + diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml new file mode 100644 index 0000000000..447c0d7ed3 --- /dev/null +++ b/doc/classes/Dictionary.xml @@ -0,0 +1,82 @@ + + + + Dictionary type. + + + Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference. + + + + + + + + + Clear the dictionary, removing all key/value pairs. + + + + + + + Return true if the dictionary is empty. + + + + + + + Erase a dictionary key/value pair by key. + + + + + + + + + Return true if the dictionary has a given key. + + + + + + + + + Return true if the dictionary has all of the keys in the given array. + + + + + + + Return a hashed integer value representing the dictionary contents. + + + + + + + Return the list of keys in the [Dictionary]. + + + + + + + Return the size of the dictionary (in pairs). + + + + + + + Return the list of values in the [Dictionary]. + + + + + + diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml new file mode 100644 index 0000000000..bf689f98e0 --- /dev/null +++ b/doc/classes/DirectionalLight.xml @@ -0,0 +1,89 @@ + + + + Directional Light, such as the Sun or the Moon. + + + A DirectionalLight is a type of [Light] node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml new file mode 100644 index 0000000000..ee0b873084 --- /dev/null +++ b/doc/classes/Directory.xml @@ -0,0 +1,196 @@ + + + + Type used to handle the filesystem. + + + Directory type. It is used to manage directories and their content (not restricted to the project folder). + Here is an example on how to iterate through the files of a directory: + [codeblock] + func dir_contents(path): + var dir = Directory.new() + if dir.open(path) == OK: + dir.list_dir_begin() + var file_name = dir.get_next() + while (file_name != ""): + if dir.current_is_dir(): + print("Found directory: " + file_name) + else: + print("Found file: " + file_name) + file_name = dir.get_next() + else: + print("An error occurred when trying to access the path.") + [/codeblock] + + + + + + + + + + + + + Change the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]). + The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*). + + + + + + + + + + + Copy the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. + Returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*). + + + + + + + Return whether the current item processed with the last [method get_next] call is a directory ([code].[/code] and [code]..[/code] are considered directories). + + + + + + + + + Return whether the target directory exists. The argument can be relative to the current directory, or an absolute path. + + + + + + + + + Return whether the target file exists. The argument can be relative to the current directory, or an absolute path. + + + + + + + Return the absolute path to the currently opened directory (e.g. [code]res://folder[/code] or [code]C:\tmp\folder[/code]). + + + + + + + + + + + + + + + On Windows, return the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not existed, the method returns an empty String. + + + + + + + On Windows, return the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0. + + + + + + + Return the next element (file or directory) in the current directory (including [code].[/code] and [code]..[/code], unless [code]skip_navigational[/code] was given to [method list_dir_begin]). + The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case). + + + + + + + On Unix desktop systems, return the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1. + + + + + + + + + + + Initialise the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end]. + If you pass [code]skip_navigational[/code], then [code].[/code] and [code]..[/code] would be filtered out. + If you pass [code]skip_hidden[/code], then hidden files would be filtered out. + + + + + + + Close the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter). + + + + + + + + + Create a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]). + The method returns one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*). + + + + + + + + + Create a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path. + Return one of the error code constants defined in [@Global Scope] (OK, FAILED or ERR_*). + + + + + + + + + Open an existing directory of the filesystem. The [i]path[/i] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]). + The method returns one of the error code constants defined in [@Global Scope] (OK or ERR_*). + + + + + + + + + Delete the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. + Return one of the error code constants defined in [@Global Scope] (OK or FAILED). + + + + + + + + + + + Rename (move) the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. + Return one of the error code constants defined in [@Global Scope] (OK or FAILED). + + + + + + diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml new file mode 100644 index 0000000000..69097ed691 --- /dev/null +++ b/doc/classes/DynamicFont.xml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml new file mode 100644 index 0000000000..51495c8b46 --- /dev/null +++ b/doc/classes/DynamicFontData.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml new file mode 100644 index 0000000000..1e0f27ef7f --- /dev/null +++ b/doc/classes/EditorFileDialog.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml new file mode 100644 index 0000000000..6a2f811425 --- /dev/null +++ b/doc/classes/EditorFileSystem.xml @@ -0,0 +1,98 @@ + + + + Resource filesystem, as the editor sees it. + + + This object holds information of all resources in the filesystem, their types, etc. + + + + + + + + + + + + + Get the type of the file, given the full path. + + + + + + + Get the root directory object. + + + + + + + + + + + + + + + Return the scan progress for 0 to 1 if the FS is being scanned. + + + + + + + Return true of the filesystem is being scanned. + + + + + + + Scan the filesystem for changes. + + + + + + + Check if the source of any imported resource changed. + + + + + + + + + Update a file information. Call this if an external program (not Godot) modified the file. + + + + + + + Emitted if the filesystem changed. + + + + + + + + + + + + + Emitted if the source of any imported file changed. + + + + + + diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml new file mode 100644 index 0000000000..7d284f864e --- /dev/null +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -0,0 +1,102 @@ + + + + A diretory for the resource filesystem. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml new file mode 100644 index 0000000000..0ced30bda6 --- /dev/null +++ b/doc/classes/EditorImportPlugin.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml new file mode 100644 index 0000000000..0422e9a64e --- /dev/null +++ b/doc/classes/EditorInterface.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml new file mode 100644 index 0000000000..f620c33f7a --- /dev/null +++ b/doc/classes/EditorPlugin.xml @@ -0,0 +1,374 @@ + + + + Used by the editor to extend its functionality. + + + 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. + + + + + + + + + + + + + + + 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 [method remove_control_from_bottom_panel]. + + + + + + + + + + + Add a custom control to a container (see CONTAINER_* enum). There are many locations where custom controls can be added in the editor UI. + 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. + + + + + + + + + + + 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 [method remove_control_from_docks]. + + + + + + + + + + + + + + + Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. + 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 [method EditorPlugin.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. + + + + + + + + + + + + + + + + + + + + + + + + + This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency. + This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object. + + + + + + + Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene. + + + + + + + + + This is used for plugins that create gizmos used by the spatial editor. Just check that the node passed in the "for_spatial" argument matches your plugin. + + + + + + + + + This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. + + + + + + + + + + + + + + + + + + + + + This function is called every time the 2D canvas editor draws (which overlays over the edited scene). Drawing over the supplied control will draw over the edited scene. To convert from control coordinates to edited scene coordinates (including zoom and offset), a transform is also provided. If you require this control to be redraw, call [method update_canvas]. + + + + + + + + + + + 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. + If you would like to always gets those input events then additionally use [method set_input_forwarding_always_enabled]. + + + + + + + This is for editors that edit script based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25 + + + + + + + + + + + + + + + + + + + Get the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). + + + + + + + Get the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. + + + + + + + + + Get the GUI layout of the plugin. This is used to save the project's editor layout when the [method EditorPlugin.queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock). + + + + + + + + + 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 [method EditorPlugin.edit] and [method EditorPlugin.make_visible] called when the editor requests them. + + + + + + + Return true if this is a main screen editor plugin (it goes in the main screen selector together with 2D, 3D, Script). + + + + + + + + + + + + + + + + + + + + + + + This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type. + Remember that you have to manage the visibility of all your editor controls manually. + + + + + + + Queue save the project's editor layout. + + + + + + + + + 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 dock. Don't forget to call this if you added one, so the editor can save the layout and remove it cleanly. + + + + + + + + + Remove a custom type added by [method EditorPlugin.add_custom_type] + + + + + + + + + + + + + + + This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources. + + + + + + + Use this method if you always want to receive inputs from 3D view screen inside [method forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene. + + + + + + + + + Restore the state saved by [method EditorPlugin.get_state]. + + + + + + + + + Restore the plugin GUI layout saved by [method EditorPlugin.get_window_layout]. + + + + + + + Updates the control used to draw the edited scene over the 2D canvas. This is used together with [method forward_canvas_input_event]. + + + + + + + + + Emitted when user change main screen view (2D, 3D, Script, AssetLib). Works also with screens which are defined by plugins. + + + + + + + Emitted when user change scene. The argument is a root node of freshly opened scene. + + + + + + + Emitted when user close scene. The argument is file path to a closed scene. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml new file mode 100644 index 0000000000..e530557a23 --- /dev/null +++ b/doc/classes/EditorResourcePreview.xml @@ -0,0 +1,83 @@ + + + + Helper to generate previews of reources or files. + + + This object is used to generate previews for resources of files. + + + + + + + + + + + + + Create an own, custom preview generator. + + + + + + + + + Check if the resource changed, if so it will be invalidated and the corresponding signal emitted. + + + + + + + + + + + + + + + Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. + + + + + + + + + + + + + + + Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. + + + + + + + + + Remove a custom preview generator. + + + + + + + + + If a preview was invalidated (changed) this signal will emit (using the path of the preview) + + + + + + diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml new file mode 100644 index 0000000000..231198516e --- /dev/null +++ b/doc/classes/EditorResourcePreviewGenerator.xml @@ -0,0 +1,48 @@ + + + + Custom generator of previews. + + + Custom code to generate previews. Please check "file_dialog/thumbnail_size" in EditorSettings to find out the right size to do previews at. + + + + + + + + + + + + + Generate a preview from a given resource. This must be always implemented. + Returning an empty texture is an OK way to fail and let another generator take care. + Care must be taken because this function is always called from a thread (not the main thread). + + + + + + + + + Generate a preview directly from a path, implementing this is optional, as default code will load and call generate() + Returning an empty texture is an OK way to fail and let another generator take care. + Care must be taken because this function is always called from a thread (not the main thread). + + + + + + + + + Return if your generator supports this resource type. + + + + + + diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml new file mode 100644 index 0000000000..48cf3e9843 --- /dev/null +++ b/doc/classes/EditorScript.xml @@ -0,0 +1,43 @@ + + + + Simple script to perform changes in the currently edited scene. + + + This script can be run from the Scene -> Run Script menu option. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml new file mode 100644 index 0000000000..8d9bdd2c05 --- /dev/null +++ b/doc/classes/EditorSelection.xml @@ -0,0 +1,63 @@ + + + + Manages the SceneTree selection in the editor. + + + This object manages the SceneTree selection in the editor. + + + + + + + + + + + + + Add a node to the selection. + + + + + + + Clear the selection. + + + + + + + Get the list of selectes nodes. + + + + + + + Get the list of selected nodes, optimized for transform operations (ie, moving them, rotating, etc). This list avoids situations where a node is selected and also chid/grandchild. + + + + + + + + + Remove a node from the selection. + + + + + + + Emitted when the selection changes. + + + + + + diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml new file mode 100644 index 0000000000..37c7a47a51 --- /dev/null +++ b/doc/classes/EditorSettings.xml @@ -0,0 +1,108 @@ + + + + Object that holds the project-independent editor settings. + + + Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu. + Accessing the settings is done by using the regular [Object] API, such as: + [codeblock] + settings.set(prop,value) + settings.get(prop) + list_of_settings = settings.get_property_list() + [/codeblock] + + + + + + + + + + + + + Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String]. + Example: + [codeblock] + editor_settings.set("category/property_name", 0) + + var property_info = { + "name": "category/property_name", + "type": TYPE_INT, + "hint": PROPERTY_HINT_ENUM, + "hint_string": "one,two,three" + } + + editor_settings.add_property_info(property_info) + [/codeblock] + + + + + + + + + Erase a given setting (pass full property path). + + + + + + + Get the list of favorite directories for this project. + + + + + + + Get the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved. + + + + + + + Get the list of recently visited folders in the file dialog for this project. + + + + + + + Get the global settings path for the engine. Inside this path you can find some standard paths such as: + settings/tmp - used for temporary storage of files + settings/templates - where export templates are located + + + + + + + + + Set the list of favorite directories for this project. + + + + + + + + + Set the list of recently visited folders in the file dialog for this project. + + + + + + + + + + + + diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml new file mode 100644 index 0000000000..de9ea5282a --- /dev/null +++ b/doc/classes/EditorSpatialGizmo.xml @@ -0,0 +1,152 @@ + + + + Custom gizmo for editing Spatial objects. + + + Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. These are created by [method EditorPlugin.create_spatial_gizmo]. + + + + + + + + + + + + + + + + + + + + + Add collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw]. + + + + + + + + + + + + + Add a list of handles (points) which can be used to deform the object being edited. + There are virtual functions which will be called upon editing of these handles. Call this function during [method redraw]. + + + + + + + + + + + + + Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw]. + + + + + + + + + + + + + + + + + + + + + + + Add an unscaled billboard for visualization. Call this function during [method redraw]. + + + + + + + + + + + + + + + + + + + Commit a handle being edited (handles must have been prevously added by [method add_handles]). + If the cancel parameter is true, an option to restore the edited value to the original is provided. + + + + + + + + + Get the name of an edited handle (handles must have been previously added by [method add_handles]). + Handles can be named for reference to the user when editing. + + + + + + + + + Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle] + + + + + + + This function is called when the Spatial this gizmo refers to changes (the [method Spatial.update_gizmo] is called). + + + + + + + + + + + + + This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates. + The [Camera] is also provided so screen coordinates can be converted to raycasts. + + + + + + + + + + + + + + diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml new file mode 100644 index 0000000000..412e60bf99 --- /dev/null +++ b/doc/classes/EncodedObjectAsID.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml new file mode 100644 index 0000000000..2372c619f5 --- /dev/null +++ b/doc/classes/Engine.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + Return the total amount of frames drawn. + + + + + + + Returns the frames per second of the running game. + + + + + + + Return the amount of fixed iterations per second (for fixed process and physics). + + + + + + + Return the main loop object (see [MainLoop] and [SceneTree]). + + + + + + + + + + + + + + + + + + + Returns the current engine version information in a Dictionary. + + "major" - Holds the major version number as a String + "minor" - Holds the minor version number as a String + "patch" - Holds the patch version number as a String + "status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String + "revision" - Holds the revision (e.g. "custom-build") as a String + "string" - major + minor + patch + status + revision in a single String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the amount of fixed iterations per second (for fixed process and physics). + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml new file mode 100644 index 0000000000..3c753977e3 --- /dev/null +++ b/doc/classes/Environment.xml @@ -0,0 +1,1173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/File.xml b/doc/classes/File.xml new file mode 100644 index 0000000000..4e73cd8ae2 --- /dev/null +++ b/doc/classes/File.xml @@ -0,0 +1,420 @@ + + + + Type to handle file reading and writing operations. + + + File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example. + Here's a sample on how to write and read from a file: + [codeblock] + func save(content): + var file = File.new() + file.open("user://save_game.dat", file.WRITE) + file.store_string(content) + file.close() + + func load(): + var file = File.new() + file.open("user://save_game.dat", file.READ) + var content = file.get_as_text() + file.close() + return content + [/codeblock] + + + + + + + + + + + Close the currently opened file. + + + + + + + Return whether the file cursor reached the end of the file. + + + + + + + + + Get whether or not the file in the specified path exists. + + + + + + + Get the next 16 bits from the file as an integer. + + + + + + + Get the next 32 bits from the file as an integer. + + + + + + + Get the next 64 bits from the file as an integer. + + + + + + + Get the next 8 bits from the file as an integer. + + + + + + + Get the whole file as a [String]. + + + + + + + + + Get next len bytes of the file as a [PoolByteArray]. + + + + + + + + + Get the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma). + + + + + + + Get the next 64 bits from the file as a floating point number. + + + + + + + Get whether endian swap is enabled for this file. + + + + + + + Get the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope]. + + + + + + + Get the next 32 bits from the file as a floating point number. + + + + + + + Return the size of the file in bytes. + + + + + + + Get the next line of the file as a [String]. + + + + + + + + + Return a md5 String representing the file at the given path or an empty [String] on failure. + + + + + + + + + + + + + + + Get a [String] saved in Pascal format from the file. + + + + + + + Return the file cursor position. + + + + + + + Get the next bits from the file as a floating point number. + + + + + + + + + Return a sha256 String representing the file at the given path or an empty [String] on failure. + + + + + + + Get the next Variant value from the file. + + + + + + + Return whether the file is currently opened. + + + + + + + + + + + Open the file for writing or reading, depending on the flags. + + + + + + + + + + + + + Open a compressed file for reading or writing. The compression_mode can be set as one of the COMPRESSION_* constants. + + + + + + + + + + + + + Open an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. + + + + + + + + + + + + + Open an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. + + + + + + + + + Change the file reading/writing cursor to the specified position (in bytes from the beginning of the file). + + + + + + + + + Change the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file. + + + + + + + + + Set whether to swap the endianness of the file. Enable this if you're dealing with files written in big endian machines. + Note that this is about the file format, not CPU type. This is always reseted to [code]false[/code] whenever you open the file. + + + + + + + + + Store an integer as 16 bits in the file. + + + + + + + + + Store an integer as 32 bits in the file. + + + + + + + + + Store an integer as 64 bits in the file. + + + + + + + + + Store an integer as 8 bits in the file. + + + + + + + + + Store the given array of bytes in the file. + + + + + + + + + Store a floating point number as 64 bits in the file. + + + + + + + + + Store a floating point number as 32 bits in the file. + + + + + + + + + Store the given [String] as a line in the file. + + + + + + + + + Store the given [String] as a line in the file in Pascal format (i.e. also store the length of the string). + + + + + + + + + Store a floating point number in the file. + + + + + + + + + Store the given [String] in the file. + + + + + + + + + Store any Variant value in the file. + + + + + + Open the file for reading. + + + Open the file for writing. Create it if the file not exists and truncate if it exists. + + + Open the file for reading and writing, without truncating the file. + + + Open the file for reading and writing. Create it if the file not exists and truncate if it exists. + + + Use the FastLZ compression method. + + + Use the Deflate compression method. + + + Use the Zstd compression method. + + + + + diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml new file mode 100644 index 0000000000..052c808556 --- /dev/null +++ b/doc/classes/FileDialog.xml @@ -0,0 +1,222 @@ + + + + Dialog for selecting files or directories in the filesystem. + + + FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. + + + + + + + + + + + + + Add a custom filter. Filter format is: "mask ; description", example (C++): dialog->add_filter("*.png ; PNG Images"); + + + + + + + Clear all the added filters in the dialog. + + + + + + + Return the file access permission of the dialog. + + + + + + + Get the current working directory of the file dialog. + + + + + + + Get the current selected file of the file dialog (empty if none). + + + + + + + Get the current selected path (directory and file) of the file dialog (empty if none). + + + + + + + + + + + + + Get the file dialog mode from the MODE_* enum. + + + + + + + Return the vertical box container of the dialog, custom controls can be added to it. + + + + + + + Invalidate and update the current dialog content list. + + + + + + + Return true if the diaog allows show hidden files. + + + + + + + + + Set the file access permission of the dialog(Must be one of [ACCESS_RESOURCES], [ACCESS_USERDATA] or [ACCESS_FILESYSTEM]). + + + + + + + + + Set the current working directory of the file dialog. + + + + + + + + + Set the current selected file name of the file dialog. + + + + + + + + + Set the current selected file path of the file dialog. + + + + + + + + + + + + + + + + + Set the file dialog mode from the MODE_* enum. + + + + + + + + + Set the dialog should show hidden files. + + + + + + + + + + + + + + + + + + + Event emitted when the user selects a directory. + + + + + + + Event emitted when the user selects a file (double clicks it or presses the OK button). + + + + + + + Event emitted when the user selects multiple files. + + + + + + The dialog allows the selection of one, and only one file. + + + The dialog allows the selection of multiple files. + + + The dialog functions as a folder selector, disallowing the selection of any file. + + + The dialog allows the selection of a file or a directory. + + + The dialog will warn when a file exists. + + + The dialog allows the selection of file and directory. + + + The dialog allows ascess files under [Resource] path(res://) . + + + The dialog allows ascess files in whole file system. + + + + + + + + + + + diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml new file mode 100644 index 0000000000..420756975f --- /dev/null +++ b/doc/classes/Font.xml @@ -0,0 +1,94 @@ + + + + Internationalized font and text drawing support. + + + Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc. + + + + + + + + + + + + + + + + + + + + + Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + + + + + + + + + + + + + + + + + Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character. + + + + + + + Return the font ascent (number of pixels above the baseline). + + + + + + + Return the font descent (number of pixels below the baseline). + + + + + + + Return the total font height (ascent plus descent) in pixels. + + + + + + + + + Return the size of a string, taking kerning and advance into account. + + + + + + + + + + + + + After editing a font (changing size, ascent, char rects, etc.). Call this function to propagate changes to controls that might use it. + + + + + + diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml new file mode 100644 index 0000000000..a7593dc2a1 --- /dev/null +++ b/doc/classes/FuncRef.xml @@ -0,0 +1,42 @@ + + + + Reference to a function in an object. + + + In GDScript, functions are not [i]first-class objects[/i]. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments. + However, by creating a [FuncRef] using the [method @GDScript.funcref] function, a reference to a function in a given object can be created, passed around and called. + + + + + + + + + + + + + + + + + + + Set the name of the function to call on the object, without parentheses or any parameters. + + + + + + + + + Set the object on which to call the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary]. + + + + + + diff --git a/doc/classes/GDFunctionState.xml b/doc/classes/GDFunctionState.xml new file mode 100644 index 0000000000..801ca718e7 --- /dev/null +++ b/doc/classes/GDFunctionState.xml @@ -0,0 +1,46 @@ + + + + State of a function call after yielding. + + + Calling [method @GDScript.yield] within a function will cause that function to yield and return its current state as an object of this type. The yielded function call can then be resumed later by calling [method resume] on this state object. + + + + + + + + + + + + + Check whether the function call may be resumed. This is not the case if the function state was already resumed. + If [code]extended_check[/code] is enabled, it also checks if the associated script and object still exist. The extended check is done in debug mode as part of [method GDFunctionState.resume], but you can use this if you know you may be trying to resume without knowing for sure the object and/or script have survived up to that point. + + + + + + + + + Resume execution of the yielded function call. + If handed an argument, return the argument from the [method @GDScript.yield] call in the yielded function call. You can pass e.g. an [Array] to hand multiple arguments. + This function returns what the resumed function call returns, possibly another function state if yielded again. + + + + + + + + + + + + + + diff --git a/doc/classes/GDNative.xml b/doc/classes/GDNative.xml new file mode 100644 index 0000000000..a0b6117b36 --- /dev/null +++ b/doc/classes/GDNative.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/GDNativeClass.xml b/doc/classes/GDNativeClass.xml new file mode 100644 index 0000000000..5a3f353720 --- /dev/null +++ b/doc/classes/GDNativeClass.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/GDNativeLibrary.xml b/doc/classes/GDNativeLibrary.xml new file mode 100644 index 0000000000..ffb5ec5542 --- /dev/null +++ b/doc/classes/GDNativeLibrary.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/GDScript.xml b/doc/classes/GDScript.xml new file mode 100644 index 0000000000..2faa0ff968 --- /dev/null +++ b/doc/classes/GDScript.xml @@ -0,0 +1,38 @@ + + + + A script implemented in the GDScript programming language. + + + A script implemented in the GDScript programming language. The script exends the functionality of all objects that instance it. + [method new] creates a new instance of the script. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. + + + + + + + + + + + Returns byte code for the script source code. + + + + + + + Returns a new instance of the script. + For example: + [codeblock] + var MyClass = load("myclass.gd") + var instance = MyClass.new() + assert(instance.get_script() == MyClass) + [/codeblock] + + + + + + diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml new file mode 100644 index 0000000000..69ed088210 --- /dev/null +++ b/doc/classes/GIProbe.xml @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml new file mode 100644 index 0000000000..de3a2ac047 --- /dev/null +++ b/doc/classes/GIProbeData.xml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml new file mode 100644 index 0000000000..5ff25cafca --- /dev/null +++ b/doc/classes/Generic6DOFJoint.xml @@ -0,0 +1,265 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml new file mode 100644 index 0000000000..6c301cb928 --- /dev/null +++ b/doc/classes/Geometry.xml @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml new file mode 100644 index 0000000000..1eb5858e6e --- /dev/null +++ b/doc/classes/GeometryInstance.xml @@ -0,0 +1,163 @@ + + + + Base node for geometry based visual instances. + + + Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the material override for the whole geometry. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the material override for the whole geometry. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml new file mode 100644 index 0000000000..73beee38cd --- /dev/null +++ b/doc/classes/Gradient.xml @@ -0,0 +1,131 @@ + + + + Color interpolator node + + + Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1. + + + + + + + + + + + + + + + Adds the specified color to the end of the ramp, with the specified offset + + + + + + + + + Returns the color of the ramp color at index [i]point[/i] + + + + + + + Returns the colors in the ramp + + + + + + + + + Returns the offset of the ramp color at index [i]point[/i] + + + + + + + Returns the offsets for the colors in this ramp + + + + + + + Returns the number of colors in the ramp + + + + + + + + + Returns the interpolated color specified by [i]offset[/i] + + + + + + + + + Removes the color at the index [i]offset[/i] + + + + + + + + + + + Sets the color of the ramp color at index [i]point[/i] + + + + + + + + + Sets the colors for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accommodate the new elements. + + + + + + + + + + + Sets the offset for the ramp color at index [i]point[/i] + + + + + + + + + Sets the offset for the specified amount of elements. Calling this function with a different number of elements than previously defined causes the ramp to resize its colors and offsets array to accommodate the new elements, all new colors will be black by default. + + + + + + + + + + + + diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml new file mode 100644 index 0000000000..c32990114b --- /dev/null +++ b/doc/classes/GradientTexture.xml @@ -0,0 +1,47 @@ + + + + Gradient filled texture. + + + Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [method set_width]). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The [Gradient] that will be used to fill the texture. + + + The number of color samples that will be obtained from the [Gradient]. + + + + + diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml new file mode 100644 index 0000000000..bd594033ee --- /dev/null +++ b/doc/classes/GraphEdit.xml @@ -0,0 +1,250 @@ + + + + GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them. + + + GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default. + It is greatly advised to enable low processor usage mode (see [method OS.set_low_processor_usage_mode]) when using GraphEdits. + + + + + + + + + + + + + + + + + + + Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created. + + + + + + + + + + + + + + + Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists. + + + + + + + Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" } + + + + + + + Return the scroll offset. + + + + + + + + + + + + + Return the current zoom value. + + + + + + + + + + + + + + + Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode. + + + + + + + Return true is the disconnection of connections is enable in the visual GraphEdit. False otherwise. + + + + + + + + + + + + + + + Enable the disconnection of existing connections in the visual GraphEdit by left-clicking a connection and releasing into the void. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the zoom value of the GraphEdit. Zoom value is between [0.01; 1.728]. + + + + + + + Signal sent at the beginning of a GraphNode movement. + + + + + Signal sent at the end of a GraphNode movement. + + + + + + + + + + + + + Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be created. + + + + + + + + + + + + + + + Signal sent when a GraphNode is attempted to be removed from the GraphEdit. + + + + + + + + + + + + + Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be removed. + + + + + Signal sent when a GraphNode is attempted to be duplicated in the GraphEdit. + + + + + + + + + + + + + Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml new file mode 100644 index 0000000000..f6a12497bc --- /dev/null +++ b/doc/classes/GraphNode.xml @@ -0,0 +1,365 @@ + + + + A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types. + + + A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. + + + + + + + + + + + Disable all input and output slots of the GraphNode. + + + + + + + + + Disable input and output slot whose index is 'idx'. + + + + + + + + + Return the color of the input connection 'idx'. + + + + + + + Return the number of enabled input slots (connections) to the GraphNode. + + + + + + + + + Return the position of the input connection 'idx'. + + + + + + + + + Return the type of the input connection 'idx'. + + + + + + + + + Return the color of the output connection 'idx'. + + + + + + + Return the number of enabled output slots (connections) of the GraphNode. + + + + + + + + + Return the position of the output connection 'idx'. + + + + + + + + + Return the type of the output connection 'idx'. + + + + + + + Return the offset of the GraphNode. + + + + + + + + + + + + + + + Return the color set to 'idx' left (input) slot. + + + + + + + + + Return the color set to 'idx' right (output) slot. + + + + + + + + + Return the (integer) type of left (input) 'idx' slot. + + + + + + + + + Return the (integer) type of right (output) 'idx' slot. + + + + + + + Return the title of the GraphNode. + + + + + + + Returns true if the close button is shown. False otherwise. + + + + + + + + + + + + + + + + + + + + + + + + + + + Return true if left (input) slot 'idx' is enabled. False otherwise. + + + + + + + + + Return true if right (output) slot 'idx' is enabled. False otherwise. + + + + + + + + + + + + + + + + + Set the offset of the GraphNode. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Show the close button on the GraphNode if 'show' is true (disabled by default). If enabled, a connection on the signal close_request is needed for the close button to work. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the title of the GraphNode. + + + + + + + + + + + + + + + Signal sent on closing the GraphNode. + + + + + + + + + Signal sent when the GraphNode is dragged. + + + + + Signal sent when the GraphNode is moved. + + + + + Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml new file mode 100644 index 0000000000..6d272e8164 --- /dev/null +++ b/doc/classes/GridContainer.xml @@ -0,0 +1,43 @@ + + + + Grid container used to arrange elements in a grid like layout + + + Grid container will arrange its children in a grid like structure, the grid columns are specified using the [method set_columns] method and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. + + + + + + + + + + + Returns the number of columns in this container + + + + + + + + + Sets the numbers of columns in the container, then reorder its children to accommodate the new layout + + + + + + + + + + + + + + + + diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml new file mode 100644 index 0000000000..9afee7ee2b --- /dev/null +++ b/doc/classes/GrooveJoint2D.xml @@ -0,0 +1,55 @@ + + + + Groove constraint for 2D physics. + + + Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another. + + + + + + + + + + + Set the final offset of the groove on body A. + + + + + + + Return the length of the groove. + + + + + + + + + Set the initial offset of the groove on body A. + + + + + + + + + Set the length of the groove. + + + + + + + + + + + + diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml new file mode 100644 index 0000000000..2ffc2a8c57 --- /dev/null +++ b/doc/classes/HBoxContainer.xml @@ -0,0 +1,21 @@ + + + + Horizontal box container. + + + Horizontal box container. See [BoxContainer]. + + + + + + + + + + + + + + diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml new file mode 100644 index 0000000000..188995527c --- /dev/null +++ b/doc/classes/HScrollBar.xml @@ -0,0 +1,37 @@ + + + + Horizontal scroll bar. + + + Horizontal scroll bar. See [ScrollBar]. This one goes from left (min) to right (max). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml new file mode 100644 index 0000000000..351eee7ee6 --- /dev/null +++ b/doc/classes/HSeparator.xml @@ -0,0 +1,23 @@ + + + + Horizontal separator. + + + Horizontal separator. See [Separator]. It is used to separate objects vertically, though (but it looks horizontal!). + + + + + + + + + + + + + + + + diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml new file mode 100644 index 0000000000..91f95d1548 --- /dev/null +++ b/doc/classes/HSlider.xml @@ -0,0 +1,35 @@ + + + + Horizontal slider. + + + Horizontal slider. See [Slider]. This one goes from left (min) to right (max). + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml new file mode 100644 index 0000000000..d7dc79a783 --- /dev/null +++ b/doc/classes/HSplitContainer.xml @@ -0,0 +1,27 @@ + + + + Horizontal split container. + + + Horizontal split container. See [SplitContainer]. This goes from left to right. + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml new file mode 100644 index 0000000000..cf48ec84f6 --- /dev/null +++ b/doc/classes/HTTPClient.xml @@ -0,0 +1,356 @@ + + + + Hyper-text transfer protocol client. + + + Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification. + Can be reused to connect to different hosts and make many requests. + + + + + + + + + + + Cloces the current connection, allows for reusal of [HTTPClient]. + + + + + + + + + + + + + + + Connect to a host. This needs to be done before any requests are sent. + The host should not have http:// prepended but will strip the protocol identifier if provided. + verify_host will check the SSL identity of the host if set to true. + + + + + + + Return current connection. + + + + + + + Return the response's body length. + + + + + + + Return the HTTP status code of the response. + + + + + + + Return the response headers. + + + + + + + Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. + Structure: ("key":"value1; value2") + Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + + + + + + + Returns a STATUS_* enum constant. Need to call [method poll] in order to get status updates. + + + + + + + Return whether this [HTTPClient] has a response available. + + + + + + + Return whether blocking mode is enabled. + + + + + + + Return whether this [HTTPClient] has a response that is chunked. + + + + + + + This needs to be called in order to have any request processed. Check results with [method get_status] + + + + + + + + + Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: + [codeblock] + var fields = {"username": "user", "password": "pass"} + String queryString = httpClient.query_string_from_dict(fields) + returns:= "username=user&password=pass" + [/codeblock] + + + + + + + Reads one chunk from the response. + + + + + + + + + + + + + + + Sends a request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php". + Headers are HTTP request headers. + To create a POST request with query strings to push to the server, do: + [codeblock] + var fields = {"username" : "user", "password" : "pass"} + var queryString = httpClient.query_string_from_dict(fields) + var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())] + var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString) + [/codeblock] + + + + + + + + + + + + + + + Sends a raw request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php". + Headers are HTTP request headers. + Sends body raw, as a byte array, does not encode it in any way. + + + + + + + + + Stub function + + + + + + + + + Stub function + + + + + + + + + If set to true, execution will block until all data is read from the response. + + + + + + + + + Set connection to use, for this client. + + + + + + + + + Sets the size of the buffer used and maximum bytes to read per iteration. see [method read_response_body_chunk] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml new file mode 100644 index 0000000000..6aa799b3f9 --- /dev/null +++ b/doc/classes/HTTPRequest.xml @@ -0,0 +1,184 @@ + + + + A Node with the ability to send HTTP requests. + + + A Node with the ability to send HTTP requests. Uses a [HTTPClient] internally, supports HTTPS. + Can be used to make HTTP requests or download files via HTTP. + + + + + + + + + + + Cancel the current request. + + + + + + + Return the response body length. + + + + + + + Return current body size limit. + + + + + + + Return the file this request will download into. + + + + + + + Return the amount of bytes this HTTPRequest downloaded. + + + + + + + Return the current status of the underlying [HTTPClient]. + + + + + + + Return the maximum amount of redirects that will be followed. + + + + + + + Whether this request is using threads. + + + + + + + + + + + + + + + + + + + + + + + + + Set the response body size limit. + + + + + + + + + Set the file to download into. Outputs the response body into the file. + + + + + + + + + Set the maximum amount of redirects the request will follow. + + + + + + + + + Make this HTTPRequest use threads. + + + + + + + + + + + + + + + + + + + + + + + This signal is emitted upon request completion. + + + + + + Request successful. + + + + + Request failed while connecting. + + + Request failed while resolving. + + + Request failed due to connection(read/write) error. + + + Request failed on SSL handshake. + + + Request does not have a response(yet). + + + Request exceded its maximum size limit, see [method set_body_size_limit]. + + + Request failed. (unused) + + + HTTPRequest couldn't open the download file. + + + HTTPRequest couldn't write to the download file. + + + Request reached its maximum redirect limit, see [method set_max_redirects]. + + + diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml new file mode 100644 index 0000000000..fe4b2fd795 --- /dev/null +++ b/doc/classes/HingeJoint.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml new file mode 100644 index 0000000000..fed7000df6 --- /dev/null +++ b/doc/classes/IP.xml @@ -0,0 +1,102 @@ + + + + IP Protocol support functions. + + + IP contains support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded. + + + + + + + + + + + + + Removes all of a "hostname"'s cached references. If no "hostname" is given then all cached IP addresses are removed. + + + + + + + + + Removes a given item "id" from the queue. This should be used to free a queue after it has completed to enable more queries to happen. + + + + + + + Returns all of the user's current IPv4 and IPv6 addresses as an array. + + + + + + + + + Returns a queued hostname's IP address, given its queue "id". Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). + + + + + + + + + Returns a queued hostname's status as a RESOLVER_STATUS_* constant, given its queue "id". + + + + + + + + + + + Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the TYPE_* constant given as "ip_type". + + + + + + + + + + + Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the TYPE_* constant given as "ip_type". Returns the queue ID if successful, or RESOLVER_INVALID_ID on error. + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/IP_Unix.xml b/doc/classes/IP_Unix.xml new file mode 100644 index 0000000000..d30ad795a8 --- /dev/null +++ b/doc/classes/IP_Unix.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml new file mode 100644 index 0000000000..985345df46 --- /dev/null +++ b/doc/classes/Image.xml @@ -0,0 +1,485 @@ + + + + Image datatype. + + + Native image datatype. Contains image data, which can be converted to a texture, and several functions to interact with it. + + + + + + + + + + + + + + + + + Alpha-blends a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest". + + + + + + + + + + + + + + + Alpha-blends a "src_rect" [Rect2] from "src" [Image] to this [Image] using a "mask" [Image] on coordinates "dest". Alpha channels are required for both "src" and "mask", dest pixels and src pixels will blend if the corresponding mask pixel's alpha value is not 0. "src" [Image] and "mask" [Image] *must* have the same size (width and height) but they can have different formats + + + + + + + + + + + + + Copy a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest". + + + + + + + + + + + + + + + Blits a "src_rect" [Rect2] from "src" [Image] to this [Image] using a "mask" [Image] on coordinates "dest". Alpha channel is required for "mask", will copy src pixel onto dest if the corresponding mask pixel's alpha value is not 0. "src" [Image] and "mask" [Image] *must* have the same size (width and height) but they can have different formats + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create an empty image of a specific size and format. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fills an [Image] with a specified [Color] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the raw data of the [Image]. + + + + + + + Return the format of the [Image], one of [Image].FORMAT_*. + + + + + + + Return the height of the [Image]. + + + + + + + + + + + + + + + + + + + + + + + + + + + Return a new [Image] that is a copy of "area" in this [Image]. + + + + + + + + + + + + + Return the area of this [Image] that is used/visibly colored/opaque. + + + + + + + Return the width of the [Image]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Load an [Image]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Save this [Image] as a png. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml new file mode 100644 index 0000000000..2b74a15fd5 --- /dev/null +++ b/doc/classes/ImageTexture.xml @@ -0,0 +1,119 @@ + + + + A [Texture] based on an [Image]. + + + A [Texture] based on an [Image]. Can be created from an [Image]. + + + + + + + + + + + + + + + + + + + Create a new [ImageTexture] with "width" and "height". + "format" one of [Image].FORMAT_*. + "flags" one or more of [Texture].FLAG_*. + + + + + + + + + + + Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*. + + + + + + + Return the format of the [ImageTexture], one of [Image].FORMAT_*. + + + + + + + Return the storage quality for [ImageTexture].STORAGE_COMPRESS_LOSSY. + + + + + + + Return the storage type. One of [ImageTexture].STORAGE_*. + + + + + + + + + Load an [ImageTexure]. + + + + + + + + + Set the [Image] of this [ImageTexture]. + + + + + + + + + Set the storage quality in case of [ImageTexture].STORAGE_COMPRESS_LOSSY. + + + + + + + + + + + + + + + + + Set the storage type. One of [ImageTexture].STORAGE_*. + + + + + + [Image] data is stored raw and unaltered. + + + [Image] data is compressed with a lossy algorithm. You can set the storage quality with [method set_lossy_storage_quality]. + + + [Image] data is compressed with a lossless algorithm. + + + diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml new file mode 100644 index 0000000000..7b45c0c678 --- /dev/null +++ b/doc/classes/ImmediateGeometry.xml @@ -0,0 +1,111 @@ + + + + Node to draw simple geometry from code, ala OpenGL 1.x + + + + + + + + + + + + + + + + + + + + + Simple helper to draw a uvsphere, with given latitudes, longitude and radius. + + + + + + + + + Add a vertex with the currently set color/uv/etc. + + + + + + + + + + + Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references. + For the type of primitive, use the [Mesh].PRIMITIVE_* enumerations. + + + + + + + Clear everything that was drawn using begin/end. + + + + + + + Call this when done adding a batch of geometry, otherwise it can't be displayed. + + + + + + + + + Set the color that the next vertex will use to be drawn. + + + + + + + + + Set the normal that the next vertex will use to be drawn. + + + + + + + + + Set the tangent (and binormal facing) that the next vertex will use to be drawn. + + + + + + + + + Set the UV that the next vertex will use to be drawn. + + + + + + + + + Set the second layer of UV that the next vertex will use to be drawn. + + + + + + diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml new file mode 100644 index 0000000000..f636000242 --- /dev/null +++ b/doc/classes/Input.xml @@ -0,0 +1,335 @@ + + + + A Singleton that deals with inputs. + + + A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. + + + + + + + + + + + + + This will simulate pressing the specificed action. + + + + + + + + + If the specified action is already pressed, this will release it. + + + + + + + + + + + Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. + + + + + + + If the device has an accelerometer, this will return the movement. + + + + + + + Returns an [Array] containing the device IDs of all currently connected joypads. + + + + + + + + + + + + + If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's x, y, and z axis. + + + + + + + + + + + Returns the current value of the joypad axis at given index (see JOY_* constants in [@Global Scope]) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns a SDL2 compatible device guid on platforms that use gamepad remapping. Returns "Default Gamepad" otherwise. + + + + + + + + + Returns the name of the joypad at the specified device index + + + + + + + + + Returns the duration of the current vibration effect in seconds. + + + + + + + + + Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. + + + + + + + Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion. + + + + + + + If the device has a magnetometer, this will return the magnetic field strength in micro-Tesla for all axes. + + + + + + + Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time the bits are added together. + + + + + + + Return the mouse mode. See the constants for more information. + + + + + + + + + + + + + + + + + + + + + + + + + Returns true or false depending on whether the action event is pressed. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with [InputMap]. + + + + + + + + + + + Returns if the joypad button at the given index is currently pressed. (see JOY_* constants in [@Global Scope]) + + + + + + + + + Returns if the specified device is known by the system. This means that it sets all button and axis indices exactly as defined in the JOY_* constants (see [@Global Scope]). Unknown joypads are not expected to match these constants, but you can still retrieve events from them. + + + + + + + + + Returns true or false depending on whether the key is pressed or not. You can pass KEY_*, which are pre-defined constants listed in [@Global Scope]. + + + + + + + + + Returns true or false depending on whether mouse button is pressed or not. You can pass BUTTON_*, which are pre-defined constants listed in [@Global Scope]. + + + + + + + + + + + + + + + + + Removes all mappings from the internal db that match the given uid. + + + + + + + + + + + + + + + + + + + Set the mouse mode. See the constants for more information. + + + + + + + + + + + + + + + Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). + Note that not every hardware is compatible with long effect durations, it is recommended to restart an effect if in need to play it for more than a few seconds. + + + + + + + + + Stops the vibration of the joypad. + + + + + + + + + Sets the mouse position to the specified vector. + + + + + + + + + + + Emitted when a joypad device has been connected or disconnected + + + + + + Makes the mouse cursor visible if it is hidden. + + + Makes the mouse cursor hidden if it is visible. + + + 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. + + + + + diff --git a/doc/classes/InputDefault.xml b/doc/classes/InputDefault.xml new file mode 100644 index 0000000000..cb8ad6b823 --- /dev/null +++ b/doc/classes/InputDefault.xml @@ -0,0 +1,17 @@ + + + + Default implementation of the [Input] class. + + + Default implementation of the [Input] class, used internally by the editor and games for default input management. + + + + + + + + + + diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml new file mode 100644 index 0000000000..1bfbacd480 --- /dev/null +++ b/doc/classes/InputEvent.xml @@ -0,0 +1,131 @@ + + + + Generic input event + + + + + + + + + + + + + + + Returns true if this input event matches the event passed. + + + + + + + Returns a [String] representation of the event. + + + + + + + Returns the id of the device that generated the event. + + + + + + + Returns the id of the event. + + + + + + + + + Returns true if this input event matches a pre-defined action, no matter the type. + + + + + + + + + Returns true if the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. + + + + + + + + + Returns true if the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. + + + + + + + + + + + + + Returns true if this input event is an echo event (only for events of type KEY, it will return false for other types). + + + + + + + Returns true if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml new file mode 100644 index 0000000000..a93c3683b2 --- /dev/null +++ b/doc/classes/InputEventAction.xml @@ -0,0 +1,44 @@ + + + + Input event type for actions. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml new file mode 100644 index 0000000000..72c34fecb8 --- /dev/null +++ b/doc/classes/InputEventJoypadButton.xml @@ -0,0 +1,63 @@ + + + + Input event type for joypad button events. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Joypad button identifier, one of the JOY_BUTTON_* constants in [@Global Scope]. + + + Pressed state of the joypad button. + + + Intensity of the button pressure, ranges from 0 to 1.0. + + + + + diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml new file mode 100644 index 0000000000..33cdac5154 --- /dev/null +++ b/doc/classes/InputEventJoypadMotion.xml @@ -0,0 +1,52 @@ + + + + Input event type for joypad motion/axis events. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Joypad axis identifier, one of the JOY_AXIS_* constants in [@Global Scope]. + + + Position of the axis, ranging from -1.0 to 1.0. A value of 0 means that the axis is in its neutral position. + + + + + diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml new file mode 100644 index 0000000000..e76447d521 --- /dev/null +++ b/doc/classes/InputEventKey.xml @@ -0,0 +1,80 @@ + + + + Input event type for keyboard events. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Echo state of the key, i.e. whether it's a repeat event or not. + + + Pressed state of the key. + + + Scancode of the key, one of the KEY_* constants in [@Global Scope]. + + + Unicode identifier of the key (when relevant). + + + + + diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml new file mode 100644 index 0000000000..15412b15e0 --- /dev/null +++ b/doc/classes/InputEventMouse.xml @@ -0,0 +1,69 @@ + + + + Base input event type for mouse events. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope]. + + + Global position of the mouse click. + + + Local position of the mouse click. + + + + + diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml new file mode 100644 index 0000000000..d33a94d6e0 --- /dev/null +++ b/doc/classes/InputEventMouseButton.xml @@ -0,0 +1,79 @@ + + + + Input event type for mouse button events. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@Global Scope]. + + + Whether the event is a double-click. + + + + + Pressed state of the mouse button. + + + + + diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml new file mode 100644 index 0000000000..85c68b6bb5 --- /dev/null +++ b/doc/classes/InputEventMouseMotion.xml @@ -0,0 +1,52 @@ + + + + Input event type for mouse motion events. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Position of the mouse pointer relative to the previous mouse position. + + + Speed of the mouse pointer. + + + + + diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml new file mode 100644 index 0000000000..401e5cc027 --- /dev/null +++ b/doc/classes/InputEventScreenDrag.xml @@ -0,0 +1,86 @@ + + + + Input event type for screen drag events. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Drag event index in the case of a multi-drag event. + + + Position of the drag event. + + + Position of the drag event relative to its start position. + + + Speed of the drag event. + + + + + diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml new file mode 100644 index 0000000000..c8e11e05bf --- /dev/null +++ b/doc/classes/InputEventScreenTouch.xml @@ -0,0 +1,63 @@ + + + + Input event type for screen touch events. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Touch event index in the case of a multi-touch event. + + + Position of the touch event. + + + Pressed state of the touch event. + + + + + diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml new file mode 100644 index 0000000000..65b6441a82 --- /dev/null +++ b/doc/classes/InputEventWithModifiers.xml @@ -0,0 +1,103 @@ + + + + Base class for input events with modifiers. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + State of the Alt modifier. + + + State of the Command modifier. + + + State of the Ctrl modifier. + + + State of the Meta modifier. + + + State of the Shift modifier. + + + + + diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml new file mode 100644 index 0000000000..bf72ba05e7 --- /dev/null +++ b/doc/classes/InputMap.xml @@ -0,0 +1,110 @@ + + + + Singleton that manages actions. + + + + + + + + + + + + + + + + + Add an [InputEvent] to an action. This [InputEvent] will trigger the action. + + + + + + + + + + + Remove an [InputEvent] from an action. + + + + + + + + + + + Whether an action has an [InputEvent] associated with it. + + + + + + + + + Add an (empty) action to the [InputMap]. An [InputEvent] can then be added to this action with [method action_add_event]. + + + + + + + + + Remove an action from the [InputMap]. + + + + + + + + + + + Return whether the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. + + + + + + + + + Return an array of InputEvents associated with a given action. + + + + + + + Return an array of all actions in the [InputMap]. + + + + + + + + + Whether this InputMap has a registered action with the given name. + + + + + + + Clear the [InputMap] and load it anew from [ProjectSettings]. + + + + + + diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml new file mode 100644 index 0000000000..e962192f81 --- /dev/null +++ b/doc/classes/InstancePlaceholder.xml @@ -0,0 +1,42 @@ + + + + Placeholder for the root [Node] of a [PackedScene]. + + + Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an InstacePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling [method replace_by_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively. + The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. + + + + + + + + + + + Retrieve the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance]. + + + + + + + + + + + + + + + + + Replace this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided. + + + + + + diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml new file mode 100644 index 0000000000..a2f6ba01d3 --- /dev/null +++ b/doc/classes/InterpolatedCamera.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml new file mode 100644 index 0000000000..2ec3f71072 --- /dev/null +++ b/doc/classes/ItemList.xml @@ -0,0 +1,558 @@ + + + + Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns. + + + This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, + or both text and icon. Tooltips are supported and may be different for every item in the list. Selectable items in the list + may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled + to allow use of popup context menus. Items may also be 'activated' with a double click (or Enter key). + + + + + + + + + + + + + + + Adds an item to the item list with no text, only an 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. + + + + + + + Remove all items from the list. + + + + + + + Ensure selection is visible, adjusting the scroll position as necessary. + + + + + + + Return whether or not items may be selected via right mouse clicking. + + + + + + + If column size has been fixed to a value, return that value. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Given a position within the control return the item (if any) at that point. + + + + + + + Return count of items currently in the item list. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the text for specified item index. + + + + + + + + + Return tooltip hint for specified item index. + + + + + + + Return total number of columns in use by the list. + + + + + + + Return total number of lines currently in use by the list. + + + + + + + + + + + + + Returns the list of selected indexes. + + + + + + + Returns the current vertical scroll bar for the List. + + + + + + + + + + + + + + + Returns whether or not the item at the specified index is disabled + + + + + + + + + Returns whether or not the item at the specified index is selectable. + + + + + + + + + Returns whether the tooptip is enabled for specified item index. + + + + + + + Returns whether or not all columns of the list are of the same size. + + + + + + + + + Returns whether or not item at the specified index is currently selected. + + + + + + + + + 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. + + + + + + + + + Allow (or disallow) selection of (selectable) items in the list using right mouse button. + + + + + + + + + + + + + + + + + Set the size (width) all columns in the list are to use. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Disable (or enable) item at specified index. + Disabled items are not be selectable and do not fire activation (Enter or double-click) signals. + + + + + + + + + + + Set (or replace) icon of the item at the specified index. + + + + + + + + + + + + + + + + + + + + + Sets a value (of any type) to be stored with the item at the specified index. + + + + + + + + + + + Allow or disallow selection of the item at the specified index. + + + + + + + + + + + Sets text of item at specified index. + + + + + + + + + + + Sets tooltip hint for item at specified index. + + + + + + + + + + + Sets whether the tooltip is enabled for specified item index. + + + + + + + + + Set maximum number of columns to use for the list. + + + + + + + + + Set maximum number of lines to use for the list. + + + + + + + + + Sets a fixed size (width) to use for all columns of the list. + + + + + + + + + + + + + + + Sorts items in the list by their text. + + + + + + + + + Ensure item at specified index is not selected. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fired when specified list item is activated via double click or Enter. + + + + + + + + + Fired when specified list item has been selected via right mouse clicking. + The click position is also provided to allow appropriate popup of context menus + at the correct location. + + + + + + + Fired when specified item has been selected. + + + + + + + + + Fired when a multiple selection is altered on a list allowing mutliple selection. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Joint.xml b/doc/classes/Joint.xml new file mode 100644 index 0000000000..089df79043 --- /dev/null +++ b/doc/classes/Joint.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml new file mode 100644 index 0000000000..cf685d498f --- /dev/null +++ b/doc/classes/Joint2D.xml @@ -0,0 +1,87 @@ + + + + Base node for all joint constraints in 2D physics. + + + Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint. + + + + + + + + + + + + + + + + + + + + + + + Return the path to the A node for the joint. + + + + + + + Return the path to the B node for the joint. + + + + + + + + + + + + + + + + + + + + + + + + + Set the path to the A node for the joint. Must be of type [PhysicsBody2D]. + + + + + + + + + Set the path to the B node for the joint. Must be of type [PhysicsBody2D]. + + + + + + + + + + + + + + + + diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml new file mode 100644 index 0000000000..74354bdd15 --- /dev/null +++ b/doc/classes/KinematicBody.xml @@ -0,0 +1,109 @@ + + + + Kinematic body 3D node. + + + Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses: + Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + Kinematic Characters: KinematicBody also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml new file mode 100644 index 0000000000..6a4e9bbc5a --- /dev/null +++ b/doc/classes/KinematicBody2D.xml @@ -0,0 +1,201 @@ + + + + Kinematic body 2D node. + + + Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses: + Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + Kinematic Characters: KinematicBody2D also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the velocity of the body that collided with this one. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Move the body in the given direction, stopping if there is an obstacle. If as a result of a movement there will be any collision then informations about this collision will be in returned dictionary. Dictionary will contains those keys: + - "position" - collision position + - "normal" - collision normal + - "local_shape" - id of this kinematic body shape that took part in a collision + - "travel" - traveled movement before being stopped + - "remainder" - remaining movement before being stopped + - "collider_id" - id of the collider, it can be used when dealing with [Physics2DServer] + - "collider" - colliding body + - "collider_shape_index" - index of the colliding shape, inside collider body "collider_metadata" + If the body did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead. Please note that this method is less user friendly than [method move_and_slide]. If you don't want to program each edge case manually, then it's recommended to use [method move_and_slide] instead. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return true if there would be a collision if the body moved from the given point in the given direction. + + + + + + + + + + diff --git a/doc/classes/KinematicCollision.xml b/doc/classes/KinematicCollision.xml new file mode 100644 index 0000000000..4c0a40ecdf --- /dev/null +++ b/doc/classes/KinematicCollision.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml new file mode 100644 index 0000000000..afcca416d3 --- /dev/null +++ b/doc/classes/Label.xml @@ -0,0 +1,266 @@ + + + + Control that displays formatted text. + + + Label is a control that displays formatted text, optionally autowrapping it to the [Control] area. It inherits from range to be able to scroll wrapped text vertically. + + + + + + + + + + + Return the alignment mode (any of the ALIGN_* enumeration values). + + + + + + + Return the amount of lines. + + + + + + + Return the height of a line. + + + + + + + Return the the number of lines to skipped before displaying. + + + + + + + Return the restricted number of lines to display. Returns -1 if unrestricted. + + + + + + + Return the restricted number of characters to display (as a percentage of the total text). + + + + + + + Return the label text. Text can contain newlines. + + + + + + + Return the total length of the text. + + + + + + + Return the vertical alignment mode (any of the VALIGN_* enumeration values). + + + + + + + Return the restricted number of characters to display. Returns -1 if unrestricted. + + + + + + + + + + + + + Return the state of the [i]autowrap[/i] mode (see [method set_autowrap]). + + + + + + + Return true if text would be cut off if it is too wide. + + + + + + + Return true if text is displayed in all capitals. + + + + + + + + + Sets the alignment mode to any of the ALIGN_* enumeration values. + + + + + + + + + Set [i]autowrap[/i] mode. When enabled, autowrap will fit text to the control width, breaking sentences when they exceed the available horizontal space. When disabled, the label minimum width becomes the width of the longest row, and the minimum height large enough to fit all rows. + + + + + + + + + Cuts off the rest of the text if it is too wide. + + + + + + + + + Sets the number of lines to skip before displaying. Useful for scrolling text. + + + + + + + + + Restricts the number of lines to display. Set to -1 to disable. + + + + + + + + + Restricts the number of characters to display (as a percentage of the total text). + + + + + + + + + Set the label text. Text can contain newlines. + + + + + + + + + Display text in all capitals. + + + + + + + + + Sets the vertical alignment mode to any of the VALIGN_* enumeration values. + + + + + + + + + Restricts the number of characters to display. Set to -1 to disable. + + + + + + + + + + + + + + + + + + + + + + + + + + Align rows to the left (default). + + + Align rows centered. + + + Align rows to the right (default). + + + Expand row whitespaces to fit the width. + + + Align the whole text to the top. + + + Align the whole text to the center. + + + Align the whole text to the bottom. + + + Align the whole text by spreading the rows. + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml new file mode 100644 index 0000000000..900020baa0 --- /dev/null +++ b/doc/classes/LargeTexture.xml @@ -0,0 +1,96 @@ + + + + A Texture capable of storing many smaller Textures with offsets. + + + A Texture capable of storing many smaller Textures with offsets. + You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets. + + + + + + + + + + + + + + + Add another [Texture] to this [LargeTexture], starting on offset "ofs". + + + + + + + Clear the [LargeTexture]. + + + + + + + Return the number of pieces currently in this [LargeTexture]. + + + + + + + + + Return the offset of the piece with index "idx". + + + + + + + + + Return the [Texture] of the piece with index "idx". + + + + + + + + + + + Set the offset of the piece with index "idx" to "ofs". + + + + + + + + + + + Set the [Texture] of the piece with index "idx" to "ofs". + + + + + + + + + Set the size of this [LargeTexture]. + + + + + + + + + + diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml new file mode 100644 index 0000000000..961b0796ce --- /dev/null +++ b/doc/classes/Light.xml @@ -0,0 +1,185 @@ + + + + Provides a base class for different kinds of light nodes. + + + Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml new file mode 100644 index 0000000000..43c550c280 --- /dev/null +++ b/doc/classes/Light2D.xml @@ -0,0 +1,399 @@ + + + + Node that casts light in a 2D environment. + + + Node that casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask. + + + + + + + + + + + Return the color of the Light2D. + + + + + + + Return the energy value of the Light2D. + + + + + + + Return the height of the Light2D. Used with 2D normalmapping. + + + + + + + + + + + + + + + + + + + Set the maximum layer value of objects of the scene that are affected by the Light2D. + + + + + + + Get the minimum layer value of objects of the scene that are affected by the Light2D. + + + + + + + Return the current mode set to the Light2D. + + + + + + + Return the shadow buffer size. + + + + + + + Return the color of casted shadows for this Light2D. + + + + + + + + + + + + + + + + + + + + + + + + + Return the texture of the Light2D. + + + + + + + Return the offset of the light texture. + + + + + + + Return the scale value of the light texture. + + + + + + + Get the maximum Z value that objects of the scene can be in order to be affected by the Light2D. + + + + + + + Get the minimum Z value that objects of the scene have to be in order to be affected by the Light2D. + + + + + + + + + + + + + Return true if the Light2D is enabled, false if it is not. + + + + + + + Return true if shadow casting is enabled for this Light2D, else return false. + + + + + + + + + Set the color of the Light2D. + + + + + + + + + + + + + + + + + Switches the Light2D on or off, depending on the 'enabled' parameter. + + + + + + + + + Set the energy value of the Light2D. The bigger the value, the stronger the light. + + + + + + + + + Set the height of the Light2D. Used with 2D normalmapping. + + + + + + + + + Set the item mask of the Light2D to 'item_mask' value. + + + + + + + + + Set the item shadow mask to 'item_shadow_mask' value. + + + + + + + + + Set the maximum layer value of objects of the scene that are affected by the Light2D. + + + + + + + + + Set the minimum layer value of objects of the scene that are affected by the Light2D. + + + + + + + + + Set the behaviour mode of the Light2D. Use constants defined in the constants section. + + + + + + + + + Set the shadow buffer size. + + + + + + + + + Set the color of casted shadows for this Light2D. + + + + + + + + + Enable or disable shadows casting from this Light2D according to the 'enabled' parameter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the texture of the Light2D. + + + + + + + + + Set the offset of the light texture. + + + + + + + + + Set the scale value of the light texture. + + + + + + + + + Set the maximum Z value that objects of the scene can be in order to be affected by the Light2D. + + + + + + + + + Set the minimum Z value that objects of the scene have to be in order to be affected by the Light2D. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light. + + + Subtract the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. + + + Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation. + + + 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. + + + diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml new file mode 100644 index 0000000000..b60623c8b0 --- /dev/null +++ b/doc/classes/LightOccluder2D.xml @@ -0,0 +1,57 @@ + + + + Occludes light cast by a Light2D, casting shadows. + + + Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed. + + + + + + + + + + + Return the light mask of the LightOccluder2D. + + + + + + + Return the OccluderPolygon2D that defines the LightOccluder2D. + + + + + + + + + Set the LightOccluder2D light mask. The LightOccluder2D will cast shadows only from Light2Ds that belong to the same light mask(s). + + + + + + + + + Set the OccluderPolygon2D that defines the LightOccluder2D. + + + + + + The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s). + + + The [OccluderPolygon2D] used to compute the shadow. + + + + + diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml new file mode 100644 index 0000000000..4d8bad5819 --- /dev/null +++ b/doc/classes/Line2D.xml @@ -0,0 +1,253 @@ + + + + A 2D line. + + + A line through several points in 2D space. + + + + + + + + + + + + + Add a point at the x/y position in the supplied [Vector2] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove the point at index 'i' from the line. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml new file mode 100644 index 0000000000..493152b9c1 --- /dev/null +++ b/doc/classes/LineEdit.xml @@ -0,0 +1,338 @@ + + + + Control that provides single line string editing. + + + LineEdit provides a single line string editor, used for text fields. + + + + + + + + + + + + + Append text at cursor, scrolling the [LineEdit] when needed. + + + + + + + Clear the [LineEdit] text. + + + + + + + Gets whether the line edit caret is blinking. + + + + + + + Gets the line edit caret blink speed. + + + + + + + + + Set the line edit caret to blink. + + + + + + + + + Set the line edit caret blink speed. Cannot be less then or equal to 0. + + + + + + + Return the align mode of the [LineEdit]. + + + + + + + Return the cursor position inside the [LineEdit]. + + + + + + + + + + + + + Return the maximum amount of characters the [LineEdit] can edit. If 0 is returned, no limit exists. + + + + + + + Return the [PopupMenu] of this [LineEdit]. + + + + + + + Return the placeholder text. + + + + + + + Return transparency of the placeholder text. + + + + + + + Return the text in the [LineEdit]. + + + + + + + Return the [i]editable[/i] status of the [LineEdit] (see [method set_editable]). + + + + + + + Return the [i]secret[/i] status of the [LineEdit] (see [method set_secret]). + + + + + + + + + Execute a given action as defined in the MENU_* enum. + + + + + + + + + + + Select the text inside [LineEdit] by the given character positions. [code]from[/code] is default to the beginning. [code]to[/code] is default to the end. + [codeblock] + select() # select all + select(5) # select from the fifth character to the end. + select(2, 5) # select from the second to the fifth character. + [/codeblock] + + + + + + + Select the whole string. + + + + + + + + + Set text alignment of the [LineEdit]. + + + + + + + + + Set the cursor position inside the [LineEdit], causing it to scroll if needed. + + + + + + + + + Set the [i]editable[/i] status of the [LineEdit]. When disabled, existing text can't be modified and new text can't be added. + + + + + + + + + + + + + + + + + Set the maximum amount of characters the [LineEdit] can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit. + + + + + + + + + Set the placeholder text. + + + + + + + + + Set transparency of the placeholder text. + + + + + + + + + Set the [i]secret[/i] status of the [LineEdit]. When enabled, every character is displayed as "*". + + + + + + + + + Set the text in the [LineEdit], clearing the existing one and the selection. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + When the text changes, this signal is emitted. + + + + + + + This signal is emitted when the user presses KEY_ENTER on the [LineEdit]. This signal is often used as an alternate confirmation mechanism in dialogs. + + + + + + Align left. + + + Align center. + + + Align right. + + + Align fill. + + + Cut (Copy and clear). + + + Copy the selected text. + + + Paste the clipboard text over the selected text. + + + Clear the text. + + + Select all text. + + + Undo an action. + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml new file mode 100644 index 0000000000..9bc762f6c4 --- /dev/null +++ b/doc/classes/LineShape2D.xml @@ -0,0 +1,55 @@ + + + + Line shape for 2D collision objects. + + + Line shape for 2D collision objects. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. + + + + + + + + + + + Return the line distance from the origin. + + + + + + + Return the line normal. + + + + + + + + + Set the line distance from the origin. + + + + + + + + + Set the line normal. + + + + + + + + + + + + diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml new file mode 100644 index 0000000000..2cbf3407af --- /dev/null +++ b/doc/classes/LinkButton.xml @@ -0,0 +1,76 @@ + + + + Simple button used to represent a link to some resource + + + This kind of buttons are primarily used when the interaction with the button causes a context change (like linking to a web page). + + + + + + + + + + + Returns the text of the button. + + + + + + + Returns the underline mode for this button. + + + + + + + + + Sets the text of the button. + + + + + + + + + Sets the underline mode for this button, the argument must be one of the [LinkButton] constants (see constants section). + + + + + + + + + + + + The LinkButton will always show an underline at the bottom of its text + + + The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. + + + The LinkButton will never show an underline at the bottom of its text. + + + + + + + + + + + + + + + diff --git a/doc/classes/Listener.xml b/doc/classes/Listener.xml new file mode 100644 index 0000000000..176369cccb --- /dev/null +++ b/doc/classes/Listener.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml new file mode 100644 index 0000000000..e6f9e40dfe --- /dev/null +++ b/doc/classes/MainLoop.xml @@ -0,0 +1,136 @@ + + + + Main loop is the abstract main loop base class. + + + Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [MainLoop] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneTree] is created), unless a main [Script] is supplied, which may or not create and return a [MainLoop]. + + + + + + + + + + + + + + + + + + + + + Called before the program exits. + + + + + + + + + Called each idle frame with time since last call as an only argument. + + + + + + + Called once during initialization. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml new file mode 100644 index 0000000000..d4b9b01f63 --- /dev/null +++ b/doc/classes/MarginContainer.xml @@ -0,0 +1,27 @@ + + + + Simple margin container. + + + Simple margin container. Adds a left margin to anything contained. + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml new file mode 100644 index 0000000000..6870764b68 --- /dev/null +++ b/doc/classes/Marshalls.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + Return [PoolByteArray] of a given base64 encoded String. + + + + + + + + + Return utf8 String of a given base64 encoded String. + + + + + + + + + Return [Variant] of a given base64 encoded String. + + + + + + + + + Return base64 encoded String of a given [PoolByteArray]. + + + + + + + + + Return base64 encoded String of a given utf8 String. + + + + + + + + + Return base64 encoded String of a given [Variant]. + + + + + + diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml new file mode 100644 index 0000000000..6312a997f6 --- /dev/null +++ b/doc/classes/Material.xml @@ -0,0 +1,55 @@ + + + + Abstract base [Resource] for coloring and shading geometry. + + + Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml new file mode 100644 index 0000000000..d71fc0463f --- /dev/null +++ b/doc/classes/MenuButton.xml @@ -0,0 +1,59 @@ + + + + Special button that brings up a [PopupMenu] when clicked. + + + Special button that brings up a [PopupMenu] when clicked. That's pretty much all it does, as it's just a helper class when building GUIs. + + + + + + + + + + + Return the [PopupMenu] contained in this button. + + + + + + + + + + + Emitted when [PopupMenu] of this MenuButton is about to show. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml new file mode 100644 index 0000000000..66b52e7f48 --- /dev/null +++ b/doc/classes/Mesh.xml @@ -0,0 +1,75 @@ + + + + A [Resource] that contains vertex-array based geometry. + + + Mesh is a type of [Resource] that contains vertex-array based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. + + + + + + + + + + + Calculate a [ConvexPolygonShape] from the mesh. + + + + + + + + + Calculate an outline mesh at a defined offset (margin) from the original mesh. Note: Typically returns the vertices in reverse order (e.g. clockwise to anti-clockwise). + + + + + + + Calculate a [ConcavePolygonShape] from the mesh. + + + + + + + Generate a [TriangleMesh] from the mesh. + + + + + + + Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle. + + + + + + Render array as points (one vertex equals one point). + + + Render array as lines (every two vertices a line is created). + + + Render array as line strip. + + + Render array as line loop (like line strip, but closed). + + + Render array as triangles (every three vertices a triangle is created). + + + Render array as triangle strips. + + + Render array as triangle fans. + + + diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml new file mode 100644 index 0000000000..6088d30013 --- /dev/null +++ b/doc/classes/MeshDataTool.xml @@ -0,0 +1,337 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml new file mode 100644 index 0000000000..a713aad930 --- /dev/null +++ b/doc/classes/MeshInstance.xml @@ -0,0 +1,94 @@ + + + + Node that instances meshes into a scenario. + + + MeshInstance is a [Node] that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance] instead. + + + + + + + + + + + This helper creates a [StaticBody] child [Node] with a [ConvexPolygonShape] [CollisionShape] calculated from the mesh geometry. It's mainly used for testing. + + + + + + + + + + + + + This helper creates a [StaticBody] child [Node] with a [ConcavePolygonShape] [CollisionShape] calculated from the mesh geometry. It's mainly used for testing. + + + + + + + Returns the current [Mesh] resource for the instance. + + + + + + + + + + + + + + + Returns the [Material] for a surface of the [Mesh] resource. + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets the [Material] for a surface of the [Mesh] resource. + + + + + + The [Mesh] resource for the instance. + + + [NodePath] to the [Skeleton] associated with the instance. + + + + + diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml new file mode 100644 index 0000000000..5636db23b5 --- /dev/null +++ b/doc/classes/MeshLibrary.xml @@ -0,0 +1,158 @@ + + + + Library of meshes. + + + Library of meshes. Contains a list of [Mesh] resources, each with name and ID. Useful for GridMap or painting Terrain. + + + + + + + + + + + Clear the library. + + + + + + + + + Create a new item in the library, supplied an id. + + + + + + + + + + + + + + + Return the list of items. + + + + + + + + + Return the mesh of the item. + + + + + + + + + Return the name of the item. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get an unused id for a new item. + + + + + + + + + Remove the item. + + + + + + + + + + + Set the mesh of the item. + + + + + + + + + + + Set the name of the item. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml new file mode 100644 index 0000000000..4b0155a206 --- /dev/null +++ b/doc/classes/MultiMesh.xml @@ -0,0 +1,151 @@ + + + + Provides high performance mesh instancing. + + + MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory. + For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead. + As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object). + Since instances may have any behavior, the Rect3 used for visibility must be provided by the user. + + + + + + + + + + + Return the visibility Rect3. + + + + + + + + + + + + + + + Get the color of a specific instance. + + + + + + + Return the amount of instances that is going to be drawn. + + + + + + + + + Return the transform of a specific instance. + + + + + + + Return the [Mesh] resource drawn as multiple instances. + + + + + + + + + + + + + + + + + + + + + + + + + Set the color of a specific instance. + + + + + + + + + Set the amount of instances that is going to be drawn. Changing this number will erase all the existing instance transform and color data. + + + + + + + + + + + Set the transform for a specific instance. + + + + + + + + + Set the [Mesh] resource to be drawn in multiple instances. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml new file mode 100644 index 0000000000..1d5448b24c --- /dev/null +++ b/doc/classes/MultiMeshInstance.xml @@ -0,0 +1,37 @@ + + + + Node that instances a [MultiMesh]. + + + MultiMeshInstance is a [Node] that takes a [MultiMesh] resource and adds it to the current scenario by creating an instance of it (yes, this is an instance of instances). + + + + + + + + + + + Return the [MultiMesh] that is used for instancing. + + + + + + + + + Set the [MultiMesh] to be instanced. + + + + + + + + + + diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml new file mode 100644 index 0000000000..ef3aeb9e07 --- /dev/null +++ b/doc/classes/Mutex.xml @@ -0,0 +1,38 @@ + + + + A synchronization Mutex. + + + A synchronization Mutex. Element used in multi-threadding. Basically a binary [Semaphore]. Guarantees that only one thread has this lock, can be used to protect a critical section. + + + + + + + + + + + Lock this [Mutex], blocks until it is unlocked by the current owner. + + + + + + + Try locking this [Mutex], does not block. Returns [OK] on success else [ERR_BUSY]. + + + + + + + Unlock this [Mutex], leaving it to others threads. + + + + + + diff --git a/doc/classes/NativeScript.xml b/doc/classes/NativeScript.xml new file mode 100644 index 0000000000..63ea5673b3 --- /dev/null +++ b/doc/classes/NativeScript.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml new file mode 100644 index 0000000000..96a201d406 --- /dev/null +++ b/doc/classes/Navigation.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml new file mode 100644 index 0000000000..ab10463a5d --- /dev/null +++ b/doc/classes/Navigation2D.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml new file mode 100644 index 0000000000..6b0583f4b2 --- /dev/null +++ b/doc/classes/NavigationMesh.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/NavigationMeshInstance.xml b/doc/classes/NavigationMeshInstance.xml new file mode 100644 index 0000000000..e2dfb6b906 --- /dev/null +++ b/doc/classes/NavigationMeshInstance.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml new file mode 100644 index 0000000000..2c08157039 --- /dev/null +++ b/doc/classes/NavigationPolygon.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/NavigationPolygonInstance.xml b/doc/classes/NavigationPolygonInstance.xml new file mode 100644 index 0000000000..c04e326bd1 --- /dev/null +++ b/doc/classes/NavigationPolygonInstance.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/NetworkedMultiplayerENet.xml b/doc/classes/NetworkedMultiplayerENet.xml new file mode 100644 index 0000000000..02c919bd83 --- /dev/null +++ b/doc/classes/NetworkedMultiplayerENet.xml @@ -0,0 +1,85 @@ + + + + PacketPeer implementation using the ENet library. + + + A connection (or a listening server) that should be passed to [method SceneTree.set_network_peer]. Socket events can be handled by connecting to [SceneTree] signals. + + + + + + + + + + + + + + + + + + + + + + + + + Create client that connects to a server at address [code]ip[/code] using specified [code]port[/code]. + + + + + + + + + + + + + + + Create server that listens to connections via [code]port[/code]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml new file mode 100644 index 0000000000..c1d8c5ad91 --- /dev/null +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return whether this [NetworkedMultiplayerPeer] is refusing new connections. + + + + + + + + + + + + + + + If [code]endable[/code] is true, this [NetworkedMultiplayerPeer] will refuse new connections. + + + + + + + + + + + + + + + + + + + + + + + Emitted when failed to connect to server. + + + + + Emitted when successfully connected to server. + + + + + + + Emitted by the server when a client is connected. + + + + + + + Emitted by the server when a client is disconnected. + + + + + Emitted by clients when server is disconnected. + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Nil.xml b/doc/classes/Nil.xml new file mode 100644 index 0000000000..de12ad1261 --- /dev/null +++ b/doc/classes/Nil.xml @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml new file mode 100644 index 0000000000..847ddf7bc5 --- /dev/null +++ b/doc/classes/NinePatchRect.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml new file mode 100644 index 0000000000..45040e2bec --- /dev/null +++ b/doc/classes/Node.xml @@ -0,0 +1,870 @@ + + + + Base class for all the [i]scene[/i] elements. + + + Nodes are the base bricks with which Godot games are developed. They can be set as children of other nodes, resulting in a tree arrangement. A given node can contain any number of nodes as children (but there is only one scene tree root node) with the requirement that all siblings (direct children of a node) should have unique names. + Any tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. Nodes can optionally be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group) to perform grouped actions. + [b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the NOTIFICATION_ENTER_TREE notification and its [method _enter_tree] callback is triggered. Children nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's. + Once all nodes have been added in the scene tree, they receive the NOTIFICATION_READY notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, from the children up to the parent nodes. + It means that when adding a scene to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (and that recursively for the whole scene). + [b]Processing:[/b] Nodes can be set to the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] is variable. Fixed processing (callback [method _fixed_process], toggled with [method set_fixed_process]) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics. + Nodes can also process input events. When set, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it. + To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with [method set_owner]. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. + Finally, when a node is freed with [method free] or [method queue_free], it will also free all its children. + [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling [method rpc] with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) on the receiving peer. To identify which [Node] receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers). + + + + + + + + + + + Called when the node enters the [SceneTree] (e.g. upon instancing, scene changing or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children. + Corresponds to the NOTIFICATION_ENTER_TREE notification in [method Object._notification]. + + + + + + + Called when the node leaves the [SceneTree] (e.g. upon freeing, scene changing or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree. + Corresponds to the NOTIFICATION_EXIT_TREE notification in [method Object._notification]. + + + + + + + + + Called during the fixed processing step of the main loop. Fixed processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant. + It is only called if fixed processing has been enabled with [method set_fixed_process]. + Corresponds to the NOTIFICATION_FIXED_PROCESS notification in [method Object._notification]. + + + + + + + + + Called when there is a change to input devices. Propagated through the node tree until a Node consumes it. + + + + + + + + + Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant. + It is only called if processing has been enabled with [method set_process]. + Corresponds to the NOTIFICATION_PROCESS notification in [method Object._notification]. + + + + + + + Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callback gets triggered first, and the node will receive the ready notification only afterwards. + Corresponds to the NOTIFICATION_READY notification in [method Object._notification]. + + + + + + + + + Propagated to all nodes when the previous InputEvent is not consumed by any nodes. + + + + + + + + + + + + + + + + + + + Add a child [Node]. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node. + The optional boolean argument enforces creating child nodes with human-readable names, based on the name of the node being instanced instead of its type only. + + + + + + + + + + + + + + + + + + + + + + + Add a node to a group. Groups are helpers to name and organize a subset of nodes, like for example "enemies" or "collectables". A [Node] can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see [method is_inside_tree]). + + + + + + + Return true if the node can process, i.e. whether its pause mode allows processing while the scene tree is paused (see [method set_pause_mode]). Always returns true if the scene tree is not paused, and false if the node is not in the tree. FIXME: Why FAIL_COND? + + + + + + + + + Duplicate the node, returning a new [Node]. + You can fine-tune the behavior using the [code]flags[/code], which are based on the DUPLICATE_* constants. + + + + + + + + + + + + + Find a descendant of this node whose name matches [code]mask[/code] as in [method 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. + + + + + + + + + Return a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node. + + + + + + + Return the amount of child nodes. + + + + + + + Return an array of references ([Node]) to the child nodes. + + + + + + + Return a filename that may be contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see [method set_filename]). + + + + + + + Return the time elapsed since the last fixed frame (see [method _fixed_process]). This is always the same in fixed processing unless the frames per second is changed in [OS]. + + + + + + + Return an array listing the groups that the node is part of. + + + + + + + Get the node index, i.e. its position among the siblings of its parent. + + + + + + + Return the name of the node. This name is unique among the siblings (other child nodes from the same parent). + + + + + + + + + + + + + + + Fetch a node. The [NodePath] must be valid (or else an error will be raised) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node. + Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]). + [i]Example:[/i] Assume your current node is Character and the following tree: + [codeblock] + /root + /root/Character + /root/Character/Sword + /root/Character/Backpack/Dagger + /root/MyGame + /root/Swamp/Alligator + /root/Swamp/Mosquito + /root/Swamp/Goblin + [/codeblock] + Possible paths are: + [codeblock] + get_node("Sword") + get_node("Backpack/Dagger") + get_node("../Swamp/Alligator") + get_node("/root/MyGame") + [/codeblock] + + + + + + + + + + + + + + + Get the node owner (see [method set_owner]). + + + + + + + Return the parent node of the current node, or an empty [Node] if the node lacks a parent. + + + + + + + Return the absolute path of the current node. This only works if the current node is inside the scene tree (see [method is_inside_tree]). + + + + + + + + + Return the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail. + + + + + + + Return the pause mode (PAUSE_MODE_*) of this Node. + + + + + + + Return the order in the node tree branch, i.e. if called by the first child Node, return 0. + + + + + + + Return the time elapsed (in seconds) since the last process callback. This is almost always different each time. + + + + + + + + + + + + + Return a [SceneTree] that this node is inside. + + + + + + + + + + + + + + + Return whether the node that a given [NodePath] points too exists. + + + + + + + + + + + + + + + + + Return [i]true[/i] if the "node" argument is a direct or indirect child of the current node, otherwise return [i]false[/i]. + + + + + + + + + + + + + Return true if fixed processing is enabled (see [method set_fixed_process]). + + + + + + + + + + + + + + + Return [i]true[/i] if "node" occurs later in the scene hierarchy than the current node, otherwise return [i]false[/i]. + + + + + + + + + Return whether this Node is in the specified group. + + + + + + + Return whether this Node is inside a [SceneTree]. + + + + + + + + + + + + + Return whether processing is enabled in the current node (see [method set_process]). + + + + + + + Return true if the node is processing input (see [method set_process_input]). + + + + + + + + + + + + + Return true if the node is processing unhandled input (see [method set_process_unhandled_input]). + + + + + + + + + + + + + + + + + Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. + + + + + + + + + + + + + Print the scene to stdout. Used mainly for debugging purposes. + + + + + + + + + + + + + Calls the method (if present) with the arguments given in "args" on this Node and recursively on all children. If the parent_first argument is true then the method will be called on the current [Node] first, then on all children. If it is false then the children will get called first. + + + + + + + + + Notify the current node and all its children recursively by calling notification() in all of them. + + + + + + + Queues a node for deletion at the end of the current frame. When deleted, all of its children nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to [method Object.free]. Use [method Object.is_queued_for_deletion] to know whether a node will be deleted at the end of the frame. + + + + + + + Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree. + + + + + + + Remove a node and set all its children as children of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed. + + + + + + + + + Remove a child [Node]. Node is NOT deleted and will have to be deleted manually. + + + + + + + + + Remove a node from a group. + + + + + + + + + + + Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost. + + + + + + + Request that [code]_ready[/code] be called again. + + + + + + + + + Send a remote procedure call request to all peers on the network (and locally), optionally sending additional data as arguments. Call request will be received by nodes with the same [NodePath]. + + + + + + + + + + + Change the method's RPC mode (one of RPC_MODE_* constants). + + + + + + + + + + + Send a [method rpc] to a specific peer identified by [i]peer_id[/i]. + + + + + + + + + Send a [method rpc] using an unreliable protocol. + + + + + + + + + + + Send a [method rpc] to a specific peer identified by [i]peer_id[/i] using an unreliable protocol. + + + + + + + + + + + Remotely change property's value on other peers (and locally). + + + + + + + + + + + Change the property's RPC mode (one of RPC_MODE_* constants). + + + + + + + + + + + + + Remotely change property's value on a specific peer identified by [i]peer_id[/i]. + + + + + + + + + + + Remotely change property's value on other peers (and locally) using an unreliable protocol. + + + + + + + + + + + + + Remotely change property's value on a specific peer identified by [i]peer_id[/i] using an unreliable protocol. + + + + + + + + + + + + + + + + + A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded. + + + + + + + + + Enables or disables node fixed framerate processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS at a fixed (usually 60 fps, check [OS] to change that) interval (and the [method _fixed_process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_fixed_process_delta_time]. + + + + + + + + + + + + + + + + + Set the name of the [Node]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed. + + + + + + + + + + + + + + + + + + + Set the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing. + + + + + + + + + Set pause mode (PAUSE_MODE_*) of this Node. + + + + + + + + + Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_process_delta_time]. + + + + + + + + + Enable input processing for node. This is not required for GUI controls! It hooks up the node to receive all input (see [method _input]). + + + + + + + + + + + + + + + + + Enable unhandled input processing for node. This is not required for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a [Control]). (see [method _unhandled_input]). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Emitted when the node is renamed. + + + + + Emitted when Node enters the tree. + + + + + Emitted when Node exits the tree. + + + + + + + + + + + + + + + + Notification received every frame when the process flag is set (see [method set_process]). + + + 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 received when a node is unparented (parent removed it from the list of children). + + + + + + + + + + + + + + + + + + + + + + + Call a method remotely. + + + Call a method both remotely and locally. + + + Call a method if the Node is Master. + + + Call a method if the Node is Slave. + + + Inherits pause mode from parent. For root node, it is equivalent to PAUSE_MODE_STOP. + + + Stop processing when SceneTree is paused. + + + Continue to process regardless of SceneTree pause state. + + + + + + + + + + + diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml new file mode 100644 index 0000000000..9f26001577 --- /dev/null +++ b/doc/classes/Node2D.xml @@ -0,0 +1,343 @@ + + + + A 2D game object, parent of all 2D related nodes. Has a position, rotation, scale and Z-index. + + + A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order. + + + + + + + + + + + + + Multiplies the current scale by the 'ratio' vector. + + + + + + + + + Set the pivot position of the 2D node to 'pivot' value. Only some Node2Ds implement this method. + + + + + + + + + Returns the angle between the node and the 'point' in radians. + + + + + + + Returns the node's global position. + + + + + + + Returns the node's global rotation in radians. + + + + + + + Return the node's global rotation in degrees. + + + + + + + Returns the node's global scale. + + + + + + + Returns the node's position. + + + + + + + + + Returns the [Transform2D] relative to this node's parent. + + + + + + + Returns the node's rotation in radians. + + + + + + + Returns the node's rotation in degrees. + + + + + + + Returns the node's scale. + + + + + + + Returns the node's Z-index. + + + + + + + + + Adds the 'offset' vector to the node's global position. + + + + + + + Returns true if this node's Z-index is relative to its parent's. Else, returns false. + + + + + + + + + Rotates the node so it points towards the 'point'. + + + + + + + + + + + Apply a local translation on the node's X axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement. + + + + + + + + + + + Apply a local translation on the node's Y axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement. + + + + + + + + + Apply a rotation to the node, in radians, starting from its current rotation. + + + + + + + + + Set the node's global position. + + + + + + + + + Set the node's global rotation in radians. + + + + + + + + + Set the node's global rotation in degrees. + + + + + + + + + Set the node's global scale. + + + + + + + + + Set the node's global [Transform2D]. + + + + + + + + + Set the node's position. + + + + + + + + + Set the node's rotation in radians. + + + + + + + + + Set the node's rotation in degrees. + + + + + + + + + Set the node's scale. + + + + + + + + + Set the node's local [Transform2D]. + + + + + + + + + Set the node's Z-index. + + + + + + + + + Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. + + + + + + + + + + + + + + + + + + + + + + + + + Translate the node locally by the 'offset' vector, starting from its current local position. + + + + + + Global position. + + + Global rotation in radians. + + + Global rotation in degrees. + + + Global scale. + + + Global [Transform2D]. + + + Position, relative to the node's parent. + + + Rotation in radians. + + + Rotation in degrees. + + + Rotation in degrees. + + + Local [Transform2D]. + + + Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others. + + + Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. + + + + + diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml new file mode 100644 index 0000000000..9aa9572b80 --- /dev/null +++ b/doc/classes/NodePath.xml @@ -0,0 +1,81 @@ + + + + Pre-parsed scene tree path. + + + A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code] would refer to the size property of the texture resource on the node named "Sprite" which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name. + You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]@"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful. + A [NodePath] is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource. + + + + + + + + + + + + + Create a NodePath from a string, e.g. "Path2D/PathFollow2D/Sprite:texture:size". A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent. + + + + + + + + + Get the node name indicated by [code]idx[/code] (0 to [method get_name_count]) + + + + + + + Get the number of node names which make up the path. + + + + + + + Get the path's property name, or an empty string if the path doesn't have a property. + + + + + + + + + Get the resource name indicated by [code]idx[/code] (0 to [method get_subname_count]) + + + + + + + Get the number of resource names in the path. + + + + + + + Return true if the node path is absolute (not relative). + + + + + + + Return true if the node path is empty. + + + + + + diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml new file mode 100644 index 0000000000..38f1eb8ce1 --- /dev/null +++ b/doc/classes/OS.xml @@ -0,0 +1,854 @@ + + + + Operating System functions. + + + Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: mouse grabbing, mouse cursors, clipboard, video mode, date and time, timers, environment variables, execution of binaries, command line, etc. + + + + + + + + + + + + + + + Displays a modal dialog box utilizing the host OS. + + + + + + + Return true if the host OS allows drawing. + + + + + + + Returns if the current host platform is using multiple threads. + + + + + + + + + Delay executing of the current thread by given milliseconds. + + + + + + + + + Delay executing of the current thread by given microseconds. + + + + + + + + + Dumps the memory allocation ringlist to a file (only works in debug). + Entry format per line: "Address - Size - Description" + + + + + + + + + Dumps all used resources to file (only works in debug). + Entry format per line: "Resource Type : Resource Location" + At the end of the file is a statistic of all used Resource Types. + + + + + + + + + + + + + + + Execute the binary file in given path, optionally blocking until it returns. A process ID is returned. + + + + + + + + + Returns the scancode of the given string (e.g. "Escape") + + + + + + + Returns true if the current window is borderless. + + + + + + + Get clipboard from the host OS. + + + + + + + Return the commandline passed to the engine. + + + + + + + Returns the current screen index (0 padded). + + + + + + + Return the absolute directory path of user data path([user://]). + + + + + + + + + Returns current date as a dictionary of keys: year, month, day, weekday, dst (daylight savings time). + + + + + + + + + Returns current datetime as a dictionary of keys: year, month, day, weekday, dst (daylight savings time), hour, minute, second. + + + + + + + + + Get a dictionary of time values when given epoch time. + Dictionary Time values will be a union of values from [method get_time] and [method get_date] dictionaries (with the exception of dst = day light standard time, as it cannot be determined from epoch). + + + + + + + Return the total amount of dynamic memory used (only works in debug). + + + + + + + + + Return an environment variable. + + + + + + + Return the path to the current engine executable. + + + + + + + + + + + + + Returns the current latin keyboard variant as a String. + Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO" or "ERROR" + + + + + + + Return the host OS locale. + + + + + + + Returns the model name of the current device. + + + + + + + Return the name of the host OS. Possible values are: "Android", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11". + + + + + + + + + + + + + + + + + + + + + + + + + Returns the game process ID + + + + + + + Returns the number of cores available in the host machine. + + + + + + + + + Returns the given scancode as a string (e.g. Return values: "Escape", "Shift+Escape"). + + + + + + + Returns the number of displays attached to the host machine + + + + + + + + + Returns the dots per inch density of the specified screen. + + On Android Devices, the actual screen densities are grouped into six generalized densities: + ldpi - 120 dpi + mdpi - 160 dpi + hdpi - 240 dpi + xhdpi - 320 dpi + xxhdpi - 480 dpi + xxxhdpi - 640 dpi + + + + + + + Returns the current screen orientation, the return value will be one of the SCREEN_ORIENTATION constants in this class. + + + + + + + + + + + + + + + + + Returns the dimensions in pixels of the specified screen. + + + + + + + + + + + + + Return the max amount of static memory used (only works in debug). + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the amount of time passed in milliseconds since the engine started. + + + + + + + + + Returns current time as a dictionary of keys: hour, minute, second + + + + + + + + + + + + + + + + + + + Return the current unix timestamp. + + + + + + + + + Get an epoch time value from a dictionary of time values. + [code]datetime[/code] must be populated with the following keys: year, month, day, hour, minute, second. + You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight savings time (dst), if present, is ignored. + + + + + + + Returns the window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. + + + + + + + Returns the size of the window (without counting window manager decorations). + + + + + + + + + Return true if an environment variable exists. + + + + + + + + + + + + + Returns true if the platform has a virtual keyboard, false otherwise. + + + + + + + Hides the virtual keyboard if it is shown, does nothing otherwise. + + + + + + + + + + + + + Return true if low cpu usage mode is enabled. + + + + + + + Returns whether the screen is being kept on or not. + + + + + + + + + + + + + + + + + + + + + Return true if the engine was executed with -v (verbose stdout). + + + + + + + + + + + + + Returns whether the window is in fullscreen mode or not. + + + + + + + Return true if the window is maximized. + + + + + + + Return true if the window is minimized. + + + + + + + Returns whether the window is resizable or not. + + + + + + + + + Kill a process ID (this method can be used to kill processes that were not spawned by the game). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX. + + + + + + + + + + + + + + + + + Set clipboard to the OS. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS) + + + + + + + + + Set to true to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. This way, editors using the engine UI only use very little cpu. + + + + + + + + + Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets window fullscreen mode to the [i]enabled[/i] argument, [i]enabled[/i] is a toggle for the fullscreen mode, calling the function with [i]enabled[/i] true when the screen is not on fullscreen mode will cause the screen to go to fullscreen mode, calling the function with [i]enabled[/i] false when the screen is in fullscreen mode will cause the window to exit the fullscreen mode. + + + + + + + + + Set the window size to maximized. + + + + + + + + + Set whether the window is minimized. + + + + + + + + + Sets the position of the window to the specified position (this function could be restricted by the window manager, meaning that there could be some unreachable areas of the screen). + + + + + + + + + Set the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings. + + + + + + + + + Sets the window size to the specified size. + + + + + + + + + Sets the window title to the specified string. + + + + + + + + + + + + + + + + + Shows the virtual keyboard if the platform has one. The [i]existing_text[/i] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml new file mode 100644 index 0000000000..67421487f1 --- /dev/null +++ b/doc/classes/Object.xml @@ -0,0 +1,392 @@ + + + + Base class for all non built-in types. + + + Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class. + Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++). + Some derivates add memory management, such as [Reference] (which keeps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted. + Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them. + Objects also receive notifications ([method _notification]). Notifications are a simple way to notify the object about simple events, so they can all be handled together. + + + + + + + + + + + + + Return a property, return null if the property does not exist. + + + + + + + Return the property list, array of dictionaries, dictionaries must contain: name:String, type:int (see TYPE_* enum in [@Global Scope]) and optionally: hint:int (see PROPERTY_HINT_* in [@Global Scope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@Global Scope]). + + + + + + + + + + + + + + + Notification request, the notification id is received. + + + + + + + + + + + Set a property. Return true if the property was found. + + + + + + + + + + + Add a user signal (can be added anytime). Arguments are optional, but can be added as an array of dictionaries, each containing "name" and "type" (from [@Global Scope] TYPE_*). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return true if this object can translate strings. + + + + + + + + + + + + + + + + + Connect a signal to a method at a target (member function). Binds are optional and are passed as extra arguments to the call. Flags specify optional deferred or one shot connections, see enum CONNECT_*. A signal can only be connected once to a method, and it will throw an error if already connected. If you want to avoid this, use [method is_connected] to check. + + + + + + + + + + + + + Disconnect a signal from a method. + + + + + + + + + + + + + + + + + + + + + + + Get a property from the object. + + + + + + + Return the class of the object as a string. + + + + + + + Returns an [Array] of dictionaries with informations about signals that are connected to this object. + Inside each [Dictionary] there are 3 fields: + - "source" is a reference to signal emitter. + - "signal_name" is name of connected signal. + - "method_name" is a name of method to which signal is connected. + + + + + + + Return the instance ID. All objects have a unique instance ID. + + + + + + + + + Return a metadata from the object. + + + + + + + Return the list of metadata in the object. + + + + + + + + + + + + + Return the list of properties as an array of dictionaries, dictionaries contain: name:String, type:int (see TYPE_* enum in [@Global Scope]) and optionally: hint:int (see PROPERTY_HINT_* in [@Global Scope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@Global Scope]). + + + + + + + Return the object script (or null if it doesn't have one). + + + + + + + + + + + + + + + Return the list of signals as an array of dictionaries. + + + + + + + + + Return true if a metadata is found with the requested name. + + + + + + + + + + + + + + + + + + + + + + + Return true if signal emission blocking is enabled. + + + + + + + + + Check the class of the object against a string (including inheritance). + + + + + + + + + + + + + Return true if a connection exists for a given signal and target/method. + + + + + + + + + + + + + + + + + Notify the object of something. + + + + + + + + + + + + + + + + + Set property into the object. + + + + + + + + + If set to true, signal emission is blocked. + + + + + + + + + Define whether this object can translate strings (with calls to [method tr]). Default is true. + + + + + + + + + + + Set a metadata into the object. Metadata is serialized. Metadata can be [i]anything[/i]. + + + + + + + + + Set a script into the object, scripts extend the object functionality. + + + + + + + + + Translate a message. Only works if message translation is enabled (which it is by default). See [method set_message_translation]. + + + + + + + + + + + + Called right when the object is initialized. Not available in script. + + + Called before the object is about to be deleted. + + + Connect a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time. + + + Persisting connections are saved when the object is serialized to file. + + + One shot connections disconnect themselves after emission. + + + diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml new file mode 100644 index 0000000000..d525487629 --- /dev/null +++ b/doc/classes/OccluderPolygon2D.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml new file mode 100644 index 0000000000..c437b9b5d1 --- /dev/null +++ b/doc/classes/OmniLight.xml @@ -0,0 +1,55 @@ + + + + OmniDirectional Light, such as a light bulb or a candle. + + + An OmniDirectional light is a type of [Light] node that emits lights in all directions. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml new file mode 100644 index 0000000000..57bd3aa695 --- /dev/null +++ b/doc/classes/OptionButton.xml @@ -0,0 +1,237 @@ + + + + Button control that provides selectable options when pressed. + + + OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text. + + + + + + + + + + + + + + + + + Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. + + + + + + + + + + + Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. + + + + + + + Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. + + + + + + + Clear all the items in the [OptionButton]. + + + + + + + Return the amount of items in the OptionButton. + + + + + + + + + Return the icon of the item at index "idx". + + + + + + + + + Return the ID of the item at index "idx". + + + + + + + + + + + + + + + + + Return the text of the item at index "idx". + + + + + + + Return the current item index + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Select an item by index and make it the current item. + + + + + + + + + + + + + + + + + + + + + Set the icon of an item at index "idx". + + + + + + + + + + + Set the ID of an item at index "idx". + + + + + + + + + + + + + + + + + + + + + Set the text of an item at index "idx". + + + + + + + + + + + + + + + This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml new file mode 100644 index 0000000000..cf8efdf6be --- /dev/null +++ b/doc/classes/PCKPacker.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PHashTranslation.xml b/doc/classes/PHashTranslation.xml new file mode 100644 index 0000000000..b25ddcbf22 --- /dev/null +++ b/doc/classes/PHashTranslation.xml @@ -0,0 +1,25 @@ + + + + Optimized translation. + + + Optimized translation. Uses real-time compressed translations, which results in very small dictionaries. + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml new file mode 100644 index 0000000000..d6a2f96523 --- /dev/null +++ b/doc/classes/PackedDataContainer.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml new file mode 100644 index 0000000000..413cd4468b --- /dev/null +++ b/doc/classes/PackedDataContainerRef.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml new file mode 100644 index 0000000000..80351759f1 --- /dev/null +++ b/doc/classes/PackedScene.xml @@ -0,0 +1,55 @@ + + + + + + TODO: explain ownership, and that node does not need to own itself + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pack will ignore any sub-nodes not owned by given node. See [method Node.set_owner]. + + + + + + + + + + + + + + + + diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml new file mode 100644 index 0000000000..bc15e5fc0c --- /dev/null +++ b/doc/classes/PacketPeer.xml @@ -0,0 +1,77 @@ + + + + Abstraction and base class for packet-based protocols. + + + PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering. + + + + + + + + + + + Return the number of packets currently available in the ring-buffer. + + + + + + + Get a raw packet. + + + + + + + Return the error state of the last packet received (via [method get_packet] and [method get_var]). + + + + + + + Get a Variant. + + + + + + + + + + + + + + + Send a raw packet. + + + + + + + + + Send a Variant as a packet. + + + + + + + + + + + + + + diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml new file mode 100644 index 0000000000..531046a4ba --- /dev/null +++ b/doc/classes/PacketPeerStream.xml @@ -0,0 +1,54 @@ + + + + Wrapper to use a PacketPeer over a StreamPeer. + + + PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the [StreamPeer] object to be wrapped. + + + + + + diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml new file mode 100644 index 0000000000..9bff0c9b5e --- /dev/null +++ b/doc/classes/PacketPeerUDP.xml @@ -0,0 +1,79 @@ + + + + UDP packet peer. + + + UDP packet peer. Can be used to send raw UDP packets as well as [Variant]\ s. + + + + + + + + + + + Close the UDP socket the [PacketPeerUDP] is currently listening on. + + + + + + + Return the IP of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]). + + + + + + + Return the port of the remote peer that sent the last packet(that was received with [method get_packet] or [method get_var]). + + + + + + + Return whether this [PacketPeerUDP] is listening. + + + + + + + + + + + + + Make this [PacketPeerUDP] listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size". + If "bind_address" is set as "*" (default), the peer will listen on all available addresses (both IPv4 and IPv6). + If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the peer will listen on all available addresses matching that IP type. + If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). + + + + + + + + + + + Set the destination address and port for sending packets and variables, a hostname will be resolved using if valid. + + + + + + + Wait for a packet to arrive on the listening port, see [method listen]. + + + + + + diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml new file mode 100644 index 0000000000..8a57659c0c --- /dev/null +++ b/doc/classes/Panel.xml @@ -0,0 +1,25 @@ + + + + Provides an opaque background for [Control] children. + + + Panel is a [Control] that displays an opaque background. It's commonly used as a parent and container for other types of [Control] nodes. + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml new file mode 100644 index 0000000000..29d5169b9e --- /dev/null +++ b/doc/classes/PanelContainer.xml @@ -0,0 +1,21 @@ + + + + Panel container type. + + + Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline. + + + + + + + + + + + + + + diff --git a/doc/classes/PanoramaSky.xml b/doc/classes/PanoramaSky.xml new file mode 100644 index 0000000000..d42c9a20ed --- /dev/null +++ b/doc/classes/PanoramaSky.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml new file mode 100644 index 0000000000..b17b72443e --- /dev/null +++ b/doc/classes/ParallaxBackground.xml @@ -0,0 +1,125 @@ + + + + A node used to create a parallax scrolling background. + + + A ParallaxBackground will use one or more [ParallaxLayer] nodes to create a parallax scrolling background. Each [ParallaxLayer] can be set to move at different speeds relative to the camera movement, this can be used to create an illusion of depth in a 2D game. + + + + + + + + + + + Return the beginning limit. + + + + + + + Return the ending limit. + + + + + + + Return the base offset. + + + + + + + Return the base motion scale. + + + + + + + + + + + + + Return ignoring camera zoom. + + + + + + + + + Set to true for all child [ParallaxLayer] nodes to not be affected by the zoom level of the camera. + + + + + + + + + Set the left and top limits in pixels for scrolling to begin. If the camera is outside of this limit the background will not continue to scroll. If an axis is greater than or equal to the corresponding axis of limit_end, then it will not limit scrolling for that axis. + + + + + + + + + Set the right and bottom limits in pixels for scrolling to end. If the camera is outside of this limit the background will not continue to scroll. If an axis is less than or equal to the corresponding axis of limit_begin, then it will not limit scrolling for that axis. + + + + + + + + + Set the base offset in pixels of all children [ParallaxLayer] nodes. + + + + + + + + + Set the base motion scale of all children [ParallaxLayer] nodes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml new file mode 100644 index 0000000000..28a43f7e99 --- /dev/null +++ b/doc/classes/ParallaxLayer.xml @@ -0,0 +1,71 @@ + + + + A parallax scrolling layer to be used with [ParallaxBackground]. + + + A ParallaxLayer must be the child of a [ParallaxBackground] node. All child nodes will be affected by the parallax scrolling of this layer. + + + + + + + + + + + Return the mirroring of the ParallaxLayer. + + + + + + + + + + + + + Return the motion scale of the ParallaxLayer. + + + + + + + + + Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring. + + + + + + + + + + + + + + + + + Set the motion scale of the ParallaxLayer. If an axis is set to 0 then it will not move at all, it will stick with the camera. + + + + + + + + + + + + + + diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml new file mode 100644 index 0000000000..fab7a462c8 --- /dev/null +++ b/doc/classes/Particles.xml @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml new file mode 100644 index 0000000000..92c71af60a --- /dev/null +++ b/doc/classes/Particles2D.xml @@ -0,0 +1,330 @@ + + + + 2D Particle emitter + + + Particles2D is a particle system 2D [Node] that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility bounding box (although helpers to create one automatically exist). + + + + + + + + + + + + + + + + + Returns the amount of particles spawned at each emission + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets the amount of seconds that each particle will be visible. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the texture for emitted particles + + + + + + + + + + + + + + + + + + + + + + + + + Returns whether this emitter is currently emitting or not + + + + + + + + + + + + + + + Sets the amount of particles spawned at each emission + + + + + + + + + + + + + + + + + If this is set to true then the particle emitter will emit particles, if its false it will not. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets the amount of seconds that each particle will be visible. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml new file mode 100644 index 0000000000..94b621524d --- /dev/null +++ b/doc/classes/ParticlesMaterial.xml @@ -0,0 +1,449 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Path.xml b/doc/classes/Path.xml new file mode 100644 index 0000000000..fa4edf81e4 --- /dev/null +++ b/doc/classes/Path.xml @@ -0,0 +1,37 @@ + + + + Container for a [Curve3D]. + + + This class is a container/Node-ification of a [Curve3D], so it can have [Spatial] properties and [Node] info. + + + + + + + + + + + Returns the [Curve3D] contained. + + + + + + + + + Sets the [Curve3D]. + + + + + + + + + + diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml new file mode 100644 index 0000000000..49ae3e2f0f --- /dev/null +++ b/doc/classes/Path2D.xml @@ -0,0 +1,37 @@ + + + + Container for a [Curve2D]. + + + This class is a container/Node-ification of a [Curve2D], so it can have [Node2D] properties and [Node] info. + + + + + + + + + + + Returns the [Curve2D] contained. + + + + + + + + + Sets the [Curve2D]. + + + + + + + + + + diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow.xml new file mode 100644 index 0000000000..86f55a2aaf --- /dev/null +++ b/doc/classes/PathFollow.xml @@ -0,0 +1,145 @@ + + + + Point sampler for a [Path]. + + + This node takes its parent [Path], and returns the coordinates of a point within it, given a distance from the first vertex. + It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly. + + + + + + + + + + + This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly. + + + + + + + Returns the X displacement this node has from its parent [Path]. + + + + + + + Returns the distance along the path in 3D units. + + + + + + + Returns the rotation mode. The constants below list which axes are allowed to rotate for each mode. + + + + + + + Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). + + + + + + + Returns the Y displacement this node has from its parent [Path]. + + + + + + + Returns whether this node wraps its offsets around, or truncates them to the path ends. + + + + + + + + + The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + This method controls whether the position between two cached points is interpolated linearly, or cubicly. + + + + + + + + + Moves this node in the X axis. As this node's position will be set every time its offset is set, this allows many PathFollow to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset. + A similar effect may be achieved moving the this node's descendants. + + + + + + + + + If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths. + + + + + + + + + Sets the distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path. + + + + + + + + + Allows or forbids rotation on one or more axes, per the constants below. + + + + + + + + + Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. + + + + + + + + + Moves this node in the Y axis, for the same reasons of [method set_h_offset]. + + + + + + Forbids the PathFollow to rotate. + + + Allows the PathFollow to rotate in the Y axis only. + + + Allows the PathFollow to rotate in both the X, and Y axes. + + + Allows the PathFollow to rotate in any axis. + + + diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml new file mode 100644 index 0000000000..850b81c046 --- /dev/null +++ b/doc/classes/PathFollow2D.xml @@ -0,0 +1,133 @@ + + + + Point sampler for a [Path2D]. + + + This node takes its parent [Path2D], and returns the coordinates of a point within it, given a distance from the first vertex. + It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly. + + + + + + + + + + + This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly. + + + + + + + Returns the horizontal displacement this node has from its parent [Path2D]. + + + + + + + Returns the distance along the path in pixels. + + + + + + + Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). + + + + + + + Returns the vertical displacement this node has from its parent [Path2D]. + + + + + + + Returns whether this node wraps its offsets around, or truncates them to the path ends. + + + + + + + Returns whether this node rotates to follow the path. + + + + + + + + + The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + This method controls whether the position between two cached points is interpolated linearly, or cubicly. + + + + + + + + + Moves this node horizontally. As this node's position will be set every time its offset is set, this allows many PathFollow2D to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset. + A similar effect may be achieved moving this node's descendants. + + + + + + + + + If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths. + + + + + + + + + Sets the distance from the first vertex, measured in pixels along the path. This sets this node's position to a point within the path. + + + + + + + + + If set, this node rotates to follow the path, making its descendants rotate. + + + + + + + + + Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. + + + + + + + + + Moves the PathFollow2D vertically, for the same reasons of [method set_h_offset]. + + + + + + diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml new file mode 100644 index 0000000000..71987ace9e --- /dev/null +++ b/doc/classes/Performance.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml new file mode 100644 index 0000000000..9b6fe69b4a --- /dev/null +++ b/doc/classes/Physics2DDirectBodyState.xml @@ -0,0 +1,234 @@ + + + + Direct access object to a physics body in the [Physics2DServer]. + + + Direct access object to a physics body in the [Physics2DServer]. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. + + + + + + + + + + + Return the angular velocity of the body. + + + + + + + + + Return the [RID] of the collider. + + + + + + + + + Return the object id of the collider. + + + + + + + + + Return the collider object, this depends on how it was created (will return a scene node if such was used to create it). + + + + + + + + + Return the contact position in the collider. + + + + + + + + + Return the collider shape index. + + + + + + + + + Return the metadata of the collided shape. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. + + + + + + + + + Return the linear velocity vector at contact point of the collider. + + + + + + + Return the amount of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts. + + + + + + + + + Return the local normal (of this body) of the contact point. + + + + + + + + + Return the local position (of this body) of the contact point. + + + + + + + + + Return the local shape index of the collision. + + + + + + + Return the inverse of the inertia of the body. + + + + + + + Return the inverse of the mass of the body. + + + + + + + Return the current linear velocity of the body. + + + + + + + Return the current state of space, useful for queries. + + + + + + + Return the timestep (delta) used for the simulation. + + + + + + + Return the rate at which the body stops rotating, if there are not any other forces moving it. + + + + + + + Return the total gravity vector being currently applied to this body. + + + + + + + Return the rate at which the body stops moving, if there are not any other forces moving it. + + + + + + + Return the transform matrix of the body. + + + + + + + Call the built-in force integration code. + + + + + + + Return true if this body is currently sleeping (not active). + + + + + + + + + Change the angular velocity of the body. + + + + + + + + + Change the linear velocity of the body. + + + + + + + + + Set the sleeping state of the body, only affects character/rigid bodies. + + + + + + + + + Change the transform matrix of the body. + + + + + + diff --git a/doc/classes/Physics2DDirectBodyStateSW.xml b/doc/classes/Physics2DDirectBodyStateSW.xml new file mode 100644 index 0000000000..c2444d4795 --- /dev/null +++ b/doc/classes/Physics2DDirectBodyStateSW.xml @@ -0,0 +1,17 @@ + + + + Software implementation of [Physics2DDirectBodyState]. + + + Software implementation of [Physics2DDirectBodyState]. This object exposes no new methods or properties and should not be used, as [Physics2DDirectBodyState] selects the best implementation available. + + + + + + + + + + diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml new file mode 100644 index 0000000000..9399227d27 --- /dev/null +++ b/doc/classes/Physics2DDirectSpaceState.xml @@ -0,0 +1,140 @@ + + + + Direct access object to a space in the [Physics2DServer]. + + + Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space. + + + + + + + + + + + + + Check whether the shape can travel to a point. If it can, the method will return an array with two floats: The first is the distance the shape can move in that direction without colliding, and the second is the distance at which it will collide. + If the shape can not move, the array will be empty. + + + + + + + + + + + Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. + + + + + + + + + Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] 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: + pointo: Place where the shapes intersect. + normal: Normal of the object at the point where the shapes intersect. + shape: Shape index within the object against which the shape intersected. + metadata: Metadata of the shape against which the shape intersected. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. + collider_id: Id of the object against which the shape intersected. + collider: Object against which the shape intersected. + rid: [RID] of the object against which the shape intersected. + linear_velocity: The movement vector of the object the shape intersected, if it was a body. If it was an area, it is (0,0). + If the shape did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead. + + + + + + + + + + + + + + + + + Check whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: + shape: Shape index within the object the point is in. + metadata: Metadata of the shape the point is in. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. + collider_id: Id of the object the point is in. + collider: Object the point is inside of. + rid: [RID] of the object the point is in. + Additionally, the method can take an array of objects or [RID]\ s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants). + + + + + + + + + + + + + + + + + Intersect a ray in a given space. The returned object is a dictionary with the following fields: + position: Place where ray is stopped. + normal: Normal of the object at the point where the ray was stopped. + shape: Shape index within the object against which the ray was stopped. + metadata: Metadata of the shape against which the ray was stopped. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. + collider_id: Id of the object against which the ray was stopped. + collider: Object against which the ray was stopped. + rid: [RID] of the object against which the ray was stopped. + If the ray did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead. + Additionally, the method can take an array of objects or [RID]\ s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants). + + + + + + + + + + + Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: + shape: Shape index within the object the shape intersected. + metadata: Metadata of the shape intersected by the shape given through the [Physics2DShapeQueryParameters]. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. + collider_id: Id of the object the shape intersected. + collider: Object the shape intersected. + rid: [RID] of the object the shape intersected. + The number of intersections can be limited with the second parameter, to reduce the processing time. + + + + + + Check for collisions with static bodies. + + + Check for collisions with kinematic bodies. + + + Check for collisions with rigid bodies. + + + Check for collisions with rigid bodies in character mode. + + + Check for collisions with areas. + + + Check for collisions with any kind of bodies (but not areas). + + + diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml new file mode 100644 index 0000000000..ab63089691 --- /dev/null +++ b/doc/classes/Physics2DServer.xml @@ -0,0 +1,1121 @@ + + + + Physics 2D Server. + + + Physics 2D Server is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. + + + + + + + + + + + + + + + + + Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + + + + + + + + + + + Assign the area to a descendant of [Object], so it can exist in the node tree. + + + + + + + + + Remove all shapes from an area. It does not delete the shapes, so they can be reassigned later. + + + + + + + Create an [Area2D]. + + + + + + + + + Get the instance ID of the object the area is assigned to. + + + + + + + + + + + Return an area parameter value. + + + + + + + + + + + Return the [RID] of the nth shape of an area. + + + + + + + + + Return the number of shapes assigned to an area. + + + + + + + + + + + Return the transform matrix of a shape within an area. + + + + + + + + + Return the space assigned to the area. + + + + + + + + + Return the space override mode for the area. + + + + + + + + + Return the transform matrix for an area. + + + + + + + + + + + Remove a shape from an area. It does not delete the shape, so it can be reassigned later. + + + + + + + + + + + Assign the area to one or many physics layers. + + + + + + + + + + + Set which physics layers the area will monitor. + + + + + + + + + + + + + Set the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: + 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. + 2: [RID] of the object that entered/exited the area. + 3: Instance ID of the object that entered/exited the area. + 4: The shape index of the object that entered/exited the area. + 5: The shape index of the area where the object entered/exited. + + + + + + + + + + + + + Set the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants. + + + + + + + + + + + + + Substitute a given area shape by another. The old shape is selected by its index, the new one by its [RID]. + + + + + + + + + + + + + + + + + + + + + + + + + Set the transform matrix for an area shape. + + + + + + + + + + + Assign a space to the area. + + + + + + + + + + + Set the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*. + + + + + + + + + + + Set the transform matrix for an area. + + + + + + + + + + + Add a body to the list of bodies exempt from collisions. + + + + + + + + + + + + + Add a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. + + + + + + + + + + + + + Add a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + + + + + + + + + + + + + Add a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. + + + + + + + + + + + Assign the area to a descendant of [Object], so it can exist in the node tree. + + + + + + + + + Remove all shapes from a body. + + + + + + + + + + + Create a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. + + + + + + + + + Return the physics layer or layers a body belongs to. + + + + + + + + + Return the physics layer or layers a body can collide with. + + + + + + + + + Return the continuous collision detection mode. + + + + + + + + + Return the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. + + + + + + + + + Return the body mode. + + + + + + + + + Get the instance ID of the object the area is assigned to. + + + + + + + + + + + Return the value of a body parameter. + + + + + + + + + + + Return the [RID] of the nth shape of a body. + + + + + + + + + Return the number of shapes assigned to a body. + + + + + + + + + + + Return the metadata of a shape of a body. + + + + + + + + + + + Return the transform matrix of a body shape. + + + + + + + + + Return the [RID] of the space assigned to a body. + + + + + + + + + + + Return a body state. + + + + + + + + + Return whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). + + + + + + + + + + + Remove a body from the list of bodies exempt from collisions. + + + + + + + + + + + Remove a shape from a body. The shape is not deleted, so it can be reused afterwards. + + + + + + + + + + + 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. + + + + + + + + + + + Set the physics layer or layers a body belongs to. + + + + + + + + + + + Set the physics layer or layers a body can collide with. + + + + + + + + + + + Set the continuous collision detection mode from any of the CCD_MODE_* constants. + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. + + + + + + + + + + + + + + + Set the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force integration]). + + + + + + + + + + + Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + + + + + + + + + + + Set the body mode, from one of the constants BODY_MODE*. + + + + + + + + + + + Set whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). + + + + + + + + + + + + + Set a body parameter (see BODY_PARAM* constants). + + + + + + + + + + + + + Substitute a given body shape by another. The old shape is selected by its index, the new one by its [RID]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries. + + + + + + + + + + + + + Set the transform matrix for a body shape. + + + + + + + + + + + Assign a space to the body (see [method create_space]). + + + + + + + + + + + + + Set a body state (see BODY_STATE* constants). + + + + + + + + + + + + + + + + + Return whether a body can move from a given point in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in. + + + + + + + + + + + + + + + Create a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself. + + + + + + + + + + + Return the value of a damped spring joint parameter. + + + + + + + + + + + + + Set a damped spring joint parameter. Parameters are explained in the DAMPED_STRING* constants. + + + + + + + + + Destroy any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console. + + + + + + + + + Return information about the current state of the 2D physics engine. The states are listed under the INFO_* constants. + + + + + + + + + + + + + + + + + Create a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself. + + + + + + + + + + + Return the value of a joint parameter. + + + + + + + + + Return the type of a joint (see JOINT_* constants). + + + + + + + + + + + + + Set a joint parameter. Parameters are explained in the JOINT_PARAM* constants. + + + + + + + + + + + + + Create a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself. + + + + + + + + + Activate or deactivate the 2D physics engine. + + + + + + + + + Create a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. + + + + + + + + + Return the shape data. + + + + + + + + + Return the type of shape (see SHAPE_* constants). + + + + + + + + + + + Set the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. + + + + + + + Create a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. + + + + + + + + + Return the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries. + + + + + + + + + + + Return the value of a space parameter. + + + + + + + + + Return whether the space is active. + + + + + + + + + + + Mark a space as active. It will not have an effect, unless it is assigned to an area or body. + + + + + + + + + + + + + Set the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants. + + + + + + Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. + + + Constant to set/get the maximum distance a shape can be from another before they are considered separated. + + + Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. + + + + + + + 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. + + + 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. + + + 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. + + + 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. + + + 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. + + + 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. + + + 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. + + + 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 [method CollisionPolygon2D.set_polygon], polygons modified with [method shape_set_data] do not verify that the points supplied form, in fact, a convex polygon. + + + 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. + + + This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. + + + Constant to set/get gravity strength in an area. + + + Constant to set/get gravity vector/center in an area. + + + Constant to set/get whether the gravity vector of an area is a direction, or a center point. + + + 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. + + + This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. + + + Constant to set/get the linear dampening factor of an area. + + + Constant to set/get the angular dampening factor of an area. + + + Constant to set/get the priority (order of processing) of an area. + + + This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. + + + 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. + + + 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. + + + This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + + + This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + + + Constant for static bodies. + + + Constant for kinematic bodies. + + + Constant for rigid bodies. + + + Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. + + + Constant to set/get a body's bounce factor. + + + Constant to set/get a body's friction. + + + Constant to set/get a body's mass. + + + Constant to set/get a body's inertia. + + + Constant to set/get a body's gravity multiplier. + + + Constant to set/get a body's linear dampening factor. + + + Constant to set/get a body's angular dampening factor. + + + This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. + + + Constant to set/get the current transform matrix of the body. + + + Constant to set/get the current linear velocity of the body. + + + Constant to set/get the current angular velocity of the body. + + + Constant to sleep/wake up a body, or to get whether it is sleeping. + + + Constant to set/get whether the body can sleep. + + + Constant to create pin joints. + + + Constant to create groove joints. + + + Constant to create damped spring joints. + + + Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. + + + Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. + + + 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). + + + Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. + + + Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. + + + Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. + + + The value of the first parameter and area callback function receives, when an object enters one of its shapes. + + + The value of the first parameter and area callback function receives, when an object exits one of its shapes. + + + Constant to get the number of objects that are not sleeping. + + + Constant to get the number of possible collisions. + + + Constant to get the number of space regions where a collision could occur. + + + diff --git a/doc/classes/Physics2DServerSW.xml b/doc/classes/Physics2DServerSW.xml new file mode 100644 index 0000000000..a8645c0b96 --- /dev/null +++ b/doc/classes/Physics2DServerSW.xml @@ -0,0 +1,17 @@ + + + + Software implementation of [Physics2DServer]. + + + Software implementation of [Physics2DServer]. This class exposes no new methods or properties and should not be used, as [Physics2DServer] automatically selects the best implementation available. + + + + + + + + + + diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml new file mode 100644 index 0000000000..78d12e0b73 --- /dev/null +++ b/doc/classes/Physics2DShapeQueryParameters.xml @@ -0,0 +1,138 @@ + + + + Parameters to be sent to a 2D shape physics query. + + + This class contains the shape and other parameters for intersection/collision queries. + + + + + + + + + + + Return the physics layer the shape belongs to. + + + + + + + Return the list of objects, or object [RID]\ s, that will be excluded from collisions. + + + + + + + Return the collision margin for the shape. + + + + + + + Return the current movement speed of the shape. + + + + + + + Return the type of object the shape belongs to. + + + + + + + Return the [RID] of the shape queried. + + + + + + + Return the transform matrix of the shape queried. + + + + + + + + + Set the physics layer the shape belongs to. + + + + + + + + + Set the list of objects, or object [RID]\ s, that will be excluded from collisions. + + + + + + + + + Set the collision margin for the shape. A collision margin is an amount (in pixels) that the shape will grow when computing collisions, to account for numerical imprecision. + + + + + + + + + Set the current movement speed of the shape. + + + + + + + + + Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK_*). + + + + + + + + + Set the [Shape2D] that will be used for collision/intersection queries. + + + + + + + + + Set the [RID] of the shape to be used in queries. + + + + + + + + + Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale. + + + + + + diff --git a/doc/classes/Physics2DShapeQueryResult.xml b/doc/classes/Physics2DShapeQueryResult.xml new file mode 100644 index 0000000000..9786a6aa75 --- /dev/null +++ b/doc/classes/Physics2DShapeQueryResult.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Physics2DTestMotionResult.xml b/doc/classes/Physics2DTestMotionResult.xml new file mode 100644 index 0000000000..a71d58faa7 --- /dev/null +++ b/doc/classes/Physics2DTestMotionResult.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml new file mode 100644 index 0000000000..6281fda3f1 --- /dev/null +++ b/doc/classes/PhysicsBody.xml @@ -0,0 +1,105 @@ + + + + Base class for different types of Physics bodies. + + + PhysicsBody is an abstract base class for implementing a physics body. All PhysicsBody types inherit from it. + + + + + + + + + + + + + Adds a body to the collision exception list. This list contains bodies that this body will not collide with. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Removes a body from the collision exception list. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml new file mode 100644 index 0000000000..25a3e4f991 --- /dev/null +++ b/doc/classes/PhysicsBody2D.xml @@ -0,0 +1,115 @@ + + + + Base class for all objects affected by physics. + + + PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it. + + + + + + + + + + + + + + + + + + + Return the physics layer this area is in. + + + + + + + + + Return an individual bit on the collision mask. + + + + + + + Return the physics layers this area can scan for collisions. + + + + + + + + + Return an individual bit on the collision mask. + + + + + + + + + + + + + + + + + Set the physics layers this area is in. + Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask]. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + + + + + + + + + + + Set/clear individual bits on the layer mask. This makes getting a body in/out of only one layer easier. + + + + + + + + + Set the physics layers this area can scan for collisions. + + + + + + + + + + + Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml new file mode 100644 index 0000000000..de51d0e958 --- /dev/null +++ b/doc/classes/PhysicsDirectBodyState.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsDirectBodyStateSW.xml b/doc/classes/PhysicsDirectBodyStateSW.xml new file mode 100644 index 0000000000..6d283f307e --- /dev/null +++ b/doc/classes/PhysicsDirectBodyStateSW.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml new file mode 100644 index 0000000000..1e4354fa7e --- /dev/null +++ b/doc/classes/PhysicsDirectSpaceState.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml new file mode 100644 index 0000000000..93a50eb1bf --- /dev/null +++ b/doc/classes/PhysicsServer.xml @@ -0,0 +1,1252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. + + + 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. + + + 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. + + + This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + + + This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsServerSW.xml b/doc/classes/PhysicsServerSW.xml new file mode 100644 index 0000000000..7bffc23258 --- /dev/null +++ b/doc/classes/PhysicsServerSW.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml new file mode 100644 index 0000000000..f2e8b1986a --- /dev/null +++ b/doc/classes/PhysicsShapeQueryParameters.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult.xml new file mode 100644 index 0000000000..4c4a283688 --- /dev/null +++ b/doc/classes/PhysicsShapeQueryResult.xml @@ -0,0 +1,54 @@ + + + + Result of a shape query in Physics2DServer. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PinJoint.xml b/doc/classes/PinJoint.xml new file mode 100644 index 0000000000..e4ec773540 --- /dev/null +++ b/doc/classes/PinJoint.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml new file mode 100644 index 0000000000..1ff9ac6591 --- /dev/null +++ b/doc/classes/PinJoint2D.xml @@ -0,0 +1,35 @@ + + + + Pin Joint for 2D Shapes. + + + Pin Joint for 2D Rigid Bodies. It pins 2 bodies (rigid or static) together, or a single body to a fixed position in space. + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml new file mode 100644 index 0000000000..b7b4983821 --- /dev/null +++ b/doc/classes/Plane.xml @@ -0,0 +1,160 @@ + + + + Plane in hessian form. + + + Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. + + + + + + + + + + + + + + + + + + + Creates a plane from the three parameters "a", "b", "c" and "d". + + + + + + + + + + + + + Creates a plane from three points. + + + + + + + + + + + Creates a plane from the normal and the plane's distance to the origin. + + + + + + + Returns the center of the plane. + + + + + + + + + Returns the shortest distance from the plane to the position "point". + + + + + + + Returns a point on the plane. + + + + + + + + + + + Returns true if "point" is inside the plane (by a very minimum threshold). + + + + + + + + + + + Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned. + + + + + + + + + + + Returns the intersection point of a ray consisting of the position "from" and the direction normal "dir" with this plane. If no intersection is found null is returned. + + + + + + + + + + + Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned. + + + + + + + + + Returns true if "point" is located above the plane. + + + + + + + Returns a copy of the plane, normalized. + + + + + + + + + Returns the orthogonal projection of point "p" into a point in the plane. + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml new file mode 100644 index 0000000000..ef46c3d409 --- /dev/null +++ b/doc/classes/PlaneMesh.xml @@ -0,0 +1,70 @@ + + + + Class representing a planar [PrimitiveMesh]. + + + Class representing a planar [PrimitiveMesh]. This flat mesh does not have a thickness. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Size of the generated plane. Defaults to (2.0, 2.0). + + + Number of subdivision along the z-axis. Defaults to 0. + + + Number of subdivision along the x-axis. Defaults to 0. + + + + + diff --git a/doc/classes/PlaneShape.xml b/doc/classes/PlaneShape.xml new file mode 100644 index 0000000000..04617a695f --- /dev/null +++ b/doc/classes/PlaneShape.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml new file mode 100644 index 0000000000..2692679dda --- /dev/null +++ b/doc/classes/Polygon2D.xml @@ -0,0 +1,233 @@ + + + + 2D polygon representation + + + A Polygon2D is defined by a set of n vertices connected together by line segments, meaning that the vertex 1 will be connected with vertex 2, vertex 2 with vertex 3 ..., vertex n-1 with vertex n and vertex n with vertex 1 in order to close the loop and define a polygon. + + + + + + + + + + + + + + + + + Return the polygon fill color. + + + + + + + Return whether this polygon is inverted or not. + + + + + + + Return the added padding around the bounding box. + + + + + + + Return the offset for the polygon vertices. + + + + + + + Return the set of vertices that defines this polygon. + + + + + + + Return the polygon texture + + + + + + + Return the polygon texture offset. + + + + + + + Return the rotation in radians of the texture polygon. + + + + + + + Return the uv coordinate multiplier. + + + + + + + Return the texture coordinates associated with every vertex of the polygon. + + + + + + + Return the list of vertex colors. + + + + + + + + + + + + + + + + + Set the polygon fill color. If the polygon has a texture defined, the defined texture will be multiplied by the polygon fill color. This, also, is the default color for those vertices that are not defined by [method get_vertex_colors]. + + + + + + + + + Set the polygon as the defined polygon bounding box minus the defined polygon (the defined polygon will appear as a hole on the square that contains the defined polygon). + + + + + + + + + Add extra padding around the bounding box, making it bigger. Too small a value can make the polygon triangulate strangely, due to numerical imprecision. + + + + + + + + + Set the an offset that will be added to the vertices' position. E.g. if the offset is set to (10,10) then all the polygon points will move 10 units to the right and 10 units to the bottom. + + + + + + + + + Define the set of vertices that will represent the polygon. + + + + + + + + + + + + + + + + + Set the offset of the polygon texture. Initially the texture will appear anchored to the polygon position, the offset is used to move the texture location away from that point (notice that the texture origin is set to its top left corner, so when offset is 0,0 the top left corner of the texture is at the polygon position), for example setting the offset to 10, 10 will move the texture 10 units to the left and 10 units to the top. + + + + + + + + + Set the amount of rotation of the polygon texture, [code]texture_rotation[/code] is specified in radians and clockwise rotation. + + + + + + + + + Set the value that will multiply the uv coordinates ([method get_uv]) when applying the texture. Larger values make the texture smaller, and vice versa. + + + + + + + + + Set the texture coordinates for every vertex of the polygon. There should be one uv vertex for every vertex in the polygon. If there are less, the undefined ones will be assumed to be (0,0). Extra uv vertices are ignored. + + + + + + + + + Set the color for each vertex of the polygon. There should be one color for every vertex in the polygon. If there are less, the undefined ones will be assumed to be [method get_color]. Extra color entries are ignored. + Colors are interpolated between vertices, resulting in smooth gradients when they differ. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml new file mode 100644 index 0000000000..3dea96cbdf --- /dev/null +++ b/doc/classes/PolygonPathFinder.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml new file mode 100644 index 0000000000..2640b5118f --- /dev/null +++ b/doc/classes/PoolByteArray.xml @@ -0,0 +1,138 @@ + + + + Raw byte array. + + + Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory. + + + + + + + + + + + + + Create from a generic array. + + + + + + + Append an element at the end of the array (alias of [method push_back]). + + + + + + + Append a [PoolByteArray] at the end of this array. + + + + + + + + + Returns a new [PoolByteArray] with the data compressed. Set the compression mode using one of [File]'s COMPRESS_* constants. + + + + + + + + + + + Returns a new [PoolByteArray] with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of [File]'s COMPRESS_* constants. + + + + + + + Returns a copy of the array's contents as [String]. Fast alternative to [method PoolByteArray.get_string_from_utf8] if the content is ASCII-only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method PoolByteArray.get_string_from_utf8]. + + + + + + + Returns a copy of the array's contents as [String]. Slower than [method PoolByteArray.get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. + + + + + + + + + + + Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + + + + + Reverse the order of the elements in the array (so first element will now be the last). + + + + + + + Append an element at the end of the array. + + + + + + + Remove an element from the array by index. + + + + + + + Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + + + + + + + + + Change the byte at the given index. + + + + + + + Return the size 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/doc/classes/PoolColorArray.xml b/doc/classes/PoolColorArray.xml new file mode 100644 index 0000000000..644256e765 --- /dev/null +++ b/doc/classes/PoolColorArray.xml @@ -0,0 +1,93 @@ + + + + Array of Colors + + + Array of Color, Contains colors. Optimized for memory usage, can't fragment the memory. + + + + + + + + + + + + + Create from a generic array. + + + + + + + Append an element at the end of the array (alias of [method push_back]). + + + + + + + Append a [PoolColorArray] at the end of this array. + + + + + + + + + + + Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + + + + + Reverse the order of the elements in the array (so first element will now be the last). + + + + + + + Append a value to the array. + + + + + + + Remove an element from the array by index. + + + + + + + Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + + + + + + + + + Change the [Color] at the given index. + + + + + + + Return the size of the array. + + + + + + diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PoolIntArray.xml new file mode 100644 index 0000000000..17772b6e2a --- /dev/null +++ b/doc/classes/PoolIntArray.xml @@ -0,0 +1,93 @@ + + + + Integer Array. + + + Integer Array. Contains integers. Optimized for memory usage, can't fragment the memory. + + + + + + + + + + + + + Create from a generic array. + + + + + + + Append an element at the end of the array (alias of [method push_back]). + + + + + + + Append an [PoolIntArray] at the end of this array. + + + + + + + + + + + Insert a new int at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + + + + + Reverse the order of the elements in the array (so first element will now be the last). + + + + + + + Append a value to the array. + + + + + + + Remove an element from the array by index. + + + + + + + Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + + + + + + + + + Change the int at the given index. + + + + + + + Return the array size. + + + + + + diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PoolRealArray.xml new file mode 100644 index 0000000000..ee2740e92a --- /dev/null +++ b/doc/classes/PoolRealArray.xml @@ -0,0 +1,93 @@ + + + + Real Array. + + + Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory. + + + + + + + + + + + + + Create from a generic array. + + + + + + + Append an element at the end of the array (alias of [method push_back]). + + + + + + + Append an [RealArray] at the end of this array. + + + + + + + + + + + Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + + + + + Reverse the order of the elements in the array (so first element will now be the last). + + + + + + + Append an element at the end of the array. + + + + + + + Remove an element from the array by index. + + + + + + + Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + + + + + + + + + Change the float at the given index. + + + + + + + Return the size of the array. + + + + + + diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PoolStringArray.xml new file mode 100644 index 0000000000..ace4f732da --- /dev/null +++ b/doc/classes/PoolStringArray.xml @@ -0,0 +1,102 @@ + + + + String Array. + + + String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory. + + + + + + + + + + + + + Create from a generic array. + + + + + + + Append an element at the end of the array (alias of [method push_back]). + + + + + + + Append an [StringArray] at the end of this array. + + + + + + + + + + + Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + + + + + Reverse the order of the elements in the array (so first element will now be the last). + + + + + + + + + Returns a [String] with each element of the array joined with the delimiter. + + + + + + + Append a string element at end of the array. + + + + + + + Remove an element from the array by index. + + + + + + + Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + + + + + + + + + Change the [String] at the given index. + + + + + + + Return the size of the array. + + + + + + diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PoolVector2Array.xml new file mode 100644 index 0000000000..e5df38483a --- /dev/null +++ b/doc/classes/PoolVector2Array.xml @@ -0,0 +1,93 @@ + + + + An Array of Vector2. + + + An Array specifically designed to hold Vector2. + + + + + + + + + + + + + Construct a new [PoolVector2Array]. Optionally, you can pass in an Array that will be converted. + + + + + + + Append an element at the end of the array (alias of [method push_back]). + + + + + + + Append an [PoolVector2Array] at the end of this array. + + + + + + + + + + + Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + + + + + Reverse the order of the elements in the array (so first element will now be the last). + + + + + + + Insert a [Vector2] at the end. + + + + + + + Remove an element from the array by index. + + + + + + + Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + + + + + + + + + Change the [Vector2] at the given index. + + + + + + + Return the size of the array. + + + + + + diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PoolVector3Array.xml new file mode 100644 index 0000000000..13a8290531 --- /dev/null +++ b/doc/classes/PoolVector3Array.xml @@ -0,0 +1,93 @@ + + + + An Array of Vector3. + + + An Array specifically designed to hold Vector3. + + + + + + + + + + + + + Construct a new PoolVector3Array. Optionally, you can pass in an Array that will be converted. + + + + + + + Append an element at the end of the array (alias of [method push_back]). + + + + + + + Append an [PoolVector3Array] at the end of this array. + + + + + + + + + + + Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + + + + + Reverse the order of the elements in the array (so first element will now be the last). + + + + + + + Insert a [Vector3] at the end. + + + + + + + Remove an element from the array by index. + + + + + + + Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + + + + + + + + + Change the [Vector3] at the given index. + + + + + + + Return the size of the array. + + + + + + diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml new file mode 100644 index 0000000000..ad09fe49ee --- /dev/null +++ b/doc/classes/Popup.xml @@ -0,0 +1,91 @@ + + + + Base container control for popups and dialogs. + + + Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. + + + + + + + + + + + Returns whether the popup will hide other popups when shown on the screen. + + + + + + + + + Popup (show the control in modal form). + + + + + + + + + Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by "size". + + + + + + + + + Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than [code]minsize[/code]. + + + + + + + + + Popup (show the control in modal form) in the center of the screen, scaled at a ratio of size of the screen. + + + + + + + + + Make the popup hide other popups when shown on the screen. + + + + + + + + + + + This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context). + + + + + This signal is emitted when a popup is hidden. + + + + + + Notification sent right after the popup is shown. + + + Notification sent right after the popup is hidden. + + + diff --git a/doc/classes/PopupDialog.xml b/doc/classes/PopupDialog.xml new file mode 100644 index 0000000000..c51c5b6d21 --- /dev/null +++ b/doc/classes/PopupDialog.xml @@ -0,0 +1,17 @@ + + + + Base class for Popup Dialogs. + + + PopupDialog is a base class for popup dialogs, along with [WindowDialog]. + + + + + + + + + + diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml new file mode 100644 index 0000000000..7ab3d19378 --- /dev/null +++ b/doc/classes/PopupMenu.xml @@ -0,0 +1,509 @@ + + + + PopupMenu displays a list of options. + + + PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus. + + + + + + + + + + + + + + + + + Add a new checkable item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + + + + + + + + + + + + + + + + + + + + + + + + + + + Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be + created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. + + + + + + + + + + + + + + + + + + + + + + + + + + + Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. + + + + + + + Add a separator between items. Separators also occupy an index. + + + + + + + + + + + + + + + + + + + + + + + + + Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index. + + + + + + + Clear the popup menu, in effect removing all items. + + + + + + + + + Return the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused. + + + + + + + Return the amount of items. + + + + + + + + + Return the icon of the item at index "idx". + + + + + + + + + Return the id of the item at index "idx". + + + + + + + + + Find and return the index of the item containing a given id. + + + + + + + + + Return the metadata of an item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items. + + + + + + + + + + + + + + + + + Return the submenu name of the item at index "idx". + + + + + + + + + Return the text of the item at index "idx". + + + + + + + + + + + + + + + Returns a boolean that indicates whether or not the PopupMenu will hide on checkable item selection. + + + + + + + Returns a boolean that indicates whether or not the PopupMenu will hide on item selection. + + + + + + + + + Return whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + + + + + + + + + Return the checkstate status of the item at index "idx". + + + + + + + + + Return whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked. + + + + + + + + + Return whether the item is a seperator. If it is, it would be displayed as a line. + + + + + + + + + Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one. + + + + + + + + + Sets whether or not the PopupMenu will hide on checkable item selection. + + + + + + + + + Sets whether or not the PopupMenu will hide on item selection. + + + + + + + + + + + Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused. + + + + + + + + + + + Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + + + + + + + + + + + Mark the item at index "idx" as a seperator, which means that it would be displayed as a mere line. + + + + + + + + + + + Set the checkstate status of the item at index "idx". + + + + + + + + + + + Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked. + + + + + + + + + + + + + + + + + + + + + Set the id of the item at index "idx". + + + + + + + + + + + Sets the metadata of an item, which might be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items. + + + + + + + + + + + + + + + + + + + + + + + Sets the submenu of the item at index "idx". The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. + + + + + + + + + + + Set the text of the item at index "idx". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This event is emitted when an item of some id is pressed or its accelerator is activated. + + + + + + + This event is emitted when an item of some index is pressed or its accelerator is activated. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml new file mode 100644 index 0000000000..f8060ab4f6 --- /dev/null +++ b/doc/classes/PopupPanel.xml @@ -0,0 +1,21 @@ + + + + Class for displaying popups with a panel background. + + + Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [WindowDialog]. + + + + + + + + + + + + + + diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml new file mode 100644 index 0000000000..ffb1c62d0f --- /dev/null +++ b/doc/classes/Position2D.xml @@ -0,0 +1,17 @@ + + + + Generic 2D Position hint for editing. + + + Generic 2D Position hint for editing. It's just like a plain [Node2D] but displays as a cross in the 2D-Editor at all times. + + + + + + + + + + diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml new file mode 100644 index 0000000000..a544e59ddc --- /dev/null +++ b/doc/classes/Position3D.xml @@ -0,0 +1,17 @@ + + + + Generic 3D Position hint for editing + + + Generic 3D Position hint for editing. It's just like a plain [Spatial] but displays as a cross in the 3D-Editor at all times. + + + + + + + + + + diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml new file mode 100644 index 0000000000..5ad09e39c4 --- /dev/null +++ b/doc/classes/PrimitiveMesh.xml @@ -0,0 +1,42 @@ + + + + Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. + + + Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The current [Material] of the primitive mesh. + + + + + diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml new file mode 100644 index 0000000000..94eb7472e5 --- /dev/null +++ b/doc/classes/PrismMesh.xml @@ -0,0 +1,104 @@ + + + + Class representing a prism-shaped [PrimitiveMesh]. + + + Class representing a prism-shaped [PrimitiveMesh]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Displacement of of the upper edge along the x-axis. 0.0 positions edge straight above the bottome left edge. Defaults to 0.5 (positioned on the midpoint). + + + Size of the prism. Defaults to (2.0, 2.0, 2.0). + + + Number of added edge loops along the z-axis. Defaults to 0. + + + Number of added edge loops along the y-axis. Defaults to 0. + + + Number of added edge loops along the x-axis. Defaults to 0. + + + + + diff --git a/doc/classes/ProceduralSky.xml b/doc/classes/ProceduralSky.xml new file mode 100644 index 0000000000..01a0a4b1fd --- /dev/null +++ b/doc/classes/ProceduralSky.xml @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml new file mode 100644 index 0000000000..6901b28dfd --- /dev/null +++ b/doc/classes/ProgressBar.xml @@ -0,0 +1,47 @@ + + + + General purpose progress bar. + + + General purpose progress bar. Shows fill percentage from right to left. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml new file mode 100644 index 0000000000..bec9525a45 --- /dev/null +++ b/doc/classes/ProjectSettings.xml @@ -0,0 +1,159 @@ + + + + Contains global variables accessible from everywhere. + + + Contains global variables accessible from everywhere. Use the normal [Object] API, such as "ProjectSettings.get(variable)", "ProjectSettings.set(variable,value)" or "ProjectSettings.has(variable)" to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. + + + + + + + + + + + + + Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String]. + Example: + [codeblock] + ProjectSettings.set("category/property_name", 0) + + var property_info = { + "name": "category/property_name", + "type": TYPE_INT, + "hint": PROPERTY_HINT_ENUM, + "hint_string": "one,two,three" + } + + ProjectSettings.add_property_info(property_info) + [/codeblock] + + + + + + + + + Clear the whole configuration (not recommended, may break things). + + + + + + + + + Return the order of a configuration value (influences when saved to the config file). + + + + + + + + + + + + + + + + + Convert a localized path (res://) to a full native OS path. + + + + + + + + + Return true if a configuration value is present. + + + + + + + + + + + + + + + + + + + + + + + + + Convert a path to a localized path (res:// path). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the order of a configuration value (influences when saved to the config file). + + + + + + diff --git a/doc/classes/ProximityGroup.xml b/doc/classes/ProximityGroup.xml new file mode 100644 index 0000000000..245d90f357 --- /dev/null +++ b/doc/classes/ProximityGroup.xml @@ -0,0 +1,71 @@ + + + + General purpose proximity-detection node. + + + General purpose proximity-detection node. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml new file mode 100644 index 0000000000..b7c66b04de --- /dev/null +++ b/doc/classes/QuadMesh.xml @@ -0,0 +1,17 @@ + + + + Class representing a square mesh. + + + Class representing a square mesh with size (2,2,0). Consider using a [PlaneMesh] if you require a differently sized plane. + + + + + + + + + + diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml new file mode 100644 index 0000000000..4626db7f4e --- /dev/null +++ b/doc/classes/Quat.xml @@ -0,0 +1,148 @@ + + + + Quaternion. + + + Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between two rotations. Multiplying quaternions also cheaply reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. + + + + + + + + + Returns the rotation matrix corresponding to the given quaternion. + + + + + + + + + + + + + + + + + + + + + + + Returns the dot product of two quaternions. + + + + + + + Returns the inverse of the quaternion. + + + + + + + Returns whether the quaternion is normalized or not. + + + + + + + Returns the length of the quaternion. + + + + + + + Returns the length of the quaternion, squared. + + + + + + + Returns a copy of the quaternion, normalized to unit length. + + + + + + + + + + + Perform a spherical-linear interpolation with another quaternion. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml new file mode 100644 index 0000000000..89005b0d3b --- /dev/null +++ b/doc/classes/RID.xml @@ -0,0 +1,33 @@ + + + + Handle for a [Resource]'s unique ID. + + + 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 [VisualServer]. + + + + + + + + + + + + + Create a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0. + + + + + + + Retrieve the ID of the referenced resource. + + + + + + diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml new file mode 100644 index 0000000000..0543cdd111 --- /dev/null +++ b/doc/classes/Range.xml @@ -0,0 +1,182 @@ + + + + Abstract base class for range-based controls. + + + Range is a base class for [Control] nodes that change a floating point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar]. + + + + + + + + + + + Return value mapped to 0 to 1 range. + + + + + + + Return the maximum value. + + + + + + + Return the minimum value. + + + + + + + Return the page size, if page is 0, paging is disabled. + + + + + + + Return the stepping, if step is 0, stepping is disabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max. + + + + + + + + + + + + + + + + + + + + + + + + + Set minimum value, clamped range value to it if it's less. + + + + + + + + + Set page size. Page is mainly used for scrollbars or anything that controls text scrolling. + + + + + + + + + Set step value. If step is 0, stepping will be disabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This signal is emitted when min, max, range or step change. + + + + + + + This signal is emitted when value changes. + + + + + + diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml new file mode 100644 index 0000000000..05dfdf5484 --- /dev/null +++ b/doc/classes/RayCast.xml @@ -0,0 +1,201 @@ + + + + Query the closest object intersecting a ray. + + + A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 3D space in order to find the closest object along the path of the ray. + + RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks. + + Only enabled raycasts will be able to query the space and report collisions. + + RayCast calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast. + + + + + + + + + + + + + Adds a collision exception so the ray does not report collisions with the specified node. + + + + + + + + + Adds a collision exception so the ray does not report collisions with the specified [RID]. + + + + + + + Removes all collision exceptions for this ray. + + + + + + + Updates the collision information for the ray. + Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. + + + + + + + Return the destination point of this ray object. + + + + + + + Return the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast.is_colliding(): + var collider = RayCast.get_collider() + [/codeblock] + + + + + + + Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast.is_colliding(): + var shape = RayCast.get_collider_shape() + [/codeblock] + + + + + + + Returns the collision layer for this ray. + + + + + + + Returns the normal of the intersecting object's shape at the collision point. + + + + + + + Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system. + + + + + + + Returns the type mask (types of objects to detect) for this ray. The value is a sum (bitwise OR'd) of constants available for [PhysicsDirectSpaceState]. + + + + + + + Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length). + + + + + + + Returns whether the ray is enabled or not. + + + + + + + + + Removes a collision exception so the ray does report collisions with the specified node. + + + + + + + + + Removes a collision exception so the ray does report collisions with the specified [RID]. + + + + + + + + + Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code]. + + + + + + + + + Set the mask to filter objects. Only objects with at least the same mask element set will be detected. + + + + + + + + + Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions. + + + + + + + + + Set the types of objects to detect. For [code]mask[/code] use a logic sum (OR operation) of constants defined in [PhysicsDirectSpaceState], eg. [code]PhysicsDirectSpaceState.TYPE_MASK_STATIC_BODY | PhysicsDirectSpaceState.TYPE_MASK_KINEMATIC_BODY[/code] to detect only those two types. + + + + + + The ray's destination point, relative to the RayCast's [code]position[/code]. + + + The RayCast's collison layer(s). Only bodies in the same collision layer(s) will be detected. + + + If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. + + + Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState]. + Example: + [codeblock] + RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY + [/codeblock] + + + + + diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml new file mode 100644 index 0000000000..85809a2e6b --- /dev/null +++ b/doc/classes/RayCast2D.xml @@ -0,0 +1,216 @@ + + + + Query the closest object intersecting a ray. + + + A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 2D space in order to find the closest object along the path of the ray. + RayCast2D can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks. + Only enabled raycasts will be able to query the space and report collisions. + RayCast2D calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast. + + + + + + + + + + + + + Adds a collision exception so the ray does not report collisions with the specified node. + + + + + + + + + Adds a collision exception so the ray does not report collisions with the specified [RID]. + + + + + + + Removes all collision exceptions for this ray. + + + + + + + Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. + + + + + + + Return the destination point of this ray object. + + + + + + + Returns the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast2D.is_colliding(): + var collider = RayCast2D.get_collider() + [/codeblock] + + + + + + + Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast2D.is_colliding(): + var shape = RayCast2D.get_collider_shape() + [/codeblock] + + + + + + + Returns the collision layer for this ray. + + + + + + + Returns the normal of the intersecting object's shape at the collision point. + + + + + + + Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system. + + + + + + + Returns whether this ray should hit your parent node, if it's a body. + + + + + + + Returns the type mask (types of objects to detect) for this ray. The value is a sum (bitwise OR'd) of constants available for [Physics2DDirectSpaceState]. + + + + + + + Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length). + + + + + + + Returns whether this raycast is enabled or not. + + + + + + + + + Removes a collision exception so the ray does report collisions with the specified node. + + + + + + + + + Removes a collision exception so the ray does report collisions with the specified [RID]. + + + + + + + + + Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code] + + + + + + + + + Set the mask to filter objects. Only objects with at least the same mask element set will be detected. + + + + + + + + + Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions. + + + + + + + + + Toggle whether this ray should hit your parent node, if it's a body. + + + + + + + + + Set the types of objects to detect. For [code]mask[/code] use a logic sum (OR operation) of constants defined in [Physics2DDirectSpaceState], eg. [code]Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY[/code] to detect only those two types. + + + + + + The ray's destination point, relative to the RayCast's [code]position[/code]. + + + The RayCast2D's collison layer(s). Only bodies in the same collision layer(s) will be detected. + + + If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. + + + If [code]true[/code], the parent node will be excluded from collision detection. Default value: [code]true[/code]. + + + Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState]. + Example: + [codeblock] + RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY + [/codeblock] + + + + + diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml new file mode 100644 index 0000000000..c302b3f886 --- /dev/null +++ b/doc/classes/RayShape.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml new file mode 100644 index 0000000000..53b3349185 --- /dev/null +++ b/doc/classes/RayShape2D.xml @@ -0,0 +1,37 @@ + + + + Ray 2D shape resource for physics. + + + Ray 2D shape resource for physics. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + + + + + + + + + + + Return the length of the ray. + + + + + + + + + Set the length of the ray. + + + + + + + + + + diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml new file mode 100644 index 0000000000..3901f12c27 --- /dev/null +++ b/doc/classes/Rect2.xml @@ -0,0 +1,155 @@ + + + + 2D Axis-aligned bounding box. + + + Rect2 provides an 2D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + + + + + + + + + + + + + + + Construct a [Rect2] by position and size. + + + + + + + + + + + + + + + Construct a [Rect2] by x, y, width and height. + + + + + + + + + Returns the intersection of this [Rect2] and b. + + + + + + + + + Returns true if this [Rect2] completely encloses another one. + + + + + + + + + Return this [Rect2] expanded to include a given point. + + + + + + + Get the area of the [Rect2]. + + + + + + + + + Return a copy of the [Rect2] grown a given amount of units towards all the sides. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return true if the [Rect2] is flat or empty. + + + + + + + + + Return true if the [Rect2] contains a point. + + + + + + + + + Return true if the [Rect2] overlaps with another. + + + + + + + + + Combine this [Rect2] with another, a larger one is returned that contains both. + + + + + + Ending corner. + + + Position (starting corner). + + + Size from position to end. + + + + + diff --git a/doc/classes/Rect3.xml b/doc/classes/Rect3.xml new file mode 100644 index 0000000000..33ae8f3ba5 --- /dev/null +++ b/doc/classes/Rect3.xml @@ -0,0 +1,202 @@ + + + + Axis-Aligned Bounding Box. + + + Rect3 provides an 3D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for simple (fast) overlap tests. + + + + + + + + + + + + + + + Optional constructor, accepts position and size. + + + + + + + + + Return true if this [Rect3] completely encloses another one. + + + + + + + + + Return this [Rect3] expanded to include a given point. + + + + + + + Get the area of the [Rect3]. + + + + + + + + + Get the position of the 8 endpoints of the [Rect3] in space. + + + + + + + Return the normalized longest axis of the [Rect3]. + + + + + + + Return the index of the longest axis of the [Rect3] (according to [Vector3]::AXIS* enum). + + + + + + + Return the scalar length of the longest axis of the [Rect3]. + + + + + + + Return the normalized shortest axis of the [Rect3]. + + + + + + + Return the index of the shortest axis of the [Rect3] (according to [Vector3]::AXIS* enum). + + + + + + + Return the scalar length of the shortest axis of the [Rect3]. + + + + + + + + + Return the support point in a given direction. This is useful for collision detection algorithms. + + + + + + + + + Return a copy of the [Rect3] grown a given amount of units towards all the sides. + + + + + + + Return true if the [Rect3] is flat or empty. + + + + + + + Return true if the [Rect3] is empty. + + + + + + + + + Return true if the [Rect3] contains a point. + + + + + + + + + Return the intersection between two [Rect3]. An empty Rect3 (size 0,0,0) is returned on failure. + + + + + + + + + Return true if the [Rect3] overlaps with another. + + + + + + + + + Return true if the [Rect3] is at both sides of a plane. + + + + + + + + + + + Return true if the [Rect3] intersects the line segment between from and to + + + + + + + + + Combine this [Rect3] with another, a larger one is returned that contains both. + + + + + + Ending corner. + + + + + Size from position to end. + + + + + diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml new file mode 100644 index 0000000000..2f9f20841f --- /dev/null +++ b/doc/classes/RectangleShape2D.xml @@ -0,0 +1,37 @@ + + + + Rectangle Shape for 2D Physics. + + + Rectangle Shape for 2D Physics. This shape is useful for modeling box-like 2D objects. + + + + + + + + + + + Return the half extents, the actual width and height of this shape is twice the half extents. + + + + + + + + + Set the half extents, the actual width and height of this shape is twice the half extents. + + + + + + + + + + diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml new file mode 100644 index 0000000000..a8ca4cde0c --- /dev/null +++ b/doc/classes/Reference.xml @@ -0,0 +1,37 @@ + + + + Base class for anything that keeps a reference count. + + + Base class for anything that keeps a reference count. Resource and many other helper objects inherit this. References keep an internal reference counter so they are only released when no longer in use. + + + + + + + + + + + + + + + + + Increase the internal reference counter. Use this only if you really know what you are doing. + + + + + + + Decrease the internal reference counter. Use this only if you really know what you are doing. + + + + + + diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml new file mode 100644 index 0000000000..e8de910cc8 --- /dev/null +++ b/doc/classes/ReferenceRect.xml @@ -0,0 +1,21 @@ + + + + Reference frame for GUI. + + + Reference frame for GUI. It's just like an empty control, except a red box is displayed while editing around its size at all times. + + + + + + + + + + + + + + diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml new file mode 100644 index 0000000000..2bcca10402 --- /dev/null +++ b/doc/classes/ReflectionProbe.xml @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/RegEx.xml b/doc/classes/RegEx.xml new file mode 100644 index 0000000000..626f8f1a93 --- /dev/null +++ b/doc/classes/RegEx.xml @@ -0,0 +1,114 @@ + + + + Simple regular expression matcher. + + + Class for finding text patterns in a string using regular expressions. It can not perform replacements. Regular expressions are a way to define patterns of text to be searched. Details on writing patterns are too long to explain here but the Internet is full of tutorials and detailed explanations. + Once created, the RegEx object needs to be compiled with the pattern before it can be used. The pattern must be escaped first for gdscript before it is escaped for the expression. For example: + [code]var exp = RegEx.new()[/code] + [code]exp.compile("\\d+")[/code] + would be read by RegEx as [code]\d+[/code] + Similarly: + [code]exp.compile("\"(?:\\\\.|[^\"])*\"")[/code] + would be read as [code]"(?:\\.|[^"])*"[/code] + Currently supported features: + * Capturing [code]()[/code] and non-capturing [code](?:)[/code] groups + * Named capturing groups [code](?P<name>)[/code] + * Any character [code].[/code] + * Shorthand character classes [code]\w \W \s \S \d \D[/code] + * User-defined character classes such as [code][A-Za-z][/code] + * Simple quantifiers [code]?[/code], [code]*[/code] and [code]+[/code] + * Range quantifiers [code]{x,y}[/code] + * Lazy (non-greedy) quantifiers [code]*?[/code] + * Beginning [code]^[/code] and end [code]$[/code] anchors + * Alternation [code]|[/code] + * Backreferences [code]\1[/code], [code]\g{1}[/code], and [code]\g<name>[/code] + * POSIX character classes [code][[:alnum:]][/code] + * Lookahead [code](?=)[/code], [code](?!)[/code] and lookbehind [code](?<=)[/code], [code](?<!)[/code] + * ASCII [code]\xFF[/code] and Unicode [code]\uFFFF[/code] code points (in a style similar to Python) + * Word boundaries [code]\b[/code], [code]\B[/code] + + + + + + + + + + + This method resets the state of the object, as it was freshly created. Namely, it unassigns the regular expression of this object. + + + + + + + + + Compiles and assign the regular expression pattern to use. + + + + + + + Returns the number of numeric capturing groups. + + + + + + + Returns an array of names of named capturing groups. + + + + + + + Returns the expression used to compile the code. + + + + + + + Returns whether this object has a valid regular expression assigned. + + + + + + + + + + + + + Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching reult if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be. + + + + + + + + + + + + + + + + + Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as [code]\1[/code] and [code]\g<name>[/code] expanded and resolved. By default only the first instance is replaced but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be. + + + + + + diff --git a/doc/classes/RegExMatch.xml b/doc/classes/RegExMatch.xml new file mode 100644 index 0000000000..9e021ed6c8 --- /dev/null +++ b/doc/classes/RegExMatch.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + Returns the end position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). + + + + + + + Returns the number of numeric capturing groups. + + + + + + + Returns an array of names of named capturing groups. + + + + + + + + + Returns the starting position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). + + + + + + + + + Returns the result of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml new file mode 100644 index 0000000000..11fc65b8bc --- /dev/null +++ b/doc/classes/RemoteTransform.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml new file mode 100644 index 0000000000..983e8bcc79 --- /dev/null +++ b/doc/classes/RemoteTransform2D.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml new file mode 100644 index 0000000000..35342c3872 --- /dev/null +++ b/doc/classes/Resource.xml @@ -0,0 +1,119 @@ + + + + Base class for all resources. + + + Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only. + + + + + + + Return the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. + + + + + + + Return the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID. + + + + + + + + + + + + + + + + + + + + + + + Set the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only. + + + + + + + + + Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. Fails if another [Resource] already has path "path". + + + + + + + + + + + + + + + Set the path of the resource. Differs from set_path(), if another [Resource] exists with "path" it over-takes it, instead of failing. + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml new file mode 100644 index 0000000000..419c4a84fb --- /dev/null +++ b/doc/classes/ResourceImporter.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/ResourceImporterOGGVorbis.xml b/doc/classes/ResourceImporterOGGVorbis.xml new file mode 100644 index 0000000000..eef626cee7 --- /dev/null +++ b/doc/classes/ResourceImporterOGGVorbis.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml new file mode 100644 index 0000000000..d508b0a532 --- /dev/null +++ b/doc/classes/ResourceInteractiveLoader.xml @@ -0,0 +1,51 @@ + + + + Interactive Resource Loader. + + + Interactive Resource Loader. This object is returned by ResourceLoader when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying load bars/percentages. + + + + + + + + + + + Return the loaded resource (only if loaded). Otherwise, returns null. + + + + + + + Return the load stage. The total amount of stages can be queried with [method get_stage_count] + + + + + + + Return the total amount of stages (calls to [method poll]) needed to completely load this resource. + + + + + + + Poll the load. If OK is returned, this means poll will have to be called again. If ERR_FILE_EOF is returned, them the load has finished and the resource can be obtained by calling [method get_resource]. + + + + + + + + + + + + diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml new file mode 100644 index 0000000000..6558a388c8 --- /dev/null +++ b/doc/classes/ResourceLoader.xml @@ -0,0 +1,74 @@ + + + + Resource Loader. + + + Resource Loader. This is a static object accessible as [ResourceLoader]. GDScript has a simplified load() function, though. + + + + + + + + + + + + + + + + + + + + + Return the list of recognized extensions for a resource type. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Load a resource interactively, the returned object allows to load with high granularity. + + + + + + + + + Change the behavior on missing sub-resources. Default is to abort load. + + + + + + diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml new file mode 100644 index 0000000000..bba5892ece --- /dev/null +++ b/doc/classes/ResourcePreloader.xml @@ -0,0 +1,76 @@ + + + + Resource Preloader Node. + + + Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here. + + + + + + + + + + + + + + + + + + + + + + + Return the resource given a text-id. + + + + + + + Return the list of resources inside the preloader. + + + + + + + + + Return true if the preloader has a given resource. + + + + + + + + + Remove a resource from the preloader by text id. + + + + + + + + + + + Rename a resource inside the preloader, from a text-id to a new text-id. + + + + + + + + + + diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml new file mode 100644 index 0000000000..de296776ad --- /dev/null +++ b/doc/classes/ResourceSaver.xml @@ -0,0 +1,51 @@ + + + + Resource Saving Interface. + + + Resource Saving Interface. This interface is used for saving resources to disk. + + + + + + + + + + + + + Return the list of extensions available for saving a resource of a given type. + + + + + + + + + + + + + Save a resource to disk, to a given path. + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml new file mode 100644 index 0000000000..065df5bf8f --- /dev/null +++ b/doc/classes/RichTextLabel.xml @@ -0,0 +1,400 @@ + + + + Label that displays rich text. + + + Label that displays rich text. Rich text can contain custom text, fonts, images and some basic formatting. It also adapts itself to given width/heights. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the raw text, stripping out the formatting information. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return true if selecting the text inside this richtext is allowed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set to true if selecting the text inside this richtext is allowed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml new file mode 100644 index 0000000000..853125a698 --- /dev/null +++ b/doc/classes/RigidBody.xml @@ -0,0 +1,441 @@ + + + + Rigid body node. + + + Rigid body node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift mode between regular Rigid body, Kinematic, Character or Static. + + + + + + + + + + + + + Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body. + + + + + + + + + + + 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 offset from the body origin are in global coordinates. + + + + + + + Return the current body angular damp. Default is -1. + + + + + + + Return the current body angular velocity. + + + + + + + Return the current axis lock of the body. One of AXIS_LOCK_* enum. + + + + + + + Return the current body bounciness. + + + + + + + Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. + + + + + + + Return the current body friction, from 0 (frictionless) to 1 (max friction). + + + + + + + Return the current body gravity scale. + + + + + + + Return the current body linear damp. Default is -1. + + + + + + + Return the current body linear velocity. + + + + + + + Return the current body mass. + + + + + + + Return the maximum contacts that can be reported. See [method set_max_contacts_reported]. + + + + + + + Return the current body mode, see [method set_mode]. + + + + + + + Return the current body weight, given standard earth-weight (gravity 9.8). + + + + + + + Return whether the body has the ability to fall asleep when not moving. See [method set_can_sleep]. + + + + + + + Return whether contact monitoring is enabled. + + + + + + + Return whether the body is sleeping. + + + + + + + Return whether this body is using continuous collision detection. + + + + + + + Return whether the body is using a custom integrator. + + + + + + + + + Set the angular damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any angular damp derived from the world or areas will be overridden. + + + + + + + + + Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state. + + + + + + + + + Set the axis lock of the body, from the AXIS_LOCK_* enum. Axis lock stops the body from moving along the specified axis(X/Y/Z) and rotating along the other two axes. + + + + + + + + + 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. + + + + + + + + + Set the body bounciness, from 0 (no bounciness) to 1 (max bounciness). + + + + + + + + + Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene. + Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body. + + + + + + + + + Enable contact monitoring. This allows the body to emit signals when it collides with another. + + + + + + + + + Set the body friction, from 0 (frictionless) to 1 (max friction). + + + + + + + + + Set the gravity factor. This factor multiplies gravity intensity just for this body. + + + + + + + + + Set the linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden. + + + + + + + + + Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state. + + + + + + + + + Set the body mass. + + + + + + + + + Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + + + + + + + + + Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body. + + + + + + + + + Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] wakes them up. Until then, they behave like a static body. + + + + + + + + + Set the continuous collision detection mode from the enum CCD_MODE_*. + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects. + + + + + + + + + Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. + + + + + + + + + Set the body weight given standard earth-weight (gravity 9.8). + + + + + + Dampens rotational forces of the Rigid body by the 'angular_damp' rate. + + + The current rotational velocity of the Rigid body + + + Locks the rotational forces to a particular axis, preventing rotations on other axes. + + + Bounciness of the Rigid body. + + + If true, the Rigid body will no longer calculate forces when there is no movement and will act as a static body. It will wake up when other forces are applied through other collisions or when the 'apply_impulse' method is used. + + + If true, the Rigid body will emit signals when it collides with another Rigid body. + + + The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + + + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects. + + + If true, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. + + + The body friction, from 0 (frictionless) to 1 (max friction). + + + The 'gravity_scale' for this Rigid body will be multiplied by the global 3d gravity setting found in "Project > Project Settings > Physics > 3d". A value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. + + + The linear damp for this body. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden. + + + The body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. + + + The body mass. + + + The body mode from the MODE_* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER. + + + The current 'sleeping' state of the Rigid body. + + + The body weight given standard earth-weight (gravity 9.8). + + + + + + + + Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. + + + + + + + Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. + + + + + + + + + + + + + Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. + This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with. + + + + + + + + + + + + + Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. + This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with. + + + + + Emitted when the body changes its sleeping state. Either by sleeping or waking up. + + + + + + Static mode. The body behaves like a [StaticBody], and can only move by user code. + + + Kinematic body. The body behaves like a [KinematicBody], and can only move by user code. + + + 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. + + + Character body. This behaves like a rigid body, but can not rotate. + + + diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml new file mode 100644 index 0000000000..878cb354b2 --- /dev/null +++ b/doc/classes/RigidBody2D.xml @@ -0,0 +1,489 @@ + + + + Rigid body 2D node. + + + Rigid body 2D node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift state between regular Rigid body, Kinematic, Character or Static. + Character mode forbids the node from being rotated. This node can have a custom force integrator function, for writing complex physics motion behavior per node. + As a warning, don't change this node position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior. + + + + + + + + + + + + + Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body. + + + + + + + + + + + Add a positioned force to the applied force and torque. As with [method apply_impulse], both the force and the offset from the body origin are in global coordinates. + + + + + + + + + + + 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 offset from the body origin are in global coordinates. + + + + + + + Return the angular damp for this body. + + + + + + + Return the body angular velocity. This changes by physics granularity. See [method set_angular_velocity]. + + + + + + + Return the applied force vector. + + + + + + + Return the torque which is being applied to this body. + + + + + + + Return the body bounciness. + + + + + + + Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. You must also enable contact monitor, see [method set_contact_monitor] + + + + + + + Return whether this body is using continuous collision detection. + + + + + + + Return the body friction. + + + + + + + Return the gravity factor. + + + + + + + Return the body's moment of inertia. This is usually automatically computed from the mass and the shapes. Note that this doesn't seem to work in a [code]_ready[/code] function: it apparently has not been auto-computed yet. + + + + + + + Return the linear damp for this body. + + + + + + + Return the body linear velocity. This changes by physics granularity. See [method set_linear_velocity]. + + + + + + + Return the body mass. + + + + + + + Return the maximum contacts that can be reported. See [method set_max_contacts_reported]. + + + + + + + Return the current body mode, see [method set_mode]. + + + + + + + Return the body weight given standard earth-weight (gravity 9.8). + + + + + + + Return true if the body has the ability to fall asleep when not moving. See [method set_can_sleep]. + + + + + + + Return whether contact monitoring is enabled. + + + + + + + Return whether the body is sleeping. + + + + + + + Return true if the body is not doing any built-in force integration. + + + + + + + + + Set the angular damp for this body. If this value is different from -1, any angular damp derived from the world or areas will be overridden. + + + + + + + + + Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state. + + + + + + + + + Set the applied force vector. This is the equivalent of pushing a box over the ground: the force applied is applied constantly. + + + + + + + + + Set a constant torque which will be applied to this body. + + + + + + + + + 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. + + + + + + + + + Set the body bounciness, from 0 (no bounce) to 1 (full bounce). + + + + + + + + + Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene. + Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body. + + + + + + + + + Enable contact monitoring. This allows the body to emit signals when it collides with another. + + + + + + + + + Set the continuous collision detection mode from the enum CCD_MODE_*. + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fast-moving objects. + + + + + + + + + Set the body friction, from 0 (frictionless) to 1 (full friction). + + + + + + + + + Set the gravity factor. This factor multiplies gravity intensity just for this body. + + + + + + + + + Set the body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it. + + + + + + + + + Set the linear damp for this body. If this value is different from -1, any linear damp derived from the world or areas will be overridden. + + + + + + + + + Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state. + + + + + + + + + Set the body mass. + + + + + + + + + Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + + + + + + + + + Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body. + + + + + + + + + Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body. + + + + + + + + + Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. + + + + + + + + + Set the body weight given standard earth-weight (gravity 9.8). Not really useful for 2D since most measures for this node are in pixels. + + + + + + + + + + + + + Return whether the body would collide, if it tried to move in the given vector. This method allows two extra parameters: A margin, which increases slightly the size of the shapes involved in the collision detection, and an object of type [Physics2DTestMotionResult], which will store additional information about the collision (should there be one). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. + + + + + + + Emitted when a body exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. + + + + + + + + + + + + + Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. + This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with. + + + + + + + + + + + + + Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. + This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with. + + + + + Emitted when the body changes its sleeping state. Either by sleeping or waking up. + + + + + + Static mode. The body behaves like a [StaticBody2D], and can only move by user code. + + + Kinematic body. The body behaves like a [KinematicBody2D], and can only move by user code. + + + 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. + + + Character body. This behaves like a rigid body, but can not rotate. + + + Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. + + + Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. + + + Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. + + + diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml new file mode 100644 index 0000000000..967c3fbad6 --- /dev/null +++ b/doc/classes/SceneState.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml new file mode 100644 index 0000000000..c40d9339d1 --- /dev/null +++ b/doc/classes/SceneTree.xml @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns true if there is a [NetworkedMultiplayerPeer] set (with [method SceneTree.set_network_peer]). + + + + + + + + + + + + + + + + + + + + + + + + + Returns true if this SceneTree's [NetworkedMultiplayerPeer] is in server mode (listening for connections). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the peer object to handle the RPC system (effectively enabling networking). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to slave. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml new file mode 100644 index 0000000000..276c6857ae --- /dev/null +++ b/doc/classes/SceneTreeTimer.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml new file mode 100644 index 0000000000..307afba8a7 --- /dev/null +++ b/doc/classes/Script.xml @@ -0,0 +1,88 @@ + + + + A class stored as a resource. + + + A class stored as a resource. The script exends the functionality of all objects that instance it. + The 'new' method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. + + + + + + + + + + + Returns true if the script can be instanced. + + + + + + + + + + + + + Returns the script source code, or an empty string if source code is not available. + + + + + + + + + Returns true if the script, or a base class, defines a signal with the given name. + + + + + + + Returns true if the script contains non-empty source code. + + + + + + + + + Returns true if 'base_object' is an instance of this script. + + + + + + + Returns true if the script is a tool script. A tool script can run in the editor. + + + + + + + + + Reloads the script's class implementation. Returns an error code. + + + + + + + + + Sets the script source code. Does not reload the class implementation. + + + + + + diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml new file mode 100644 index 0000000000..e93a0eda0c --- /dev/null +++ b/doc/classes/ScriptEditor.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + Returns a [Script] that is currently active in editor. + + + + + + + Returns an array with all [Script] objects which are currently open in editor. + + + + + + + + + Emitted when user changed active script. Argument is a freshly activated [Script]. + + + + + + + Emitted when editor is about to close the active script. Argument is a [Script] that is going to be closed. + + + + + + diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml new file mode 100644 index 0000000000..c7be79fc85 --- /dev/null +++ b/doc/classes/ScrollBar.xml @@ -0,0 +1,41 @@ + + + + Base class for scroll bars. + + + Scrollbars are a [Range] based [Control], that display a draggable area (the size of the page). Horizontal ([HScrollBar]) and Vertical ([VScrollBar]) versions are available. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml new file mode 100644 index 0000000000..b8164f8565 --- /dev/null +++ b/doc/classes/ScrollContainer.xml @@ -0,0 +1,87 @@ + + + + A helper node for displaying scrollable elements (e.g. lists). + + + A ScrollContainer node with a [Control] child and scrollbar child ([HScrollbar], [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 [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). + + + + + + + + + + + Return current horizontal scroll value. + + + + + + + Return current vertical scroll value. + + + + + + + Return true if horizontal scroll is allowed. + + + + + + + Return true if vertical scroll is allowed. + + + + + + + + + Set allows horizontal scroll. + + + + + + + + + Set allows vertical scroll. + + + + + + + + + Set horizontal scroll value. + + + + + + + + + Set vertical scroll value. + + + + + + + + + + + + diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml new file mode 100644 index 0000000000..a3cbff329a --- /dev/null +++ b/doc/classes/SegmentShape2D.xml @@ -0,0 +1,55 @@ + + + + Segment Shape for 2D Collision Detection. + + + Segment Shape for 2D Collision Detection, consists of two points, 'a' and 'b'. + + + + + + + + + + + Return the first point's position. + + + + + + + Return the second point's position. + + + + + + + + + Set the first point's position. + + + + + + + + + Set the second point's position. + + + + + + + + + + + + diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml new file mode 100644 index 0000000000..0aeb6472af --- /dev/null +++ b/doc/classes/Semaphore.xml @@ -0,0 +1,31 @@ + + + + A synchronization Semaphore. + + + A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation. + + + + + + + + + + + Lowers the [Semaphore], allowing one more thread in. + + + + + + + Tries to wait for the [Semaphore], if its value is zero, blocks until non-zero. + + + + + + diff --git a/doc/classes/Separator.xml b/doc/classes/Separator.xml new file mode 100644 index 0000000000..4bbabe58aa --- /dev/null +++ b/doc/classes/Separator.xml @@ -0,0 +1,17 @@ + + + + Base class for separators. + + + Separator is a [Control] used for separating other controls. It's purely a visual decoration. Horizontal ([HSeparator]) and Vertical ([VSeparator]) versions are available. + + + + + + + + + + diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml new file mode 100644 index 0000000000..935cdaab9d --- /dev/null +++ b/doc/classes/Shader.xml @@ -0,0 +1,73 @@ + + + + To be changed, ignore. + + + To be changed, ignore. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml new file mode 100644 index 0000000000..8bd9f1039e --- /dev/null +++ b/doc/classes/ShaderMaterial.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml new file mode 100644 index 0000000000..8e6e12a736 --- /dev/null +++ b/doc/classes/Shape.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml new file mode 100644 index 0000000000..ffe965b796 --- /dev/null +++ b/doc/classes/Shape2D.xml @@ -0,0 +1,102 @@ + + + + Base class for all 2D Shapes. + + + Base class for all 2D Shapes. All 2D shape types inherit from this. + + + + + + + + + + + + + + + + + Return whether this shape is colliding with another. + This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]). + + + + + + + + + + + + + Return a list of the points where this shape touches another. If there are no collisions, the list is empty. + This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]). + + + + + + + + + + + + + + + + + Return whether this shape would collide with another, if a given movement was applied. + This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). + + + + + + + + + + + + + + + + + Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty. + This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). + + + + + + + Return the custom solver bias. + + + + + + + + + Use a custom solver bias. No need to change this unless you really know what you are doing. + The solver bias is a factor controlling how much two objects "rebound" off each other, when colliding, to avoid them getting into each other because of numerical imprecision. + + + + + + + + + + diff --git a/doc/classes/ShortCut.xml b/doc/classes/ShortCut.xml new file mode 100644 index 0000000000..437c1427b6 --- /dev/null +++ b/doc/classes/ShortCut.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton.xml new file mode 100644 index 0000000000..b5be340b77 --- /dev/null +++ b/doc/classes/Skeleton.xml @@ -0,0 +1,221 @@ + + + + Skeleton for characters and animated objects. + + + Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). Skeleton will support rag doll dynamics in the future. + + + + + + + + + + + + + Add a bone, with name "name". [method get_bone_count] will become the bone index. + + + + + + + + + + + Deprecated soon. + + + + + + + Clear all the bones in this skeleton. + + + + + + + + + Return the bone index that matches "name" as its name. + + + + + + + Return the amount of bones in the skeleton. + + + + + + + + + + + + + + + + + + + + + + + + + Return the name of the bone at index "index" + + + + + + + + + Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx". + + + + + + + + + Return the pose transform for bone "bone_idx". + + + + + + + + + Return the rest transform for a bone "bone_idx". + + + + + + + + + + + + + + + + + Deprecated soon. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx". + + + + + + + + + + + Return the pose transform for bone "bone_idx". + + + + + + + + + + + Set the rest transform for bone "bone_idx" + + + + + + + + + + + Deprecated soon. + + + + + + + + + + + + + + + + diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml new file mode 100644 index 0000000000..49dd9602dd --- /dev/null +++ b/doc/classes/Sky.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml new file mode 100644 index 0000000000..cfcbd23a9b --- /dev/null +++ b/doc/classes/Slider.xml @@ -0,0 +1,73 @@ + + + + Base class for GUI Sliders. + + + Base class for GUI Sliders. + + + + + + + + + + + Return amounts of ticks to display on slider. + + + + + + + Return true if ticks are visible on borders. + + + + + + + + + + + + + + + + + + + + + + + Set amount of ticks to display in slider. + + + + + + + + + Set true if ticks are visible on borders. + + + + + + + + + + + + + + + + diff --git a/doc/classes/SliderJoint.xml b/doc/classes/SliderJoint.xml new file mode 100644 index 0000000000..b6593590d7 --- /dev/null +++ b/doc/classes/SliderJoint.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml new file mode 100644 index 0000000000..f8f02e07fc --- /dev/null +++ b/doc/classes/Spatial.xml @@ -0,0 +1,406 @@ + + + + Most basic 3D game object, parent of all 3D related nodes. + + + Most basic 3D game object, with a 3D [Transform] and visibility settings. All 3D physics nodes and sprites inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project. + + + + + + + + + + + Return the SpatialGizmo for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. + + + + + + + Return the global transform, relative to worldspace. + + + + + + + Return the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial]. + + + + + + + Return the rotation (in radians). + + + + + + + Return the rotation (in degrees). + + + + + + + + + + + + + Return the local transform, relative to the bone parent. + + + + + + + + + + + + + Return current [World] resource this Spatial node is registered to. + + + + + + + + + + + Rotate current node along normal [Vector3] by angle in radians in Global space. + + + + + + + + + Move current node by [Vector3] offset in Global space. + + + + + + + Disable rendering of this node. Change Spatial Visible property to false. + + + + + + + Returns whether node sends notification that its local transformation changed. Spatial will not propagate this by default. + + + + + + + Returns whether this node is set as Toplevel, ignoring its parent node transformations. + + + + + + + Returns whether node sends notification that its transformation changed. Spatial will not propagate this by default. + + + + + + + Returns whether this node is set to be visible. + + + + + + + Returns whether this node is visible, taking into consideration that its parents visibility. + + + + + + + + + + + Rotates itself to point into direction of target position. Operations take place in global space. + + + + + + + + + + + + + Moves itself to specified position and then rotates itself to point into direction of target position. Operations take place in global space. + + + + + + + Reset this node transformations (like scale, skew and taper) preserving its rotation and translation. Performs orthonormalization on this node [Transform3D]. + + + + + + + + + + + Rotates node in local space on given normal [Vector3] by angle in radians. + + + + + + + + + Rotates node in local space on X axis by angle in radians. + + + + + + + + + Rotates node in local space on Y axis by angle in radians. + + + + + + + + + Rotates node in local space on Z axis by angle in radians. + + + + + + + + + Makes this node ignore its parents tranformations. Node tranformations are only in global space. + + + + + + + + + Set [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. + + + + + + + + + Set the transform globally, relative to world space. + + + + + + + Reset all tranformations for this node. Set its [Transform3D] to identity matrix. + + + + + + + + + Set whether this node ignores notification that its transformation changed. + + + + + + + + + Set whether this node sends notification that its local transformation changed. Spatial will not propagate this by default. + + + + + + + + + Set whether this node sends notification that its transformation changed. Spatial will not propagate this by default. + + + + + + + + + Set the rotation (in radians). + + + + + + + + + Set the rotation (in degrees). + + + + + + + + + Set the scale. + + + + + + + + + Set the transform locally, relative to the parent spatial node. + + + + + + + + + + + + + + + + + + + + + + + Enable rendering of this node. Change Spatial Visible property to false. + + + + + + + + + Tranform [Vector3] from this node local space to world space. + + + + + + + + + Tranform [Vector3] from world space to this node local space. + + + + + + + + + Change node position by given offset [Vector3]. + + + + + + + Update [SpatialGizmo] of this node. + + + + + + World space (global) [Transform] of this node. + + + Local euler rotation in radians of this node. + + + Local euler rotation in degrees of this node. + + + Local scale of this node. + + + Local space [Transform] of this node. + + + Local translation of this node. + + + Visibility of this node. Toggles if this node is rendered. + + + + + + Emitted when node visibility changed. + + + + + + Spatial nodes receive 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). + + + Spatial nodes receive this notification when they are registered to new [World] resource. + + + Spatial nodes receive this notification when they are unregistered from current [World] resource. + + + Spatial nodes receive this notification when their visibility changes. + + + diff --git a/doc/classes/SpatialGizmo.xml b/doc/classes/SpatialGizmo.xml new file mode 100644 index 0000000000..1612e80500 --- /dev/null +++ b/doc/classes/SpatialGizmo.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml new file mode 100644 index 0000000000..55bc04fd88 --- /dev/null +++ b/doc/classes/SpatialMaterial.xml @@ -0,0 +1,1021 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SpatialVelocityTracker.xml b/doc/classes/SpatialVelocityTracker.xml new file mode 100644 index 0000000000..2cbc2b9739 --- /dev/null +++ b/doc/classes/SpatialVelocityTracker.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml new file mode 100644 index 0000000000..4f64463dc0 --- /dev/null +++ b/doc/classes/SphereMesh.xml @@ -0,0 +1,104 @@ + + + + Class representing a spherical [PrimitiveMesh]. + + + Class representing a spherical [PrimitiveMesh]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Full height of the sphere. Defaults to 2.0. + + + Determines whether a full sphere or a hemisphere is created. Attention: To get a regular hemisphere the height and radius of the sphere have to equal. Defaults to false. + + + Number of radial segments on the sphere. Defaults to 64. + + + Radius of sphere. Defaults to 1.0. + + + Number of segments along the height of the sphere. Defaults to 32. + + + + + diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape.xml new file mode 100644 index 0000000000..9dbf39037e --- /dev/null +++ b/doc/classes/SphereShape.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml new file mode 100644 index 0000000000..e492ebb389 --- /dev/null +++ b/doc/classes/SpinBox.xml @@ -0,0 +1,82 @@ + + + + Numerical input text field. + + + SpinBox is a numerical input text field. It allows entering integers and floats. + + + + + + + + + + + + + + + + + + + + + + + Return the specific suffix. + + + + + + + Return if the spinbox is editable. + + + + + + + + + Set whether the spinbox is editable. + + + + + + + + + Set a prefix. + + + + + + + + + Set a specific suffix. + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml new file mode 100644 index 0000000000..b3cdd9d17d --- /dev/null +++ b/doc/classes/SplitContainer.xml @@ -0,0 +1,91 @@ + + + + Container for splitting and adjusting. + + + Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. + + + + + + + + + + + Return visibility of the split dragger (one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]). + + + + + + + Return the split offset. + + + + + + + Return true if the split is collapsed. + + + + + + + + + Set if the split must be collapsed. + + + + + + + + + Set visibility of the split dragger ([i]mode[/i] must be one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]). + + + + + + + + + Set the split offset. + + + + + + + + + + + + + + + + + Emitted when the dragger is dragged by user. + + + + + + The split dragger is visible. + + + The split dragger is invisible. + + + The split dragger is invisible and collapsed. + + + diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml new file mode 100644 index 0000000000..d95e52645a --- /dev/null +++ b/doc/classes/SpotLight.xml @@ -0,0 +1,27 @@ + + + + Spotlight [Light], such as a reflector spotlight or a lantern. + + + A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight. + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml new file mode 100644 index 0000000000..c3288593fe --- /dev/null +++ b/doc/classes/Sprite.xml @@ -0,0 +1,241 @@ + + + + General purpose Sprite node. + + + General purpose Sprite node. This Sprite node can show any texture as a sprite. The texture can be used as a spritesheet for animation, or only a region from a bigger texture can referenced, like an atlas. + + + + + + + + + + + Return the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1. + + + + + + + Return the amount of horizontal frames. See [method set_hframes]. + + + + + + + + + + + + + Return sprite draw offset. + + + + + + + Return the region rect to read from. + + + + + + + Return the base texture for the sprite. + + + + + + + Return the amount of vertical frames. See [method set_vframes]. + + + + + + + Return if the sprite is centered at the local origin. + + + + + + + Return true if the sprite is flipped horizontally. + + + + + + + Return true if the sprite is flipped vertically. + + + + + + + Return if the sprite reads from a region. + + + + + + + + + + + + + + + Set whether the sprite should be centered on the origin. + + + + + + + + + Set true to flip the sprite horizontally. + + + + + + + + + Set true to flip the sprite vertically. + + + + + + + + + Set the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1. + + + + + + + + + Set the amount of horizontal frames and converts the sprite into a sprite-sheet. This is useful for animation. + + + + + + + + + + + + + + + + + Set the sprite draw offset, useful for setting rotation pivots. + + + + + + + + + Set the sprite as a sub-region of a bigger texture. Useful for texture-atlases. + + + + + + + + + + + + + + + + + Set the region rect to read from. + + + + + + + + + Set the base texture for the sprite. + + + + + + + + + Set the amount of vertical frames and converts the sprite into a sprite-sheet. This is useful for animation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml new file mode 100644 index 0000000000..dea62ec620 --- /dev/null +++ b/doc/classes/Sprite3D.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml new file mode 100644 index 0000000000..8eb32b7c05 --- /dev/null +++ b/doc/classes/SpriteBase3D.xml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml new file mode 100644 index 0000000000..1627b0f4a0 --- /dev/null +++ b/doc/classes/SpriteFrames.xml @@ -0,0 +1,159 @@ + + + + Sprite frame library for AnimatedSprite. + + + Sprite frame library for [AnimatedSprite]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody.xml new file mode 100644 index 0000000000..5f01c1b2fc --- /dev/null +++ b/doc/classes/StaticBody.xml @@ -0,0 +1,97 @@ + + + + Static body for 3D Physics. + + + Static body for 3D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody3D] so they are great for scenario collision. + A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. + Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). + + + + + + + + + + + Return the body bounciness. + + + + + + + Return the constant angular velocity for the body. + + + + + + + Return the constant linear velocity for the body. + + + + + + + Return the body friction. + + + + + + + + + Set the body bounciness, from 0 (not bouncy) to 1 (bouncy). + + + + + + + + + Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating. + + + + + + + + + Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving. + + + + + + + + + Set the body friction, from 0 (frictionless) to 1 (full friction). + + + + + + The body bounciness. + + + The constant angular velocity for the body. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. + + + The constant linear velocity for the body. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. + + + The body friction, from 0 (frictionless) to 1 (full friction). + + + + + diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml new file mode 100644 index 0000000000..6b70094f6f --- /dev/null +++ b/doc/classes/StaticBody2D.xml @@ -0,0 +1,93 @@ + + + + Static body for 2D Physics. + + + Static body for 2D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody2D] so they are great for scenario collision. + A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. + Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). + + + + + + + + + + + Return the body bounciness. + + + + + + + Return the constant angular velocity for the body. + + + + + + + Return the constant linear velocity for the body. + + + + + + + Return the body friction. + + + + + + + + + Set the body bounciness, from 0 (not bouncy) to 1 (bouncy). + + + + + + + + + Set a constant angular velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating. + + + + + + + + + Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving. + + + + + + + + + Set the body friction, from 0 (frictionless) to 1 (full friction). + + + + + + + + + + + + + + + + diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml new file mode 100644 index 0000000000..2fdd4b07d5 --- /dev/null +++ b/doc/classes/StreamPeer.xml @@ -0,0 +1,279 @@ + + + + Abstraction and base class for stream-based protocols. + + + StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or Unix Sockets). It provides an API for sending and receiving data through streams as raw data or strings. + + + + + + + + + + + Get a signed 16 bit value from the stream. + + + + + + + Get a signed 32 bit value from the stream. + + + + + + + Get a signed 64 bit value from the stream. + + + + + + + Get a signed byte from the stream. + + + + + + + Return the amount of bytes this [StreamPeer] has available. + + + + + + + + + Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an Error code and a data array. + + + + + + + Get a double-precision float from the stream. + + + + + + + Get a single-precision float from the stream. + + + + + + + + + Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an Error code, and a data array. + + + + + + + + + Get a string with byte-length "bytes" from the stream. + + + + + + + Get an unsigned 16 bit value from the stream. + + + + + + + Get an unsigned 32 bit value from the stream. + + + + + + + Get an unsigned 16 bit value from the stream. + + + + + + + Get an unsigned byte from the stream. + + + + + + + + + Get a utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8). + + + + + + + Get a Variant from the stream. + + + + + + + Return whether this [StreamPeer] is using big-endian format. + + + + + + + + + Put a signed 16 bit value into the stream. + + + + + + + + + Put a signed 32 bit value into the stream. + + + + + + + + + Put a signed 64 bit value into the stream. + + + + + + + + + Put a signed byte into the stream. + + + + + + + + + Send a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an Error code. + + + + + + + + + Put a double-precision float into the stream. + + + + + + + + + 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. + + + + + + + + + Put an unsigned 16 bit value into the stream. + + + + + + + + + Put an unsigned 32 bit value into the stream. + + + + + + + + + Put an unsigned 64 bit value into the stream. + + + + + + + + + Put an unsigned byte into the stream. + + + + + + + + + Put a zero-terminated utf8 string into the stream. + + + + + + + + + Put a Variant into the stream. + + + + + + + + + Set this [StreamPeer] to use big-endian format. Default is false. + + + + + + diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml new file mode 100644 index 0000000000..70a4c781c9 --- /dev/null +++ b/doc/classes/StreamPeerBuffer.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml new file mode 100644 index 0000000000..7a2843ff47 --- /dev/null +++ b/doc/classes/StreamPeerSSL.xml @@ -0,0 +1,64 @@ + + + + SSL Stream peer. + + + SSL Stream peer. This object can be used to connect to SSL servers. + + + + + + + + + + + + + + + + + + + + + + + + + Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname". + + + + + + + Disconnect from host. + + + + + + + Return the status of the connection, one of STATUS_* enum. + + + + + + A status representing a [StreamPeerSSL] that is disconnected. + + + A status representing a [StreamPeerSSL] that is connected to a host. + + + An errot status that shows the peer did not present a SSL certificate and validation was requested. + + + An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation. + + + diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml new file mode 100644 index 0000000000..3b2af330b3 --- /dev/null +++ b/doc/classes/StreamPeerTCP.xml @@ -0,0 +1,74 @@ + + + + TCP Stream peer. + + + TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a tcp server. + + + + + + + + + + + + + + + Connect to the specified host:port pair. A hostname will be resolved if valid. Returns [OK] on success or [FAILED] on failure. + + + + + + + Disconnect from host. + + + + + + + Return the IP of this peer. + + + + + + + Return the port of this peer. + + + + + + + Return the status of the connection, one of STATUS_* enum. + + + + + + + + + + + + The initial status of the [StreamPeerTCP], also the status after a disconnect. + + + A status representing a [StreamPeerTCP] that is connecting to a host. + + + A status representing a [StreamPeerTCP] that is connected to a host. + + + A staus representing a [StreamPeerTCP] in error state. + + + diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture.xml new file mode 100644 index 0000000000..c1d90ebf04 --- /dev/null +++ b/doc/classes/StreamTexture.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/String.xml b/doc/classes/String.xml new file mode 100644 index 0000000000..ce3dc1db2f --- /dev/null +++ b/doc/classes/String.xml @@ -0,0 +1,730 @@ + + + + Built-in string class. + + + This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return true if the strings begins with the given string. + + + + + + + Return the bigrams (pairs of consecutive letters) of this string. + + + + + + + Return a copy of the string with special characters escaped using the C language standard. + + + + + + + Return a copy of the string with escaped characters replaced by their meanings according to the C language standard. + + + + + + + Change the case of some letters. Replace underscores with spaces, convert all letters to lowercase then capitalize first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code]. + + + + + + + + + Perform a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater. + + + + + + + Return true if the string is empty. + + + + + + + + + Return true if the strings ends with the given string. + + + + + + + + + Erase [code]chars[/code] characters from the string starting from [code]pos[/code]. + + + + + + + + + + + Find the first occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. + + + + + + + + + Find the last occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. + + + + + + + + + + + Find the first occurrence of a substring but search as case-insensitive, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. + + + + + + + + + + + + + + + + + If the string is a path to a file, return the base directory. + + + + + + + If the string is a path to a file, return the path to the file without the extension. + + + + + + + If the string is a path to a file, return the extension. + + + + + + + If the string is a path to a file, return the file and ignore the base directory. + + + + + + + Hash the string and return a 32 bits integer. + + + + + + + Convert a string containing a hexadecimal number into an int. + + + + + + + + + + + Insert a substring at a given position. + + + + + + + If the string is a path to a file or directory, return true if the path is absolute. + + + + + + + If the string is a path to a file or directory, return true if the path is relative. + + + + + + + + + Check whether this string is a subsequence of the given string. + + + + + + + + + Check whether this string is a subsequence of the given string, without considering case. + + + + + + + Check whether the string contains a valid float. + + + + + + + Check whether the string contains a valid color in HTML notation. + + + + + + + Check whether the string is a valid identifier. As is common in programming languages, a valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit. + + + + + + + Check whether the string contains a valid integer. + + + + + + + Check whether the string contains a valid IP address. + + + + + + + Return a copy of the string with special characters escaped using the JSON standard. + + + + + + + + + Return an amount of characters from the left of the string. + + + + + + + Return the length of the string in characters. + + + + + + + + + Do a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'. + + + + + + + + + Do a simple case insensitive expression match, using ? and * wildcards (see [method match]). + + + + + + + Return the MD5 hash of the string as an array of bytes. + + + + + + + Return the MD5 hash of the string as a string. + + + + + + + + + Perform a case-insensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater. + + + + + + + + + Return the character code at position [code]at[/code]. + + + + + + + + + Format a number to have an exact number of [code]digits[/code] after the decimal point. + + + + + + + + + Format a number to have an exact number of [code]digits[/code] before the decimal point. + + + + + + + Decode a percent-encoded string. See [method percent_encode]. + + + + + + + Percent-encode a string. This is meant to encode parameters in a URL when sending a HTTP GET request and bodies of form-urlencoded POST request. + + + + + + + + + If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code]. + + + + + + + + + + + Replace occurrences of a substring for different ones inside the string. + + + + + + + + + + + Replace occurrences of a substring for different ones inside the string, but search case-insensitive. + + + + + + + + + + + Perform a search for a substring, but start from the end of the string instead of the beginning. + + + + + + + + + + + Perform a search for a substring, but start from the end of the string instead of the beginning. Also search case-insensitive. + + + + + + + + + Return the right side of the string from a given position. + + + + + + + + + + + + + Return the SHA-256 hash of the string as a string. + + + + + + + + + Return the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar. + + + + + + + + + + + Split the string by a divisor string, return an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",". + + + + + + + + + + + Split the string in floats by using a divisor string, return an array of the substrings. Example "1,2.5,3" will return [1,2.5,3] if split by ",". + + + + + + + + + + + Return a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. + + + + + + + + + + + Return part of the string from the position [code]from[/code], with length [code]len[/code]. + + + + + + + Convert the String (which is a character array) to PoolByteArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters. + + + + + + + Convert a string, containing a decimal number, into a [code]float[/code]. + + + + + + + Convert a string, containing an integer number, into an [code]int[/code]. + + + + + + + Return the string converted to lowercase. + + + + + + + Return the string converted to uppercase. + + + + + + + Convert the String (which is an array of characters) to PoolByteArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). + + + + + + + Return a copy of the string with special characters escaped using the XML standard. + + + + + + + Return a copy of the string with escaped characters replaced by their meanings according to the XML standard. + + + + + + diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml new file mode 100644 index 0000000000..74215b6f65 --- /dev/null +++ b/doc/classes/StyleBox.xml @@ -0,0 +1,97 @@ + + + + Base class for drawing stylized boxes for the UI. + + + StyleBox is [Resource] that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the default offset of the margin "margin" (see MARGIN_* enum) of a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded. + + + + + + + + + Return the offset of margin "margin" (see MARGIN_* enum). + + + + + + + Return the minimum size that this stylebox can be shrunk to. + + + + + + + Return the "offset" of a stylebox, this is a helper function, like writing [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code]. + + + + + + + + + + + Set the default offset "offset" of the margin "margin" (see MARGIN_* enum) for a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded. + + + + + + + + + + + Test a position in a rectangle, return whether it passes the mask test. + + + + + + + + + + + + + + + + diff --git a/doc/classes/StyleBoxEmpty.xml b/doc/classes/StyleBoxEmpty.xml new file mode 100644 index 0000000000..f11959c41d --- /dev/null +++ b/doc/classes/StyleBoxEmpty.xml @@ -0,0 +1,17 @@ + + + + Empty stylebox (does not display anything). + + + Empty stylebox (really does not display anything). + + + + + + + + + + diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml new file mode 100644 index 0000000000..b2eaa00b00 --- /dev/null +++ b/doc/classes/StyleBoxFlat.xml @@ -0,0 +1,338 @@ + + + + Customizable Stylebox with a given set of parameters. (no texture required) + + + This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: + - Color + - Border width (individual width for each border) + - Rounded corners (individual radius for each corner) + - Shadow + About corner radius: + Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example: + [codeblock] + height = 30 + corner_radius_top_left = 50 + corner_raidus_bottom_left = 100 + [/codeblock] + The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result: + [codeblock] + corner_radius_top_left: 10 + corner_raidus_bottom_left: 20 + [/codeblock] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Anti Aliasing draws a small ring around edges. This ring fades to transparent. As a result edges look much smoother. This is only noticable when using rounded corners. + + + This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. + + + The background color of the stylebox. + + + When set to true, the border will fade into the background color. + + + Sets the color of the border. + + + Border width for the bottom border. + + + Border width for the left border. + + + Border width for the right border. + + + Border width for the top border. + + + This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius]) into account. + For corner radius smaller than 10: 4-5 should be enough + For corner radius smaller than 30: 8-12 should be enough ... + + + The corner radius of the bottom left corner. When set to 0 the corner is not rounded. + + + The corner radius of the bottom right corner. When set to 0 the corner is not rounded. + + + The corner radius of the top left corner. When set to 0 the corner is not rounded. + + + The corner radius of the top right corner. When set to 0 the corner is not rounded. + + + Toggels drawing of the inner part of the stylebox. + + + Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with border_width_bottom. To draw a border outside the control rect. + + + Expands the stylebox outside of the control rect on the left edge. Useful in combination with border_width_left. To draw a border outside the control rect. + + + Expands the stylebox outside of the control rect on the right edge. Useful in combination with border_width_right. To draw a border outside the control rect. + + + Expands the stylebox outside of the control rect on the top edge. Useful in combination with border_width_top. To draw a border outside the control rect. + + + The color of the shadow. (This has no effect when shadow_size < 1) + + + The shadow size in pixels. + + + + + diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml new file mode 100644 index 0000000000..87aaba2cdd --- /dev/null +++ b/doc/classes/StyleBoxTexture.xml @@ -0,0 +1,217 @@ + + + + Texture Based 3x3 scale style. + + + Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml new file mode 100644 index 0000000000..1e91ee402b --- /dev/null +++ b/doc/classes/SurfaceTool.xml @@ -0,0 +1,226 @@ + + + + Helper tool to create geometry. + + + The [SurfaceTool] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from script. All properties except index need to be added before a call to [method add_vertex]. For example adding vertex colors and UVs looks like + [codeblock] + var st = SurfaceTool.new() + st.begin(Mesh.PRIMITIVE_TRIANGLES) + st.add_color(Color(1, 0, 0)) + st.add_uv(Vector2(0, 0)) + st.add_vertex(Vector3(0, 0, 0)) + [/codeblock] + The [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calls to [method add_uv] or [method add_color] then the last values would be used. + It is very important that vertex attributes are passed [b]before[/b] the call to [method add_vertex], failure to do this will result in an error when committing the vertex information to a mesh. + + + + + + + + + + + + + Add an array of bones for the next Vertex to use. + + + + + + + + + Specify a [Color] for the next Vertex to use. + + + + + + + + + Adds an index to index array if you are using indexed Vertices. Does not need to be called before adding Vertex. + + + + + + + + + Specify a normal for the next Vertex to use. + + + + + + + + + Specify whether current Vertex (if using only Vertex arrays) or current index (if also using index arrays) should utilize smooth normals for normal calculation. + + + + + + + + + Specify a Tangent for the next Vertex to use. + + + + + + + + + + + + + + + + + + + + + + + + + + + Insert a triangle fan made of array data into [Mesh] being constructed. + + + + + + + + + Specify UV Coordinate for next Vertex to use. + + + + + + + + + Specify an optional second set of UV coordinates for next Vertex to use. + + + + + + + + + Specify position of current Vertex. Should be called after specifying other vertex properties (e.g. Color, UV). + + + + + + + + + Specify weight value for next Vertex to use. + + + + + + + + + + + + + + + + + + + + + Called before adding any Vertices. Takes the primitive type as an argument (e.g. Mesh.PRIMITIVE_TRIANGLES). + + + + + + + Clear all information passed into the surface tool so far. + + + + + + + + + Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. + + + + + + + + + + + + + + + + + Removes index array by expanding Vertex array. + + + + + + + Generates normals from Vertices so you do not have to do it manually. + + + + + + + + + + + + + Shrinks Vertex array by creating an index array. Avoids reusing Vertices. + + + + + + + + + Sets [Material] to be used by the [Mesh] you are constructing. + + + + + + diff --git a/doc/classes/TCP_Server.xml b/doc/classes/TCP_Server.xml new file mode 100644 index 0000000000..97115619ad --- /dev/null +++ b/doc/classes/TCP_Server.xml @@ -0,0 +1,52 @@ + + + + TCP Server. + + + TCP Server class. Listens to connections on a port and returns a [StreamPeerTCP] when got a connection. + + + + + + + + + + + Return true if a connection is available for taking. + + + + + + + + + + + Listen on the "port" binding to "bind_address". + If "bind_address" is set as "*" (default), the server will listen on all available addresses (both IPv4 and IPv6). + If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the server will listen on all available addresses matching that IP type. + If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists). + + + + + + + Stop listening. + + + + + + + If a connection is available, return a StreamPeerTCP with the connection/ + + + + + + diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml new file mode 100644 index 0000000000..9dc0775bd8 --- /dev/null +++ b/doc/classes/TabContainer.xml @@ -0,0 +1,232 @@ + + + + Tabbed Container. + + + Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one. + Children controls of this one automatically. + + + + + + + + + + + Return whether the tabs should be visible or hidden. + + + + + + + Return the current tab index that is being shown. + + + + + + + + + + + + + + + + + + + Return the previous tab index that was being shown. + + + + + + + Return tab alignment, from the ALIGN_* enum. + + + + + + + + + Return the current tab control that is being shown. + + + + + + + Return the amount of tabs. + + + + + + + + + + + + + + + + + + + + + + + + + Return the title for the tab. Tab titles are by default the children node name, but this can be overridden. + + + + + + + + + Bring a tab (and the Control it represents) to the front, and hide the rest. + + + + + + + + + + + + + + + + + Set tab alignment, from the ALIGN_* enum. Moves tabs to the left, right or center. + + + + + + + + + + + + + + + + + + + + + Set an icon for a tab. + + + + + + + + + + + Set a title for the tab. Tab titles are by default the children node name, but this can be overridden. + + + + + + + + + Set whether the tabs should be visible or hidden. + + + + + + + + + + + + + + + + + + + + + Emitted only when the current tab changes. + + + + + + + Emitted when a tab is being selected, even if it is the same tab. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml new file mode 100644 index 0000000000..db836d1ae4 --- /dev/null +++ b/doc/classes/Tabs.xml @@ -0,0 +1,263 @@ + + + + Tabs Control. + + + Simple tabs control, similar to [TabContainer] but is only in charge of drawing tabs, not interact with children. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns tab [Rect2] with local position and size. + + + + + + + + + + + + + + + + + + + Rearrange tab. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml new file mode 100644 index 0000000000..8c6226b678 --- /dev/null +++ b/doc/classes/TextEdit.xml @@ -0,0 +1,553 @@ + + + + Multiline text editing control. + + + TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo. + + + + + + + + + + + + + + + + + + + Add color region (given the delimiters) and its colors. + + + + + + + + + + + Add a keyword and its color. + + + + + + + Clear all the syntax coloring information. + + + + + + + Clear the undo history. + + + + + + + Copy the current selection. + + + + + + + Gets whether the text editor caret is blinking. + + + + + + + Gets the text editor caret blink speed. + + + + + + + Return the column the editing cursor is at. + + + + + + + Return the line the editing cursor is at. + + + + + + + Gets whether the text editor caret is in block mode. + + + + + + + + + Set the text editor caret to blink. + + + + + + + + + Set the text editor caret blink speed. Cannot be less then or equal to 0. + + + + + + + + + Set the text editor caret to block mode. + + + + + + + + + + + + + + + + + + + + + + + + + + + Cut the current selection. + + + + + + + + + Return the text of a specific line. + + + + + + + Return the amount of total lines in the text. + + + + + + + + + + + + + Return the selection begin column. + + + + + + + Return the selection begin line. + + + + + + + Return the text inside the selection. + + + + + + + Return the selection end column. + + + + + + + Return the selection end line. + + + + + + + Return the whole text. + + + + + + + + + + + + + + + + + + + + + Insert a given text at the cursor position. + + + + + + + Returns true if highlight all occurrences is enabled. + + + + + + + Return true if the selection is active. + + + + + + + Returns true if line numbers are enabled. + + + + + + + + + + + + + Return true if the syntax coloring is enabled. + + + + + + + + + + + + + + + Paste the current selection. + + + + + + + Perform redo operation. + + + + + + + + + + + + + + + Perform a search inside the text. Search flags can be specified in the SEARCH_* enum. + + + + + + + + + + + + + + + Perform selection, from line/column to line/column. + + + + + + + Select all the text. + + + + + + + + + Set to enable highlighting all occurrences of the current selection. + + + + + + + + + Set the maximum amount of characters editable. + + + + + + + + + Set the text editor as read-only. Text can be displayed but not edited. + + + + + + + + + Set to enable showing line numbers. + + + + + + + + + + + + + + + + + Set to enable the syntax coloring. + + + + + + + + + Set the entire text. + + + + + + + + + + + + + + + + + Enable text wrapping when it goes beyond he edge of what is visible. + + + + + + + Perform undo operation. + + + + + + + + + + + + + + + + + + + + + + + + + + + Emitted when a breakpoint is placed via the breakpoint gutter. + + + + + Emitted when the cursor changes. + + + + + + + + + + + + + + + + + + + Emitted when the text changes. + + + + + + Match case when searching. + + + Match whole words when searching. + + + Search from end to beginning. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml new file mode 100644 index 0000000000..d09236bbc9 --- /dev/null +++ b/doc/classes/Texture.xml @@ -0,0 +1,141 @@ + + + + Texture for 2D and 3D. + + + A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the current texture flags. + + + + + + + Return the texture height. + + + + + + + Return the texture size. + + + + + + + Return the texture width. + + + + + + + + + + + + + + + Change the texture flags. + + + + + + Generate mipmaps, to enable smooth zooming out of the texture. + + + Repeat (instead of clamp to edge). + + + Turn on magnifying filter, to enable smooth zooming in of the texture. + + + Texture is a video surface. + + + Default flags. Generate mipmaps, repeat, and filter are enabled. + + + + + + + + + diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml new file mode 100644 index 0000000000..da1d22bbec --- /dev/null +++ b/doc/classes/TextureButton.xml @@ -0,0 +1,162 @@ + + + + Button that can be themed with textures. + + + Button that can be themed with textures. This is like a regular [Button] but can be themed by assigning textures to it. This button is intended to be easy to theme, however a regular button can expand (that uses styleboxes) and still be better if the interface is expect to have internationalization of texts. + Only the normal texture is required, the others are optional. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml new file mode 100644 index 0000000000..71dcbe3cb8 --- /dev/null +++ b/doc/classes/TextureProgress.xml @@ -0,0 +1,189 @@ + + + + Textured progress bar implementation. + + + [ProgressBar] implementation that is easier to theme (by just passing a few textures). + + + + + + + + + + + + + + + + + + + + + + + Returns true if textures are stretched as nine-patches or false otherwise. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return nine-patch texture offset for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set if textures should be stretched as nine-patches. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set nine-patch texture offset for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml new file mode 100644 index 0000000000..9eaaf56140 --- /dev/null +++ b/doc/classes/TextureRect.xml @@ -0,0 +1,86 @@ + + + + Control that draws a texture. + + + Control that draws a texture. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If [code]true[/code] texture will expand to fit. Default value: [code]false[/code]. + + + Stretch mode of the texture. Use STRETCH_* constants as value. + + + The [Texture] resource for the node. + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml new file mode 100644 index 0000000000..7f52efb600 --- /dev/null +++ b/doc/classes/Theme.xml @@ -0,0 +1,306 @@ + + + + Theme for controls. + + + Theme for skinning controls. Controls can be skinned individually, but for complex applications it's more efficient to just create a global theme that defines everything. This theme can be applied to any [Control], and it and its children will automatically use it. + Theme resources can be alternatively loaded by writing them in a .theme file, see docs for more info. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml new file mode 100644 index 0000000000..2156d04614 --- /dev/null +++ b/doc/classes/Thread.xml @@ -0,0 +1,60 @@ + + + + A unit of execution in a process. + + + A unit of execution in a process. Can run methods on [Object]\ s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects. + + + + + + + + + + + Returns the current [Thread]\ s id, uniquely identifying it among all threads. + + + + + + + Returns true if this [Thread] is currently active. An active [Thread] cannot start work on a new method but can be joined with [method wait_to_finish]. + + + + + + + + + + + + + + + Starts a new [Thread] that runs "method" on object "instance" with "userdata" passed as an argument. The "priority" of the [Thread] can be changed by passing a PRIORITY_* enum. + Returns OK on success, or ERR_CANT_CREATE on failure. + + + + + + + Joins the [Thread] and waits for it to finish. Returns what the method called returned. + + + + + + + + + + + + diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml new file mode 100644 index 0000000000..42774ddf09 --- /dev/null +++ b/doc/classes/TileMap.xml @@ -0,0 +1,537 @@ + + + + Node for 2D tile-based maps. + + + Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. + + + + + + + + + + + Clear all cells. + + + + + + + + + + + Return the tile index of the referenced cell. + + + + + + + Return the cell size. + + + + + + + + + Return the tile index of the cell referenced by a Vector2. + + + + + + + Return true if tiles are to be centered in x coordinate (by default this is false and they are drawn from upper left cell corner). + + + + + + + Return true if tiles are to be centered in y coordinate (by default this is false and they are drawn from upper left cell corner). + + + + + + + Return the collision bounce parameter. + + + + + + + Return the collision friction parameter. + + + + + + + Return the collision layer. + + + + + + + + + + + + + + + Return the collision mask. + + + + + + + + + + + + + + + Return whether the tilemap handles collisions as a kinematic body. + + + + + + + Return the custom transform matrix. + + + + + + + Return the current half offset configuration. + + + + + + + Return the orientation mode. + + + + + + + + + + + + + Return the quadrant size. + + + + + + + Return the tile origin configuration. + + + + + + + Return the current tileset. + + + + + + + Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1). + + + + + + + + + + + + + + + + + + + + + + + + + Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector). + + + + + + + + + + + Return whether the referenced cell is flipped over the X axis. + + + + + + + + + + + Return whether the referenced cell is flipped over the Y axis. + + + + + + + Return the Y sort mode. + + + + + + + + + + + Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument. + Optionally, the tilemap's potential half offset can be ignored. + + + + + + + + + + + + + + + + + + + Set the tile index for the cell referenced by its grid-based X and Y coordinates. + A tile index of -1 clears the cell. + Optionally, the tile can also be flipped over the X and Y coordinates or transposed. + + + + + + + + + Set the cell size. + + + + + + + + + + + + + + + + + Set the tile index for the cell referenced by a Vector2 of grid-based coordinates. + A tile index of -1 clears the cell. + Optionally, the tile can also be flipped over the X and Y axes or transposed. + + + + + + + + + Set tiles to be centered in x coordinate. (by default this is false and they are drawn from upper left cell corner). + + + + + + + + + Set tiles to be centered in y coordinate. (by default this is false and they are drawn from upper left cell corner). + + + + + + + + + Set the collision bounce parameter. Allowable values range from 0 to 1. + + + + + + + + + Set the collision friction parameter. Allowable values range from 0 to 1. + + + + + + + + + Set the collision layer. + Layers are referenced by binary indexes, so allowable values to describe the 20 available layers range from 0 to 2^20-1. + + + + + + + + + + + + + + + + + + + Set the collision masks. + Masks are referenced by binary indexes, so allowable values to describe the 20 available masks range from 0 to 2^20-1. + + + + + + + + + + + + + + + + + + + Set the tilemap to handle collisions as a kinematic body (enabled) or a static body (disabled). + + + + + + + + + Set custom transform matrix, to use in combination with the custom orientation mode. + + + + + + + + + Set a half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument). + Half offset sets every other tile off by a half tile size in the specified direction. + + + + + + + + + Set the orientation mode as square, isometric or custom (use MODE_* constants as argument). + + + + + + + + + + + + + + + + + Set the quadrant size, this optimizes drawing by batching chunks of map at draw/cull time. + Allowed values are integers ranging from 1 to 128. + + + + + + + + + Set the tile origin to the tile center or its top-left corner (use TILE_ORIGIN_* constants as argument). + + + + + + + + + Set the current tileset. + + + + + + + + + Set the Y sort mode. Enabled Y sort mode means that children of the tilemap will be drawn in the order defined by their Y coordinate. + A tile with a higher Y coordinate will therefore be drawn later, potentially covering up the tile(s) above it if its sprite is higher than its cell size. + + + + + + + + + Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument. + + + + + + The custom [Transform2D] to be applied to the TileMap's cells. + + + Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED. + + + The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16. + + + The TileMap's cell size. + + + Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT. + + + If [code]true[/code] the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code]. + + + Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0. + + + Friction value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 1. + + + The collision layer(s) for all colliders in the TileMap. + + + The collision mask(s) for all colliders in the TileMap. + + + If [code]true[/code] TileMap collisions will be handled as a kinematic body. If [code]false[/code] collisions will be handled as static body. Default value: [code]false[/code]. + + + The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE. + + + 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). + + + A [PoolIntArray] containing + + + The assigned [TileSet]. + + + + + + Emitted when a tilemap setting has changed. + + + + + + Returned when a cell doesn't exist. + + + Orthogonal orientation mode. + + + Isometric orientation mode. + + + Custom orientation mode. + + + Half offset on the X coordinate. + + + Half offset on the Y coordinate. + + + Half offset disabled. + + + Tile origin at its top-left corner. + + + Tile origin at its center. + + + + + diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml new file mode 100644 index 0000000000..a858138144 --- /dev/null +++ b/doc/classes/TileSet.xml @@ -0,0 +1,372 @@ + + + + Tile library for tilemaps. + + + A TileSet is a library of tiles for a [TileMap]. It contains a list of tiles, each consisting of a sprite and optional collision shapes. + Tiles are referenced by a unique integer ID. + + + + + + + + + + + Clear all tiles. + + + + + + + + + Create a new tile which will be referenced by the given ID. + + + + + + + + + Find the first tile matching the given name. + + + + + + + Return the ID following the last currently used ID, useful when creating a new tile. + + + + + + + Return an array of all currently used tile IDs. + + + + + + + + + Remove the tile referenced by the given ID. + + + + + + + + + + + + + + + + + + + + + + + Return the light occluder of the tile. + + + + + + + + + Return the material of the tile. + + + + + + + + + Return the name of the tile. + + + + + + + + + Return the navigation polygon of the tile. + + + + + + + + + Return the offset of the tile's navigation polygon. + + + + + + + + + + + + + + + + + Return the offset of the tile's light occluder. + + + + + + + + + Return the tile sub-region in the texture. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the array of shapes of the tile. + + + + + + + + + Return the texture of the tile. + + + + + + + + + Return the texture offset of the tile. + + + + + + + + + + + Set a light occluder for the tile. + + + + + + + + + + + Set the material of the tile. + + + + + + + + + + + Set the name of the tile, for descriptive purposes. + + + + + + + + + + + Set a navigation polygon for the tile. + + + + + + + + + + + Set an offset for the tile's navigation polygon. + + + + + + + + + + + + + + + + + + + + + Set an offset for the tile's light occluder. + + + + + + + + + + + Set the tile sub-region in the texture. This is common in texture atlases. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set an array of shapes for the tile, enabling physics to collide with it. + + + + + + + + + + + Set the texture of the tile. + + + + + + + + + + + Set the texture offset of the tile. + + + + + + diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml new file mode 100644 index 0000000000..c3da651434 --- /dev/null +++ b/doc/classes/Timer.xml @@ -0,0 +1,151 @@ + + + + A countdown timer. + + + Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one shot" mode. + + + + + + + + + + + Return the time left for timeout in seconds if the timer is active, 0 otherwise. + + + + + + + Return the timer's processing mode. + + + + + + + Return the wait time in seconds. + + + + + + + Return true if set to automatically start when entering the scene. + + + + + + + Return true if configured as one-shot. + + + + + + + Return if the timer is paused or not. + + + + + + + + + + + + + + + Set to automatically start when entering the scene. + + + + + + + + + Set as one-shot. If enabled, the timer will stop after timeout, otherwise it will automatically restart. + + + + + + + + + Set whether the timer is paused or not. A paused timer will be inactive until it is unpaused again. + + + + + + + + + Set the timer's processing mode (fixed or idle, use TIMER_PROCESS_* constants as argument). + + + + + + + + + Set wait time in seconds. When the time is over, it will emit the timeout signal. + + + + + + + Start the Timer. + + + + + + + Stop (cancel) the Timer. + + + + + + If [code]true[/code], Timer will automatically start when entering the scene tree. Default value: [code]false[/code]. + + + If [code]true[/code], Timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code]. + + + Processing mode. Uses TIMER_PROCESS_* constants as value. + + + Wait time in seconds. + + + + + + Emitted when the Timer reaches 0. + + + + + + Update the Timer at fixed intervals (framerate processing). + + + Update the Timer during the idle time at each frame. + + + diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml new file mode 100644 index 0000000000..7723dadb83 --- /dev/null +++ b/doc/classes/ToolButton.xml @@ -0,0 +1,46 @@ + + + + Flat button helper class. + + + This is a helper class to generate a flat [Button] (see [method Button.set_flat]), creating a ToolButton is equivalent to: + + [codeblock] + var btn = Button.new() + btn.set_flat(true) + [/codeblock] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml new file mode 100644 index 0000000000..65dc9608fa --- /dev/null +++ b/doc/classes/TouchScreenButton.xml @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml new file mode 100644 index 0000000000..1ab1099646 --- /dev/null +++ b/doc/classes/Transform.xml @@ -0,0 +1,168 @@ + + + + 3D Transformation. 3x4 matrix. + + + Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [Basis] "basis" and an [Vector3] "origin". It is similar to a 3x4 matrix. + + + + + + + + + + + + + + + + + + + Construct the Transform from four [Vector3]. Each axis corresponds to local basis vectors (some of which may be scaled). + + + + + + + + + + + Construct the Transform from a [Basis] and [Vector3]. + + + + + + + + + Construct the Transform from a [Transform2D]. + + + + + + + + + Construct the Transform from a [Quat]. The origin will be Vector3(0, 0, 0). + + + + + + + + + Construct the Transform from a [Basis]. The origin will be Vector3(0, 0, 0). + + + + + + + Returns the inverse of the transfrom, under the assumption that the transformation is composed of rotation, scaling and translation. + + + + + + + + + + + Interpolate to other Transform by weight amount (0-1). + + + + + + + Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). + + + + + + + + + + + Rotate the transform around the up vector to face the target. + + + + + + + Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors. + + + + + + + + + + + Rotate the transform around given axis by phi. The axis must be a normalized vector. + + + + + + + + + Scale the transform by the specified 3D scaling factors. + + + + + + + + + Translate the transform by the specified offset. + + + + + + + + + Transforms the given vector "v" by this transform. + + + + + + + + + Inverse-transforms vector "v" by this transform. + + + + + + The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. + + + The translation offset of the transform. + + + + + diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml new file mode 100644 index 0000000000..5b9629a594 --- /dev/null +++ b/doc/classes/Transform2D.xml @@ -0,0 +1,177 @@ + + + + 2D Transformation. 3x2 matrix. + + + Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a two [Vector2] x, y and [Vector2] "origin". It is similar to a 3x2 matrix. + + + + + + + + + + + + + Constructs the [Transform2D] from a 3D [Transform]. + + + + + + + + + + + + + Constructs the [Transform2D] from 3 [Vector2] consisting of rows x, y and origin. + + + + + + + + + + + Constructs the [Transform2D] from rotation angle in radians and position [Vector2]. + + + + + + + Returns the inverse of the matrix. + + + + + + + + + Transforms the given vector "v" by this transform basis (no translation). + + + + + + + + + Inverse-transforms vector "v" by this transform basis (no translation). + + + + + + + Return the origin [Vector2] (translation). + + + + + + + Return the rotation (in radians). + + + + + + + Return the scale. + + + + + + + + + + + Interpolate to other Transform2D by weight amount (0-1). + + + + + + + Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). + + + + + + + Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors. + + + + + + + + + Rotate the transform by phi. + + + + + + + + + Scale the transform by the specified 2D scaling factors. + + + + + + + + + Translate the transform by the specified offset. + + + + + + + + + Transforms the given vector "v" by this transform. + + + + + + + + + Inverse-transforms the given vector "v" by this transform. + + + + + + The translation offset of the transform. + + + The X axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. + + + The Y axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. + + + + + diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml new file mode 100644 index 0000000000..6580bdf288 --- /dev/null +++ b/doc/classes/Translation.xml @@ -0,0 +1,81 @@ + + + + Language Translation. + + + Translations are resources that can be loaded/unloaded on demand. They map a string to another string. + + + + + + + + + + + + + + + Add a message for translation. + + + + + + + + + Erase a message. + + + + + + + Return the locale of the translation. + + + + + + + + + Return a message for translation. + + + + + + + + + + + + + Return all the messages (keys). + + + + + + + + + Set the locale of the translation. + + + + + + + + + + + + diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml new file mode 100644 index 0000000000..974b0e283f --- /dev/null +++ b/doc/classes/TranslationServer.xml @@ -0,0 +1,60 @@ + + + + Server that manages all translations. Translations can be set to it and removed from it. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml new file mode 100644 index 0000000000..68228ed803 --- /dev/null +++ b/doc/classes/Tree.xml @@ -0,0 +1,487 @@ + + + + Control to show a tree of items. + + + This shows a tree of items that can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like text editing, buttons and popups. It can be useful for structural displaying and interactions. + Trees are built via code, using [TreeItem] objects to create the structure. They have a single root but multiple root can be simulated if a dummy hidden root is added. + [codeblock] + func _ready(): + var tree = Tree.new() + var root = tree.create_item() + tree.set_hide_root(true) + var child1 = tree.create_item(root) + var child2 = tree.create_item(root) + var subchild1 = tree.create_item(child1) + subchild1.set_text(0, "Subchild1") + [/codeblock] + + + + + + + + + + + Get whether the column titles are being shown. + + + + + + + Clear the tree. This erases all of the items. + + + + + + + + + Create an item in the tree and add it as the last child of [code]parent[/code]. If parent is not given, it will be added as the last child of the root, or it'll the be the root itself if the tree is empty. + + + + + + + Make the current selected item visible. This will scroll the tree to make sure the selected item is in sight. + + + + + + + + + + + + + Get whether a right click can select items. + + + + + + + + + Get the column index under the given point. + + + + + + + + + Get the title of the given column. + + + + + + + + + Get the width of the given column in pixels. + + + + + + + Get the amount of columns. + + + + + + + Get the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode]. + + + + + + + Get the flags of the current drop mode. + + + + + + + Get the current edited item. This is only available for custom cell mode. + + + + + + + Get the column of the cell for the current edited icon. This is only available for custom cell mode. + + + + + + + + + + + Get the rectangle area of the the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. + + + + + + + + + Get the tree item at the specified position (relative to the tree origin position). + + + + + + + + + Get the next selected item after the given one. + + + + + + + Get the index of the last pressed button. + + + + + + + Get the root item of the tree. + + + + + + + Get the current scrolling position. + + + + + + + Get the currently selected item. + + + + + + + Get the column number of the current selection. + + + + + + + Get whether the folding arrow is hidden. + + + + + + + + + + + + + + + + + Set whether or not a right mouse button click can select items. + + + + + + + + + + + Set whether a column will have the "Expand" flag of [Control]. + + + + + + + + + + + Set the minimum width of a column. + + + + + + + + + + + Set the title of a column. + + + + + + + + + Set whether the column titles visibility. + + + + + + + + + Set the amount of columns. + + + + + + + + + Set the drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. + + + + + + + + + Set whether the folding arrow should be hidden. + + + + + + + + + Set whether the root of the tree should be hidden. + + + + + + + + + Set the selection mode. Use one of the [code]SELECT_*[/code] constants. + + + + + + + + + + + + + Emitted when a button on the tree was pressed (see [method TreeItem.add_button]). + + + + + Emitted when a cell is selected. + + + + + + + + + + + + + Emitted when a cell with the [code]CELL_MODE_CUSTOM[/code] is clicked to be edited. + + + + + + + Emitted when the right mouse button is pressed if RMB selection is active and the tree is empty. + + + + + Emitted when an item is activated (double-clicked). + + + + + + + Emitted when an item is collapsed by a click on the folding arrow. + + + + + + + + + + + + + Emitted when an item is editted. + + + + + + + + + + + Emitted when an item is selected with right mouse button. + + + + + Emitted when an item is selected with right mouse button. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml new file mode 100644 index 0000000000..48159946fa --- /dev/null +++ b/doc/classes/TreeItem.xml @@ -0,0 +1,535 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml new file mode 100644 index 0000000000..21b85c1d05 --- /dev/null +++ b/doc/classes/TriangleMesh.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml new file mode 100644 index 0000000000..6a4e2f305e --- /dev/null +++ b/doc/classes/Tween.xml @@ -0,0 +1,477 @@ + + + + Node useful for animations with unknown start and end points. + + + Node useful for animations with unknown start and end points, procedural animations, making one node follow another, and other simple behavior. + Because it is easy to get it wrong, here is a quick usage example: + [codeblock] + var tween = get_node("Tween") + tween.interpolate_property(get_node("Node2D_to_move"), "transform/pos", Vector2(0,0), Vector2(100,100), 1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) + tween.start() + [/codeblock] + Some of the methods of this class require a property name. You can get the property name by hovering over the property in the inspector of the editor. + Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an TRANS_* constant, and refers to the way the timing of the animation is handled (you might want to see [code]http://easings.net/[/code] for some examples). The second accepts an EASE_* constant, and controls the where [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transision and easing to pick, you can try different TRANS_* constants with EASE_IN_OUT, and use the one that looks best. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Follow [code]method[/code] of [code]object[/code] and apply the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are animated by calling them with consequitive values. + [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + + + + + + + + + + + + + + + + + + + + + + + + + Follow [code]property[/code] of [code]object[/code] and apply it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Note that [code]target:target_property[/code] would equal [code]object:property[/code] at the end of the tween. + [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + + + + + + + Returns the time needed for all tweens to end in seconds, measured from the start. Thus, if you have two tweens, one ending 10 seconds after the start and the other - 20 seconds, it would return 20 seconds, as by that time all tweens would have finished. + + + + + + + Returns the speed that has been set from editor GUI or [method set_repeat]. + + + + + + + Returns the process mode that has been set from editor GUI or [method set_tween_process_mode] + + + + + + + + + + + + + + + + + + + + + + + Call [code]callback[/code] of [code]object[/code] after [code]duration[/code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback. + + + + + + + + + + + + + + + + + + + + + + + Call [code]callback[/code] of [code]object[/code] after [code]duration[/code] on the main thread (similar to [methog Object.call_deferred). [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback. + + + + + + + + + + + + + + + + + + + + + + + Animate [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values. + [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + + + + + + + + + + + + + + + + + + + + + + + Animate [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. + [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + + + + + + + Returns true if any tweens are currently running, and false otherwise. Note that this method doesn't consider tweens that have ended. + + + + + + + Returns true if repeat has been set from editor GUI or [method set_repeat]. + + + + + + + + + + + Stop animating and completely remove a tween, given its object and property/method pair. Passing empty String as key will remove all tweens for given object. + + + + + + + Stop animating and completely remove all tweens. + + + + + + + + + + + Resets a tween to the initial value (the one given, not the one before the tween), given its object and property/method pair. Passing empty String as key will reset all tweens for given object. + + + + + + + Resets all tweens to their initial values (the ones given, not those before the tween). + + + + + + + + + + + Continue animating a stopped tween, given its object and property/method pair. Passing empty String as key will resume all tweens for given object. + + + + + + + Continue animating all stopped tweens. + + + + + + + + + Seek the animation to the given [code]time[/code] in seconds. + + + + + + + + + Activate/deactivate the tween. You can use this for pausing animations, though [method stop_all] and [method resume_all] might be more fit for this. + + + + + + + + + Make the tween repeat after all tweens have finished. + + + + + + + + + Set the speed multiplier of the tween. Set it to 1 for normal speed, 2 for two times nromal speed, and 0.5 for half of the normal speed. Setting it to 0 would pause the animation, but you might consider using [method set_active] or [method stop_all] and [method resume_all] for this. + + + + + + + + + Set whether the Tween uses [code]_process[/code] or [code]_fixed_process[/code] (accepts TWEEN_PROCESS_IDLE and TWEEN_PROCESS_FIXED constants, respectively). + + + + + + + Start the tween node. You can define tweens both before and after this. + + + + + + + + + + + Stop animating a tween, given its object and property/method pair. Passing empty String as key will stop all tweens for given object. + + + + + + + Stop animating all tweens. + + + + + + + + + + + + + + + + + + + + + + + + + Animate [code]method[/code] of [code]object[/code] from the value returned by [code]initial.initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values. + [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + + + + + + + + + + + + + + + + + + + + + + + + + Animate [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. + [code]trans_type[/code] accepts TRANS_* constants, and is the way the animation is interpolated, while [code]ease_type[/code] accepts EASE_* constants, and controls the place of the interpolation (the beginning, the end, or both). You can read more about them in the class description. + + + + + + + Returns the current time of the tween. + + + + + + + + + + + + + + + This signal is emitted when a tween ends. + + + + + + + + + This signal is emitted when a tween starts. + + + + + + + + + + + + + This signal is emitted each step of the tweening. + + + + + + The [Tween] should use [code]_fixed_process[/code] for timekeeping when this is enabled. + + + The [Tween] should use [code]_process[/code] for timekeeping when this is enabled (default). + + + Means that the animation is interpolated linearly. + + + Means that the animation is interpolated using a sine wave. + + + Means that the animation is interpolated with a quinary (to the power of 5) function. + + + Means that the animation is interpolated with a quartic (to the power of 4) function. + + + Means that the animation is interpolated with a quadratic (to the power of 2) function. + + + Means that the animation is interpolated with an exponential (some number to the power of x) function. + + + Means that the animation is interpolated with elasticity, wiggling around the edges. + + + Means that the animation is interpolated with a cubic (to the power of 3) function. + + + Means that the animation is interpolated with a function using square roots. + + + Means that the animation is interpolated by bouncing at, but never surpassing, the end. + + + Means that the animation is interpolated backing out at edges. + + + Signifies that the interpolation should be focused in the beginning. + + + Signifies that the interpolation should be focused in the end. + + + Signifies that the interpolation should be focused in both ends. + + + Signifies that the interpolation should be focused in both ends, but they should be switched (a bit hard to explain, try it for yourself to be sure). + + + diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml new file mode 100644 index 0000000000..43e0ad7873 --- /dev/null +++ b/doc/classes/UndoRedo.xml @@ -0,0 +1,128 @@ + + + + Helper to manage UndoRedo in the editor or custom tools. + + + Helper to manage UndoRedo in the editor or custom tools. It works by storing calls to functions in both 'do' an 'undo' lists. + Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action. + + + + + + + + + + + + + + + + + + + + + + + + + + + Set a property with a custom value. + + + + + + + + + Add a 'do' reference that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources. + + + + + + + + + + + + + + + + + + + + + + + Undo setting of a property with a custom value. + + + + + + + + + Add an 'undo' reference that will be erased if the 'undo' history is lost. This is useful mostly for nodes removed with the 'do' call (not the 'undo' call!). + + + + + + + Clear the undo/redo history and associated references. + + + + + + + Commit the action. All 'do' methods/properties are called/set when this function is called. + + + + + + + + + + + Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property] and [method add_undo_property]. + + + + + + + Get the name of the current action. + + + + + + + Get the version, each time a new action is committed, the version number of the UndoRedo is increased automatically. + This is useful mostly to check if something changed from a saved version. + + + + + + + + + + + + diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml new file mode 100644 index 0000000000..de544ed031 --- /dev/null +++ b/doc/classes/VBoxContainer.xml @@ -0,0 +1,21 @@ + + + + Vertical box container. + + + Vertical box container. See [BoxContainer]. + + + + + + + + + + + + + + diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml new file mode 100644 index 0000000000..4510ac1e2e --- /dev/null +++ b/doc/classes/VScrollBar.xml @@ -0,0 +1,36 @@ + + + + Vertical version of [ScrollBar], which goes from left (min) to right (max). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml new file mode 100644 index 0000000000..f98473a148 --- /dev/null +++ b/doc/classes/VSeparator.xml @@ -0,0 +1,23 @@ + + + + Vertical version of [Separator]. + + + Vertical version of [Separator]. It is used to separate objects horizontally, though (but it looks vertical!). + + + + + + + + + + + + + + + + diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml new file mode 100644 index 0000000000..e4ba4a19c5 --- /dev/null +++ b/doc/classes/VSlider.xml @@ -0,0 +1,35 @@ + + + + Vertical slider. + + + Vertical slider. See [Slider]. This one goes from left (min) to right (max). + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml new file mode 100644 index 0000000000..aac10841c3 --- /dev/null +++ b/doc/classes/VSplitContainer.xml @@ -0,0 +1,27 @@ + + + + Vertical split container. + + + Vertical split container. See [SplitContainer]. This goes from left to right. + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml new file mode 100644 index 0000000000..914ef10036 --- /dev/null +++ b/doc/classes/Variant.xml @@ -0,0 +1,17 @@ + + + + The most important data type in Godot. + + + A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time, instead they are used mainly for communication, editing, serialization and moving data around. + + + + + + + + + + diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml new file mode 100644 index 0000000000..b2ab83cb07 --- /dev/null +++ b/doc/classes/Vector2.xml @@ -0,0 +1,225 @@ + + + + Vector used for 2D Math. + + + 2-element structure that can be used to represent positions in 2d-space, or any other pair of numeric values. + + + + + + + + + + + + + + + Constructs a new Vector2 from the given x and y. + + + + + + + Returns a new vector with all components in absolute values (i.e. positive). + + + + + + + Returns the result of atan2 when called with the Vector's x and y as parameters (Math::atan2(x,y)). + Be aware that it therefore returns an angle oriented clockwise with regard to the (0, 1) unit vector, and not an angle oriented counter-clockwise with regard to the (1, 0) unit vector (which would be the typical trigonometric representation of the angle when calling Math::atan2(y,x)). + + + + + + + + + Returns the angle in radians between the two vectors. + + + + + + + + + Returns the angle in radians between the line connecting the two points and the x coordinate. + + + + + + + Returns the ratio of X to Y. + + + + + + + + + Bounce returns the vector "bounced off" from the given plane, specified by its normal vector. + + + + + + + + + Returns the vector with a maximum length. + + + + + + + + + + + + + + + Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t". + + + + + + + + + Returns the squared distance to vector "b". Prefer this function over "distance_to" if you need to sort vectors or need the squared distance for some formula. + + + + + + + + + Returns the distance to vector "b". + + + + + + + + + Returns the dot product with vector "b". + + + + + + + Remove the fractional part of x and y. + + + + + + + Returns whether the vector is normalized or not. + + + + + + + Returns the length of the vector. + + + + + + + Returns the squared length of the vector. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. + + + + + + + + + + + Returns the result of the linear interpolation between this vector and "b", by amount "t". + + + + + + + Returns a normalized vector to unit length. + + + + + + + + + Reflects the vector along the given plane, specified by its normal vector. + + + + + + + + + Rotates the vector by "phi" radians. + + + + + + + + + Slide returns the component of the vector along the given plane, specified by its normal vector. + + + + + + + + + Snaps the vector to a grid with the given size. + + + + + + + Returns a perpendicular vector. + + + + + + X component of the vector. + + + Y component of the vector. + + + + + diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml new file mode 100644 index 0000000000..bbe6d16931 --- /dev/null +++ b/doc/classes/Vector3.xml @@ -0,0 +1,253 @@ + + + + Vector class, which performs basic 3D vector math operations. + + + Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations. + + + + + + + + + + + + + + + + + Returns a Vector3 with the given components. + + + + + + + Returns a new vector with all components in absolute values (i.e. positive). + + + + + + + + + + + + + + + + + Bounce returns the vector "bounced off" from the given plane, specified by its normal vector. + + + + + + + Returns a new vector with all components rounded up. + + + + + + + + + Return the cross product with b. + + + + + + + + + + + + + + + Perform a cubic interpolation between vectors pre_a, a, b, post_b (a is current), by the given amount (t). + + + + + + + + + Return the squared distance (distance minus the last square root) to b. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula. + + + + + + + + + Return the distance to b. + + + + + + + + + Return the dot product with b. + + + + + + + Returns a new vector with all components rounded down. + + + + + + + Returns the inverse of the vector. This is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z ) + + + + + + + Returns whether the vector is normalized or not. + + + + + + + Return the length of the vector. + + + + + + + Return the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. + + + + + + + + + + + Linearly interpolates the vector to a given one (b), by the given amount (t). + + + + + + + Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the largest. + + + + + + + Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the smallest. + + + + + + + Return a copy of the normalized vector to unit length. This is the same as v / v.length(). + + + + + + + + + Return the outer product with b. + + + + + + + + + Reflects the vector along the given plane, specified by its normal vector. + + + + + + + + + + + Rotates the vector around some axis by phi radians. The axis must be a normalized vector. + + + + + + + + + Slide returns the component of the vector along the given plane, specified by its normal vector. + + + + + + + + + Return a copy of the vector, snapped to the lowest neared multiple. + + + + + + + Return a diagonal matrix with the vector as main diagonal. + + + + + + X component of the vector. + + + Y component of the vector. + + + Z component of the vector. + + + + + Enumerated value for the X axis. Returned by functions like max_axis or min_axis. + + + Enumerated value for the Y axis. + + + Enumerated value for the Z axis. + + + diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody.xml new file mode 100644 index 0000000000..7a805c2a44 --- /dev/null +++ b/doc/classes/VehicleBody.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example: + [codeblock] + # vehicle is an instance of VehicleBody + var speed = vehicle.get_linear_velocity().length() + [/codeblock] + + + + + + + + + + + + + Return the steering angle (in radians). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the steering angle (in radians). + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml new file mode 100644 index 0000000000..b0e168dfc9 --- /dev/null +++ b/doc/classes/VehicleWheel.xml @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml new file mode 100644 index 0000000000..f376e97064 --- /dev/null +++ b/doc/classes/VideoPlayer.xml @@ -0,0 +1,201 @@ + + + + Control to play video files. + + + This control has the ability to play video streams. The only format accepted is the OGV Theora, so any other format must be converted before using in a project. + + + + + + + + + + + Get the selected audio track (for multitrack videos). + + + + + + + Get the amount of miliseconds to store in buffer while playing. + + + + + + + Get the video stream. + + + + + + + Get the name of the video stream. + + + + + + + Get the current position of the stream, in seconds. + + + + + + + Get the current frame of the video as a [Texture]. + + + + + + + Get the volume of the audio track as a linear value. + + + + + + + Get the volume of the audio track in decibels. + + + + + + + Get whether or not the video is set as autoplay. + + + + + + + Get whether or not the expand property is set. + + + + + + + Get whether or not the video is paused. + + + + + + + Get whether or not the video is playing. + + + + + + + Start the video playback. + + + + + + + + + Set the audio track (for multitrack videos). + + + + + + + + + Set whether this node should start playing automatically. + + + + + + + + + Set the amount of miliseconds to buffer during playback. + + + + + + + + + Set the expand property. If enabled, the video will grow or shrink to fit the player size, otherwise it will play at the stream resolution. + + + + + + + + + Set whether the video should pause the playback. + + + + + + + + + Set the video stream for this player. + + + + + + + + + Set the audio volume as a linear value. + + + + + + + + + Set the audio volume in decibels. + + + + + + + Stop the video playback. + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml new file mode 100644 index 0000000000..c282cdfbd0 --- /dev/null +++ b/doc/classes/VideoStream.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml new file mode 100644 index 0000000000..11b84891a1 --- /dev/null +++ b/doc/classes/Viewport.xml @@ -0,0 +1,654 @@ + + + + Creates a sub-view into the screen. + + + A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too. + Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports. + If a viewport is a child of a [Control], it will automatically take up its same rect and position, otherwise they must be set manually. + Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it. + Also, viewports can be assigned to different screens in case the devices have multiple screens. + Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw. + + + + + + + + + + + Return the 3D world of the viewport, or if no such present, the one of the parent viewport. + + + + + + + Return the 2D world of the viewport. + + + + + + + Return the active 3D camera. + + + + + + + Get the canvas transform of the viewport. + + + + + + + + + + + + + + + + + + + Get the total transform of the viewport. + + + + + + + Get the global canvas transform of the viewport. + + + + + + + Get whether the rendered texture has filters enabled. + + + + + + + Get the mouse position, relative to the viewport. + + + + + + + + + + + + + Get whether picking for all physics objects inside the viewport is enabled. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the viewport rect. If the viewport is child of a control, it will use the same rect as the parent. Otherwise, if the rect is empty, the viewport will use all the allowed space. + + + + + + + Get the size override set with [method set_size_override]. + + + + + + + Get the viewport's texture, for use with various objects that you want to texture with the viewport. + + + + + + + Get when the viewport would be updated, will be one of the [code]UPDATE_*[/code] constants. + + + + + + + + + + + + + Set whether the render target is flipped on the Y axis. + + + + + + + Get the viewport RID from the [VisualServer]. + + + + + + + Return the final, visible rect in global screen coordinates. + + + + + + + Return the 3D world of the viewport. + + + + + + + Return the 2D world of the viewport. + + + + + + + Returs the drag data from the GUI, that was previously returned by [method Control.get_drag_data]. + + + + + + + Returs whether there are shown modals on-screen. + + + + + + + Return whether the viewport lets whatever is behind it to show. + + + + + + + + + + + + + + + + + + + + + Returns whether the viewport sends sounds to the speakers. + + + + + + + Returns whether the viewport sends soundsfrom 2D emitters to the speakers. + + + + + + + Return whether input to the viewport is disabled. + + + + + + + Get the enabled status of the size override set with [method set_size_override]. + + + + + + + Get the enabled status of the size strech override set with [method set_size_override_stretch]. + + + + + + + + + + + + + Return whether the viewport is using a world separate from the parent viewport's world. + + + + + + + + + Makes the viewport send sounds to the speakers. + + + + + + + + + Makes the viewport send sounds from 2D emitters to the speakers. + + + + + + + + + + + + + + + + + Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]\ s. This is relative to the global canvas transform of the viewport. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set whether input to the viewport is disabled. + + + + + + + + + Set the global canvas transform of the viewport. The canvas transform is relative to this. + + + + + + + + + + + + + + + + + + + + + + + + + Enable/disable picking for all physics objects inside the viewport. + + + + + + + + + + + + + + + + + + + + + + + + + + + Set the size of the viewport. + + + + + + + + + + + + + Set the size override of the viewport. If the enable parameter is true, it would use the override, otherwise it would use the default size. If the size parameter is equal to [code](-1, -1)[/code], it won't update the size. + + + + + + + + + Set whether the size override affects stretch as well. + + + + + + + + + + + + + + + + + If this viewport is a child of another viewport, keep the previously drawn background visible. + + + + + + + + + Set when the render target would be updated, using the [code]UPDATE_*[/code] constants + + + + + + + + + + + + + + + + + If true this viewport will be bound to our ARVR Server. + If this is our main Godot viewport our AR/VR output will be displayed on screen. + If output is redirected to an HMD we'll see the output of just one of the eyes without any distortion applied else we'll see the stereo buffer with distortion applied if applicable + If this is an extra viewport output will only work if redirection to an HMD is supported by the interface. The render target will allow you to use the undistorted output for the right eye in the display. + + + + + + + + + Make the viewport use a world separate from the parent viewport's world. + + + + + + + + + Set whether the viewport is flipped on the Y axis. + + + + + + + + + Change the 3D world of the viewport. + + + + + + + + + + + + + + + + + + + + + + + Force update of the 2D and 3D worlds. + + + + + + + Returns whether this viewport is using our ARVR Server + + + + + + + + + Warp the mouse to a position, relative to the viewport. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means. + + + + + + Do not update the render target. + + + Update the render target once, then switch to [code]UPDATE_DISABLED[/code] + + + Update the render target only when it is visible. This is the default value. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml new file mode 100644 index 0000000000..2c00c4f9b2 --- /dev/null +++ b/doc/classes/ViewportContainer.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml new file mode 100644 index 0000000000..4497cade16 --- /dev/null +++ b/doc/classes/ViewportTexture.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml new file mode 100644 index 0000000000..dec2cb4b15 --- /dev/null +++ b/doc/classes/VisibilityEnabler.xml @@ -0,0 +1,51 @@ + + + + Enable certain nodes only when visible. + + + The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself. + + + + + + + + + + + + + Returns whether the specified enabler was set to true or not. + + + + + + + + + + + Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler is not in view. See the constants for enablers and what they affect. + + + + + + + + + + + + This enabler will freeze [RigidBody] nodes. + + + This enabler will pause [AnimationPlayer] nodes. + + + + + diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml new file mode 100644 index 0000000000..899be8993d --- /dev/null +++ b/doc/classes/VisibilityEnabler2D.xml @@ -0,0 +1,70 @@ + + + + Enable certain nodes only when visible. + + + The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler2D itself. + + + + + + + + + + + + + Returns whether the specified enabler was set to true or not. + + + + + + + + + + + Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler2D is not in view. See the constants for enablers and what they affect. + + + + + + + + + + + + + + + + + + + + This enabler will freeze [RigidBody2D] nodes. + + + This enabler will pause [AnimationPlayer] nodes. + + + This enabler will stop [Particles2D] nodes. + + + + + This enabler will stop the parent's _process function. + + + This enabler will stop the parent's _fixed_process function. + + + + + diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml new file mode 100644 index 0000000000..62a79d5ade --- /dev/null +++ b/doc/classes/VisibilityNotifier.xml @@ -0,0 +1,70 @@ + + + + Detect when the node is visible on screen. + + + The VisibilityNotifier is used to notify when its bounding box enters the screen, is visible on the screen, or when it exits the screen. + + + + + + + + + + + Return the visibility bounding box of the VisibilityNotifier. + + + + + + + Return true if any part of the bounding box is on the screen. + + + + + + + + + Set the visibility bounding box of the VisibilityNotifier. + + + + + + + + + + + + + Emitted when the VisibilityNotifier enters a [Camera]'s view. + + + + + + + Emitted when the VisibilityNotifier exits a [Camera]'s view. + + + + + Emitted when the VisibilityNotifier enters the screen. + + + + + Emitted when the VisibilityNotifier exits the screen. + + + + + + diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml new file mode 100644 index 0000000000..5218d4eae4 --- /dev/null +++ b/doc/classes/VisibilityNotifier2D.xml @@ -0,0 +1,70 @@ + + + + Detect when the node is visible on screen. + + + The VisibilityNotifier2D is used to notify when its bounding rectangle enters the screen, is visible on the screen, or when it exits the screen. + + + + + + + + + + + Return the visibility bounding rectangle of the VisibilityNotifier2D. + + + + + + + Return true if any part of the bounding rectangle is on the screen. + + + + + + + + + Set the visibility bounding rectangle of the VisibilityNotifier2D. + + + + + + + + + + + Emitted when the VisibilityNotifier2D enters the screen. + + + + + Emitted when the VisibilityNotifier2D exits the screen. + + + + + + + Emitted when the VisibilityNotifier2D enters a [Viewport]'s view. + + + + + + + Emitted when the VisibilityNotifier2D exits a [Viewport]'s view. + + + + + + diff --git a/doc/classes/VisualInstance.xml b/doc/classes/VisualInstance.xml new file mode 100644 index 0000000000..9df5f2ae7c --- /dev/null +++ b/doc/classes/VisualInstance.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScript.xml b/doc/classes/VisualScript.xml new file mode 100644 index 0000000000..e66689f37a --- /dev/null +++ b/doc/classes/VisualScript.xml @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptBasicTypeConstant.xml b/doc/classes/VisualScriptBasicTypeConstant.xml new file mode 100644 index 0000000000..f622f717f6 --- /dev/null +++ b/doc/classes/VisualScriptBasicTypeConstant.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptBuiltinFunc.xml b/doc/classes/VisualScriptBuiltinFunc.xml new file mode 100644 index 0000000000..1d50e39cc6 --- /dev/null +++ b/doc/classes/VisualScriptBuiltinFunc.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptClassConstant.xml b/doc/classes/VisualScriptClassConstant.xml new file mode 100644 index 0000000000..39e36516fa --- /dev/null +++ b/doc/classes/VisualScriptClassConstant.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptComment.xml b/doc/classes/VisualScriptComment.xml new file mode 100644 index 0000000000..f49d8dec90 --- /dev/null +++ b/doc/classes/VisualScriptComment.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptCondition.xml b/doc/classes/VisualScriptCondition.xml new file mode 100644 index 0000000000..73f1b69c02 --- /dev/null +++ b/doc/classes/VisualScriptCondition.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptConstant.xml b/doc/classes/VisualScriptConstant.xml new file mode 100644 index 0000000000..5058efcc40 --- /dev/null +++ b/doc/classes/VisualScriptConstant.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptConstructor.xml b/doc/classes/VisualScriptConstructor.xml new file mode 100644 index 0000000000..1b3f2e239c --- /dev/null +++ b/doc/classes/VisualScriptConstructor.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptCustomNode.xml b/doc/classes/VisualScriptCustomNode.xml new file mode 100644 index 0000000000..ec442e993c --- /dev/null +++ b/doc/classes/VisualScriptCustomNode.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptDeconstruct.xml b/doc/classes/VisualScriptDeconstruct.xml new file mode 100644 index 0000000000..45fbbb287f --- /dev/null +++ b/doc/classes/VisualScriptDeconstruct.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptEmitSignal.xml b/doc/classes/VisualScriptEmitSignal.xml new file mode 100644 index 0000000000..ba5b63af93 --- /dev/null +++ b/doc/classes/VisualScriptEmitSignal.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptEngineSingleton.xml b/doc/classes/VisualScriptEngineSingleton.xml new file mode 100644 index 0000000000..05782c38b2 --- /dev/null +++ b/doc/classes/VisualScriptEngineSingleton.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptExpression.xml b/doc/classes/VisualScriptExpression.xml new file mode 100644 index 0000000000..1ca943a8a8 --- /dev/null +++ b/doc/classes/VisualScriptExpression.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptFunction.xml b/doc/classes/VisualScriptFunction.xml new file mode 100644 index 0000000000..946231eaad --- /dev/null +++ b/doc/classes/VisualScriptFunction.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptFunctionCall.xml b/doc/classes/VisualScriptFunctionCall.xml new file mode 100644 index 0000000000..f830e75e9f --- /dev/null +++ b/doc/classes/VisualScriptFunctionCall.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptFunctionState.xml b/doc/classes/VisualScriptFunctionState.xml new file mode 100644 index 0000000000..d5c06682ef --- /dev/null +++ b/doc/classes/VisualScriptFunctionState.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptGlobalConstant.xml b/doc/classes/VisualScriptGlobalConstant.xml new file mode 100644 index 0000000000..d859b6b0e9 --- /dev/null +++ b/doc/classes/VisualScriptGlobalConstant.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptIndexGet.xml b/doc/classes/VisualScriptIndexGet.xml new file mode 100644 index 0000000000..c0226b6677 --- /dev/null +++ b/doc/classes/VisualScriptIndexGet.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptIndexSet.xml b/doc/classes/VisualScriptIndexSet.xml new file mode 100644 index 0000000000..440b4801b4 --- /dev/null +++ b/doc/classes/VisualScriptIndexSet.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptInputAction.xml b/doc/classes/VisualScriptInputAction.xml new file mode 100644 index 0000000000..33fee36ac7 --- /dev/null +++ b/doc/classes/VisualScriptInputAction.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptIterator.xml b/doc/classes/VisualScriptIterator.xml new file mode 100644 index 0000000000..74309fcf00 --- /dev/null +++ b/doc/classes/VisualScriptIterator.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptLocalVar.xml b/doc/classes/VisualScriptLocalVar.xml new file mode 100644 index 0000000000..a1da488f7b --- /dev/null +++ b/doc/classes/VisualScriptLocalVar.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptLocalVarSet.xml b/doc/classes/VisualScriptLocalVarSet.xml new file mode 100644 index 0000000000..d388fa83bd --- /dev/null +++ b/doc/classes/VisualScriptLocalVarSet.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptMathConstant.xml b/doc/classes/VisualScriptMathConstant.xml new file mode 100644 index 0000000000..22a13ebd72 --- /dev/null +++ b/doc/classes/VisualScriptMathConstant.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptNode.xml b/doc/classes/VisualScriptNode.xml new file mode 100644 index 0000000000..e026ba1ace --- /dev/null +++ b/doc/classes/VisualScriptNode.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptOperator.xml b/doc/classes/VisualScriptOperator.xml new file mode 100644 index 0000000000..852b828ccb --- /dev/null +++ b/doc/classes/VisualScriptOperator.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptPreload.xml b/doc/classes/VisualScriptPreload.xml new file mode 100644 index 0000000000..4cce5cbdd9 --- /dev/null +++ b/doc/classes/VisualScriptPreload.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptPropertyGet.xml b/doc/classes/VisualScriptPropertyGet.xml new file mode 100644 index 0000000000..c27a8c72a2 --- /dev/null +++ b/doc/classes/VisualScriptPropertyGet.xml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptPropertySet.xml b/doc/classes/VisualScriptPropertySet.xml new file mode 100644 index 0000000000..acf92cb2e1 --- /dev/null +++ b/doc/classes/VisualScriptPropertySet.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptResourcePath.xml b/doc/classes/VisualScriptResourcePath.xml new file mode 100644 index 0000000000..126c53c579 --- /dev/null +++ b/doc/classes/VisualScriptResourcePath.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptReturn.xml b/doc/classes/VisualScriptReturn.xml new file mode 100644 index 0000000000..1da6f79533 --- /dev/null +++ b/doc/classes/VisualScriptReturn.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptSceneNode.xml b/doc/classes/VisualScriptSceneNode.xml new file mode 100644 index 0000000000..dad4c3b9bd --- /dev/null +++ b/doc/classes/VisualScriptSceneNode.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptSceneTree.xml b/doc/classes/VisualScriptSceneTree.xml new file mode 100644 index 0000000000..55e27460ab --- /dev/null +++ b/doc/classes/VisualScriptSceneTree.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptSelect.xml b/doc/classes/VisualScriptSelect.xml new file mode 100644 index 0000000000..3e05ce4330 --- /dev/null +++ b/doc/classes/VisualScriptSelect.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptSelf.xml b/doc/classes/VisualScriptSelf.xml new file mode 100644 index 0000000000..a60f7eee03 --- /dev/null +++ b/doc/classes/VisualScriptSelf.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptSequence.xml b/doc/classes/VisualScriptSequence.xml new file mode 100644 index 0000000000..fed62e59ad --- /dev/null +++ b/doc/classes/VisualScriptSequence.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptSubCall.xml b/doc/classes/VisualScriptSubCall.xml new file mode 100644 index 0000000000..297ec96781 --- /dev/null +++ b/doc/classes/VisualScriptSubCall.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptSwitch.xml b/doc/classes/VisualScriptSwitch.xml new file mode 100644 index 0000000000..95ed737372 --- /dev/null +++ b/doc/classes/VisualScriptSwitch.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptTypeCast.xml b/doc/classes/VisualScriptTypeCast.xml new file mode 100644 index 0000000000..bd034f8339 --- /dev/null +++ b/doc/classes/VisualScriptTypeCast.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptVariableGet.xml b/doc/classes/VisualScriptVariableGet.xml new file mode 100644 index 0000000000..cfa8c8090e --- /dev/null +++ b/doc/classes/VisualScriptVariableGet.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptVariableSet.xml b/doc/classes/VisualScriptVariableSet.xml new file mode 100644 index 0000000000..8c49fa18e4 --- /dev/null +++ b/doc/classes/VisualScriptVariableSet.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptWhile.xml b/doc/classes/VisualScriptWhile.xml new file mode 100644 index 0000000000..b49678582e --- /dev/null +++ b/doc/classes/VisualScriptWhile.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptYield.xml b/doc/classes/VisualScriptYield.xml new file mode 100644 index 0000000000..47fbf2dade --- /dev/null +++ b/doc/classes/VisualScriptYield.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualScriptYieldSignal.xml b/doc/classes/VisualScriptYieldSignal.xml new file mode 100644 index 0000000000..0cf34a531d --- /dev/null +++ b/doc/classes/VisualScriptYieldSignal.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml new file mode 100644 index 0000000000..242fc18ab9 --- /dev/null +++ b/doc/classes/VisualServer.xml @@ -0,0 +1,82 @@ + + + + Server for anything visible. + + + Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. + The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml new file mode 100644 index 0000000000..1071a40c3b --- /dev/null +++ b/doc/classes/WeakRef.xml @@ -0,0 +1,24 @@ + + + + Holds an [Object], but does not contribute to the reference count if the object is a reference. + + + A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GDScript.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to eachother. Without weakrefs, using these classes could lead to memory leaks, since both references keep eachother from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released. + + + + + + + + + + + Returns the [Object] this weakref is referring to. + + + + + + diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml new file mode 100644 index 0000000000..dc95743a58 --- /dev/null +++ b/doc/classes/WindowDialog.xml @@ -0,0 +1,80 @@ + + + + Base class for window dialogs. + + + Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel [Control] that draws a window decoration and allows motion and resizing. + + + + + + + + + + + Return the close [TextureButton]. + + + + + + + + + + + + + Return the title of the window. + + + + + + + + + + + + + + + + + Set the title of the window. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/World.xml b/doc/classes/World.xml new file mode 100644 index 0000000000..f67d6c2005 --- /dev/null +++ b/doc/classes/World.xml @@ -0,0 +1,69 @@ + + + + Class that has everything pertaining to a world. + + + Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml new file mode 100644 index 0000000000..d57117fef0 --- /dev/null +++ b/doc/classes/World2D.xml @@ -0,0 +1,38 @@ + + + + Class that has everything pertaining to a 2D world. + + + Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world. + + + + + + + + + + + Retrieve the [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing. + + + + + + + Retrieve the state of this world's physics space. This allows arbitrary querying for collision. + + + + + + + Retrieve the [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area. + + + + + + diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml new file mode 100644 index 0000000000..24606b59b8 --- /dev/null +++ b/doc/classes/WorldEnvironment.xml @@ -0,0 +1,37 @@ + + + + Sets environment properties for the entire scene + + + The [WorldEnvironment] node can be added to a scene in order to set default [Environment] variables for the scene. The [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time. The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). + + + + + + + + + + + Return the [Environment] currently bound. + + + + + + + + + Set the currently bound [Environment] to the one specified. + + + + + + + + + + diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml new file mode 100644 index 0000000000..6ab84ef345 --- /dev/null +++ b/doc/classes/XMLParser.xml @@ -0,0 +1,173 @@ + + + + Low-level class for creating parsers for XML files. + + + This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low level so it can be applied to any possible schema. + + + + + + + + + + + Get the amount of attributes in the current element. + + + + + + + + + Get the name of the attribute specified by the index in [code]idx[/code] argument. + + + + + + + + + Get the value of the attribute specified by the index in [code]idx[/code] argument. + + + + + + + Get the current line in the parsed file (currently not implemented). + + + + + + + + + Get the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute. + + + + + + + + + Get the value of a certain attribute of the current element by name. This will return an empty [String] if the attribute is not found. + + + + + + + Get the contents of a text node. This will raise an error in any other type of node. + + + + + + + Get the name of the current element node. This will raise an error if the current node type is not [code]NODE_ELEMENT[/code] nor [code]NODE_ELEMENT_END[/code] + + + + + + + Get the byte offset of the current node since the beginning of the file or buffer. + + + + + + + Get the type of the current node. Compare with [code]NODE_*[/code] constants. + + + + + + + + + Check whether or not the current element has a certain attribute. + + + + + + + Check whether the current element is empty (this only works for completely empty tags, e.g. <element \>). + + + + + + + + + Open a XML file for parsing. This returns an error code. + + + + + + + + + Open a XML raw buffer for parsing. This returns an error code. + + + + + + + Read the next node of the file. This returns an error code. + + + + + + + + + Move the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code. + + + + + + + Skips the current section. If the node contains other elements, they will be ignored and the cursor will go to the closing of the current element. + + + + + + There's no node (no file or buffer opened) + + + Element (tag) + + + End of element + + + Text node + + + Comment node + + + CDATA content + + + Unknown node + + + diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml new file mode 100644 index 0000000000..b3411e0971 --- /dev/null +++ b/doc/classes/YSort.xml @@ -0,0 +1,37 @@ + + + + Sort all child nodes based on their Y positions. + + + Sort all child nodes based on their Y positions. The child node must inherit from [CanvasItem] for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position. + + + + + + + + + + + Returns true if the children nodes are being sorted. + + + + + + + + + Set whether the children nodes are sorted or not. (default true) + + + + + + + + + + diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml new file mode 100644 index 0000000000..1d662ba946 --- /dev/null +++ b/doc/classes/bool.xml @@ -0,0 +1,44 @@ + + + + Boolean built-in type + + + Boolean built-in type. + + + + + + + + + + + + + Cast an [int] value to a boolean value, this method will return true if called with an integer value different to 0 and false in other case. + + + + + + + + + Cast a [float] value to a boolean value, this method will return true if called with a floating point value different to 0 and false in other case. + + + + + + + + + Cast a [String] value to a boolean value, this method will return true if called with a non empty string and false in other case. Examples: [code]bool('False')[/code] returns true, [code]bool('')[/code]. returns false + + + + + + diff --git a/doc/classes/float.xml b/doc/classes/float.xml new file mode 100644 index 0000000000..942aa4d55a --- /dev/null +++ b/doc/classes/float.xml @@ -0,0 +1,44 @@ + + + + Float built-in type + + + Float built-in type. + + + + + + + + + + + + + Cast a [bool] value to a floating point value, [code]float(true)[/code] will be equals to 1.0 and [code]float(false)[/code] will be equals to 0.0. + + + + + + + + + Cast an [int] value to a floating point value, [code]float(1)[/code] will be equals to 1.0. + + + + + + + + + Cast a [String] value to a floating point value. This method accepts float value strings like [code] '1.23' [/code] and exponential notation strings for its parameter so calling [code] float('1e3') [/code] will return 1000.0 and calling [code] float('1e-3') [/code] will return -0.001. + + + + + + diff --git a/doc/classes/int.xml b/doc/classes/int.xml new file mode 100644 index 0000000000..7c2267ac9a --- /dev/null +++ b/doc/classes/int.xml @@ -0,0 +1,44 @@ + + + + Integer built-in type. + + + Integer built-in type. + + + + + + + + + + + + + Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0. + + + + + + + + + Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. + + + + + + + + + Cast a [String] value to an integer value, this method is an integer parser from a string, so calling this method with an invalid integer string will return 0, a valid string will be something like [code]'1.7'[/code]. This method will ignore all non-number characters, so calling [code]int('1e3')[/code] will return 13. + + + + + + diff --git a/editor/SCsub b/editor/SCsub index 0e690cf465..839d8e74c1 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -41,11 +41,8 @@ def make_doc_header(target, source, env): src = s.srcnode().abspath f = open_utf8(src, "r") content = f.read() - buf += content[content.find("")] - if len(docbegin) == 0: - docbegin = content[0: content.find(""): len(buf)] + buf+=content + buf = encode_utf8(docbegin + buf + docend) decomp_size = len(buf) import zlib @@ -60,6 +57,7 @@ def make_doc_header(target, source, env): for i in range(len(buf)): g.write(byte_to_str(buf[i]) + ",\n") g.write("};\n") + g.write("#endif") @@ -385,6 +383,18 @@ def make_license_header(target, source, env): g.write("#endif\n") + +def _make_doc_data_class_path(to_path): + g = open_utf8(os.path.join(to_path,"doc_data_class_path.gen.h"), "wb") + g.write("static const int _doc_data_class_path_count="+str(len(env.doc_class_path))+";\n") + g.write("struct _DocDataClassPath { const char* name; const char* path; };\n") + + g.write("static const _DocDataClassPath _doc_data_class_paths["+str(len(env.doc_class_path)+1)+"]={\n"); + for c in env.doc_class_path: + g.write("{\""+c+"\",\""+env.doc_class_path[c]+"\"},\n") + g.write("{NULL,NULL}\n") + g.write("};\n") + if (env["tools"] == "yes"): # Register exporters @@ -401,16 +411,15 @@ if (env["tools"] == "yes"): f.close() # API documentation - docs = ["#doc/base/classes.xml"] - moduledir = os.path.join(os.getcwd(), "..", "modules") - for m in os.listdir(moduledir): - curmodle = os.path.join(moduledir, m) - docfile = os.path.join(curmodle, "classes.xml") - if os.path.isdir(curmodle) and os.path.isfile(docfile): - docs.append(docfile) + docs=[] + print("cdir is: "+env.Dir('#').abspath) + for f in os.listdir(os.path.join(env.Dir('#').abspath,"doc/classes")): + docs.append("#doc/classes/"+f) + + _make_doc_data_class_path(os.path.join(env.Dir('#').abspath,"editor/doc")) + env.Depends("#editor/doc_data_compressed.gen.h", docs) env.Command("#editor/doc_data_compressed.gen.h", docs, make_doc_header) - # Certificates env.Depends("#editor/certs_compressed.gen.h", "#thirdparty/certs/ca-certificates.crt") env.Command("#editor/certs_compressed.gen.h", "#thirdparty/certs/ca-certificates.crt", make_certs_header) diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 6848c43b68..dd2eeaa5c6 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -32,6 +32,7 @@ #include "global_constants.h" #include "io/compression.h" #include "io/marshalls.h" +#include "os/dir_access.h" #include "project_settings.h" #include "scene/resources/theme.h" #include "script_language.h" @@ -50,6 +51,8 @@ void DocData::merge_from(const DocData &p_data) { c.description = cf.description; c.brief_description = cf.brief_description; + c.tutorials = cf.tutorials; + c.demos =cf.demos; for (int i = 0; i < c.methods.size(); i++) { @@ -675,13 +678,62 @@ static Error _parse_methods(Ref &parser, Vector & return OK; } -Error DocData::load(const String &p_path) { +Error DocData::load_classes(const String &p_dir) { - Ref parser = memnew(XMLParser); - Error err = parser->open(p_path); - if (err) + Error err; + DirAccessRef da = DirAccess::open(p_dir,&err); + if (!da) { return err; - return _load(parser); + } + + da->list_dir_begin(); + String path; + bool isdir; + path=da->get_next(&isdir); + while(path!=String()) { + if (!isdir && path.ends_with("xml")) { + Ref parser = memnew(XMLParser); + Error err = parser->open(p_dir.plus_file(path)); + if (err) + return err; + + _load(parser); + } + path=da->get_next(&isdir); + } + + da->list_dir_end(); + + return OK; +} +Error DocData::erase_classes(const String &p_dir) { + + Error err; + DirAccessRef da = DirAccess::open(p_dir,&err); + if (!da) { + return err; + } + + List to_erase; + + da->list_dir_begin(); + String path; + bool isdir; + path=da->get_next(&isdir); + while(path!=String()) { + if (!isdir && path.ends_with("xml")) { + to_erase.push_back(path); + } + path=da->get_next(&isdir); + } + da->list_dir_end(); + + while(to_erase.size()) { + da->remove(to_erase.front()->get()); + to_erase.pop_front(); + } + + return OK; } Error DocData::_load(Ref parser) { @@ -689,22 +741,9 @@ Error DocData::_load(Ref parser) { while ((err = parser->read()) == OK) { - if (parser->get_node_type() == XMLParser::NODE_ELEMENT) { - - if (parser->get_node_name() == "doc") { - break; - } else if (!parser->is_empty()) - parser->skip_section(); // unknown section, likely headers + if (parser->get_node_type() == XMLParser::NODE_ELEMENT && parser->get_node_name() == "?xml") { + parser->skip_section(); } - } - - if (parser->has_attribute("version")) - version = parser->get_attribute_value("version"); - - while ((err = parser->read()) == OK) { - - if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END && parser->get_node_name() == "doc") - break; //end of if (parser->get_node_type() != XMLParser::NODE_ELEMENT) continue; //no idea what this may be, but skipping anyway @@ -739,6 +778,14 @@ Error DocData::_load(Ref parser) { parser->read(); if (parser->get_node_type() == XMLParser::NODE_TEXT) c.description = parser->get_node_data().strip_edges(); + } else if (name == "tutorials") { + parser->read(); + if (parser->get_node_type() == XMLParser::NODE_TEXT) + c.tutorials = parser->get_node_data().strip_edges(); + } else if (name == "demos") { + parser->read(); + if (parser->get_node_type() == XMLParser::NODE_TEXT) + c.demos = parser->get_node_data().strip_edges(); } else if (name == "methods") { Error err = _parse_methods(parser, c.methods); @@ -867,24 +914,33 @@ static void _write_string(FileAccess *f, int p_tablevel, const String &p_string) f->store_string(tab + p_string + "\n"); } -Error DocData::save(const String &p_path) { +Error DocData::save_classes(const String &p_default_path, const Map& p_class_path) { - Error err; - FileAccess *f = FileAccess::open(p_path, FileAccess::WRITE, &err); - - if (err) { - ERR_EXPLAIN("Can't write doc file: " + p_path); - - ERR_FAIL_V(err); - } - - _write_string(f, 0, ""); - _write_string(f, 0, ""); for (Map::Element *E = class_list.front(); E; E = E->next()) { + + ClassDoc &c = E->get(); + String save_path; + if (p_class_path.has(c.name)) { + save_path=p_class_path[c.name]; + } else { + save_path=p_default_path; + } + + Error err; + String save_file = save_path.plus_file(c.name+".xml"); + FileAccessRef f = FileAccess::open(save_file, FileAccess::WRITE, &err); + if (err) { + ERR_EXPLAIN("Can't write doc file: " + save_file); + + ERR_FAIL_V(err); + } + + _write_string(f, 0, ""); + String header = ""); @@ -903,6 +960,14 @@ Error DocData::save(const String &p_path) { if (c.description != "") _write_string(f, 2, c.description.xml_escape()); _write_string(f, 1, ""); + _write_string(f, 1, ""); + if (c.tutorials != "") + _write_string(f, 2, c.tutorials.xml_escape()); + _write_string(f, 1, ""); + _write_string(f, 1, ""); + if (c.demos != "") + _write_string(f, 2, c.demos.xml_escape()); + _write_string(f, 1, ""); _write_string(f, 1, ""); c.methods.sort(); @@ -1035,9 +1100,6 @@ Error DocData::save(const String &p_path) { _write_string(f, 0, ""); } - _write_string(f, 0, ""); - f->close(); - memdelete(f); return OK; } diff --git a/editor/doc/doc_data.h b/editor/doc/doc_data.h index efb4ea3040..5f94fe17f0 100644 --- a/editor/doc/doc_data.h +++ b/editor/doc/doc_data.h @@ -85,6 +85,8 @@ public: String category; String brief_description; String description; + String tutorials; + String demos; Vector methods; Vector signals; Vector constants; @@ -101,8 +103,9 @@ public: void merge_from(const DocData &p_data); void remove_from(const DocData &p_data); void generate(bool p_basic_types = false); - Error load(const String &p_path); - Error save(const String &p_path); + Error load_classes(const String &p_dir); + static Error erase_classes(const String &p_dir); + Error save_classes(const String &p_default_path,const Map& p_class_path); Error load_compressed(const uint8_t *p_data, int p_compressed_size, int p_uncompressed_size); }; diff --git a/main/main.cpp b/main/main.cpp index 8eb80fe6ba..58b5a6a68f 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -60,6 +60,7 @@ #include "editor/doc/doc_data.h" #include "editor/editor_node.h" #include "editor/project_manager.h" +#include "editor/doc/doc_data_class_path.gen.h" #endif #include "io/file_access_network.h" @@ -74,6 +75,7 @@ #include "translation.h" #include "version.h" + static ProjectSettings *globals = NULL; static Engine *engine = NULL; static InputMap *input_map = NULL; @@ -1143,26 +1145,47 @@ bool Main::start() { #ifdef TOOLS_ENABLED if (doc_tool != "") { + { + DirAccessRef da = DirAccess::open(doc_tool); + if (!da) { + ERR_EXPLAIN("Argument supplied to --doctool must be a base godot build directory"); + ERR_FAIL_V(false); + } + } DocData doc; doc.generate(doc_base); - DocData docsrc; - if (docsrc.load(doc_tool) == OK) { - print_line("Doc exists. Merging.."); - doc.merge_from(docsrc); - } else { - print_line("No Doc exists. Generating empty."); - } - for (List::Element *E = removal_docs.front(); E; E = E->next()) { - DocData rmdoc; - if (rmdoc.load(E->get()) == OK) { - print_line(String("Removing classes in ") + E->get()); - doc.remove_from(rmdoc); + DocData docsrc; + Map doc_data_classes; + Set checked_paths; + print_line("Loading docs.."); + + for(int i=0;i<_doc_data_class_path_count;i++) { + String path = doc_tool.plus_file(_doc_data_class_paths[i].path); + String name = _doc_data_class_paths[i].name; + doc_data_classes[name]=path; + if (!checked_paths.has(path)) { + checked_paths.insert(path); + docsrc.load_classes(path); + print_line("Loading docs from: "+path); } } - doc.save(doc_tool); + String index_path = doc_tool.plus_file("doc/classes"); + docsrc.load_classes(index_path); + checked_paths.insert(index_path); + print_line("Loading docs from: "+index_path); + + print_line("Merging docs.."); + doc.merge_from(docsrc); + for (Set::Element *E=checked_paths.front();E;E=E->next()) { + print_line("Erasing old docs at: "+E->get()); + DocData::erase_classes(E->get()); + } + + print_line("Generating new docs.."); + doc.save_classes(index_path,doc_data_classes); return false; } diff --git a/modules/gridmap/config.py b/modules/gridmap/config.py index 5698a37295..b3dbb9f46a 100644 --- a/modules/gridmap/config.py +++ b/modules/gridmap/config.py @@ -6,3 +6,9 @@ def can_build(platform): def configure(env): pass + +def get_doc_classes(): + return ["GridMap"] + +def get_doc_path(): + return "doc_classes" diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml new file mode 100644 index 0000000000..3676570ec1 --- /dev/null +++ b/modules/gridmap/doc_classes/GridMap.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/gridmap/doc_classes/README.md b/modules/gridmap/doc_classes/README.md new file mode 100644 index 0000000000..b1ec9058c8 --- /dev/null +++ b/modules/gridmap/doc_classes/README.md @@ -0,0 +1 @@ +Doc classes will appear here when generating \ No newline at end of file