diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 100ecc8329f..3e3a170d2a9 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -89,18 +89,6 @@ - Assert that the condition is true. If the condition is false a fatal error is generated and the program is halted. - Useful for debugging to make sure a value is always true. - [codeblock] - # Speed should always be between 0 and 20 - speed = -10 - # Is true - assert(speed < 20) - # Is false and program stops - assert(speed >= 0) - # or simply - assert(speed >= 0 && speed < 20) - [/codeblock] @@ -109,11 +97,6 @@ - Returns the arc tangent of 's' in radians. Use to get the angle of tangent 's'. Notice that because of the sign ambiguity, the function cannot determine with certainty in which quadrant the angle falls only by its tangent value. See [method atan2] for an alternative that takes a fractional argument instead. - [codeblock] - # a is 0.463648 - a = atan(0.5) - [/codeblock] @@ -319,10 +302,6 @@ 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. - [codeblock] - # a is 2.71828 - a = exp(2) - [/codeblock] @@ -332,12 +311,6 @@ Returns the largest integer value (rounded down) that is less than or equal to 's'. - [codeblock] - # a is 2 - a = floor(2.99) - # a is -3 - a = floor(-2.99) - [/codeblock] @@ -362,26 +335,6 @@ - Returns the floating-point remainder of x/y that wraps equally in positive and negative. - [codeblock] - var i = -10; - while i < 0: - prints(i, fposmod(i, 10)) - i += 1 - [/codeblock] - Produces: - [codeblock] - -10 10 - -9 1 - -8 2 - -7 3 - -6 4 - -5 5 - -4 6 - -3 7 - -2 8 - -1 9 - [/codeblock] @@ -392,15 +345,6 @@ - Returns a reference to the specified function 'funcname' in object 'instance'. - [codeblock] - a = funcref(self, "foo") - a.call_func() - - func foo(): - print("bar") - [/codeblock] - Prints out "bar". This is a trivial example, the real power is that variable 'a' can be passed around to functions. @@ -471,7 +415,7 @@ - + @@ -480,7 +424,7 @@ - + @@ -956,7 +900,7 @@ 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. @@ -2245,7 +2189,7 @@ - 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. + 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. @@ -2254,7 +2198,7 @@ - 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. + 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. @@ -2302,6 +2246,12 @@ If active, returns the name of the associated controller if provided by the AR/VR SDK used. + + + + + + @@ -2387,7 +2337,7 @@ - Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform. + Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform. @@ -2513,14 +2463,20 @@ 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. + 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 this is a controller that is being tracked the controller will also be represented by a joystick entry with this id. @@ -2576,6 +2532,12 @@ + + + + + + @@ -2767,13 +2729,8 @@ - If true we ignore the tilt of the device and we don't reset the tilt. This means that when the player is looking down we don't counter this and the player will still look down in game. If this is false the player will look straight ahead even when looking down. - The direction in which the player looks is centered so the player looks to negative Z regardless of where the player is looking in the real world. - This is a really important setting. When true we keep the height information given by our tracking. - You should set this to true when you are using room scale tracking and want your player to freely walk around the room, be able to crouch, etc. Your ARVROrigin should be placed on the floor of your scene in this scenario. - You should set this to false in all other situations. The current location of the HMD will become your 0,0,0 location and you should place your ARVROrigin point where your player currently is positioned. Use this when room scale is not available or when your making a driving or flying sim and you want to ensure the HMD is centered in your cockpit. This is a really important function to understand correctly. AR and VR platforms all handle positioning slightly differently. @@ -2827,6 +2784,8 @@ + + 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. @@ -2834,6 +2793,10 @@ + + + + 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). @@ -2888,7 +2851,7 @@ - Called when estimating the cost between a point and the path's ending point. + Called when estimating the cost between a point and the path's ending point. @@ -3053,6 +3016,12 @@ Returns the weight scale of the point associated with the given id. + + + + + + @@ -5746,7 +5715,7 @@ - + Set the space override mode. This mode controls how an area affects gravity and damp. @@ -5759,49 +5728,49 @@ - + 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. @@ -5888,11 +5857,21 @@ - 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. + + 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. + @@ -5992,6 +5971,12 @@ Return the amount of times an element is in the array. + + + + + + @@ -6256,6 +6241,22 @@ Return the length in vertices of the vertex array in the requested surface (see [method add_surface]). + + + + + + + + + + + + + + + + @@ -8343,7 +8344,7 @@ - + @@ -8509,7 +8510,7 @@ - + @@ -8817,7 +8818,7 @@ - + @@ -9509,7 +9510,7 @@ - Returns the amount of bitmap elements that are set to true. + Returns the amount of bitmap elements that are set to true. @@ -9895,7 +9896,7 @@ 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. @@ -12873,19 +12874,6 @@ [/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]. - - @@ -12912,6 +12900,19 @@ [/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]. + + @@ -13091,7 +13092,7 @@ - Set new color to ColorRect. + Set new color to ColorRect. [codeblock] var cr = get_node("colorrect_node") @@ -15740,6 +15741,12 @@ 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. + + + + + + @@ -15760,6 +15767,14 @@ + + + + + + + + @@ -15774,6 +15789,10 @@ + + + + @@ -15792,6 +15811,10 @@ + + + + @@ -18848,7 +18871,7 @@ - + @@ -18856,9 +18879,11 @@ - + - + + + @@ -22691,7 +22716,7 @@ 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. - + @@ -26400,8 +26425,6 @@ - - @@ -29884,6 +29907,18 @@ 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. + + + + + + + + + + + + @@ -40347,6 +40382,12 @@ + + + + + + @@ -43935,7 +43976,7 @@ 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 '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. @@ -45172,7 +45213,6 @@ - If true, preserve existing script instances and subclasses. Reloads the script's class implementation. Returns an error code. @@ -53389,7 +53429,7 @@ 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 + A [PoolIntArray] containing The assigned [TileSet]. @@ -57600,6 +57640,12 @@ Get the enabled status of the size strech override set with [method set_size_override_stretch]. + + + + + + @@ -57758,6 +57804,14 @@ Set whether the size override affects stretch as well. + + + + + + + + @@ -57876,6 +57930,8 @@ + + @@ -58823,7 +58879,7 @@ - + @@ -58895,7 +58951,7 @@ - + @@ -59267,7 +59323,7 @@ - + @@ -59533,7 +59589,7 @@ - + @@ -59723,7 +59779,7 @@ - + diff --git a/main/main.cpp b/main/main.cpp index 1295cd73b52..8eb80fe6bab 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -177,7 +177,7 @@ void Main::print_help(const char *p_binary) { OS::get_singleton()->print(" -w, --windowed Request windowed mode.\n"); OS::get_singleton()->print(" --resolution x Request window resolution.\n"); OS::get_singleton()->print(" --position , Request window position.\n"); - OS::get_singleton()->print(" --low-dpi Force low-DPI mode (macOS only).\n"); + OS::get_singleton()->print(" --low-dpi Force low-DPI mode (macOS and Windows only).\n"); OS::get_singleton()->print(" --no-window Disable window creation (Windows only). Useful together with --script.\n"); OS::get_singleton()->print("\n");