diff options
Diffstat (limited to 'doc')
109 files changed, 1822 insertions, 445 deletions
diff --git a/doc/Makefile b/doc/Makefile index 4914c657d2..d68c66f8eb 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,5 +1,5 @@ BASEDIR = $(CURDIR) -CLASSES = $(BASEDIR)/base/classes.xml +CLASSES = $(BASEDIR)/classes/ $(BASEDIR)/../modules/ OUTPUTDIR = $(BASEDIR)/_build TOOLSDIR = $(BASEDIR)/tools diff --git a/doc/classes/@Global Scope.xml b/doc/classes/@Global Scope.xml index a8fd377ecf..d8c9a57a88 100644 --- a/doc/classes/@Global Scope.xml +++ b/doc/classes/@Global Scope.xml @@ -1013,7 +1013,7 @@ </constant> <constant name="ERR_TIMEOUT" value="24"> </constant> - <constant name="ERR_CANT_AQUIRE_RESOURCE" value="28"> + <constant name="ERR_CANT_ACQUIRE_RESOURCE" value="28"> </constant> <constant name="ERR_INVALID_DATA" value="30"> </constant> diff --git a/doc/classes/@VisualScript.xml b/doc/classes/@VisualScript.xml index 2392e3ecca..fe40bc45e9 100644 --- a/doc/classes/@VisualScript.xml +++ b/doc/classes/@VisualScript.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="@VisualScript" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Built-in visual script functions. </brief_description> <description> + A list of built-in visual script functions, see [VisualScriptBuiltinFunc] and [VisualScript]. </description> <tutorials> </tutorials> diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml index 4ff39390b2..6e11034073 100644 --- a/doc/classes/ARVRAnchor.xml +++ b/doc/classes/ARVRAnchor.xml @@ -34,6 +34,13 @@ Returns true if the anchor is being tracked and false if no anchor with this id is currently known. </description> </method> + <method name="get_plane" qualifiers="const"> + <return type="Plane"> + </return> + <description> + Returns a plane aligned with our anchor, handy for intersection testing + </description> + </method> <method name="get_size" qualifiers="const"> <return type="Vector3"> </return> diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index fad9571628..1c2e761b57 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -12,6 +12,20 @@ <demos> </demos> <methods> + <method name="get_anchor_detection_is_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns true if achor detection is enabled (AR only). + </description> + </method> + <method name="get_capabilities" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns a combination of flags providing information about the capabilities of this interface. + </description> + </method> <method name="get_name" qualifiers="const"> <return type="String"> </return> @@ -26,11 +40,11 @@ Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform. </description> </method> - <method name="hmd_is_present"> - <return type="bool"> + <method name="get_tracking_status" qualifiers="const"> + <return type="int" enum="ARVRInterface.Tracking_status"> </return> <description> - Returns true if an HMD is available for this interface. + If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking. </description> </method> <method name="initialize"> @@ -51,34 +65,45 @@ Returns true if this interface is active. </description> </method> - <method name="is_installed"> + <method name="is_primary"> <return type="bool"> </return> <description> - 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). </description> </method> - <method name="is_primary"> + <method name="is_stereo"> <return type="bool"> </return> <description> - Returns true if this interface is currently the primary interface (the interface responsible for showing the output). + Returns true if the current output of this interface is in stereo. </description> </method> - <method name="set_is_primary"> + <method name="set_anchor_detection_is_enabled"> <return type="void"> </return> <argument index="0" name="enable" type="bool"> </argument> <description> - Set this interface to the primary interface (unset the old one). + Enables anchor detection, this is used on AR interfaces and enables the extra logic that will detect planes, features, objects, etc. and adds/modifies anchor points. </description> </method> - <method name="supports_hmd"> - <return type="bool"> + <method name="set_is_initialized"> + <return type="void"> + </return> + <argument index="0" name="initialized" type="bool"> + </argument> + <description> + Initialise/uninitilise this interface (same effect as calling intialize/uninitialize). + </description> + </method> + <method name="set_is_primary"> + <return type="void"> </return> + <argument index="0" name="enable" type="bool"> + </argument> <description> - Returns true if this interface supports HMDs and by extension uses stereo scopic rendering. + Set this interface to the primary interface (unset the old one). </description> </method> <method name="uninitialize"> @@ -90,10 +115,32 @@ </method> </methods> <members> - <member name="primary" type="bool" setter="set_is_primary" getter="is_primary"> + <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled"> + On an AR interface, is our anchor detection enabled? + </member> + <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized"> + Has this interface been initialized? + </member> + <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary"> + Is this our primary interface? </member> </members> <constants> + <constant name="ARVR_NONE" value="0"> + No ARVR capabilities. + </constant> + <constant name="ARVR_MONO" value="1"> + This interface can work with normal rendering output (non-HMD based AR). + </constant> + <constant name="ARVR_STEREO" value="2"> + This interface supports stereoscopic rendering. + </constant> + <constant name="ARVR_AR" value="4"> + This interface support AR (video background and real world tracking). + </constant> + <constant name="ARVR_EXTERNAL" value="8"> + This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of get_recommended_render_targetsize. Using a seperate viewport node frees up the main viewport for other purposes. + </constant> <constant name="EYE_MONO" value="0"> Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. </constant> @@ -103,5 +150,20 @@ <constant name="EYE_RIGHT" value="2"> Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information. </constant> + <constant name="ARVR_NORMAL_TRACKING" value="0"> + Tracking is behaving as expected. + </constant> + <constant name="ARVR_EXCESSIVE_MOTION" value="1"> + Tracking is hindered by excessive motion, player is moving faster then tracking can keep up. + </constant> + <constant name="ARVR_INSUFFICIENT_FEATURES" value="2"> + Tracking is hindered by insufficient features, it's too dark (for camera based tracking), player is blocked, etc. + </constant> + <constant name="ARVR_UNKNOWN_TRACKING" value="3"> + We don't know the status of the tracking or this interface does not provide feedback. + </constant> + <constant name="ARVR_NOT_TRACKING" value="4"> + Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.) + </constant> </constants> </class> diff --git a/doc/classes/ARVRScriptInterface.xml b/doc/classes/ARVRScriptInterface.xml index 54415539e0..182147a015 100644 --- a/doc/classes/ARVRScriptInterface.xml +++ b/doc/classes/ARVRScriptInterface.xml @@ -29,6 +29,20 @@ Outputs a finished render buffer to the AR/VR device for the given eye. </description> </method> + <method name="get_anchor_detection_is_enabled" qualifiers="virtual"> + <return type="bool"> + </return> + <description> + Returns true if achor detection is enabled (AR only). + </description> + </method> + <method name="get_capabilities" qualifiers="virtual"> + <return type="int"> + </return> + <description> + Returns a combination of flags providing information about the capabilities of this interface. + </description> + </method> <method name="get_recommended_render_targetsize" qualifiers="virtual"> <return type="Vector2"> </return> @@ -36,6 +50,13 @@ Returns the size at which we should render our scene to get optimal quality on the output device. </description> </method> + <method name="get_tracking_status" qualifiers="virtual"> + <return type="int"> + </return> + <description> + If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking. + </description> + </method> <method name="get_transform_for_eye" qualifiers="virtual"> <return type="Transform"> </return> @@ -47,13 +68,6 @@ Get the location and orientation transform used when rendering a specific eye. </description> </method> - <method name="hmd_is_present" qualifiers="virtual"> - <return type="bool"> - </return> - <description> - Return true is an HMD is available. - </description> - </method> <method name="initialize" qualifiers="virtual"> <return type="bool"> </return> @@ -68,13 +82,6 @@ Returns true if this interface has been initialized and is active. </description> </method> - <method name="is_installed" qualifiers="virtual"> - <return type="bool"> - </return> - <description> - Returns true if the required middleware is installed. - </description> - </method> <method name="is_stereo" qualifiers="virtual"> <return type="bool"> </return> @@ -89,11 +96,13 @@ Gets called before rendering each frame so tracking data gets updated in time. </description> </method> - <method name="supports_hmd" qualifiers="virtual"> - <return type="bool"> + <method name="set_anchor_detection_is_enabled" qualifiers="virtual"> + <return type="void"> </return> + <argument index="0" name="enabled" type="bool"> + </argument> <description> - Returns true if this interface supports HMDs. + Enables anchor detection, this is used on AR interfaces and enables the extra logic that will detect planes, features, objects, etc. and adds/modifies anchor points. </description> </method> <method name="uninitialize" qualifiers="virtual"> diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index 282f25bec9..6a7262bd14 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -20,6 +20,22 @@ Mostly exposed for GDNative based interfaces, this is called to register an available interface with the AR/VR server. </description> </method> + <method name="center_on_hmd"> + <return type="void"> + </return> + <argument index="0" name="ignore_tilt" type="bool"> + </argument> + <argument index="1" name="keep_height" type="bool"> + </argument> + <description> + 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 center our tracker on the location of the HMD, 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. + </description> + </method> <method name="find_interface" qualifiers="const"> <return type="ARVRInterface"> </return> @@ -84,22 +100,6 @@ Removes a registered interface, again exposed mostly for GDNative based interfaces. </description> </method> - <method name="request_reference_frame"> - <return type="void"> - </return> - <argument index="0" name="ignore_tilt" type="bool"> - </argument> - <argument index="1" name="keep_height" type="bool"> - </argument> - <description> - 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. - </description> - </method> <method name="set_primary_interface"> <return type="void"> </return> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 4244e66a35..f87a40b8aa 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -92,8 +92,10 @@ </methods> <members> <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok"> + If [code]true[/code] the dialog is hidden when accepted. Default value: [code]true[/code]. </member> <member name="dialog_text" type="String" setter="set_text" getter="get_text"> + The text displayed by this dialog. </member> </members> <signals> diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml index f8663e90e0..dce7bf283a 100644 --- a/doc/classes/AnimatedSprite.xml +++ b/doc/classes/AnimatedSprite.xml @@ -4,7 +4,7 @@ Sprite node that can use multiple textures for animation. </brief_description> <description> - Sprite node that can use multiple textures for animation. + Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel. </description> <tutorials> </tutorials> @@ -149,31 +149,39 @@ </methods> <members> <member name="animation" type="String" setter="set_animation" getter="get_animation"> + The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered"> + If [code]true[/code] texture will be centered. Default value: [code]true[/code]. </member> <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> + If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> + If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame"> + The displayed animation frame's index. </member> <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames"> + The [SpriteFrames] resource containing the animation(s). </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + The texture's drawing offset. </member> <member name="playing" type="bool" setter="_set_playing" getter="_is_playing"> + If [code]true[/code] the [member animation] is currently playing. </member> </members> <signals> <signal name="animation_finished"> <description> - 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 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. </description> </signal> <signal name="frame_changed"> <description> - Emitted when frame is changed. + Emitted when [member frame] changed. </description> </signal> </signals> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 4e28f7de8d..b0bb7bb6ab 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.0.alpha.custom_build"> <brief_description> + 2D sprite node in 3D world, that can use multiple 2D textures for animation. </brief_description> <description> + Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel. </description> <tutorials> </tutorials> @@ -83,18 +85,22 @@ </methods> <members> <member name="animation" type="String" setter="set_animation" getter="get_animation"> + The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame"> + The displayed animation frame's index. </member> <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames"> + The [SpriteFrames] resource containing the animation(s). </member> <member name="playing" type="bool" setter="_set_playing" getter="_is_playing"> + If [code]true[/code] the [member animation] is currently playing. </member> </members> <signals> <signal name="frame_changed"> <description> - Emitted when frame is changed. + Emitted when [member frame] changed. </description> </signal> </signals> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 6cb4fd5b17..d853345268 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -368,9 +368,9 @@ </argument> <argument index="1" name="time" type="float"> </argument> - <argument index="2" name="loc" type="Vector3"> + <argument index="2" name="location" type="Vector3"> </argument> - <argument index="3" name="rot" type="Quat"> + <argument index="3" name="rotation" type="Quat"> </argument> <argument index="4" name="scale" type="Vector3"> </argument> diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index c59bbee084..8797575038 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Area" inherits="CollisionObject" category="Core" version="3.0.alpha.custom_build"> <brief_description> - General purpose area detection and influence for 3D physics. + General purpose area node for detection and 3D physics influence. </brief_description> <description> - 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. + 3D area that detects [CollisionObject] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). </description> <tutorials> </tutorials> @@ -88,14 +88,14 @@ <return type="Array"> </return> <description> - Return a list of the areas that are totally or partially inside this area. + Returns a list of intersecting [Area]\ s. </description> </method> <method name="get_overlapping_bodies" qualifiers="const"> <return type="Array"> </return> <description> - Return a list of the bodies ([PhysicsBody]) that are totally or partially inside this area. + Returns a list of intersecting [PhysicsBody]\ s. </description> </method> <method name="get_priority" qualifiers="const"> @@ -169,7 +169,7 @@ <argument index="0" name="area" type="Node"> </argument> <description> - Return whether the area passed is totally or partially inside this area. + If [code]true[/code] the given area overlaps the Area. </description> </method> <method name="overlaps_body" qualifiers="const"> @@ -178,7 +178,7 @@ <argument index="0" name="body" type="Node"> </argument> <description> - Return whether the body passed is totally or partially inside this area. + If [code]true[/code] the given body overlaps the Area. </description> </method> <method name="set_angular_damp"> @@ -374,30 +374,43 @@ </methods> <members> <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp"> + The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus"> + The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus"> + If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> + The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code]. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + The physics layers this area scans to determine collision detection. </member> <member name="gravity" type="float" setter="set_gravity" getter="get_gravity"> + The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. </member> <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale"> + The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. </member> <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point"> + If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code]. </member> <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector"> + The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction. </member> <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp"> + The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable"> + If [code]true[/code] other monitoring areas can detect this area. Default value: [code]true[/code]. </member> <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring"> + If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. </member> <member name="priority" type="float" setter="set_priority" getter="get_priority"> + The area's priority. Higher priority areas are processed first. Default value: 0. </member> <member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount"> </member> @@ -408,6 +421,7 @@ <member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity"> </member> <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride"> + Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values. </member> </members> <signals> @@ -415,14 +429,14 @@ <argument index="0" name="area" type="Object"> </argument> <description> - This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area. + Emitted when another area enters. </description> </signal> <signal name="area_exited"> <argument index="0" name="area" type="Object"> </argument> <description> - This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area. + Emitted when another area exits. </description> </signal> <signal name="area_shape_entered"> @@ -435,7 +449,7 @@ <argument index="3" name="self_shape" type="int"> </argument> <description> - 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. + Emitted when another area enters, reporting which areas overlapped. </description> </signal> <signal name="area_shape_exited"> @@ -448,21 +462,21 @@ <argument index="3" name="self_shape" type="int"> </argument> <description> - 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. + Emitted when another area exits, reporting which areas were overlapping. </description> </signal> <signal name="body_entered"> <argument index="0" name="body" type="Object"> </argument> <description> - This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area. + Emitted when a [PhysicsBody] object enters. </description> </signal> <signal name="body_exited"> <argument index="0" name="body" type="Object"> </argument> <description> - This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area. + Emitted when a [PhysicsBody2D] object exits. </description> </signal> <signal name="body_shape_entered"> @@ -475,7 +489,7 @@ <argument index="3" name="area_shape" type="int"> </argument> <description> - 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. + Emitted when a [PhysicsBody2D] object enters, reporting which shapes overlapped. </description> </signal> <signal name="body_shape_exited"> @@ -488,20 +502,25 @@ <argument index="3" name="area_shape" type="int"> </argument> <description> - 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. + Emitted when a [PhysicsBody2D] object exits, reporting which shapes were overlapping. </description> </signal> </signals> <constants> <constant name="SPACE_OVERRIDE_DISABLED" value="0"> + This area does not affect gravity/damping. </constant> <constant name="SPACE_OVERRIDE_COMBINE" value="1"> + This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order). </constant> <constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2"> + This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order), ignoring any lower priority areas. </constant> <constant name="SPACE_OVERRIDE_REPLACE" value="3"> + This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. </constant> <constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4"> + This area replaces any gravity/damping calculated so far (in [code]priority[/code] order), but keeps calculating the rest of the areas. </constant> </constants> </class> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index e093b5cb49..0cbc079962 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - 2D area that detects nodes that enter or exit it. Can override 2D physics properties within range. + 2D area for detection and 2D physics influence. </brief_description> <description> - 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. + 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). </description> <tutorials> </tutorials> @@ -18,7 +18,7 @@ Return the angular damp rate. </description> </method> - <method name="get_audio_bus" qualifiers="const"> + <method name="get_audio_bus_name" qualifiers="const"> <return type="String"> </return> <description> @@ -88,14 +88,14 @@ <return type="Array"> </return> <description> - Returns a list of the [Area2D]s that intersect with this area. + Returns a list of intersecting [Area2D]\ s. </description> </method> <method name="get_overlapping_bodies" qualifiers="const"> <return type="Array"> </return> <description> - Return a list of the [PhysicsBody2D]s that intersect with this area. + Returns a list of intersecting [PhysicsBody2D]\ s. </description> </method> <method name="get_priority" qualifiers="const"> @@ -145,7 +145,7 @@ <argument index="0" name="area" type="Node"> </argument> <description> - Return whether the area passed is totally or partially inside this area. + If [code]true[/code] the given area overlaps the Area2D. </description> </method> <method name="overlaps_body" qualifiers="const"> @@ -154,7 +154,7 @@ <argument index="0" name="body" type="Node"> </argument> <description> - Return whether the body passed is totally or partially inside this area. + If [code]true[/code] the given body overlaps the Area2D. </description> </method> <method name="set_angular_damp"> @@ -167,7 +167,7 @@ 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. </description> </method> - <method name="set_audio_bus"> + <method name="set_audio_bus_name"> <return type="void"> </return> <argument index="0" name="name" type="String"> @@ -318,49 +318,46 @@ </methods> <members> <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp"> - 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 rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> - <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus"> - The name of the Area2D's audio bus. + <member name="audio_bus_name" type="String" setter="set_audio_bus_name" getter="get_audio_bus_name"> + The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus"> - If [code]true[/code], overrides the default audio bus with the Area2D's. Defaults to [code]false[/code]. + If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> - 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 area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code]. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> - The physics layers this Area2D scans to determine collision detections. + The physics layers this area scans to determine collision detection. </member> <member name="gravity" type="float" setter="set_gravity" getter="get_gravity"> - 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 area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. </member> <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale"> - The falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance. + The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. </member> <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point"> - 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]. + If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code]. </member> <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector"> - 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 area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction. </member> <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp"> - 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 rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable"> - 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] other monitoring areas can detect this area. Default value: [code]true[/code]. </member> <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring"> - If [code]true[/code], this detects bodies/areas entering/exiting it (can it detect others at the moment?). Defaults to [code]true[/code]. + If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. </member> <member name="priority" type="float" setter="set_priority" getter="get_priority"> - The processing order for this priority. Ranges from 0 to 128. Defaults to 0. Higher priorities are processed first. + The area's priority. Higher priority areas are processed first. Default value: 0. </member> <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area2D.SpaceOverride"> - How to override gravity and damping calculations within this Area2D, if at all. Consult the SPACE_OVERRIDE_* constants for available options. + Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values. </member> </members> <signals> @@ -368,14 +365,14 @@ <argument index="0" name="area" type="Object"> </argument> <description> - This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area. + Emitted when another area enters. </description> </signal> <signal name="area_exited"> <argument index="0" name="area" type="Object"> </argument> <description> - This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area. + Emitted when another area exits. </description> </signal> <signal name="area_shape_entered"> @@ -388,7 +385,7 @@ <argument index="3" name="self_shape" type="int"> </argument> <description> - 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. + Emitted when another area enters, reporting which shapes overlapped. </description> </signal> <signal name="area_shape_exited"> @@ -401,21 +398,21 @@ <argument index="3" name="self_shape" type="int"> </argument> <description> - 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. + Emitted when another area exits, reporting which shapes were overlapping. </description> </signal> <signal name="body_entered"> <argument index="0" name="body" type="Object"> </argument> <description> - This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area. + Emitted when a [PhysicsBody2D] object enters. </description> </signal> <signal name="body_exited"> <argument index="0" name="body" type="Object"> </argument> <description> - This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area. + Emitted when a [PhysicsBody2D] object exits. </description> </signal> <signal name="body_shape_entered"> @@ -428,7 +425,7 @@ <argument index="3" name="area_shape" type="int"> </argument> <description> - 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. + Emitted when a [PhysicsBody2D] object enters, reporting which shapes overlapped. </description> </signal> <signal name="body_shape_exited"> @@ -441,25 +438,25 @@ <argument index="3" name="area_shape" type="int"> </argument> <description> - 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. + Emitted when a [PhysicsBody2D] object exits, reporting which shapes were overlapping. </description> </signal> </signals> <constants> <constant name="SPACE_OVERRIDE_DISABLED" value="0"> - This area does not affect gravity/damp. These are areas that exist only to detect collisions and objects entering or exiting them. + This area does not affect gravity/damping. </constant> <constant name="SPACE_OVERRIDE_COMBINE" value="1"> - This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order). </constant> <constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2"> - This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order), ignoring any lower priority areas. </constant> <constant name="SPACE_OVERRIDE_REPLACE" value="3"> - 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/damping, even the defaults, ignoring any lower priority areas. </constant> <constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4"> - This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + This area replaces any gravity/damping calculated so far (in [code]priority[/code] order), but keeps calculating the rest of the areas. </constant> </constants> </class> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index f833764141..2cfbaffe04 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -104,6 +104,7 @@ <return type="Array"> </return> <description> + Returns a copy of this [code]Array[/code]. </description> </method> <method name="empty"> @@ -177,8 +178,10 @@ </description> </method> <method name="invert"> + <return type="Array"> + </return> <description> - Reverse the order of the elements in the array (so first element will now be the last). + Reverse the order of the elements in the array (so first element will now be the last) and return reference to the array. </description> </method> <method name="pop_back"> @@ -213,7 +216,7 @@ </description> </method> <method name="resize"> - <argument index="0" name="position" type="int"> + <argument index="0" name="size" type="int"> </argument> <description> 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. @@ -238,17 +241,21 @@ </description> </method> <method name="sort"> + <return type="Array"> + </return> <description> - Sort the array using natural order. + Sort the array using natural order and return reference to the array. </description> </method> <method name="sort_custom"> + <return type="Array"> + </return> <argument index="0" name="obj" type="Object"> </argument> <argument index="1" name="func" type="String"> </argument> <description> - 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. + Sort the array using a custom method and return reference to the array. 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. </description> </method> </methods> diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml index e5b17b8dfb..045c6c2bf9 100644 --- a/doc/classes/AudioBusLayout.xml +++ b/doc/classes/AudioBusLayout.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioBusLayout" inherits="Resource" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Stores information about the audiobusses. </brief_description> <description> + Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between busses. See [AudioServer] for usage. </description> <tutorials> </tutorials> diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml index 8497042b53..35d7991833 100644 --- a/doc/classes/AudioEffectAmplify.xml +++ b/doc/classes/AudioEffectAmplify.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Amplifies the volume of an audio source. + Adds a Amplify audio effect to an Audio bus. + Increases or decreases the volume of the selected audio bus. </brief_description> <description> - Amplifies the volume of an audio source. Increase gain of the audio being routed through the bus. + Increases or decreases the volume being routed through the audio bus. </description> <tutorials> </tutorials> @@ -15,7 +16,6 @@ <return type="float"> </return> <description> - Returns the set maximum volume. </description> </method> <method name="set_volume_db"> @@ -24,13 +24,12 @@ <argument index="0" name="volume" type="float"> </argument> <description> - Sets the maximum volume. </description> </method> </methods> <members> <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db"> - The effect's volume limit. + Amount of amplification. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. Default value: [code]0[/code]. </member> </members> <constants> diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml index 5a7a91ede0..9d7e25dbf2 100644 --- a/doc/classes/AudioEffectCompressor.xml +++ b/doc/classes/AudioEffectCompressor.xml @@ -1,8 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a Compressor audio effect to an Audio bus. + Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume. </brief_description> <description> + Dynamic range compressor reduces the level of the sound when the amplitude goes over a certain threshold in Decibels. One of the main uses of a compressor is to increase the dynamic range by clipping as little as possible (when sound goes over 0dB). + Compressor has many uses in the mix: + - In the Master bus to compress the whole output (Although a [AudioEffectLimiter] is probably better) + - In voice channels to ensure they sound as balanced as possible. + - Sidechained. Sidechained, which can reduce the sound level sidechained with another audio bus for threshold detection.. This technique is very common in video game mixing to download the level of Music/SFX while voices are being heard. + - Accentuates transients by using a wider attack, making effects sound more punchy. </description> <tutorials> </tutorials> @@ -110,18 +118,25 @@ </methods> <members> <member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us"> + Compressor's reaction time when the signal exceeds the threshold. Value can range from 20 to 2000. Default value: [code]20ms[/code]. </member> <member name="gain" type="float" setter="set_gain" getter="get_gain"> + Gain applied to the output signal. </member> <member name="mix" type="float" setter="set_mix" getter="get_mix"> + Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). Default value: [code]1[/code]. </member> <member name="ratio" type="float" setter="set_ratio" getter="get_ratio"> + Amount of compression applied to the audio once it passes the threshold level. The higher the ratio the more the loud parts of the audio will be compressed. Value can range from 1 to 48. Default value: [code]4[/code]. </member> <member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms"> + Compressor's delay time to stop reducing the signal after the signal level falls below the threshold. Value can range from 20 to 2000. Default value: [code]250ms[/code]. </member> <member name="sidechain" type="String" setter="set_sidechain" getter="get_sidechain"> + Reduce the sound level using another audio bus for threshold detection. </member> <member name="threshold" type="float" setter="set_threshold" getter="get_threshold"> + The level above which compression is applied to the audio. Value can range from -60 to 0. Default value: [code]0[/code]. </member> </members> <constants> diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml index 8d317b3c46..9dc61883ab 100644 --- a/doc/classes/AudioEffectDelay.xml +++ b/doc/classes/AudioEffectDelay.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a Delay audio effect to an Audio bus. Plays input signal back after a period of time. + Two tap delay and feedback options. </brief_description> <description> + Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds. </description> <tutorials> </tutorials> @@ -194,30 +197,43 @@ </methods> <members> <member name="dry" type="float" setter="set_dry" getter="get_dry"> + Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="feedback/active" type="bool" setter="set_feedback_active" getter="is_feedback_active"> + If [code]true[/code] feedback is enabled. Default value: [code]false[/code]. </member> <member name="feedback/delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms"> + Feedback delay time in milliseconds. Default value: [code]340[/code]. </member> <member name="feedback/level_db" type="float" setter="set_feedback_level_db" getter="get_feedback_level_db"> + Sound level for [code]tap1[/code]. Default value: [code]-6 dB[/code]. </member> <member name="feedback/lowpass" type="float" setter="set_feedback_lowpass" getter="get_feedback_lowpass"> + Low-pass filter for feedback. Frequencies below the Low Cut value are filtered out of the source signal. Default value: [code]16000[/code]. </member> <member name="tap1/active" type="bool" setter="set_tap1_active" getter="is_tap1_active"> + If [code]true[/code], [code]tap1[/code] will be enabled. Default value: [code]true[/code]. </member> <member name="tap1/delay_ms" type="float" setter="set_tap1_delay_ms" getter="get_tap1_delay_ms"> + [b]Tap1[/b] delay time in milliseconds. Default value: [code]250ms[/code]. </member> <member name="tap1/level_db" type="float" setter="set_tap1_level_db" getter="get_tap1_level_db"> + Sound level for [code]tap1[/code]. Default value: [code]-6 dB[/code]. </member> <member name="tap1/pan" type="float" setter="set_tap1_pan" getter="get_tap1_pan"> + Pan position for [code]tap1[/code]. Value can range from -1 (fully left) to 1 (fully right). Default value: [code]0.2[/code]. </member> <member name="tap2/active" type="bool" setter="set_tap2_active" getter="is_tap2_active"> + If [code]true[/code], [code]tap2[/code] will be enabled. Default value: [code]true[/code]. </member> <member name="tap2/delay_ms" type="float" setter="set_tap2_delay_ms" getter="get_tap2_delay_ms"> + [b]Tap2[/b] delay time in milliseconds. Default value: [code]500ms[/code]. </member> <member name="tap2/level_db" type="float" setter="set_tap2_level_db" getter="get_tap2_level_db"> + Sound level for [code]tap2[/code]. Default value: [code]-12 dB[/code]. </member> <member name="tap2/pan" type="float" setter="set_tap2_pan" getter="get_tap2_pan"> + Pan position for [code]tap2[/code]. Value can range from -1 (fully left) to 1 (fully right). Default value: [code]-0.4[/code]. </member> </members> <constants> diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml index e5c5a3b50e..1a6aa1d2b6 100644 --- a/doc/classes/AudioEffectDistortion.xml +++ b/doc/classes/AudioEffectDistortion.xml @@ -1,8 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a Distortion audio effect to an Audio bus. + Modify the sound to make it dirty. </brief_description> <description> + Modify the sound and make it dirty. Differents types available : clip, tan, lofi (bit crushing), overdrive, or waveshape. + By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently. </description> <tutorials> </tutorials> @@ -82,26 +86,35 @@ </methods> <members> <member name="drive" type="float" setter="set_drive" getter="get_drive"> + Distortion power. Value can range from 0 to 1. Default value: [code]0[/code]. </member> <member name="keep_hf_hz" type="float" setter="set_keep_hf_hz" getter="get_keep_hf_hz"> + High-pass filter. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. Default value: [code]16000[/code]. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="AudioEffectDistortion.Mode"> + Distortion type. Default value: [code]MODE_CLIP[/code]. </member> <member name="post_gain" type="float" setter="set_post_gain" getter="get_post_gain"> + Increases or decreases the volume after the effect. Value can range from -80 to 24. Default value: [code]0[/code]. </member> <member name="pre_gain" type="float" setter="set_pre_gain" getter="get_pre_gain"> + Increases or decreases the volume before the effect. Value can range from -60 to 60. Default value: [code]0[/code]. </member> </members> <constants> <constant name="MODE_CLIP" value="0"> + Digital distortion effect which cuts off peaks at the top and bottom of the waveform. </constant> <constant name="MODE_ATAN" value="1"> </constant> <constant name="MODE_LOFI" value="2"> + Low-resolution digital distortion effect. You can use it to emulate the sound of early digital audio devices. </constant> <constant name="MODE_OVERDRIVE" value="3"> + Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers. </constant> <constant name="MODE_WAVESHAPE" value="4"> + Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound. </constant> </constants> </class> diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml index 94d5c696c3..246f6b882e 100644 --- a/doc/classes/AudioEffectEQ.xml +++ b/doc/classes/AudioEffectEQ.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectEQ" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Base class for audio equalizers. Gives you control over frequencies. + Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] or [AudioEffectEQ21] don't fit your needs. </brief_description> <description> + AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQ are very useful on the Master Bus to completely master a mix and give it character. They are also very useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). </description> <tutorials> </tutorials> @@ -13,6 +16,7 @@ <return type="int"> </return> <description> + Returns the number of bands of the equalizer. </description> </method> <method name="get_band_gain_db" qualifiers="const"> @@ -21,6 +25,7 @@ <argument index="0" name="band_idx" type="int"> </argument> <description> + Returns the band's gain at the specified index, in dB. </description> </method> <method name="set_band_gain_db"> @@ -31,6 +36,7 @@ <argument index="1" name="volume_db" type="float"> </argument> <description> + Sets band's gain at the specified index, in dB. </description> </method> </methods> diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml index 004236dfde..7a29f4cc0b 100644 --- a/doc/classes/AudioEffectEQ10.xml +++ b/doc/classes/AudioEffectEQ10.xml @@ -1,8 +1,23 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz. + Each frequency can be modulated between -60/+24 dB. </brief_description> <description> + Frequency bands : + Band 1 : 31 Hz + Band 2 : 62 Hz + Band 3 : 125 Hz + Band 4 : 250 Hz + Band 5 : 500 Hz + Band 6 : 1000 Hz + Band 7 : 2000 Hz + Band 8 : 4000 Hz + Band 9 : 8000 Hz + Band 10 : 16000 Hz + + See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ21]. </description> <tutorials> </tutorials> diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml index e4faa9bb0c..327f5a291a 100644 --- a/doc/classes/AudioEffectEQ21.xml +++ b/doc/classes/AudioEffectEQ21.xml @@ -1,8 +1,34 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz. + Each frequency can be modulated between -60/+24 dB. </brief_description> <description> + Frequency bands : + Band 1 : 22 Hz + Band 2 : 32 Hz + Band 3 : 44 Hz + Band 4 : 63 Hz + Band 5 : 90 Hz + Band 6 : 125 Hz + Band 7 : 175 Hz + Band 8 : 250 Hz + Band 9 : 350 Hz + Band 10 : 500 Hz + Band 11 : 700 Hz + Band 12 : 1000 Hz + Band 13 : 1400 Hz + Band 14 : 2000 Hz + Band 15 : 2800 Hz + Band 16 : 4000 Hz + Band 17 : 5600 Hz + Band 18 : 8000 Hz + Band 19 : 11000 Hz + Band 20 : 16000 Hz + Band 21 : 22000 Hz + + See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ10]. </description> <tutorials> </tutorials> diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml index b74cc5d285..bc05535041 100644 --- a/doc/classes/AudioEffectEQ6.xml +++ b/doc/classes/AudioEffectEQ6.xml @@ -1,8 +1,19 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz. + Each frequency can be modulated between -60/+24 dB. </brief_description> <description> + Frequency bands : + Band 1 : 32 Hz + Band 2 : 100 Hz + Band 3 : 320 Hz + Band 4 : 1000 Hz + Band 5 : 3200 Hz + Band 6 : 10000 Hz + + See also [AudioEffectEQ], [AudioEffectEQ10], [AudioEffectEQ21]. </description> <tutorials> </tutorials> diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml index e52fb57c70..5209f290b1 100644 --- a/doc/classes/AudioEffectLimiter.xml +++ b/doc/classes/AudioEffectLimiter.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectLimiter" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a soft clip Limiter audio effect to an Audio bus. </brief_description> <description> + A limiter is similar to a compressor, but it’s less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master Bus is always recommended to reduce the effects of clipping. + Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded. </description> <tutorials> </tutorials> @@ -68,12 +71,15 @@ </methods> <members> <member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db"> + The waveform's maximum allowed value. Value can range from -20 to -0.1. Default value: [code]-0.1dB[/code]. </member> <member name="soft_clip_db" type="float" setter="set_soft_clip_db" getter="get_soft_clip_db"> + Applies a gain to the limited waves. Value can range from 0 to 6. Default value: [code]2dB[/code]. </member> <member name="soft_clip_ratio" type="float" setter="set_soft_clip_ratio" getter="get_soft_clip_ratio"> </member> <member name="threshold_db" type="float" setter="set_threshold_db" getter="get_threshold_db"> + Threshold from which the limiter begins to be active. Value can range from -30 to 0. Default value: [code]0dB[/code]. </member> </members> <constants> diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml index b55d7f91c1..56b39a36c6 100644 --- a/doc/classes/AudioEffectPanner.xml +++ b/doc/classes/AudioEffectPanner.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectPanner" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a Panner audio effect to an Audio bus. Pans sound left or right. </brief_description> <description> + Determines how much of an audio signal is sent to the left and right buses. </description> <tutorials> </tutorials> @@ -26,6 +28,7 @@ </methods> <members> <member name="pan" type="float" setter="set_pan" getter="get_pan"> + Pan position. Value can range from -1 (fully left) to 1 (fully right). </member> </members> <constants> diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml index 7e9cd27a47..bd9067471b 100644 --- a/doc/classes/AudioEffectPhaser.xml +++ b/doc/classes/AudioEffectPhaser.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectPhaser" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a Phaser audio effect to an Audio bus. + Combines the original signal with a copy that is slightly out of phase with the original. </brief_description> <description> + Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a Low Frequency Oscillator. </description> <tutorials> </tutorials> @@ -82,14 +85,19 @@ </methods> <members> <member name="depth" type="float" setter="set_depth" getter="get_depth"> + Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. Default value: [code]1[/code]. </member> <member name="feedback" type="float" setter="set_feedback" getter="get_feedback"> + Output percent of modified sound. Value can range from 0.1 to 0.9. Default value: [code]0.7[/code]. </member> <member name="range_max_hz" type="float" setter="set_range_max_hz" getter="get_range_max_hz"> + Determines the maximum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: [code]1600hz[/code]. </member> <member name="range_min_hz" type="float" setter="set_range_min_hz" getter="get_range_min_hz"> + Determines the minimum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: [code]440hz[/code]. </member> <member name="rate_hz" type="float" setter="set_rate_hz" getter="get_rate_hz"> + Adjusts the rate at which the effect sweeps up and down across the frequency range. </member> </members> <constants> diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml index 6fc3acdc20..edcb54e09e 100644 --- a/doc/classes/AudioEffectPitchShift.xml +++ b/doc/classes/AudioEffectPitchShift.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectPitchShift" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a Pitch shift audio effect to an Audio bus. + Raises or lowers the pitch of original sound. </brief_description> <description> + Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients. </description> <tutorials> </tutorials> @@ -26,6 +29,7 @@ </methods> <members> <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale"> + Pitch value. Can range from 0 (-1 octave) to 16 (+16 octaves). </member> </members> <constants> diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index b390fa239c..4cda24530b 100644 --- a/doc/classes/AudioEffectReverb.xml +++ b/doc/classes/AudioEffectReverb.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectReverb" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Adds a Reverb audio effect to an Audio bus. + Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces. </brief_description> <description> + Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room. </description> <tutorials> </tutorials> @@ -124,20 +127,28 @@ </methods> <members> <member name="damping" type="float" setter="set_damping" getter="get_damping"> + Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="dry" type="float" setter="set_dry" getter="get_dry"> + Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="hipass" type="float" setter="set_hpf" getter="get_hpf"> + High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1. Default value: [code]0[/code]. </member> <member name="predelay_feedback" type="float" setter="set_predelay_msec" getter="get_predelay_msec"> + Output percent of predelay. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="predelay_msec" type="float" setter="set_predelay_msec" getter="get_predelay_msec"> + Time between the original signal and the early reflections of the reverb signal. Default value: [code]150ms[/code]. </member> <member name="room_size" type="float" setter="set_room_size" getter="get_room_size"> + Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. Default value: [code]0.8[/code]. </member> <member name="spread" type="float" setter="set_spread" getter="get_spread"> + Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="wet" type="float" setter="set_wet" getter="get_wet"> + Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. Default value: [code]0.5[/code]. </member> </members> <constants> diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 768987fd0b..0a59da5355 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -17,6 +17,7 @@ <argument index="0" name="at_position" type="int" default="-1"> </argument> <description> + Adds a bus at [code]at_position[/code]. </description> </method> <method name="add_bus_effect"> @@ -29,18 +30,21 @@ <argument index="2" name="at_position" type="int" default="-1"> </argument> <description> + Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code]. </description> </method> <method name="generate_bus_layout" qualifiers="const"> <return type="AudioBusLayout"> </return> <description> + Generates an [AudioBusLayout] using the available busses and effects. </description> </method> <method name="get_bus_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of available busses. </description> </method> <method name="get_bus_effect"> @@ -51,6 +55,7 @@ <argument index="1" name="effect_idx" type="int"> </argument> <description> + Returns the [AudioEffect] at position [code]effect_idx[/code] in bus [code]bus_idx[/code]. </description> </method> <method name="get_bus_effect_count"> @@ -59,6 +64,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> + Returns the number of effects on the bus at [code]bus_idx[/code]. </description> </method> <method name="get_bus_index" qualifiers="const"> @@ -67,6 +73,7 @@ <argument index="0" name="bus_name" type="String"> </argument> <description> + Returns the index of the bus with the name [code]bus_name[/code]. </description> </method> <method name="get_bus_name" qualifiers="const"> @@ -75,6 +82,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> + Returns the name of the bus with the index [code]bus_idx[/code]. </description> </method> <method name="get_bus_peak_volume_left_db" qualifiers="const"> @@ -85,6 +93,7 @@ <argument index="1" name="channel" type="int"> </argument> <description> + Returns the peak volume of the left speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code]. </description> </method> <method name="get_bus_peak_volume_right_db" qualifiers="const"> @@ -95,6 +104,7 @@ <argument index="1" name="channel" type="int"> </argument> <description> + Returns the peak volume of the right speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code]. </description> </method> <method name="get_bus_send" qualifiers="const"> @@ -103,6 +113,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> + Returns the name of the bus that the bus at index [code]bus_idx[/code] sends to. </description> </method> <method name="get_bus_volume_db" qualifiers="const"> @@ -111,18 +122,21 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> + Returns the volume of the bus at index [code]bus_idx[/code] in dB. </description> </method> <method name="get_mix_rate" qualifiers="const"> <return type="float"> </return> <description> + Returns the sample rate at the output of the audioserver. </description> </method> <method name="get_speaker_mode" qualifiers="const"> <return type="int" enum="AudioServer.SpeakerMode"> </return> <description> + Returns the speaker configuration. </description> </method> <method name="is_bus_bypassing_effects" qualifiers="const"> @@ -131,6 +145,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> + If [code]true[/code] the bus at index [code]bus_idx[/code] is bypassing effects. </description> </method> <method name="is_bus_effect_enabled" qualifiers="const"> @@ -141,6 +156,7 @@ <argument index="1" name="effect_idx" type="int"> </argument> <description> + If [code]true[/code] the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. </description> </method> <method name="is_bus_mute" qualifiers="const"> @@ -149,6 +165,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> + If [code]true[/code] the bus at index [code]bus_idx[/code] is muted. </description> </method> <method name="is_bus_solo" qualifiers="const"> @@ -157,12 +174,14 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> + If [code]true[/code] the bus at index [code]bus_idx[/code] is in solo mode. </description> </method> <method name="lock"> <return type="void"> </return> <description> + Locks the audio drivers mainloop. Remember to unlock it afterwards. </description> </method> <method name="move_bus"> @@ -173,6 +192,7 @@ <argument index="1" name="to_index" type="int"> </argument> <description> + Moves the bus from index [code]index[/code] to index [code]to_index[/code]. </description> </method> <method name="remove_bus"> @@ -181,6 +201,7 @@ <argument index="0" name="index" type="int"> </argument> <description> + Removes the bus at index [code]index[/code]. </description> </method> <method name="remove_bus_effect"> @@ -191,6 +212,7 @@ <argument index="1" name="effect_idx" type="int"> </argument> <description> + Removes the effect at index [code]effect_idx[/code] from the bus at index [code]bus_idx[/code]. </description> </method> <method name="set_bus_bypass_effects"> @@ -201,6 +223,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code] the bus at index [code]bus_idx[/code] is bypassing effects. </description> </method> <method name="set_bus_count"> @@ -209,6 +232,7 @@ <argument index="0" name="amount" type="int"> </argument> <description> + Adds and removes busses to make the number of busses match [code]amount[/code]. </description> </method> <method name="set_bus_effect_enabled"> @@ -221,6 +245,7 @@ <argument index="2" name="enabled" type="bool"> </argument> <description> + If [code]true[/code] the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. </description> </method> <method name="set_bus_layout"> @@ -229,6 +254,7 @@ <argument index="0" name="bus_layout" type="AudioBusLayout"> </argument> <description> + Overwrites the currently used [AudioBusLayout]. </description> </method> <method name="set_bus_mute"> @@ -239,6 +265,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code] the bus at index [code]bus_idx[/code] is muted. </description> </method> <method name="set_bus_name"> @@ -249,6 +276,7 @@ <argument index="1" name="name" type="String"> </argument> <description> + Sets the name of the bus at index [code]bus_idx[/code] to [code]name[/code]. </description> </method> <method name="set_bus_send"> @@ -259,6 +287,7 @@ <argument index="1" name="send" type="String"> </argument> <description> + Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/send]. </description> </method> <method name="set_bus_solo"> @@ -269,6 +298,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code] the bus at index [code]bus_idx[/code] is in solo mode. </description> </method> <method name="set_bus_volume_db"> @@ -279,6 +309,7 @@ <argument index="1" name="volume_db" type="float"> </argument> <description> + Sets the volume of the bus at index [code]bus_idx[/code] to [code]volume_db[/code]. </description> </method> <method name="swap_bus_effects"> @@ -291,27 +322,33 @@ <argument index="2" name="by_effect_idx" type="int"> </argument> <description> + Swaps the position of two effects in bus [code]bus_idx[/code]. </description> </method> <method name="unlock"> <return type="void"> </return> <description> + Unlocks the audiodriver's main loop. After locking it always unlock it. </description> </method> </methods> <signals> <signal name="bus_layout_changed"> <description> + Emitted when the [AudioBusLayout] changes. </description> </signal> </signals> <constants> <constant name="SPEAKER_MODE_STEREO" value="0"> + Two or fewer speakers are detected. </constant> <constant name="SPEAKER_SURROUND_51" value="2"> + A 5.1 channel surround setup detected. </constant> <constant name="SPEAKER_SURROUND_71" value="3"> + A 7.1 channel surround setup detected. </constant> </constants> </class> diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml index 30a9a8f070..f45beec42c 100644 --- a/doc/classes/AudioStreamPlayback.xml +++ b/doc/classes/AudioStreamPlayback.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamPlayback" inherits="Reference" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Meta class for playing back audio. </brief_description> <description> + Can play, loop, pause a scroll through Audio. See [AudioStream] and [AudioStreamOGGVorbis] for usage. </description> <tutorials> </tutorials> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 2dba35bec0..1a9ad85565 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -7,6 +7,7 @@ Plays background audio. </description> <tutorials> + http://docs.godotengine.org/en/latest/learning/features/audio/index.html </tutorials> <demos> </demos> @@ -23,10 +24,11 @@ <description> </description> </method> - <method name="get_position"> + <method name="get_playback_position"> <return type="float"> </return> <description> + Returns the position in the [AudioStream]. </description> </method> <method name="get_stream" qualifiers="const"> @@ -121,15 +123,16 @@ </methods> <members> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. + If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> Bus on which this audio is playing. </member> <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget"> + If the audio configuration has more than two speakers, this sets the target channels. See [code]MIX_TARGET_*[/code] constants. </member> <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> - If [code]true[/code], audio is playing. + If [code]true[/code] audio is playing. </member> <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> The [AudioStream] object to be played. @@ -147,10 +150,13 @@ </signals> <constants> <constant name="MIX_TARGET_STEREO" value="0"> + The audio will be played only on the first channel. </constant> <constant name="MIX_TARGET_SURROUND" value="1"> + The audio will be played on all surround channels. </constant> <constant name="MIX_TARGET_CENTER" value="2"> + The audio will be played on the second channel, which is usually the center. </constant> </constants> </class> diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index 68afffdb41..c6fd8ff54f 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -36,10 +36,11 @@ <description> </description> </method> - <method name="get_position"> + <method name="get_playback_position"> <return type="float"> </return> <description> + Returns the position in the [AudioStream]. </description> </method> <method name="get_stream" qualifiers="const"> @@ -156,7 +157,7 @@ Dampens audio over distance with this as an exponent. </member> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. + If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> Bus on which this audio is playing. @@ -165,7 +166,7 @@ Maximum distance from which audio is still hearable. </member> <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> - If [code]true[/code], audio is playing. + If [code]true[/code] audio is playing. </member> <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> The [AudioStream] object to be played. diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 1577c1e4d3..2085b35e2e 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -78,10 +78,11 @@ <description> </description> </method> - <method name="get_position"> + <method name="get_playback_position"> <return type="float"> </return> <description> + Returns the position in the [AudioStream]. </description> </method> <method name="get_stream" qualifiers="const"> @@ -288,7 +289,7 @@ Decides if audio should get quieter with distance linearly, quadratically or logarithmically. </member> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code], audio plays audio plays when added to scene tree. Default value: [code]false[/code]. + If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> Bus on which this audio is playing. @@ -300,7 +301,7 @@ The angle in which the audio reaches cameras undampened. </member> <member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled"> - If [code]true[/code], the audio should be dampened according to the direction of the sound. + If [code]true[/code] the audio should be dampened according to the direction of the sound. </member> <member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db"> dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB. diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml index 091bd3fa73..6c44430949 100644 --- a/doc/classes/BackBufferCopy.xml +++ b/doc/classes/BackBufferCopy.xml @@ -15,7 +15,7 @@ <return type="int" enum="BackBufferCopy.CopyMode"> </return> <description> - Return the copy mode currently applied to the BackBufferCopy (refer to constants section). + Return the copy mode currently applied to the BackBufferCopy. See [code]COPY_MODE_*[/code] constants. </description> </method> <method name="get_rect" qualifiers="const"> @@ -31,7 +31,7 @@ <argument index="0" name="copy_mode" type="int" enum="BackBufferCopy.CopyMode"> </argument> <description> - Set the copy mode of the BackBufferCopy (refer to constants section). + Set the copy mode of the BackBufferCopy. See [code]COPY_MODE_*[/code] constants. </description> </method> <method name="set_rect"> @@ -46,8 +46,10 @@ </methods> <members> <member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode"> + Buffer mode. See [code]COPY_MODE_*[/code] constants. </member> <member name="rect" type="Rect2" setter="set_rect" getter="get_rect"> + The area covered by the BackBufferCopy. Only used if [code]copy_mode[/code] is [code]COPY_MODE_RECT[/code]. </member> </members> <constants> @@ -55,10 +57,10 @@ Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers. </constant> <constant name="COPY_MODE_RECT" value="1"> - Sets the copy mode to a region. + BackBufferCopy buffers a rectangular region. </constant> <constant name="COPY_MODE_VIEWPORT" value="2"> - Sets the copy mode to the entire screen. + BackBufferCopy buffers the entire screen. </constant> </constants> </class> diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml index d872d0892d..63e6a5f682 100644 --- a/doc/classes/BitMap.xml +++ b/doc/classes/BitMap.xml @@ -77,6 +77,9 @@ </methods> <members> <member name="data" type="Dictionary" setter="_set_data" getter="_get_data"> + Returns a [Dictionary] with two keys : + [code]data[/code] : [PoolByteArray] with [code]true[/code]/[code]false[/code] [code]BitMap[/code] data. + [code]size[/code] : The [code]Bitmap[/code]'s size. </member> </members> <constants> diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml index 2302c39e35..068b91204c 100644 --- a/doc/classes/Camera.xml +++ b/doc/classes/Camera.xml @@ -15,6 +15,7 @@ <return type="void"> </return> <description> + If this is the current Camera, remove it from being current. If it is inside the node tree, request to make the next Camera current, if any. </description> </method> <method name="get_camera_transform" qualifiers="const"> @@ -28,6 +29,7 @@ <return type="int"> </return> <description> + Returns the culling mask, describing which 3D render layers are rendered by this Camera. </description> </method> <method name="get_doppler_tracking" qualifiers="const"> @@ -40,30 +42,35 @@ <return type="Environment"> </return> <description> + Returns the [Environment] used by this Camera. </description> </method> <method name="get_fov" qualifiers="const"> <return type="float"> </return> <description> + Returns the [i]FOV[/i] Y angle in degrees (FOV means Field of View). </description> </method> <method name="get_h_offset" qualifiers="const"> <return type="float"> </return> <description> + Returns the horizontal (X) offset of the Camera viewport. </description> </method> <method name="get_keep_aspect_mode" qualifiers="const"> <return type="int" enum="Camera.KeepAspect"> </return> <description> + Returns the current mode for keeping the aspect ratio. See [code]KEEP_*[/code] constants. </description> </method> <method name="get_projection" qualifiers="const"> <return type="int" enum="Camera.Projection"> </return> <description> + Returns the Camera's projection. See PROJECTION_* constants. </description> </method> <method name="get_size" qualifiers="const"> @@ -76,25 +83,28 @@ <return type="float"> </return> <description> + Returns the vertical (Y) offset of the Camera viewport. </description> </method> <method name="get_zfar" qualifiers="const"> <return type="float"> </return> <description> + Returns the far clip plane in world space units. </description> </method> <method name="get_znear" qualifiers="const"> <return type="float"> </return> <description> + Returns the near clip plane in world space units. </description> </method> <method name="is_current" qualifiers="const"> <return type="bool"> </return> <description> - Return whether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree). + Returns [code]true[/code] if the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree). </description> </method> <method name="is_position_behind" qualifiers="const"> @@ -103,6 +113,7 @@ <argument index="0" name="world_point" type="Vector3"> </argument> <description> + Returns [code]true[/code] if the given position is behind the Camera. </description> </method> <method name="make_current"> @@ -126,6 +137,7 @@ <argument index="0" name="screen_point" type="Vector2"> </argument> <description> + Returns how a 2D coordinate in the Viewport rectangle maps to a 3D point in worldspace. </description> </method> <method name="project_ray_normal" qualifiers="const"> @@ -134,7 +146,7 @@ <argument index="0" name="screen_point" type="Vector2"> </argument> <description> - 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. + Returns 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. </description> </method> <method name="project_ray_origin" qualifiers="const"> @@ -143,7 +155,7 @@ <argument index="0" name="screen_point" type="Vector2"> </argument> <description> - 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. + Returns 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. </description> </method> <method name="set_cull_mask"> @@ -152,6 +164,7 @@ <argument index="0" name="mask" type="int"> </argument> <description> + Sets the cull mask, describing which 3D render layers are rendered by this Camera. </description> </method> <method name="set_doppler_tracking"> @@ -160,6 +173,7 @@ <argument index="0" name="mode" type="int" enum="Camera.DopplerTracking"> </argument> <description> + Changes Doppler effect tracking. See [code]DOPPLER_*[/code] constants. </description> </method> <method name="set_environment"> @@ -168,6 +182,7 @@ <argument index="0" name="env" type="Environment"> </argument> <description> + Sets the [Environment] to use for this Camera. </description> </method> <method name="set_h_offset"> @@ -176,6 +191,7 @@ <argument index="0" name="ofs" type="float"> </argument> <description> + Sets the horizontal (X) offset of the Camera viewport. </description> </method> <method name="set_keep_aspect_mode"> @@ -184,6 +200,7 @@ <argument index="0" name="mode" type="int" enum="Camera.KeepAspect"> </argument> <description> + Sets the mode for keeping the aspect ratio. See [code]KEEP_*[/code] constants. </description> </method> <method name="set_orthogonal"> @@ -218,6 +235,7 @@ <argument index="0" name="ofs" type="float"> </argument> <description> + Sets the vertical (Y) offset of the Camera viewport. </description> </method> <method name="unproject_position" qualifiers="const"> @@ -226,7 +244,7 @@ <argument index="0" name="world_point" type="Vector3"> </argument> <description> - Return how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle. + Returns how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle. </description> </method> </methods> @@ -238,14 +256,19 @@ Orthogonal Projection (objects remain the same size on the screen no matter how far away they are). </constant> <constant name="KEEP_WIDTH" value="0"> + Try to keep the aspect ratio when scaling the Camera's viewport to the screen. If not possible, preserve the viewport's width by changing the height. Height is [code]sizey[/code] for orthographic projection, [code]fovy[/code] for perspective projection. </constant> <constant name="KEEP_HEIGHT" value="1"> + Try to keep the aspect ratio when scaling the Camera's viewport to the screen. If not possible, preserve the viewport's height by changing the width. Width is [code]sizex[/code] for orthographic projection, [code]fovx[/code] for perspective projection. </constant> <constant name="DOPPLER_TRACKING_DISABLED" value="0"> + Disable Doppler effect simulation (default). </constant> <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1"> + Simulate Doppler effect by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). </constant> <constant name="DOPPLER_TRACKING_FIXED_STEP" value="2"> + Simulate Doppler effect by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). </constant> </constants> </class> diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index b6b699612e..c627112af5 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -5,7 +5,7 @@ </brief_description> <description> 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]. + This node is intended to be a simple helper to 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]. </description> <tutorials> </tutorials> @@ -324,18 +324,24 @@ </methods> <members> <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode"> + The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants. </member> <member name="current" type="bool" setter="_set_current" getter="is_current"> + If [code]true[/code] this camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. </member> <member name="drag_margin_bottom" type="float" setter="set_drag_margin" getter="get_drag_margin"> + Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> <member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled"> </member> <member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin"> + Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> <member name="drag_margin_right" type="float" setter="set_drag_margin" getter="get_drag_margin"> + Right margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> <member name="drag_margin_top" type="float" setter="set_drag_margin" getter="get_drag_margin"> + Top margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> <member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled"> </member> @@ -346,16 +352,21 @@ <member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled"> </member> <member name="limit_bottom" type="int" setter="set_limit" getter="get_limit"> + Bottom scroll limit in pixels. The camera stops moving when reaching this value. </member> <member name="limit_left" type="int" setter="set_limit" getter="get_limit"> + Left scroll limit in pixels. The camera stops moving when reaching this value. </member> <member name="limit_right" type="int" setter="set_limit" getter="get_limit"> + Right scroll limit in pixels. The camera stops moving when reaching this value. </member> <member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled"> </member> <member name="limit_top" type="int" setter="set_limit" getter="get_limit"> + Top scroll limit in pixels. The camera stops moving when reaching this value. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + The camera's offset, useful for looking around or camera shake animations. </member> <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating"> </member> @@ -364,6 +375,7 @@ <member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing"> </member> <member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom"> + The camera's zoom relative to the viewport. Values larger than [code]Vector2(1, 1)[/code] zoom out and smaller values zoom in. For an example, use [code]Vector2(0.5, 0.5)[/code] for a 2x zoom in, and [code]Vector2(4, 4)[/code] for a 4x zoom out. </member> </members> <constants> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 8fc2ff2bc2..4a9890ea18 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -172,7 +172,7 @@ </return> <argument index="0" name="position" type="Vector2"> </argument> - <argument index="1" name="rot" type="float"> + <argument index="1" name="rotation" type="float"> </argument> <argument index="2" name="scale" type="Vector2"> </argument> diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml index f0e3132da5..b4b20e29f9 100644 --- a/doc/classes/CanvasModulate.xml +++ b/doc/classes/CanvasModulate.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CanvasModulate" inherits="Node2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Tint the entire canvas + Tint the entire canvas. </brief_description> <description> - CanvasModulate tints the canvas elements using its assigned color + [code]CanvasModulate[/code] tints the canvas elements using its assigned [code]color[/code]. </description> <tutorials> </tutorials> @@ -30,6 +30,7 @@ </methods> <members> <member name="color" type="Color" setter="set_color" getter="get_color"> + The tint color to apply. </member> </members> <constants> diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml index 98023a5898..64e9e07925 100644 --- a/doc/classes/CollisionObject.xml +++ b/doc/classes/CollisionObject.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CollisionObject" inherits="Spatial" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Base node for collision objects. </brief_description> <description> + CollisionObject is the base class for physics objects. It can hold any number of collision [Shape]\ s. Each shape must be assigned to a [i]shape owner[/i]. The CollisionObject can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the [code]shape_owner_*[/code] methods. </description> <tutorials> </tutorials> @@ -31,7 +33,7 @@ <argument index="0" name="owner" type="Object"> </argument> <description> - 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. + Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. </description> </method> <method name="get_capture_input_on_drag" qualifiers="const"> @@ -44,13 +46,14 @@ <return type="RID"> </return> <description> + Returns the object's [RID]. </description> </method> <method name="get_shape_owners"> <return type="Array"> </return> <description> - 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. + Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument. </description> </method> <method name="is_ray_pickable" qualifiers="const"> @@ -65,6 +68,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> + If [code]true[/code] the shape owner and its shapes are disabled. </description> </method> <method name="remove_shape_owner"> @@ -73,6 +77,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> + Removes the given shape owner. </description> </method> <method name="set_capture_input_on_drag"> @@ -97,6 +102,7 @@ <argument index="0" name="shape_index" type="int"> </argument> <description> + Returns the [code]owner_id[/code] of the given shape. </description> </method> <method name="shape_owner_add_shape"> @@ -107,6 +113,7 @@ <argument index="1" name="shape" type="Shape"> </argument> <description> + Adds a [Shape] to the shape owner. </description> </method> <method name="shape_owner_clear_shapes"> @@ -115,7 +122,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> - Will remove all the shapes associated with given owner. + Removes all shapes from the shape owner. </description> </method> <method name="shape_owner_get_owner" qualifiers="const"> @@ -124,6 +131,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> + Returns the parent object of the given shape owner. </description> </method> <method name="shape_owner_get_shape" qualifiers="const"> @@ -134,7 +142,7 @@ <argument index="1" name="shape_id" type="int"> </argument> <description> - 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 the [Shape] with the given id from the given shape owner. </description> </method> <method name="shape_owner_get_shape_count" qualifiers="const"> @@ -143,7 +151,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> - Returns number of shapes to which given owner is associated to. + Returns the number of shapes the given shape owner contains. </description> </method> <method name="shape_owner_get_shape_index" qualifiers="const"> @@ -162,7 +170,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> - Will return [Transform] of an owner node. + Returns the shape owner's [Transform]. </description> </method> <method name="shape_owner_remove_shape"> @@ -173,7 +181,7 @@ <argument index="1" name="shape_id" type="int"> </argument> <description> - Removes related shape from the owner. + Removes a shape from the given shape owner. </description> </method> <method name="shape_owner_set_disabled"> @@ -184,6 +192,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> + If [code]true[/code] disables the given shape owner. </description> </method> <method name="shape_owner_set_transform"> @@ -194,6 +203,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] of the given shape owner. </description> </method> </methods> @@ -220,10 +230,12 @@ </signal> <signal name="mouse_entered"> <description> + Emitted when the mouse pointer enters any of this object's shapes. </description> </signal> <signal name="mouse_exited"> <description> + Emitted when the mouse pointer exits all this object's shapes. </description> </signal> </signals> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index db1412805f..52743bd37d 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CollisionObject2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Base node for 2D collisionables. + Base node for 2D collision objects. </brief_description> <description> - 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. + CollisionObject2D is the base class for 2D physics objects. It can hold any number of 2D collision [Shape2D]\ s. Each shape must be assigned to a [i]shape owner[/i]. The CollisionObject2D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the [code]shape_owner_*[/code] methods. </description> <tutorials> </tutorials> @@ -29,21 +29,21 @@ <argument index="0" name="owner" type="Object"> </argument> <description> - 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. + Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. </description> </method> <method name="get_rid" qualifiers="const"> <return type="RID"> </return> <description> - Return the RID of this object. + Returns the object's [RID]. </description> </method> <method name="get_shape_owners"> <return type="Array"> </return> <description> - 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. + Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument. </description> </method> <method name="is_pickable" qualifiers="const"> @@ -59,6 +59,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> + If [code]true[/code] the shape owner and its shapes are disabled. </description> </method> <method name="is_shape_owner_one_way_collision_enabled" qualifiers="const"> @@ -75,6 +76,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> + Removes the given shape owner. </description> </method> <method name="set_pickable"> @@ -92,6 +94,7 @@ <argument index="0" name="shape_index" type="int"> </argument> <description> + Returns the [code]owner_id[/code] of the given shape. </description> </method> <method name="shape_owner_add_shape"> @@ -102,6 +105,7 @@ <argument index="1" name="shape" type="Shape2D"> </argument> <description> + Adds a [Shape2D] to the shape owner. </description> </method> <method name="shape_owner_clear_shapes"> @@ -110,7 +114,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> - Will remove all the shapes associated with given owner. + Removes all shapes from the shape owner. </description> </method> <method name="shape_owner_get_owner" qualifiers="const"> @@ -119,6 +123,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> + Returns the parent object of the given shape owner. </description> </method> <method name="shape_owner_get_shape" qualifiers="const"> @@ -129,7 +134,7 @@ <argument index="1" name="shape_id" type="int"> </argument> <description> - 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 the [Shape2D] with the given id from the given shape owner. </description> </method> <method name="shape_owner_get_shape_count" qualifiers="const"> @@ -138,7 +143,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> - Returns number of shapes to which given owner is associated to. + Returns the number of shapes the given shape owner contains. </description> </method> <method name="shape_owner_get_shape_index" qualifiers="const"> @@ -157,7 +162,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> - Will return [Transform2D] of an owner node. + Returns the shape owner's [Transform2D]. </description> </method> <method name="shape_owner_remove_shape"> @@ -168,7 +173,7 @@ <argument index="1" name="shape_id" type="int"> </argument> <description> - Removes related shape from the owner. + Removes a shape from the given shape owner. </description> </method> <method name="shape_owner_set_disabled"> @@ -179,6 +184,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> + If [code]true[/code] disables the given shape owner. </description> </method> <method name="shape_owner_set_one_way_collision"> @@ -199,11 +205,13 @@ <argument index="1" name="transform" type="Transform2D"> </argument> <description> + Sets the [Transform2D] of the given shape owner. </description> </method> </methods> <members> <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable"> + If [code]true[/code] this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. </member> </members> <signals> @@ -215,16 +223,17 @@ <argument index="2" name="shape_idx" type="int"> </argument> <description> + Emitted when an input event occurs and [code]input_pickable[/code] is [code]true[/code]. </description> </signal> <signal name="mouse_entered"> <description> - This event fires only once when the mouse pointer enters any shape of this object. + Emitted when the mouse pointer enters any of this object's shapes. </description> </signal> <signal name="mouse_exited"> <description> - This event fires only once when the mouse pointer exits all shapes of this object. + Emitted when the mouse pointer exits all this object's shapes. </description> </signal> </signals> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index d3dee1e9bb..7f30e8e83e 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Editor-only class for defining a collision polygon in 2D space. + Defines a 2D collision polygon. </brief_description> <description> - Allows editing a collision polygon's vertices. This class is only available in the editor. It will not appear in the scene tree at runtime. Creates a [Shape2D] for gameplay. Properties modified during gameplay will have no effect. + Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygon can be drawn in the editor or specified by a list of vertices. </description> <tutorials> </tutorials> @@ -75,22 +75,24 @@ </methods> <members> <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode"> - If BUILD_SOLIDS, the polygon and the area within it will have collision. If BUILD_SEGMENTS, only the edges of the polygon will have collision. + Collision build mode. Use one of the [code]BUILD_*[/code] constants. Default value: [code]BUILD_SOLIDS[/code]. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> - If true, no collision will be produced. + If [code]true[/code] no collisions will be detected. </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled"> - If true, only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. + If [code]true[/code] only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - Array of vertices which define the polygon. + The polygon's list of vertices. The final point will be connected to the first. </member> </members> <constants> <constant name="BUILD_SOLIDS" value="0"> + Collisions will include the polygon and its contained area. </constant> <constant name="BUILD_SEGMENTS" value="1"> + Collisions will only include the polygon edges. </constant> </constants> </class> diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml index 90e88603b0..6e70a1e8b7 100644 --- a/doc/classes/ColorRect.xml +++ b/doc/classes/ColorRect.xml @@ -38,6 +38,10 @@ </methods> <members> <member name="color" type="Color" setter="set_frame_color" getter="get_frame_color"> + The color to fill the [code]ColorRect[/code]. + [codeblock] + $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect node's color to red + [/codeblock] </member> </members> <constants> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 59c3bd30c7..b3bdd1d6c2 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Control" inherits="CanvasItem" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Base node for all User Interface components. + All User Interface nodes inherit from Control. Features anchors and margins to adapt its position and size to its parent. </brief_description> <description> - 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. + Base class for all User Interface or [i]UI[/i] related nodes. [code]Control[/code] features a bounding rectangle that defines its extents, an anchor position relative to its parent and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. + For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [code]Control[/code] and [Container] nodes. + [b]User Interface nodes and input[/b] + Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [method MainLoop._input_event]. Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it. + Only one [code]Control[/code] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the foucs, call [method set_focus_mode]. [code]Control[/code] nodes lose focus when another node grabs it, or if you hide the node in focus. + Call [method set_ignore_mouse] to tell a [code]Control[/code] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. + [Theme] resources change the Control's appearance. If you change the [Theme] on a [code]Control[/code] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector. </description> <tutorials> </tutorials> @@ -21,7 +21,7 @@ <return type="Vector2"> </return> <description> - Returns the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. + Returns the minimum size this Control can shrink to. The node can never be smaller than this minimum size. </description> </method> <method name="_gui_input" qualifiers="virtual"> @@ -30,13 +30,15 @@ <argument index="0" name="event" type="InputEvent"> </argument> <description> + The node's parent forwards input events to this method. Use it to process and accept inputs on UI elements. See [method accept_event]. + Replaces Godot 2's [code]_input_event[/code]. </description> </method> <method name="accept_event"> <return type="void"> </return> <description> - 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]. + Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input]. </description> </method> <method name="add_color_override"> @@ -47,6 +49,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Overrides the color in the [theme] resource the node uses. </description> </method> <method name="add_constant_override"> @@ -57,7 +60,7 @@ <argument index="1" name="constant" type="int"> </argument> <description> - Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared. + Overrides an integer constant in the [theme] resource the node uses. If the [code]constant[code] is invalid, Godot clears the override. See [member Theme.INVALID_CONSTANT] for more information. </description> </method> <method name="add_font_override"> @@ -68,7 +71,7 @@ <argument index="1" name="font" type="Font"> </argument> <description> - Override a single font (font) in the theme of this Control. If font is empty, override is cleared. + Overrides the [code]name[/code] font in the [theme] resource the node uses. If [code]font[/code] is empty, Godot clears the override. </description> </method> <method name="add_icon_override"> @@ -79,7 +82,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> - Override a single icon ([Texture]) in the theme of this Control. If texture is empty, override is cleared. + Overrides the [code]name[/code] icon in the [theme] resource the node uses. If [code]icon[/code] is empty, Godot clears the override. </description> </method> <method name="add_shader_override"> @@ -90,6 +93,7 @@ <argument index="1" name="shader" type="Shader"> </argument> <description> + Overrides the [code]name[/code] shader in the [theme] resource the node uses. If [code]shader[/code] is empty, Godot clears the override. </description> </method> <method name="add_style_override"> @@ -100,7 +104,7 @@ <argument index="1" name="stylebox" type="StyleBox"> </argument> <description> - Override a single stylebox ([Stylebox]) in the theme of this Control. If stylebox is empty, override is cleared. + Overrides the [code]name[/code] [Stylebox] in the [theme] resource the node uses. If [code]stylebox[/code] is empty, Godot clears the override. </description> </method> <method name="can_drop_data" qualifiers="virtual"> @@ -180,7 +184,7 @@ <argument index="0" name="position" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> - Return the cursor shape at a certain position in the control. + Returns the mouse cursor shape the control displays on mouse hover, one of the [code]CURSOR_*[/code] constants. </description> </method> <method name="get_custom_minimum_size" qualifiers="const"> @@ -193,7 +197,7 @@ <return type="int" enum="Control.CursorShape"> </return> <description> - Return the default cursor shape for this control. See enum CURSOR_* for the list of shapes. + Returns the default cursor shape for this control. See enum [code]CURSOR_*[/code] for the list of shapes. </description> </method> <method name="get_drag_data" qualifiers="virtual"> @@ -624,7 +628,7 @@ <argument index="0" name="shape" type="int" enum="Control.CursorShape"> </argument> <description> - Set the default cursor shape for this control. See enum CURSOR_* for the list of shapes. + Sets the default cursor shape for this control. See [code]CURSOR_*[/code] for the list of available cursor shapes. Useful for Godot plugins and applications or games that use the system's mouse cursors. </description> </method> <method name="set_drag_forwarding"> @@ -785,7 +789,7 @@ <argument index="0" name="theme" type="Theme"> </argument> <description> - Override whole the [Theme] for this Control and all its children controls. + Overrides the whole [Theme] for this node and all its [code]Control[/code] children. </description> </method> <method name="set_tooltip"> @@ -794,7 +798,7 @@ <argument index="0" name="tooltip" type="String"> </argument> <description> - Set a tooltip, which will appear when the cursor is resting over this control. + Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments. </description> </method> <method name="set_v_grow_direction"> @@ -834,58 +838,83 @@ </methods> <members> <member name="anchor_bottom" type="float" setter="_set_anchor" getter="get_anchor"> + Anchors the bottom edge of the node to the origin, the center, or the end of its parent container. It changes how the bottom margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. </member> <member name="anchor_left" type="float" setter="_set_anchor" getter="get_anchor"> + Anchors the left edge of the node to the origin, the center or the end of its parent container. It changes how the left margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. </member> <member name="anchor_right" type="float" setter="_set_anchor" getter="get_anchor"> + Anchors the right edge of the node to the origin, the center or the end of its parent container. It changes how the right margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. </member> <member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor"> + Anchors the top edge of the node to the origin, the center or the end of its parent container. It changes how the top margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. </member> <member name="focus_neighbour_bottom" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> + Tells Godot which node it should give keyboard focus to if the user presses Tab, the down arrow on the keyboard, or down on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. + If the user presses Tab, Godot will give focus to the closest node to the right first, then to the bottom. If the user presses Shift+Tab, Godot will look to the left of the node, then above it. </member> <member name="focus_neighbour_left" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> + Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab, the left arrow on the keyboard or left on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the left of this one. </member> <member name="focus_neighbour_right" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> + Tells Godot which node it should give keyboard focus to if the user presses Tab, the right arrow on the keyboard or right on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. </member> <member name="focus_neighbour_top" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> + Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab, the top arrow on the keyboard or top on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. </member> <member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" enum="Control.GrowDirection"> </member> <member name="grow_vertical" type="int" setter="set_v_grow_direction" getter="get_v_grow_direction" enum="Control.GrowDirection"> </member> <member name="hint_tooltip" type="String" setter="set_tooltip" getter="_get_tooltip"> + Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments. </member> <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin"> + Distance between the node's bottom edge and its parent container, based on [member anchor_bottom]. + Margins are often controlled by one or multiple parent [Container] nodes. Margins update automatically when you move or resize the node. </member> <member name="margin_left" type="float" setter="set_margin" getter="get_margin"> + Distance between the node's left edge and its parent container, based on [member anchor_left]. </member> <member name="margin_right" type="float" setter="set_margin" getter="get_margin"> + Distance between the node's right edge and its parent container, based on [member anchor_right]. </member> <member name="margin_top" type="float" setter="set_margin" getter="get_margin"> + Distance between the node's top edge and its parent container, based on [member anchor_top]. </member> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter"> </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents"> </member> <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size"> + The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. </member> <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset"> + By default, the node's pivot is its top-left corner. When you change its [member rect_scale], it will scale around this pivot. Set this property to [member rect_size] / 2 to center the pivot in the node's rectangle. </member> <member name="rect_position" type="Vector2" setter="set_position" getter="get_position"> + The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member rect_pivot_offset]. </member> <member name="rect_rotation" type="float" setter="set_rotation_deg" getter="get_rotation_deg"> + The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position. </member> <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale"> + The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. </member> <member name="rect_size" type="Vector2" setter="set_size" getter="get_size"> + The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically. </member> <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags"> + Tells the parent [Container] nodes how they should resize and place the node on the X axis. Use one of the [code]SIZE_*[/code] constants to change the flags. See the constants to learn what each does. </member> <member name="size_flags_stretch_ratio" type="float" setter="set_stretch_ratio" getter="get_stretch_ratio"> + If the node and at least one of its neighbours uses the [code]SIZE_EXPAND[/code] size flag, the parent [Container] will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space. </member> <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags"> + Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [code]SIZE_*[/code] constants to change the flags. See the constants to learn what each does. </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> + Changing this property replaces the current [Theme] resource this node and all its [code]Control[/code] children use. </member> </members> <signals> @@ -903,6 +932,7 @@ <argument index="0" name="ev" type="Object"> </argument> <description> + Emitted when the node receives an [InputEvent]. </description> </signal> <signal name="minimum_size_changed"> @@ -912,16 +942,17 @@ </signal> <signal name="modal_closed"> <description> + Emitted when a modal [code]Control[/code] is closed. See [method show_modal]. </description> </signal> <signal name="mouse_entered"> <description> - Emitted when the mouse enters the control's area. + Emitted when the mouse enters the control's [code]Rect[/code] area. </description> </signal> <signal name="mouse_exited"> <description> - Emitted when the mouse leaves the control's area. + Emitted when the mouse leaves the control's [code]Rect[/code] area. </description> </signal> <signal name="resized"> @@ -931,116 +962,154 @@ </signal> <signal name="size_flags_changed"> <description> - Emitted when the size flags change. + Emitted when one of the size flags changes. See [member size_flags_horizontal] and [member size_flags_vertical]. </description> </signal> </signals> <constants> <constant name="FOCUS_NONE" value="0"> - Control can't acquire focus. + The node cannot grab focus. Use with [member set_focus_mode]. </constant> <constant name="FOCUS_CLICK" value="1"> - Control can acquire focus only if clicked. + The node can only grab focus on mouse clicks. Use with [member set_focus_mode]. </constant> <constant name="FOCUS_ALL" value="2"> - Control can acquire focus if clicked, or by pressing TAB/Directionals in the keyboard from another Control. + The node can grab focus on mouse click or using the arrows and the Tab keys on the keyboard. Use with [member set_focus_mode]. </constant> <constant name="NOTIFICATION_RESIZED" value="40" enum=""> - Control changed size (get_size() reports the new size). + Sent when the node changes size. Use [member rect_size] to get the new size. </constant> <constant name="NOTIFICATION_MOUSE_ENTER" value="41" enum=""> - Mouse pointer entered the area of the Control. + Sent when the mouse pointer enters the node's [code]Rect[/code] area. </constant> <constant name="NOTIFICATION_MOUSE_EXIT" value="42" enum=""> - Mouse pointer exited the area of the Control. + Sent when the mouse pointer exits the node's [code]Rect[/code] area. </constant> <constant name="NOTIFICATION_FOCUS_ENTER" value="43" enum=""> - Control gained focus. + Sent when the node grabs focus. </constant> <constant name="NOTIFICATION_FOCUS_EXIT" value="44" enum=""> - Control lost focus. + Sent when the node loses focus. </constant> <constant name="NOTIFICATION_THEME_CHANGED" value="45" enum=""> - Theme changed. Redrawing is desired. + Sent when the node's [member theme] changes, right before Godot redraws the [code]Control[/code]. Happens when you call one of the [code]add_*_override[/code] </constant> <constant name="NOTIFICATION_MODAL_CLOSE" value="46" enum=""> - Modal control was closed. + Sent when an open modal dialog closes. See [member show_modal]. </constant> <constant name="CURSOR_ARROW" value="0"> + Show the system's arrow mouse cursor when the user hovers the node. Use with [method set_default_cursor_shape]. </constant> <constant name="CURSOR_IBEAM" value="1"> + Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text. </constant> <constant name="CURSOR_POINTING_HAND" value="2"> + Show the system's pointing hand mouse cursor when the user hovers the node. </constant> <constant name="CURSOR_CROSS" value="3"> + Show the system's cross mouse cursor when the user hovers the node. </constant> <constant name="CURSOR_WAIT" value="4"> + Show the system's wait mouse cursor, often an hourglass, when the user hovers the node. </constant> <constant name="CURSOR_BUSY" value="5"> + Show the system's busy mouse cursor when the user hovers the node. Often an hourglass. </constant> <constant name="CURSOR_DRAG" value="6"> + Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock. </constant> <constant name="CURSOR_CAN_DROP" value="7"> + Show the system's drop mouse cursor when the user hovers the node. It can be an open hand. It tells the user they can drop an item they're currently grabbing, like a node in the Scene dock. </constant> <constant name="CURSOR_FORBIDDEN" value="8"> + Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle. </constant> <constant name="CURSOR_VSIZE" value="9"> + Show the system's vertical resize mouse cursor when the user hovers the node. A double headed vertical arrow. It tells the user they can resize the window or the panel vertically. </constant> <constant name="CURSOR_HSIZE" value="10"> + Show the system's horizontal resize mouse cursor when the user hovers the node. A double headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. </constant> <constant name="CURSOR_BDIAGSIZE" value="11"> + Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. </constant> <constant name="CURSOR_FDIAGSIZE" value="12"> + Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double headed arrow that goes from the top left to the bottom right, the opposite of [code]CURSOR_BDIAGSIZE[/code]. It tells the user they can resize the window or the panel both horizontally and vertically. </constant> <constant name="CURSOR_MOVE" value="13"> + Show the system's move mouse cursor when the user hovers the node. It shows 2 double-headed arrows at a 90 degree angle. It tells the user they can move a UI element freely. </constant> <constant name="CURSOR_VSPLIT" value="14"> + Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as [code]CURSOR_VSIZE[/code]. </constant> <constant name="CURSOR_HSPLIT" value="15"> + Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as [code]CURSOR_HSIZE[/code]. </constant> <constant name="CURSOR_HELP" value="16"> + Show the system's help mouse cursor when the user hovers the node, a question mark. </constant> <constant name="PRESET_TOP_LEFT" value="0"> + Snap all 4 anchors to the top-left of the parent container's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_TOP_RIGHT" value="1"> + Snap all 4 anchors to the top-right of the parent container's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_BOTTOM_LEFT" value="2"> + Snap all 4 anchors to the bottom-left of the parent container's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_BOTTOM_RIGHT" value="3"> + Snap all 4 anchors to the bottom-right of the parent container's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_CENTER_LEFT" value="4"> + Snap all 4 anchors to the center of the left edge of the parent container's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_CENTER_TOP" value="5"> + Snap all 4 anchors to the center of the top edge of the parent container's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_CENTER_RIGHT" value="6"> + Snap all 4 anchors to the center of the right edge of the parent container's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_CENTER_BOTTOM" value="7"> + Snap all 4 anchors to the center of the bottom edge of the parent container's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_CENTER" value="8"> + Snap all 4 anchors to the center of the parent container's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_LEFT_WIDE" value="9"> + Snap all 4 anchors to the left edge of the parent container. The left margin becomes relative to the left edge and the top margin relative to the top left corner of the node's parent. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_TOP_WIDE" value="10"> + Snap all 4 anchors to the top edge of the parent container. The left margin becomes relative to the top left corner, the top margin relative to the top edge, and the right margin relative to the top right corner of the node's parent. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_RIGHT_WIDE" value="11"> + Snap all 4 anchors to the right edge of the parent container. The right margin becomes relative to the right edge and the top margin relative to the top right corner of the node's parent. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_BOTTOM_WIDE" value="12"> + Snap all 4 anchors to the bottom edge of the parent container. The left margin becomes relative to the bottom left corner, the bottom margin relative to the bottom edge, and the right margin relative to the bottom right corner of the node's parent. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_VCENTER_WIDE" value="13"> + Snap all 4 anchors to a vertical line that cuts the parent container in half. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_HCENTER_WIDE" value="14"> + Snap all 4 anchors to a horizontal line that cuts the parent container in half. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_WIDE" value="15"> + Snap all 4 anchors to the respective corners of the parent container. Set all 4 margins to 0 after you applied this preset and the [code]Control[/code] will fit its parent container. Use with [method set_anchors_preset]. </constant> <constant name="SIZE_EXPAND" value="2"> + Tells the parent [Container] to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See [member size_flags_stretch_ratio]. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="SIZE_FILL" value="1"> + Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="SIZE_EXPAND_FILL" value="3"> + Sets the node's size flags to both fill and expand. See the 2 constants above for more information. </constant> <constant name="SIZE_SHRINK_CENTER" value="4"> + Tells the parent [Container] to center the node in itself. It centers the [code]Control[/code] based on its bounding box, so it doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="SIZE_SHRINK_END" value="8"> + Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="MOUSE_FILTER_STOP" value="0"> </constant> @@ -1053,10 +1122,10 @@ <constant name="GROW_DIRECTION_END" value="1"> </constant> <constant name="ANCHOR_BEGIN" value="0"> - X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP. + Snaps one of the 4 anchor's sides to the origin of the node's [code]Rect[/code], in the top left. Use it with one of the [code]anchor_*[/code] member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset]. </constant> <constant name="ANCHOR_END" value="1"> - X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM. + Snaps one of the 4 anchor's sides to the end of the node's [code]Rect[/code], in the bottom right. Use it with one of the [code]anchor_*[/code] member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset]. </constant> </constants> </class> diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml index 9a7cb0d475..822b99547e 100644 --- a/doc/classes/ConvexPolygonShape.xml +++ b/doc/classes/ConvexPolygonShape.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Convex Polygon Shape. + Convex polygon shape for 3D physics. </brief_description> <description> - Convex polygon shape resource, which can be set into a [PhysicsBody] or area. + Convex polygon shape resource, which can be added to a [PhysicsBody] or area. </description> <tutorials> </tutorials> @@ -28,6 +28,7 @@ </methods> <members> <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points"> + The list of 3D points forming the convex polygon shape. </member> </members> <constants> diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml index c5b6d90041..0cb4f4045b 100644 --- a/doc/classes/ConvexPolygonShape2D.xml +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -16,7 +16,7 @@ <return type="PoolVector2Array"> </return> <description> - Return a list of points in either clockwise or counter clockwise order, forming a convex polygon. + Returns a list of points in either clockwise or counter clockwise order, forming a convex polygon. </description> </method> <method name="set_point_cloud"> @@ -34,12 +34,13 @@ <argument index="0" name="points" type="PoolVector2Array"> </argument> <description> - Set a list of points in either clockwise or counter clockwise order, forming a convex polygon. + Sets a list of points in either clockwise or counter clockwise order, forming a convex polygon. </description> </method> </methods> <members> <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points"> + The polygon's list of vertices. Can be in either clockwise or counterclockwise order. </member> </members> <constants> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index ee0b873084..c3c4c7a8ac 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -85,6 +85,7 @@ <return type="int"> </return> <description> + Returns the currently opened directory's drive index. See [method get_drive] to convert returned index to the name of the drive. </description> </method> <method name="get_drive"> diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml new file mode 100644 index 0000000000..e165ae376b --- /dev/null +++ b/doc/classes/EditorResourceConversionPlugin.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorResourceConversionPlugin" inherits="Reference" category="Core" version="3.0.alpha.custom_build"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + <method name="_convert" qualifiers="virtual"> + <return type="Resource"> + </return> + <argument index="0" name="resource" type="Resource"> + </argument> + <description> + </description> + </method> + <method name="_converts_to" qualifiers="virtual"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index e530557a23..acf36b6a08 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -41,7 +41,7 @@ <argument index="3" name="userdata" type="Variant"> </argument> <description> - Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. + Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. </description> </method> <method name="queue_resource_preview"> @@ -56,7 +56,7 @@ <argument index="3" name="userdata" type="Variant"> </argument> <description> - Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty 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 texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything. </description> </method> <method name="remove_preview_generator"> diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml index de9ea5282a..baab995fab 100644 --- a/doc/classes/EditorSpatialGizmo.xml +++ b/doc/classes/EditorSpatialGizmo.xml @@ -24,6 +24,8 @@ </return> <argument index="0" name="triangles" type="TriangleMesh"> </argument> + <argument index="1" name="bounds" type="Rect3"> + </argument> <description> Add collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw]. </description> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 2372c619f5..5bb0810296 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Engine" inherits="Object" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Access to basic engine properties. </brief_description> <description> + The [Engine] class allows you to query and modify the game's run-time parameters, such as frames per second, time scale, and others. </description> <tutorials> </tutorials> @@ -13,7 +15,7 @@ <return type="int"> </return> <description> - Return the total amount of frames drawn. + Returns the total number of frames drawn. </description> </method> <method name="get_frames_per_second" qualifiers="const"> @@ -27,26 +29,28 @@ <return type="int"> </return> <description> - Return the amount of fixed iterations per second (for fixed process and physics). + Returns the number of fixed iterations per second (for fixed process and physics). </description> </method> <method name="get_main_loop" qualifiers="const"> <return type="MainLoop"> </return> <description> - Return the main loop object (see [MainLoop] and [SceneTree]). + Returns the main loop object (see [MainLoop] and [SceneTree]). </description> </method> <method name="get_target_fps" qualifiers="const"> <return type="float"> </return> <description> + Returns the desired frames per second. If the hardware cannot keep up, this setting may not be respected. It defaults to 0, which indicates no limit. </description> </method> <method name="get_time_scale"> <return type="float"> </return> <description> + Returns how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. </description> </method> <method name="get_version_info" qualifiers="const"> @@ -67,12 +71,14 @@ <return type="bool"> </return> <description> + Returns [code]true[/code] if the editor is running. </description> </method> - <method name="is_in_fixed_frame" qualifiers="const"> + <method name="is_in_physics_frame" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the game is inside the fixed process and physics phase of the game loop. </description> </method> <method name="set_editor_hint"> @@ -81,6 +87,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> + Sets the running inside the editor hint if [code]enabled[/code] is [code]true[/code]. </description> </method> <method name="set_iterations_per_second"> @@ -89,7 +96,7 @@ <argument index="0" name="iterations_per_second" type="int"> </argument> <description> - Set the amount of fixed iterations per second (for fixed process and physics). + Sets the number of fixed iterations per second (for fixed process and physics). </description> </method> <method name="set_target_fps"> @@ -98,6 +105,7 @@ <argument index="0" name="target_fps" type="int"> </argument> <description> + Sets the target frames per second. </description> </method> <method name="set_time_scale"> @@ -106,6 +114,7 @@ <argument index="0" name="time_scale" type="float"> </argument> <description> + Sets the time scale. </description> </method> </methods> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 4338b188a6..3880c45a86 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -1,8 +1,15 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Environment" inherits="Resource" category="Core" version="3.0.alpha.custom_build"> +<class name="Environment" inherits="Resource" category="Core" version="3.0"> <brief_description> + Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options. </brief_description> <description> + Resource for environment nodes (like [WorldEnvironment]) that define multiple environment operations (such as background [Sky] or [Color], ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is: + - DOF Blur + - Motion Blur + - Bloom + - Tonemap (auto exposure) + - Adjustments </description> <tutorials> </tutorials> @@ -982,118 +989,174 @@ </methods> <members> <member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness"> + Global brightness value of the rendered scene (default value is 1). </member> <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction"> + Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. </member> <member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast"> + Global contrast value of the rendered scene (default value is 1). </member> <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled"> + Enables the adjustment_* options provided by this resource. If false, adjustments modifications will have no effect on the rendered scene. </member> <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation"> + Global color saturation value of the rendered scene (default value is 1). </member> <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color"> + [Color] of the ambient light. </member> <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy"> + Energy of the ambient light. The higher the value, the stronger the light. </member> <member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution"> + Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. </member> <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure"> + Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light. </member> <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max"> + Maximum luminance value for the auto exposure. </member> <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min"> + Minimum luminance value for the auto exposure. </member> <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey"> + Scale of the auto exposure effect. Affects the intensity of auto exposure. </member> <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed"> + Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. </member> <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer"> + Maximum layer id (if using Layer background mode). </member> <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color"> + Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). </member> <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy"> + Power of light emitted by the background. </member> <member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode"> + Defines the mode of background. </member> <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky"> + [Sky] resource defined as background. </member> <member name="background_sky_scale" type="float" setter="set_sky_scale" getter="get_sky_scale"> + [Sky] resource's scale. </member> <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount"> + Amount of far blur. </member> <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance"> + Distance from the camera where the far blur effect affects the rendering. </member> <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled"> + Enables the far blur effect. </member> <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality"> + Quality of the far blur quality. </member> <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition"> + Transition between no-blur area and far blur. </member> <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount"> + Amount of near blur. </member> <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance"> + Distance from the camera where the near blur effect affects the rendering. </member> <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled"> + Enables the near blur effect. </member> <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality"> + Quality of the near blur quality. </member> <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition"> + Transition between near blur and no-blur area. </member> <member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color"> + Fog's [Color]. </member> <member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin"> + Fog's depth starting distance from the camera. </member> <member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve"> + Value defining the fog depth intensity. </member> <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled"> + Enables the fog depth. </member> <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled"> + Enables the fog. Needs fog_height_enabled and/or for_depth_enabled to actually display fog. </member> <member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve"> + Value defining the fog height intensity. </member> <member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled"> + Enables the fog height. </member> <member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max"> + Maximum height of fog. </member> <member name="fog_height_min" type="float" setter="set_fog_height_min" getter="get_fog_height_min"> + Minimum height of fog. </member> <member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount"> + Amount of sun that affects the fog rendering. </member> <member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color"> + Sun [Color]. </member> <member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve"> + Amount of light that the fog transmits. </member> <member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled"> + Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog. </member> <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled"> </member> <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode"> + Glow blending mode. </member> <member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom"> + Bloom value (global glow). </member> <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled"> + Enables glow rendering. </member> <member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale"> + Bleed scale of the HDR glow. </member> <member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold"> + Bleed threshold of the HDR glow. </member> <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity"> + Glow intensity. </member> <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + First level of glow (most local). </member> <member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + Second level of glow. </member> <member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + Third level of glow. </member> <member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + Fourth level of glow. </member> <member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + Fifth level of glow. </member> <member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + Sixth level of glow. </member> <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + Seventh level of glow (most global). </member> <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength"> + Glow strength. </member> <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance"> </member> @@ -1126,48 +1189,69 @@ <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2"> </member> <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure"> + Default exposure for tonemap. </member> <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper"> + Tonemapping mode. </member> <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white"> + White reference value for tonemap. </member> </members> <constants> <constant name="BG_KEEP" value="5"> + Keep on screen every pixel drawn in the background. </constant> <constant name="BG_CLEAR_COLOR" value="0"> + Clear the background using the project's clear color. </constant> <constant name="BG_COLOR" value="1"> + Clear the background using a custom clear color. </constant> <constant name="BG_SKY" value="2"> + Display a user-defined sky in the background. </constant> <constant name="BG_COLOR_SKY" value="3"> + Clear the background using a custom clear color and allows defining a sky for shading and reflection. </constant> <constant name="BG_CANVAS" value="4"> + Display a [CanvasLayer] in the background. </constant> <constant name="BG_MAX" value="6"> + Helper constant keeping track of the enum's size, has no direct usage in API calls. </constant> <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0"> + Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. </constant> <constant name="GLOW_BLEND_MODE_SCREEN" value="1"> + Screen glow blending mode. Increases brightness, used frequently with bloom. </constant> <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2"> + Softlight glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. </constant> <constant name="GLOW_BLEND_MODE_REPLACE" value="3"> + Replace glow blending mode. Replaces all pixels' color by the glow value. </constant> <constant name="TONE_MAPPER_LINEAR" value="0"> + Linear tonemapper operator. Reads the linear data and performs an exposure adjustment. </constant> <constant name="TONE_MAPPER_REINHARDT" value="1"> + Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: color = color / (1 + color). </constant> <constant name="TONE_MAPPER_FILMIC" value="2"> + Filmic tonemapper operator. </constant> <constant name="TONE_MAPPER_ACES" value="3"> + Academy Color Encoding System tonemapper operator. </constant> <constant name="DOF_BLUR_QUALITY_LOW" value="0"> + Low depth-of-field blur quality. </constant> <constant name="DOF_BLUR_QUALITY_MEDIUM" value="1"> + Medium depth-of-field blur quality. </constant> <constant name="DOF_BLUR_QUALITY_HIGH" value="2"> + High depth-of-field blur quality. </constant> </constants> </class> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index e1a024270e..6272d4105c 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -30,14 +30,14 @@ <return type="void"> </return> <description> - Close the currently opened file. + Closes the currently opened file. </description> </method> <method name="eof_reached" qualifiers="const"> <return type="bool"> </return> <description> - Return whether the file cursor reached the end of the file. + Returns [code]true[/code] if the file cursor has reached the end of the file. </description> </method> <method name="file_exists" qualifiers="const"> @@ -46,42 +46,42 @@ <argument index="0" name="path" type="String"> </argument> <description> - Get whether or not the file in the specified path exists. + Returns [code]true[/code] if the file exists in the given path. </description> </method> <method name="get_16" qualifiers="const"> <return type="int"> </return> <description> - Get the next 16 bits from the file as an integer. + Returns the next 16 bits from the file as an integer. </description> </method> <method name="get_32" qualifiers="const"> <return type="int"> </return> <description> - Get the next 32 bits from the file as an integer. + Returns the next 32 bits from the file as an integer. </description> </method> <method name="get_64" qualifiers="const"> <return type="int"> </return> <description> - Get the next 64 bits from the file as an integer. + Returns the next 64 bits from the file as an integer. </description> </method> <method name="get_8" qualifiers="const"> <return type="int"> </return> <description> - Get the next 8 bits from the file as an integer. + Returns the next 8 bits from the file as an integer. </description> </method> <method name="get_as_text" qualifiers="const"> <return type="String"> </return> <description> - Get the whole file as a [String]. + Returns the whole file as a [String]. </description> </method> <method name="get_buffer" qualifiers="const"> @@ -90,7 +90,7 @@ <argument index="0" name="len" type="int"> </argument> <description> - Get next len bytes of the file as a [PoolByteArray]. + Returns next [code]len[/code] bytes of the file as a [PoolByteArray]. </description> </method> <method name="get_csv_line" qualifiers="const"> @@ -99,49 +99,49 @@ <argument index="0" name="delim" type="String" default="",""> </argument> <description> - 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). + Returns 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). </description> </method> <method name="get_double" qualifiers="const"> <return type="float"> </return> <description> - Get the next 64 bits from the file as a floating point number. + Returns the next 64 bits from the file as a floating point number. </description> </method> <method name="get_endian_swap"> <return type="bool"> </return> <description> - Get whether endian swap is enabled for this file. + Returns [code]true[/code] if endian swap is enabled for this file. </description> </method> <method name="get_error" qualifiers="const"> <return type="int" enum="Error"> </return> <description> - Get the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope]. + Returns the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope]. </description> </method> <method name="get_float" qualifiers="const"> <return type="float"> </return> <description> - Get the next 32 bits from the file as a floating point number. + Returns the next 32 bits from the file as a floating point number. </description> </method> <method name="get_len" qualifiers="const"> <return type="int"> </return> <description> - Return the size of the file in bytes. + Returns the size of the file in bytes. </description> </method> <method name="get_line" qualifiers="const"> <return type="String"> </return> <description> - Get the next line of the file as a [String]. + Returns the next line of the file as a [String]. </description> </method> <method name="get_md5" qualifiers="const"> @@ -150,7 +150,7 @@ <argument index="0" name="path" type="String"> </argument> <description> - Return a md5 String representing the file at the given path or an empty [String] on failure. + Returns an MD5 String representing the file at the given path or an empty [String] on failure. </description> </method> <method name="get_modified_time" qualifiers="const"> @@ -159,27 +159,28 @@ <argument index="0" name="file" type="String"> </argument> <description> + Returns the last time the [code]file[/code] was modified in unix timestamp format or returns a [String] "ERROR IN [code]file[/code]". This unix timestamp can be converted to datetime by using [method OS.get_datetime_from_unix_time]. </description> </method> <method name="get_pascal_string"> <return type="String"> </return> <description> - Get a [String] saved in Pascal format from the file. + Returns a [String] saved in Pascal format from the file. </description> </method> <method name="get_position" qualifiers="const"> <return type="int"> </return> <description> - Return the file cursor position. + Returns the file cursor's position. </description> </method> <method name="get_real" qualifiers="const"> <return type="float"> </return> <description> - Get the next bits from the file as a floating point number. + Returns the next bits from the file as a floating point number. </description> </method> <method name="get_sha256" qualifiers="const"> @@ -188,21 +189,21 @@ <argument index="0" name="path" type="String"> </argument> <description> - Return a sha256 String representing the file at the given path or an empty [String] on failure. + Returns a SHA-256 [String] representing the file at the given path or an empty [String] on failure. </description> </method> <method name="get_var" qualifiers="const"> <return type="Variant"> </return> <description> - Get the next Variant value from the file. + Returns the next [Variant] value from the file. </description> </method> <method name="is_open" qualifiers="const"> <return type="bool"> </return> <description> - Return whether the file is currently opened. + Returns [code]true[/code] if the file is currently opened. </description> </method> <method name="open"> @@ -213,7 +214,7 @@ <argument index="1" name="flags" type="int"> </argument> <description> - Open the file for writing or reading, depending on the flags. + Opens the file for writing or reading, depending on the flags. </description> </method> <method name="open_compressed"> @@ -226,7 +227,7 @@ <argument index="2" name="compression_mode" type="int" default="0"> </argument> <description> - Open a compressed file for reading or writing. The compression_mode can be set as one of the COMPRESSION_* constants. + Opens a compressed file for reading or writing. Use COMPRESSION_* constants to set [code]compression_mode[/code]. </description> </method> <method name="open_encrypted"> @@ -239,7 +240,7 @@ <argument index="2" name="key" type="PoolByteArray"> </argument> <description> - Open an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. + Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. </description> </method> <method name="open_encrypted_with_pass"> @@ -252,7 +253,7 @@ <argument index="2" name="pass" type="String"> </argument> <description> - Open an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. + Opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. </description> </method> <method name="seek"> @@ -270,7 +271,7 @@ <argument index="0" name="position" type="int" default="0"> </argument> <description> - 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. + Changes 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. </description> </method> <method name="set_endian_swap"> @@ -279,7 +280,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Set whether to swap the endianness of the file. Enable this if you're dealing with files written in big endian machines. + If [code]true[/code] the file's endianness is swapped. Use 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. </description> </method> @@ -289,7 +290,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Store an integer as 16 bits in the file. + Stores an integer as 16 bits in the file. </description> </method> <method name="store_32"> @@ -298,7 +299,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Store an integer as 32 bits in the file. + Stores an integer as 32 bits in the file. </description> </method> <method name="store_64"> @@ -307,7 +308,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Store an integer as 64 bits in the file. + Stores an integer as 64 bits in the file. </description> </method> <method name="store_8"> @@ -316,7 +317,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Store an integer as 8 bits in the file. + Stores an integer as 8 bits in the file. </description> </method> <method name="store_buffer"> @@ -325,7 +326,7 @@ <argument index="0" name="buffer" type="PoolByteArray"> </argument> <description> - Store the given array of bytes in the file. + Stores the given array of bytes in the file. </description> </method> <method name="store_double"> @@ -334,7 +335,7 @@ <argument index="0" name="value" type="float"> </argument> <description> - Store a floating point number as 64 bits in the file. + Stores a floating point number as 64 bits in the file. </description> </method> <method name="store_float"> @@ -343,7 +344,7 @@ <argument index="0" name="value" type="float"> </argument> <description> - Store a floating point number as 32 bits in the file. + Stores a floating point number as 32 bits in the file. </description> </method> <method name="store_line"> @@ -352,7 +353,7 @@ <argument index="0" name="line" type="String"> </argument> <description> - Store the given [String] as a line in the file. + Stores the given [String] as a line in the file. </description> </method> <method name="store_pascal_string"> @@ -361,7 +362,7 @@ <argument index="0" name="string" type="String"> </argument> <description> - Store the given [String] as a line in the file in Pascal format (i.e. also store the length of the string). + Stores the given [String] as a line in the file in Pascal format (i.e. also store the length of the string). </description> </method> <method name="store_real"> @@ -370,7 +371,7 @@ <argument index="0" name="value" type="float"> </argument> <description> - Store a floating point number in the file. + Stores a floating point number in the file. </description> </method> <method name="store_string"> @@ -379,7 +380,7 @@ <argument index="0" name="string" type="String"> </argument> <description> - Store the given [String] in the file. + Stores the given [String] in the file. </description> </method> <method name="store_var"> @@ -388,33 +389,34 @@ <argument index="0" name="value" type="Variant"> </argument> <description> - Store any Variant value in the file. + Stores any Variant value in the file. </description> </method> </methods> <constants> <constant name="READ" value="1"> - Open the file for reading. + Opens the file for read operations. </constant> <constant name="WRITE" value="2"> - Open the file for writing. Create it if the file not exists and truncate if it exists. + Opens the file for write operations. Create it if the file does not exist and truncate if it exists. </constant> <constant name="READ_WRITE" value="3"> - Open the file for reading and writing, without truncating the file. + Opens the file for read and write operations. Does not truncate the file. </constant> <constant name="WRITE_READ" value="7"> - Open the file for reading and writing. Create it if the file not exists and truncate if it exists. + Opens the file for read and write operations. Create it if the file does not exist and truncate if it exists. </constant> <constant name="COMPRESSION_FASTLZ" value="0"> - Use the FastLZ compression method. + Uses the FastLZ compression method. </constant> <constant name="COMPRESSION_DEFLATE" value="1"> - Use the Deflate compression method. + Uses the Deflate compression method. </constant> <constant name="COMPRESSION_ZSTD" value="2"> - Use the Zstd compression method. + Uses the Zstd compression method. </constant> <constant name="COMPRESSION_GZIP" value="3"> + Uses the gzip compression method. </constant> </constants> </class> diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml index a7593dc2a1..1277cef77d 100644 --- a/doc/classes/FuncRef.xml +++ b/doc/classes/FuncRef.xml @@ -16,6 +16,7 @@ <return type="Variant"> </return> <description> + Calls the referenced function previously set by [method set_function] or [method @GDScript.funcref]. </description> </method> <method name="set_function"> @@ -24,7 +25,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Set the name of the function to call on the object, without parentheses or any parameters. + The name of the referenced function to call on the object, without parentheses or any parameters. </description> </method> <method name="set_instance"> @@ -33,7 +34,7 @@ <argument index="0" name="instance" type="Object"> </argument> <description> - 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]. + The object containing 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]. </description> </method> </methods> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index f97908b0a2..e086ae86b1 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Gradient" inherits="Resource" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Color interpolator node + Color interpolator node. </brief_description> <description> 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. @@ -122,8 +122,10 @@ </methods> <members> <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors"> + Gradient's colors returned as a [PoolColorArray]. </member> <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets"> + Gradient's offsets returned as a [PoolRealArray]. </member> </members> <constants> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index c9771f1ada..f064029a01 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -228,9 +228,11 @@ <constants> </constants> <theme_items> + <theme_item name="SnapGrid" type="Texture"> + </theme_item> <theme_item name="bezier_len_neg" type="int"> </theme_item> - <theme_item name="bezier_len_position" type="int"> + <theme_item name="bezier_len_pos" type="int"> </theme_item> <theme_item name="bg" type="StyleBox"> </theme_item> @@ -244,7 +246,5 @@ </theme_item> <theme_item name="reset" type="Texture"> </theme_item> - <theme_item name="snap" type="Texture"> - </theme_item> </theme_items> </class> diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index ca7b868cd8..30976eff99 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -30,6 +30,7 @@ </methods> <members> <member name="columns" type="int" setter="set_columns" getter="get_columns"> + The number of columns in the [code]GridContainer[/code]. If modified, [code]GridContainer[/code] reorders its children to accommodate the new layout. </member> </members> <constants> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 2b74a15fd5..fdaee798db 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -4,7 +4,7 @@ A [Texture] based on an [Image]. </brief_description> <description> - A [Texture] based on an [Image]. Can be created from an [Image]. + A [Texture] based on an [Image]. Can be created from an [Image] with [method create_from_image]. </description> <tutorials> </tutorials> @@ -66,7 +66,7 @@ <argument index="0" name="path" type="String"> </argument> <description> - Load an [ImageTexure]. + Load an [ImageTexture]. </description> </method> <method name="set_data"> @@ -93,6 +93,7 @@ <argument index="0" name="size" type="Vector2"> </argument> <description> + Resizes the [code]ImageTexture[/code] to the specified dimensions. </description> </method> <method name="set_storage"> diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml index b12f9c99a9..cd7074aeaf 100644 --- a/doc/classes/ImmediateGeometry.xml +++ b/doc/classes/ImmediateGeometry.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Node to draw simple geometry from code, ala OpenGL 1.x + Draws simple geometry from code. </brief_description> <description> + Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x. </description> <tutorials> </tutorials> @@ -31,7 +32,7 @@ <argument index="0" name="position" type="Vector3"> </argument> <description> - Add a vertex with the currently set color/uv/etc. + Adds a vertex with the currently set color/uv/etc. </description> </method> <method name="begin"> @@ -50,14 +51,14 @@ <return type="void"> </return> <description> - Clear everything that was drawn using begin/end. + Clears everything that was drawn using begin/end. </description> </method> <method name="end"> <return type="void"> </return> <description> - Call this when done adding a batch of geometry, otherwise it can't be displayed. + Ends a drawing context and displays the results. </description> </method> <method name="set_color"> @@ -66,7 +67,7 @@ <argument index="0" name="color" type="Color"> </argument> <description> - Set the color that the next vertex will use to be drawn. + The current drawing color. </description> </method> <method name="set_normal"> @@ -75,7 +76,7 @@ <argument index="0" name="normal" type="Vector3"> </argument> <description> - Set the normal that the next vertex will use to be drawn. + The next vertex's normal. </description> </method> <method name="set_tangent"> @@ -84,7 +85,7 @@ <argument index="0" name="tangent" type="Plane"> </argument> <description> - Set the tangent (and binormal facing) that the next vertex will use to be drawn. + The next vertex's tangent (and binormal facing). </description> </method> <method name="set_uv"> @@ -93,7 +94,7 @@ <argument index="0" name="uv" type="Vector2"> </argument> <description> - Set the UV that the next vertex will use to be drawn. + The next vertex's UV. </description> </method> <method name="set_uv2"> @@ -102,7 +103,7 @@ <argument index="0" name="uv" type="Vector2"> </argument> <description> - Set the second layer of UV that the next vertex will use to be drawn. + The next vertex's second layer UV. </description> </method> </methods> diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index a38b2f61cf..8bff140bb4 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="JSON" inherits="Object" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Helper class for parsing JSON data. </brief_description> <description> + Helper class for parsing JSON data. </description> <tutorials> </tutorials> @@ -15,6 +17,7 @@ <argument index="0" name="json" type="String"> </argument> <description> + Parses a JSON encoded string and returns a [JSONParseResult] containing the result. </description> </method> <method name="print"> @@ -23,6 +26,7 @@ <argument index="0" name="value" type="Variant"> </argument> <description> + Converts a Variant var to JSON text and returns the result. Useful for serializing data to store or send over the network. </description> </method> </methods> diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml index 6aeb614508..86edaaf1e6 100644 --- a/doc/classes/JSONParseResult.xml +++ b/doc/classes/JSONParseResult.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="JSONParseResult" inherits="Reference" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Data class wrapper for decoded JSON. </brief_description> <description> + Returned by [method JSON.parse], [JSONParseResult] contains decoded JSON or error information if JSON source not successfully parsed. You can check if JSON source was successfully parsed with [code]if json_result.error == 0[/code]. </description> <tutorials> </tutorials> @@ -68,12 +70,24 @@ </methods> <members> <member name="error" type="int" setter="set_error" getter="get_error" enum="Error"> + The error type if JSON source was not successfully parsed. See [@Global Scope]ERR_* constants. </member> <member name="error_line" type="int" setter="set_error_line" getter="get_error_line"> + The line number where the error occurred if JSON source was not successfully parsed. </member> <member name="error_string" type="String" setter="set_error_string" getter="get_error_string"> + The error message if JSON source was not successfully parsed. See [@Global Scope]ERR_* constants. </member> <member name="result" type="Variant" setter="set_result" getter="get_result"> + A [Variant] containing the parsed JSON. Use typeof() to check if it is what you expect. For exemple, if JSON source starts with braces [code]{}[/code] a [Dictionary] will be returned, if JSON source starts with array braces [code][][/code] an [Array] will be returned. + [i]Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types.[/i] + [codeblock] + p = JSON.parse('["hello", "world", "!"]') + if typeof(p) == TYPE_ARRAY: + print(p[0]) # prints 'hello' + else: + print("unexpected results") + [/codeblock] </member> </members> <constants> diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index 8f242c5187..86354548cd 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -6,7 +6,7 @@ <description> Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such 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 Characters: KinematicBody also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. </description> <tutorials> </tutorials> @@ -17,6 +17,7 @@ <return type="Vector3"> </return> <description> + Returns the velocity of the floor. Only updates when calling [method move_and_slide]. </description> </method> <method name="get_safe_margin" qualifiers="const"> @@ -31,30 +32,35 @@ <argument index="0" name="slide_idx" type="int"> </argument> <description> + Returns a [KinematicCollision], which contains information about a collision that occured during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count]()-1). </description> </method> <method name="get_slide_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. </description> </method> <method name="is_on_ceiling" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide]. </description> </method> <method name="is_on_floor" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide]. </description> </method> <method name="is_on_wall" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide]. </description> </method> <method name="move_and_collide"> @@ -63,6 +69,7 @@ <argument index="0" name="rel_vec" type="Vector3"> </argument> <description> + Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision], which contains information about the collision. </description> </method> <method name="move_and_slide"> @@ -79,6 +86,13 @@ <argument index="4" name="floor_max_angle" type="float" default="0.785398"> </argument> <description> + Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. + [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method. + [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. + If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. + If the body collides, it will change direction a maximum of [code]max_bounces[/code] times before it stops. + [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. + Returns the movement that remained when the body stopped. To get more detailed information about collisions that occured, use [method get_slide_collision]. </description> </method> <method name="set_safe_margin"> @@ -97,11 +111,13 @@ <argument index="1" name="rel_vec" type="Vector3"> </argument> <description> + Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. </description> </method> </methods> <members> <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin"> + If the body is at least this close to another body, this body will consider them to be colliding. </member> </members> <constants> diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index dddae2c0fc..e7c58fdb3a 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -6,7 +6,7 @@ <description> Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such 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. + Kinematic Characters: KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. </description> <tutorials> </tutorials> @@ -17,6 +17,7 @@ <return type="Vector2"> </return> <description> + Returns the velocity of the floor. Only updates when calling [method move_and_slide]. </description> </method> <method name="get_safe_margin" qualifiers="const"> @@ -31,30 +32,35 @@ <argument index="0" name="slide_idx" type="int"> </argument> <description> + Returns a [KinematicCollision2D], which contains information about a collision that occured during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count]()-1). </description> </method> <method name="get_slide_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. </description> </method> <method name="is_on_ceiling" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide]. </description> </method> <method name="is_on_floor" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide]. </description> </method> <method name="is_on_wall" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide]. </description> </method> <method name="move_and_collide"> @@ -63,7 +69,7 @@ <argument index="0" name="rel_vec" type="Vector2"> </argument> <description> - Moves the body along the given vector. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the colliding body. + Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision. </description> </method> <method name="move_and_slide"> @@ -80,6 +86,13 @@ <argument index="4" name="floor_max_angle" type="float" default="0.785398"> </argument> <description> + Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. + [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method. + [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. + If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. + If the body collides, it will change direction a maximum of [code]max_bounces[/code] times before it stops. + [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. + Returns the movement that remained when the body stopped. To get more detailed information about collisions that occured, use [method get_slide_collision]. </description> </method> <method name="set_safe_margin"> @@ -98,14 +111,15 @@ <argument index="1" name="rel_vec" type="Vector2"> </argument> <description> - Returns true if there would be a collision if the body moved from the given point in the given direction. + Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. </description> </method> </methods> <members> <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin"> + If the body is at least this close to another body, this body will consider them to be colliding. </member> </members> <constants> </constants> -</class> +</class>
\ No newline at end of file diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 8c5e69b407..1d1ce63a58 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -15,7 +15,7 @@ <return type="int" enum="Label.Align"> </return> <description> - Return the alignment mode (any of the ALIGN_* enumeration values). + Returns the alignment mode (any of the ALIGN_* enumeration values). </description> </method> <method name="get_line_count" qualifiers="const"> @@ -36,76 +36,77 @@ <return type="int"> </return> <description> - Return the the number of lines to skipped before displaying. + Returns the the number of lines to skip before displaying. </description> </method> <method name="get_max_lines_visible" qualifiers="const"> <return type="int"> </return> <description> - Return the restricted number of lines to display. Returns -1 if unrestricted. + Returns the maximum number of lines to display. Returns -1 if unrestricted. </description> </method> <method name="get_percent_visible" qualifiers="const"> <return type="float"> </return> <description> - Return the restricted number of characters to display (as a percentage of the total text). + Returns the maximum number of characters to display as a percentage of the total text. </description> </method> <method name="get_text" qualifiers="const"> <return type="String"> </return> <description> - Return the label text. Text can contain newlines. + Returns the label text. Text can contain newlines. </description> </method> <method name="get_total_character_count" qualifiers="const"> <return type="int"> </return> <description> - Return the total length of the text. + Returns the total length of the text. </description> </method> <method name="get_valign" qualifiers="const"> <return type="int" enum="Label.VAlign"> </return> <description> - Return the vertical alignment mode (any of the VALIGN_* enumeration values). + Returns the vertical alignment mode (any of the VALIGN_* enumeration values). </description> </method> <method name="get_visible_characters" qualifiers="const"> <return type="int"> </return> <description> - Return the restricted number of characters to display. Returns -1 if unrestricted. + Returns the restricted number of characters to display. Returns -1 if unrestricted. </description> </method> <method name="get_visible_line_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of lines shown. Useful if the [code]Label[/code] 's height cannot currently display all lines. </description> </method> <method name="has_autowrap" qualifiers="const"> <return type="bool"> </return> <description> - Return the state of the [i]autowrap[/i] mode (see [method set_autowrap]). + Returns [code]true[/code] if [i]autowrap[/i] mode (see [method set_autowrap]). </description> </method> <method name="is_clipping_text" qualifiers="const"> <return type="bool"> </return> <description> - Return [code]true[/code] if text would be cut off if it is too wide. + Returns [code]true[/code] if text would be cut off if it is too wide. </description> </method> <method name="is_uppercase" qualifiers="const"> <return type="bool"> </return> <description> - Return [code]true[/code] if text is displayed in all capitals. + Returns [code]true[/code] if text is displayed in all capitals. </description> </method> <method name="set_align"> diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml index e4cabdc556..f5416488f6 100644 --- a/doc/classes/LargeTexture.xml +++ b/doc/classes/LargeTexture.xml @@ -5,7 +5,7 @@ </brief_description> <description> A Texture capable of storing many smaller Textures with offsets. - You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets. + You can dynamically add pieces([Texture]) to this [code]LargeTexture[/code] using different offsets. </description> <tutorials> </tutorials> @@ -20,21 +20,21 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> - Add another [Texture] to this [LargeTexture], starting on offset "ofs". + Add another [Texture] to this [code]LargeTexture[/code], starting on offset "ofs". </description> </method> <method name="clear"> <return type="void"> </return> <description> - Clear the [LargeTexture]. + Clears the [code]LargeTexture[/code]. </description> </method> <method name="get_piece_count" qualifiers="const"> <return type="int"> </return> <description> - Return the number of pieces currently in this [LargeTexture]. + Returns the number of pieces currently in this [code]LargeTexture[/code]. </description> </method> <method name="get_piece_offset" qualifiers="const"> @@ -43,7 +43,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Return the offset of the piece with index "idx". + Returns the offset of the piece with index "idx". </description> </method> <method name="get_piece_texture" qualifiers="const"> @@ -52,7 +52,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Return the [Texture] of the piece with index "idx". + Returns the [Texture] of the piece with index "idx". </description> </method> <method name="set_piece_offset"> @@ -63,7 +63,7 @@ <argument index="1" name="ofs" type="Vector2"> </argument> <description> - Set the offset of the piece with index "idx" to "ofs". + Sets the offset of the piece with index "idx" to "ofs". </description> </method> <method name="set_piece_texture"> @@ -74,7 +74,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> - Set the [Texture] of the piece with index "idx" to "ofs". + Sets the [Texture] of the piece with index "idx" to "ofs". </description> </method> <method name="set_size"> @@ -83,12 +83,16 @@ <argument index="0" name="size" type="Vector2"> </argument> <description> - Set the size of this [LargeTexture]. + Sets the size of this [code]LargeTexture[/code]. </description> </method> </methods> <members> <member name="_data" type="Array" setter="_set_data" getter="_get_data"> + Returns an [Array] with offsets and textures data of each added piece. Schema is [offsets1, texture1, offsets2, texture2, large_texture_size]. + [code]offsets[/code] : [Vector2] offsets of the texture piece. + [code]second[/code] : [StreamTexture] data of the texture piece. + [code]last entry[/code] : [Vector2] size of the entire large texture. </member> </members> <constants> diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index 7ce7cef7c1..05054e06fd 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Light2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Node that casts light in a 2D environment. + Casts light in a 2D environment. </brief_description> <description> - 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. + 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. </description> <tutorials> </tutorials> @@ -385,7 +385,7 @@ If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code]. </member> <member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter"> - Shadow filter type. May be one of [code][None, PCF5, PCF9, PCF13][/code]. Default value: [code]None[/code]. + Shadow filter type. Use SHADOW_FILTER_* constants to set [code]shadow_filter[/code]. Default value: [code]None[/code]. </member> <member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth"> Smoothing value for shadows. @@ -408,7 +408,7 @@ Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behaviour of a light. </constant> <constant name="MODE_SUB" value="1"> - Subtract the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. + Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. </constant> <constant name="MODE_MIX" value="2"> Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation. @@ -417,16 +417,22 @@ 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. </constant> <constant name="SHADOW_FILTER_NONE" value="0"> + No filter applies to the shadow map. See [method shadow_filter]. </constant> <constant name="SHADOW_FILTER_PCF3" value="1"> + Percentage closer filtering (3 samples) applies to the shadow map. See [method shadow_filter]. </constant> <constant name="SHADOW_FILTER_PCF5" value="2"> + Percentage closer filtering (5 samples) applies to the shadow map. See [method shadow_filter]. </constant> <constant name="SHADOW_FILTER_PCF7" value="3"> + Percentage closer filtering (7 samples) applies to the shadow map. See [method shadow_filter]. </constant> <constant name="SHADOW_FILTER_PCF9" value="4"> + Percentage closer filtering (9 samples) applies to the shadow map. See [method shadow_filter]. </constant> <constant name="SHADOW_FILTER_PCF13" value="5"> + Percentage closer filtering (13 samples) applies to the shadow map. See [method shadow_filter]. </constant> </constants> </class> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index e6e615ccf1..3cca256a5d 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -17,7 +17,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Add a point at the x/y position in the supplied [Vector2] + Add a point at the [code]position[/code]. Appends the point at the end of the line. </description> </method> <method name="get_begin_cap_mode" qualifiers="const"> @@ -54,6 +54,7 @@ <return type="int"> </return> <description> + Returns the Line2D's amount of points. </description> </method> <method name="get_point_position" qualifiers="const"> @@ -62,6 +63,7 @@ <argument index="0" name="i" type="int"> </argument> <description> + Returns point [code]i[code]'s position. </description> </method> <method name="get_points" qualifiers="const"> @@ -106,7 +108,7 @@ <argument index="0" name="i" type="int"> </argument> <description> - Remove the point at index 'i' from the line. + Remove the point at index [code]i[/code] from the line. </description> </method> <method name="set_begin_cap_mode"> @@ -157,6 +159,7 @@ <argument index="1" name="position" type="Vector2"> </argument> <description> + Overwites the position in point [code]i[/code] with the supplied [code]position[/code]. </description> </method> <method name="set_points"> @@ -210,44 +213,63 @@ </methods> <members> <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode"> + Controls the style of the line's first point. Use [code]LINE_CAP_*[/code] constants. Default value: [code]LINE_CAP_NONE[/code]. </member> <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color"> + The line's color. Will not be used if a gradient is set. </member> <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode"> + Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants. Default value: [code]LINE_CAP_NONE[/code]. </member> <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient"> + The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set. </member> <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode"> + The style for the points inbetween the start and the end. </member> <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points"> + The points that form the lines. The line is drawn between every point set in this array. </member> <member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision"> + The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round. </member> <member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit"> + The direction difference in radians between vector points. This value is only used if [code]joint mode[/code] is set to [code]LINE_JOINT_SHARP[/code]. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style. </member> <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode"> + The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants. Default value: [code]LINE_TEXTURE_NONE[/code]. </member> <member name="width" type="float" setter="set_width" getter="get_width"> + The line's width. </member> </members> <constants> <constant name="LINE_JOINT_SHARP" value="0"> + The line's joints will be pointy. If [code]sharp_limit[/code] is greater than the rotation of a joint, it becomes a bevel joint instead. </constant> <constant name="LINE_JOINT_BEVEL" value="1"> + The line's joints will be bevelled/chamfered. </constant> <constant name="LINE_JOINT_ROUND" value="2"> + The line's joints will be rounded. </constant> <constant name="LINE_CAP_NONE" value="0"> + Don't have a line cap. </constant> <constant name="LINE_CAP_BOX" value="1"> + Draws the line cap as a box. </constant> <constant name="LINE_CAP_ROUND" value="2"> + Draws the line cap as a circle. </constant> <constant name="LINE_TEXTURE_NONE" value="0"> + Takes the left pixels of the texture and renders it over the whole line. </constant> <constant name="LINE_TEXTURE_TILE" value="1"> + Tiles the texture over the line. The texture need to be imported with Repeat Enabled for it to work properly. </constant> </constants> </class> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 65200c4769..f78821e158 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -26,14 +26,14 @@ <return type="bool"> </return> <description> - Return true if the host OS allows drawing. + Returns [code]true[/code] if the host OS allows drawing. </description> </method> <method name="can_use_threads" qualifiers="const"> <return type="bool"> </return> <description> - Returns if the current host platform is using multiple threads. + Returns [code]true[/code] if the current host platform is using multiple threads. </description> </method> <method name="delay_msec" qualifiers="const"> @@ -117,7 +117,7 @@ <return type="PoolStringArray"> </return> <description> - Return the commandline passed to the engine. + Returns the command line arguments passed to the engine. </description> </method> <method name="get_current_screen" qualifiers="const"> @@ -131,7 +131,7 @@ <return type="String"> </return> <description> - Return the absolute directory path of user data path([user://]). + Returns the absolute directory path of user data path([user://]). </description> </method> <method name="get_date" qualifiers="const"> @@ -166,7 +166,7 @@ <return type="int"> </return> <description> - Return the total amount of dynamic memory used (only works in debug). + Returns the total amount of dynamic memory used (only works in debug). </description> </method> <method name="get_environment" qualifiers="const"> @@ -175,14 +175,14 @@ <argument index="0" name="environment" type="String"> </argument> <description> - Return an environment variable. + Returns an environment variable. </description> </method> <method name="get_executable_path" qualifiers="const"> <return type="String"> </return> <description> - Return the path to the current engine executable. + Returns the path to the current engine executable. </description> </method> <method name="get_exit_code" qualifiers="const"> @@ -203,7 +203,7 @@ <return type="String"> </return> <description> - Return the host OS locale. + Returns the host OS locale. </description> </method> <method name="get_model_name" qualifiers="const"> @@ -217,25 +217,28 @@ <return type="String"> </return> <description> - Return the name of the host OS. Possible values are: "Android", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11". + Returns the name of the host OS. Possible values are: "Android", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11". </description> </method> <method name="get_power_percent_left"> <return type="int"> </return> <description> + Returns the amount of battery left in the device as a percentage. </description> </method> <method name="get_power_seconds_left"> <return type="int"> </return> <description> + Returns the time in seconds before the device runs out of battery. </description> </method> <method name="get_power_state"> <return type="int" enum="OS.PowerState"> </return> <description> + Returns the current state of the device regarding battery and power. See [code]POWERSTATE_*[/code] constants. </description> </method> <method name="get_process_id" qualifiers="const"> @@ -265,7 +268,7 @@ <return type="int"> </return> <description> - Returns the number of displays attached to the host machine + Returns the number of displays attached to the host machine. </description> </method> <method name="get_screen_dpi" qualifiers="const"> @@ -298,6 +301,7 @@ <argument index="0" name="screen" type="int" default="-1"> </argument> <description> + Returns the position of the specified screen by index. If no screen index is provided, the current screen will be used. </description> </method> <method name="get_screen_size" qualifiers="const"> @@ -319,13 +323,14 @@ <return type="int"> </return> <description> - Return the max amount of static memory used (only works in debug). + Returns the max amount of static memory used (only works in debug). </description> </method> <method name="get_static_memory_usage" qualifiers="const"> <return type="int"> </return> <description> + Returns the amount of static memory being used by the program in bytes. </description> </method> <method name="get_system_dir" qualifiers="const"> @@ -334,19 +339,21 @@ <argument index="0" name="dir" type="int" enum="OS.SystemDir"> </argument> <description> + Returns the actual path to commonly used folders across different platforms. Available locations are specified in [OS.SystemDir]. </description> </method> <method name="get_system_time_secs" qualifiers="const"> <return type="int"> </return> <description> + Returns the epoch time of the operating system in seconds. </description> </method> <method name="get_ticks_msec" qualifiers="const"> <return type="int"> </return> <description> - Return the amount of time passed in milliseconds since the engine started. + Returns the amount of time passed in milliseconds since the engine started. </description> </method> <method name="get_time" qualifiers="const"> @@ -355,19 +362,21 @@ <argument index="0" name="utc" type="bool" default="false"> </argument> <description> - Returns current time as a dictionary of keys: hour, minute, second + Returns current time as a dictionary of keys: hour, minute, second. </description> </method> <method name="get_time_zone_info" qualifiers="const"> <return type="Dictionary"> </return> <description> + Returns the current time zone as a dictionary with the keys: bias and name. </description> </method> <method name="get_unique_id" qualifiers="const"> <return type="String"> </return> <description> + Returns a unique string. </description> </method> <method name="get_unix_time" qualifiers="const"> @@ -408,20 +417,21 @@ <argument index="0" name="environment" type="String"> </argument> <description> - Return true if an environment variable exists. + Returns [code]true[/code] if an environment variable exists. </description> </method> <method name="has_touchscreen_ui_hint" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the device has a touchscreen or emulates one. </description> </method> <method name="has_virtual_keyboard" qualifiers="const"> <return type="bool"> </return> <description> - Returns true if the platform has a virtual keyboard, false otherwise. + Returns [code]true[/code] if the platform has a virtual keyboard, [code]false[/code] otherwise. </description> </method> <method name="hide_virtual_keyboard"> @@ -435,26 +445,30 @@ <return type="bool"> </return> <description> + Returns [code]true[/code] if the build is a debug build. + Returns [code]true[/code] when running in the editor. + Returns [code]false[/code] if the build is a release build. </description> </method> <method name="is_in_low_processor_usage_mode" qualifiers="const"> <return type="bool"> </return> <description> - Return true if low cpu usage mode is enabled. + Returns [code]true[/code] if low cpu usage mode is enabled. </description> </method> <method name="is_keep_screen_on" qualifiers="const"> <return type="bool"> </return> <description> - Returns whether the screen is being kept on or not. + Returns [code]true[/code] if the screen is being kept on. </description> </method> <method name="is_ok_left_and_cancel_right" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the "Okay" button should appear on the left and "Cancel" on the right. </description> </method> <method name="is_scancode_unicode" qualifiers="const"> @@ -463,47 +477,56 @@ <argument index="0" name="code" type="int"> </argument> <description> + Returns [code]true[/code] if the input code has a unicode character. </description> </method> <method name="is_stdout_verbose" qualifiers="const"> <return type="bool"> </return> <description> - Return true if the engine was executed with -v (verbose stdout). + Returns [code]true[/code] if the engine was executed with -v (verbose stdout). + </description> + </method> + <method name="is_userfs_persistent" qualifiers="const"> + <return type="bool"> + </return> + <description> + If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable. </description> </method> <method name="is_vsync_enabled" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if synchronizing the framerate to the monitor's refresh rate is enabled. </description> </method> <method name="is_window_fullscreen" qualifiers="const"> <return type="bool"> </return> <description> - Returns whether the window is in fullscreen mode or not. + Returns [code]true[/code] if the window is in fullscreen mode. </description> </method> <method name="is_window_maximized" qualifiers="const"> <return type="bool"> </return> <description> - Return true if the window is maximized. + Returns [code]true[/code] if the window is maximized. </description> </method> <method name="is_window_minimized" qualifiers="const"> <return type="bool"> </return> <description> - Return true if the window is minimized. + Returns [code]true[/code] if the window is minimized. </description> </method> <method name="is_window_resizable" qualifiers="const"> <return type="bool"> </return> <description> - Returns whether the window is resizable or not. + Returns [code]true[/code] if the window is resizable. </description> </method> <method name="kill"> @@ -519,12 +542,14 @@ <return type="bool"> </return> <description> + Returns [code]true[/code] if native video is playing. </description> </method> <method name="native_video_pause"> <return type="void"> </return> <description> + Pauses native video playback. </description> </method> <method name="native_video_play"> @@ -539,18 +564,21 @@ <argument index="3" name="subtitle_track" type="String"> </argument> <description> + Plays native video from the specified path, at the given volume and with audio and subtitle tracks. </description> </method> <method name="native_video_stop"> <return type="void"> </return> <description> + Stops native video playback. </description> </method> <method name="native_video_unpause"> <return type="void"> </return> <description> + Resumes native video playback. </description> </method> <method name="print_all_resources"> @@ -559,12 +587,14 @@ <argument index="0" name="tofile" type="String" default=""""> </argument> <description> + Shows all resources in the game. Optionally the list can be written to a file. </description> </method> <method name="print_all_textures_by_size"> <return type="void"> </return> <description> + Shows the list of loaded textures sorted by size in memory. </description> </method> <method name="print_resources_by_type"> @@ -573,6 +603,7 @@ <argument index="0" name="types" type="PoolStringArray"> </argument> <description> + Shows the number of resources loaded by the game of the given types. </description> </method> <method name="print_resources_in_use"> @@ -581,6 +612,7 @@ <argument index="0" name="short" type="bool" default="false"> </argument> <description> + Shows all resources currently used by the game. </description> </method> <method name="request_attention"> @@ -596,6 +628,7 @@ <argument index="0" name="borderless" type="bool"> </argument> <description> + Removes the window frame. </description> </method> <method name="set_clipboard"> @@ -604,7 +637,7 @@ <argument index="0" name="clipboard" type="String"> </argument> <description> - Set clipboard to the OS. + Sets clipboard to the OS. </description> </method> <method name="set_current_screen"> @@ -613,6 +646,7 @@ <argument index="0" name="screen" type="int"> </argument> <description> + Sets the current screen by index. </description> </method> <method name="set_exit_code"> @@ -621,6 +655,7 @@ <argument index="0" name="code" type="int"> </argument> <description> + Sets the exit code that will be returned by the game. </description> </method> <method name="set_icon"> @@ -629,6 +664,7 @@ <argument index="0" name="icon" type="Image"> </argument> <description> + Sets the game's icon. </description> </method> <method name="set_ime_position"> @@ -645,7 +681,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - Set keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS) + Sets keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS) </description> </method> <method name="set_low_processor_usage_mode"> @@ -654,7 +690,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - 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. + Set to [code]true[/code] 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. Use this in tool mode to reduce CPU usage. </description> </method> <method name="set_screen_orientation"> @@ -672,6 +708,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Sets the name of the current thread. </description> </method> <method name="set_use_file_access_save_and_swap"> @@ -680,6 +717,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> + Enables backup saves if [code]enabled[/code] is [code]true[/code]. </description> </method> <method name="set_use_vsync"> @@ -688,6 +726,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> + If [code]true[/code] the framerate will synchronize to the monitor's refresh rate. </description> </method> <method name="set_window_fullscreen"> @@ -705,7 +744,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - Set the window size to maximized. + Set [code]true[/code] to maximize the window. </description> </method> <method name="set_window_minimized"> @@ -714,7 +753,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - Set whether the window is minimized. + Set [code]true[/code] to minimize the window. </description> </method> <method name="set_window_position"> @@ -732,7 +771,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - Set the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings. + Sets the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings. </description> </method> <method name="set_window_size"> @@ -759,6 +798,9 @@ <argument index="0" name="uri" type="String"> </argument> <description> + Requests the OS to open a resource with the most appropriate program. For example. + [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the downloads folders of the user. + [code]OS.shell_open("http://godotengine.org")[/code] opens the default web browser on the official Godot website. </description> </method> <method name="show_virtual_keyboard"> diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index e17e60f2bc..1e89d2194c 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Particles" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build"> <brief_description> + 3D particle emitter. </brief_description> <description> + 3D particle node used to create a variety of particle systems and effects. [code]Particles[/code] features an emitter that generates some number of particles at a given rate. + Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles. </description> <tutorials> </tutorials> @@ -252,8 +255,10 @@ </methods> <members> <member name="amount" type="int" setter="set_amount" getter="get_amount"> + Number of particles to emit. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles.DrawOrder"> + Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [code]DRAW_ORDER_INDEX[/code]. </member> <member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh"> </member> @@ -266,36 +271,47 @@ <member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes"> </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> + If [code]true[/code] particles are being emitted. Default value: [code]true[/code]. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> + Time ratio between each emission. If [code]0[/code] particles are emitted continuously. If [code]1[/code] all particles are emitted simultaneously. Default value: [code]0[/code]. </member> <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> + Amount of time each particle will exist. Default value: [code]1[/code]. </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> + If [code]true[/code] particles use the parent node's coordinate space. If [code]false[/code] they use global coordinates. Default value: [code]true[/code]. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> + If [code]true[/code] only [code]amount[/code] particles will be emitted. Default value: [code]false[/code]. </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> </member> <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material"> + [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. </member> <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio"> + Emission randomness ratio. Default value: [code]0[/code]. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> + Speed scaling ratio. Default value: [code]1[/code]. </member> <member name="visibility_aabb" type="Rect3" setter="set_visibility_aabb" getter="get_visibility_aabb"> </member> </members> <constants> <constant name="DRAW_ORDER_INDEX" value="0"> + Particles are drawn in the order emitted. </constant> <constant name="DRAW_ORDER_LIFETIME" value="1"> + Particles are drawn in order of remaining lifetime. </constant> <constant name="DRAW_ORDER_VIEW_DEPTH" value="2"> + Particles are drawn in order of depth. </constant> <constant name="MAX_DRAW_PASSES" value="4" enum=""> </constant> diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index d837d6eb62..b2c63ea0c3 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Particles2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - 2D Particle emitter + 2D particle emitter. </brief_description> <description> - 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). + 2D particle node used to create a variety of particle systems and effects. [code]Particles2D[/code] features an emitter that generates some number of particles at a given rate. + Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles. </description> <tutorials> </tutorials> @@ -285,46 +286,61 @@ </methods> <members> <member name="amount" type="int" setter="set_amount" getter="get_amount"> + Number of particles to emit. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder"> + Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [code]DRAW_ORDER_INDEX[/code]. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> + If [code]true[/code] particles are being emitted. Default value: [code]true[/code]. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> + Time ratio between each emission. If [code]0[/code] particles are emitted continuously. If [code]1[/code] all particles are emitted simultaneously. Default value: [code]0[/code]. </member> <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> </member> <member name="h_frames" type="int" setter="set_h_frames" getter="get_h_frames"> + Number of horizontal frames in [code]texture[/code]. </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> + Amount of time each particle will exist. Default value: [code]1[/code]. </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> + If [code]true[/code] particles use the parent node's coordinate space. If [code]false[/code] they use global coordinates. Default value: [code]true[/code]. </member> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> + If [code]true[/code] only [code]amount[/code] particles will be emitted. Default value: [code]false[/code]. </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> </member> <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material"> + [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. </member> <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio"> + Emission randomness ratio. Default value: [code]0[/code]. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> + Speed scaling ratio. Default value: [code]1[/code]. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + Particle texture. If [code]null[/code] particles will be squares. </member> <member name="v_frames" type="int" setter="set_v_frames" getter="get_v_frames"> + Number of vertical frames in [code]texture[/code]. </member> <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect"> </member> </members> <constants> <constant name="DRAW_ORDER_INDEX" value="0"> + Particles are drawn in the order emitted. </constant> <constant name="DRAW_ORDER_LIFETIME" value="1"> + Particles are drawn in order of remaining lifetime. </constant> </constants> </class> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 1767a19a9f..bebdc44b69 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ParticlesMaterial" inherits="Material" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Particle properties for [Particles] and [Particles2D] nodes. </brief_description> <description> + ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [Particles] and [Particles2D] emitter nodes. + Some of this material's properties are applied to each particle when emitted, while others can have a [CurveTexture] applied to vary values over the lifetime of the particle. </description> <tutorials> </tutorials> @@ -294,152 +297,217 @@ </methods> <members> <member name="angle" type="float" setter="set_param" getter="get_param"> + Initial rotation applied to each particle. </member> <member name="angle_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Each particle's rotation will be animated along this [CurveTexture]. </member> <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Rotation randomness ratio. Default value: [code]0[/code]. </member> <member name="angular_velocity" type="float" setter="set_param" getter="get_param"> + Initial angular velocity applied to each particle. </member> <member name="angular_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Each particle's angular velocity will vary along this [CurveTexture]. </member> <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Angular velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="anim_loop" type="bool" setter="set_flag" getter="get_flag"> + If [code]true[/code] animation will loop. Default value: [code]false[/code]. </member> <member name="anim_offset" type="float" setter="set_param" getter="get_param"> + Particle animation offset. </member> <member name="anim_offset_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Each particle's animation offset will vary along this [CurveTexture]. </member> <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Animation offset randomness ratio. Default value: [code]0[/code]. </member> <member name="anim_speed" type="float" setter="set_param" getter="get_param"> + Particle animation speed. </member> <member name="anim_speed_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Each particle's animation speed will vary along this [CurveTexture]. </member> <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Animation speed randomness ratio. Default value: [code]0[/code]. </member> <member name="color" type="Color" setter="set_color" getter="get_color"> + Each particle's initial color. If the [Particle2D]'s [code]texture[/code] is defined, it will be multiplied by this color. </member> <member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp"> + Each particle's color will vary along this [GradientTexture]. </member> <member name="damping" type="float" setter="set_param" getter="get_param"> + The rate at which particles lose velocity. </member> <member name="damping_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Damping will vary along this [CurveTexture]. </member> <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Damping randomness ratio. Default value: [code]0[/code]. </member> <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents"> + The box's extents if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_BOX[/code]. </member> <member name="emission_color_texture" type="Texture" setter="set_emission_color_texture" getter="get_emission_color_texture"> </member> <member name="emission_normal_texture" type="Texture" setter="set_emission_normal_texture" getter="get_emission_normal_texture"> </member> <member name="emission_point_count" type="int" setter="set_emission_point_count" getter="get_emission_point_count"> + The number of emission points if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_POINTS[/code] or [code]EMISSION_SHAPE_DIRECTED_POINTS[/code]. </member> <member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture"> </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape"> + Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values. Default value: [code]EMISSION_SHAPE_POINT[/code]. </member> <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius"> + The sphere's radius if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_SPHERE[/code]. </member> <member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag"> </member> <member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag"> + If [code]true[/code] particles will not move on the z axis. Default value: [code]true[/code] for [Particles2D], [code]false[/code] for [Particles]. </member> <member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag"> </member> <member name="flatness" type="float" setter="set_flatness" getter="get_flatness"> </member> <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity"> + Gravity applied to every particle. Default value: [code](0, 98, 0)[/code]. </member> <member name="hue_variation" type="float" setter="set_param" getter="get_param"> + Initial hue variation applied to each particle. </member> <member name="hue_variation_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Each particle's hue will vary along this [CurveTexture]. </member> <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Hue variation randomness ratio. Default value: [code]0[/code]. </member> <member name="initial_velocity" type="float" setter="set_param" getter="get_param"> + Initial velocity for each particle. </member> <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Initial velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="linear_accel" type="float" setter="set_param" getter="get_param"> + Linear acceleration applied to each particle. </member> <member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Each particle's linear acceleration will vary along this [CurveTexture]. </member> <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Linear acceleration randomness ratio. Default value: [code]0[/code]. </member> <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> + Orbital velocity applied to each particle. </member> <member name="orbit_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Each particle's orbital velocity will vary along this [CurveTexture]. </member> <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Orbital velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="radial_accel" type="float" setter="set_param" getter="get_param"> + Linear acceleration applied to each particle. </member> <member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Each particle's radial acceleration will vary along this [CurveTexture]. </member> <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Radial acceleration randomness ratio. Default value: [code]0[/code]. </member> <member name="scale" type="float" setter="set_param" getter="get_param"> + Initial scale applied to each particle. </member> <member name="scale_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Each particle's scale will vary along this [CurveTexture]. </member> <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Scale randomness ratio. Default value: [code]0[/code]. </member> <member name="spread" type="float" setter="set_spread" getter="get_spread"> + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. </member> <member name="tangential_accel" type="float" setter="set_param" getter="get_param"> + Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity. </member> <member name="tangential_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + Each particle's tangential acceleration will vary along this [CurveTexture]. </member> <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + Tangential acceleration randomness ratio. Default value: [code]0[/code]. </member> <member name="trail_color_modifier" type="GradientTexture" setter="set_trail_color_modifier" getter="get_trail_color_modifier"> + Trail particles' color will vary along this [GradientTexture]. </member> <member name="trail_divisor" type="int" setter="set_trail_divisor" getter="get_trail_divisor"> + Emitter will emit [code]amount[/code] divided by [code]trail_divisor[/code] particles. The remaining particles will be used as trail(s). </member> <member name="trail_size_modifier" type="CurveTexture" setter="set_trail_size_modifier" getter="get_trail_size_modifier"> + Trail particles' size will vary along this [CurveTexture]. </member> </members> <constants> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set initial velocity properties. </constant> <constant name="PARAM_ANGULAR_VELOCITY" value="1"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties. </constant> <constant name="PARAM_ORBIT_VELOCITY" value="2"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital_velocity properties. </constant> <constant name="PARAM_LINEAR_ACCEL" value="3"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties. </constant> <constant name="PARAM_RADIAL_ACCEL" value="4"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set radial acceleration properties. </constant> <constant name="PARAM_TANGENTIAL_ACCEL" value="5"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set tangential acceleration properties. </constant> <constant name="PARAM_DAMPING" value="6"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set damping properties. </constant> <constant name="PARAM_ANGLE" value="7"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angle properties. </constant> <constant name="PARAM_SCALE" value="8"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties. </constant> <constant name="PARAM_HUE_VARIATION" value="9"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue_variation properties. </constant> <constant name="PARAM_ANIM_SPEED" value="10"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties. </constant> <constant name="PARAM_ANIM_OFFSET" value="11"> + Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties. </constant> <constant name="PARAM_MAX" value="12"> </constant> <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0"> + Use with [method set_flag] to set [member flag_align_y]. </constant> <constant name="FLAG_ROTATE_Y" value="1"> + Use with [method set_flag] to set [member flag_rotate_y] </constant> <constant name="FLAG_MAX" value="4"> </constant> <constant name="EMISSION_SHAPE_POINT" value="0"> + All particles will be emitted from a single point. </constant> <constant name="EMISSION_SHAPE_SPHERE" value="1"> + Particles will be emitted in the volume of a sphere. </constant> <constant name="EMISSION_SHAPE_BOX" value="2"> + Particles will be emitted in the volume of a box. </constant> <constant name="EMISSION_SHAPE_POINTS" value="3"> </constant> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 71987ace9e..82ee3531f1 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Performance" inherits="Object" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Exposes performance related data. </brief_description> <description> + This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the [i]Monitor[/i] tab in the editor's [i]Debugger[/i] panel. By using the [method get_monitor] method of this class, you can access this data from your code. Note that a few of these monitors are only available in debug mode and will always return 0 when used in a release build. + Many of these monitors are not updated in real-time, so there may be a short delay between changes. </description> <tutorials> </tutorials> @@ -15,63 +18,93 @@ <argument index="0" name="monitor" type="int" enum="Performance.Monitor"> </argument> <description> + Returns the value of one of the available monitors. You should provide one of this class's constants as the argument, like this: + [codeblock] + print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console + [/codeblock] </description> </method> </methods> <constants> <constant name="TIME_FPS" value="0"> + Frames per second. </constant> <constant name="TIME_PROCESS" value="1"> + Time it took to complete one frame. </constant> - <constant name="TIME_FIXED_PROCESS" value="2"> + <constant name="TIME_PHYSICS_PROCESS" value="2"> + Time it took to complete one physics frame. </constant> <constant name="MEMORY_STATIC" value="3"> + Static memory currently used, in bytes. Not available in release builds. </constant> <constant name="MEMORY_DYNAMIC" value="4"> + Dynamic memory currently used, in bytes. Not available in release builds. </constant> <constant name="MEMORY_STATIC_MAX" value="5"> + Available static memory. Not available in release builds. </constant> <constant name="MEMORY_DYNAMIC_MAX" value="6"> + Available dynamic memory. Not available in release builds. </constant> <constant name="MEMORY_MESSAGE_BUFFER_MAX" value="7"> + Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. </constant> <constant name="OBJECT_COUNT" value="8"> + Number of objects currently instanced (including nodes). </constant> <constant name="OBJECT_RESOURCE_COUNT" value="9"> + Number of resources currently used. </constant> <constant name="OBJECT_NODE_COUNT" value="10"> + Number of nodes currently instanced. This also includes the root node, as well as any nodes not in the scene tree. </constant> <constant name="RENDER_OBJECTS_IN_FRAME" value="11"> + 3D objects drawn per frame. </constant> <constant name="RENDER_VERTICES_IN_FRAME" value="12"> + Vertices drawn per frame. 3D only. </constant> <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="13"> + Material changes per frame. 3D only </constant> <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="14"> + Shader changes per frame. 3D only. </constant> <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="15"> + Render surface changes per frame. 3D only. </constant> <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="16"> - </constant> - <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="20"> + Draw calls per frame. 3D only. </constant> <constant name="RENDER_VIDEO_MEM_USED" value="17"> + Video memory used. Includes both texture and vertex memory. </constant> <constant name="RENDER_TEXTURE_MEM_USED" value="18"> + Texture memory used. </constant> <constant name="RENDER_VERTEX_MEM_USED" value="19"> + Vertex memory used. + </constant> + <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="20"> </constant> <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="21"> + Number of active [RigidBody2D] nodes in the game. </constant> <constant name="PHYSICS_2D_COLLISION_PAIRS" value="22"> + Number of collision pairs in the 2D physics engine. </constant> <constant name="PHYSICS_2D_ISLAND_COUNT" value="23"> + Number of islands in the 2D physics engine. </constant> <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="24"> + Number of active [RigidBody] and [VehicleBody] nodes in the game. </constant> <constant name="PHYSICS_3D_COLLISION_PAIRS" value="25"> + Number of collision pairs in the 3D physics engine. </constant> <constant name="PHYSICS_3D_ISLAND_COUNT" value="26"> + Number of islands in the 3D physics engine. </constant> <constant name="MONITOR_MAX" value="27"> </constant> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 05869c514e..23cb9bd91b 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Polygon2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build"> <brief_description> - 2D polygon representation + A 2D polygon. </brief_description> <description> - 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. + A Polygon2D is defined by a set of points. Each point is connected to the next, with the final point being connected to the first, resulting in a closed polygon. Polygon2Ds can be filled with color (solid or gradient) or filled with a given texture. </description> <tutorials> </tutorials> @@ -204,28 +204,40 @@ </methods> <members> <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased"> + If [code]true[/code] polygon edges will be anti-aliased. Default value: [code]false[/code]. </member> <member name="color" type="Color" setter="set_color" getter="get_color"> + The polygon's fill color. If [code]texture[/code] is defined, it will be multiplied by this color. It will also be the default color for vertices not set in [code]vertex_colors[/code]. </member> <member name="invert_border" type="float" setter="set_invert_border" getter="get_invert_border"> + Added padding applied to the bounding box when using [code]invert[/code]. Setting this value too small may result in a "Bad Polygon" error. Default value: [code]100[/code]. </member> <member name="invert_enable" type="bool" setter="set_invert" getter="get_invert"> + If [code]true[/code] polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. Default value: [code]false[/code]. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + The offset applied to each vertex. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> + The polygon's list of vertices. The final point will be connected to the first. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + The polygon's fill texture. Use [code]uv[/code] to set texture coordinates. </member> <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset"> + Amount to offset the polygon's [code]texture[/code]. If [code](0, 0)[/code] the texture's origin (its top-left corner) will be placed at the polygon's [code]position[/code]. </member> <member name="texture_rotation" type="float" setter="_set_texture_rotationd" getter="_get_texture_rotationd"> + The texture's rotation in degrees. </member> <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale"> + Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa. </member> <member name="uv" type="PoolVector2Array" setter="set_uv" getter="get_uv"> + Texture coordinates for each vertex of the polygon. There should be one [code]uv[/code] per polygon vertex. If there are fewer, undefined vertices will use [code](0, 0)[/code]. </member> <member name="vertex_colors" type="PoolColorArray" setter="set_vertex_colors" getter="get_vertex_colors"> + Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code]. </member> </members> <constants> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 9af6abf7b8..cd75c2b658 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -138,29 +138,38 @@ <argument index="0" name="with" type="Node"> </argument> <description> + Binds two Ranges together along with any Ranges previously grouped with either of them. When any of Range's member variables change, it will share the new value with all other Ranges in its group. </description> </method> <method name="unshare"> <return type="void"> </return> <description> + Stop Range from sharing its member variables with any other Range. </description> </method> </methods> <members> <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp"> + If [code]true[/code] and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly. </member> <member name="max_value" type="float" setter="set_max" getter="get_max"> + Maximum value. Range is clamped if [code]value[/code] is greater than [code]max_value[/code]. Default value: 100. </member> <member name="min_value" type="float" setter="set_min" getter="get_min"> + Minimum value. Range is clamped if [code]value[/code] is less than [code]min_value[/code]. Default value: 0. </member> <member name="page" type="float" setter="set_page" getter="get_page"> + Page size. Used mainly for [ScrollBar]. ScrollBar's length is its size multiplied by [code]page[/code] over the difference between [code]min_value[/code] and [code]max_value[/code]. </member> <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values"> + If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer. </member> <member name="step" type="float" setter="set_step" getter="get_step"> + If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer. </member> <member name="value" type="float" setter="set_value" getter="get_value"> + Range's current value. </member> </members> <signals> diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml index 7fab9c3949..d5d367a335 100644 --- a/doc/classes/RayShape.xml +++ b/doc/classes/RayShape.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RayShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Ray shape for 3D collisions. </brief_description> <description> + Ray shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. 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. </description> <tutorials> </tutorials> @@ -26,6 +28,7 @@ </methods> <members> <member name="length" type="float" setter="set_length" getter="get_length"> + The ray's length. </member> </members> <constants> diff --git a/doc/classes/RegEx.xml b/doc/classes/RegEx.xml index 626f8f1a93..4577672c72 100644 --- a/doc/classes/RegEx.xml +++ b/doc/classes/RegEx.xml @@ -5,7 +5,7 @@ </brief_description> <description> 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: + Once created, the RegEx object needs to be compiled with the search pattern before it can be used. The search 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] @@ -47,7 +47,7 @@ <argument index="0" name="pattern" type="String"> </argument> <description> - Compiles and assign the regular expression pattern to use. + Compiles and assign the search pattern to use. </description> </method> <method name="get_group_count" qualifiers="const"> @@ -68,14 +68,14 @@ <return type="String"> </return> <description> - Returns the expression used to compile the code. + Returns the search pattern used to compile the code. </description> </method> <method name="is_valid" qualifiers="const"> <return type="bool"> </return> <description> - Returns whether this object has a valid regular expression assigned. + Returns whether this object has a valid search pattern assigned. </description> </method> <method name="search" qualifiers="const"> @@ -88,7 +88,7 @@ <argument index="2" name="end" type="int" default="-1"> </argument> <description> - 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. Returns a [RegExMatch] container of the first matching result if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be. </description> </method> <method name="sub" qualifiers="const"> diff --git a/doc/classes/RegExMatch.xml b/doc/classes/RegExMatch.xml index 9e021ed6c8..abf2e383d5 100644 --- a/doc/classes/RegExMatch.xml +++ b/doc/classes/RegExMatch.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RegExMatch" inherits="Reference" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Contains the results of a regex search. </brief_description> <description> + Contains the results of a regex search. [method RegEx.search] returns an instance of [code]RegExMatch[/code] if it finds the search pattern in the [source] string. </description> <tutorials> </tutorials> @@ -15,7 +17,7 @@ <argument index="0" name="name" type="Variant" default="0"> </argument> <description> - 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 end position of the match in the [source] 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). </description> </method> <method name="get_group_count" qualifiers="const"> @@ -38,7 +40,7 @@ <argument index="0" name="name" type="Variant" default="0"> </argument> <description> - 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 starting position of the match in the [source] 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). </description> </method> <method name="get_string" qualifiers="const"> @@ -47,19 +49,21 @@ <argument index="0" name="name" type="Variant" default="0"> </argument> <description> - 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). + Returns the result of the match in the [source] 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). </description> </method> <method name="get_strings" qualifiers="const"> <return type="Array"> </return> <description> + Returns an [Array] of the matches in the [source] string. </description> </method> <method name="get_subject" qualifiers="const"> <return type="String"> </return> <description> + Returns the [source] string used with the search pattern to find this matching result. </description> </method> </methods> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 90ee76cb98..9f8cdcce6d 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -47,6 +47,12 @@ <description> </description> </method> + <method name="get_line_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> <method name="get_percent_visible" qualifiers="const"> <return type="float"> </return> @@ -84,6 +90,12 @@ <description> </description> </method> + <method name="get_visible_line_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> <method name="is_meta_underlined" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml index 8e6e12a736..4d822a1705 100644 --- a/doc/classes/Shape.xml +++ b/doc/classes/Shape.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Shape" inherits="Resource" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Base class for all 3D shape resources. </brief_description> <description> + Base class for all 3D shape resources. All 3D shapes that inherit from this can be set into a [PhysicsBody] or [Area]. </description> <tutorials> </tutorials> diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml index 0f1c57e85b..344a42b7c0 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/SpatialMaterial.xml @@ -105,6 +105,18 @@ <description> </description> </method> + <method name="get_distance_fade_max_distance" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="get_distance_fade_min_distance" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> <method name="get_emission" qualifiers="const"> <return type="Color"> </return> @@ -187,6 +199,12 @@ <description> </description> </method> + <method name="get_proximity_fade_distance" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> <method name="get_refraction" qualifiers="const"> <return type="float"> </return> @@ -297,12 +315,24 @@ <description> </description> </method> + <method name="is_distance_fade_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="is_grow_enabled" qualifiers="const"> <return type="bool"> </return> <description> </description> </method> + <method name="is_proximity_fade_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="set_albedo"> <return type="void"> </return> @@ -439,6 +469,30 @@ <description> </description> </method> + <method name="set_distance_fade"> + <return type="void"> + </return> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="set_distance_fade_max_distance"> + <return type="void"> + </return> + <argument index="0" name="distance" type="float"> + </argument> + <description> + </description> + </method> + <method name="set_distance_fade_min_distance"> + <return type="void"> + </return> + <argument index="0" name="distance" type="float"> + </argument> + <description> + </description> + </method> <method name="set_emission"> <return type="void"> </return> @@ -555,6 +609,22 @@ <description> </description> </method> + <method name="set_proximity_fade"> + <return type="void"> + </return> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="set_proximity_fade_distance"> + <return type="void"> + </return> + <argument index="0" name="distance" type="float"> + </argument> + <description> + </description> + </method> <method name="set_refraction"> <return type="void"> </return> @@ -745,6 +815,12 @@ </member> <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="SpatialMaterial.DetailUV"> </member> + <member name="distance_fade_enable" type="bool" setter="set_distance_fade" getter="is_distance_fade_enabled"> + </member> + <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance"> + </member> + <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance"> + </member> <member name="emission" type="Color" setter="set_emission" getter="get_emission"> </member> <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature"> @@ -811,6 +887,10 @@ </member> <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames"> </member> + <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance"> + </member> + <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled"> + </member> <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature"> </member> <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction"> diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape.xml index 120c7fcc25..7c6174f4e4 100644 --- a/doc/classes/SphereShape.xml +++ b/doc/classes/SphereShape.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="SphereShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Sphere shape for 3D collisions. </brief_description> <description> + Sphere shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. This shape is useful for modeling sphere-like 3D objects. </description> <tutorials> </tutorials> @@ -26,6 +28,7 @@ </methods> <members> <member name="radius" type="float" setter="set_radius" getter="get_radius"> + The sphere's radius. The shape's diameter is double the radius. </member> </members> <constants> diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml index 90ebe79666..0cdc8f7099 100644 --- a/doc/classes/Sprite.xml +++ b/doc/classes/Sprite.xml @@ -4,7 +4,7 @@ General purpose Sprite node. </brief_description> <description> - 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. + A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. </description> <tutorials> </tutorials> @@ -202,37 +202,51 @@ </methods> <members> <member name="centered" type="bool" setter="set_centered" getter="is_centered"> + If [code]true[/code] texture is centered. Default value: [code]true[/code]. </member> <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> + If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> + If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame"> + Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. </member> <member name="hframes" type="int" setter="set_hframes" getter="get_hframes"> + The number of collumns in the sprite sheet. </member> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + The normal map gives depth to the Sprite. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + The texture's drawing offset. </member> <member name="region_enabled" type="bool" setter="set_region" getter="is_region"> + If [code]true[/code] texture is cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code]. </member> <member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled"> + If [code]true[/code] the outermost pixels get blurred out. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> + The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + [Texture] object to draw. </member> <member name="vframes" type="int" setter="set_vframes" getter="get_vframes"> + The number of rows in the sprite sheet. </member> </members> <signals> <signal name="frame_changed"> <description> + Emitted when the [member frame] changes. </description> </signal> <signal name="texture_changed"> <description> + Emitted when the [member texture] changes. </description> </signal> </signals> diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index f6f2f8f00c..e51616a071 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Sprite3D" inherits="SpriteBase3D" category="Core" version="3.0.alpha.custom_build"> <brief_description> + 2D Sprite node in 3D world. </brief_description> <description> + A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. </description> <tutorials> </tutorials> @@ -96,21 +98,28 @@ </methods> <members> <member name="frame" type="int" setter="set_frame" getter="get_frame"> + Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. </member> <member name="hframes" type="int" setter="set_hframes" getter="get_hframes"> + The number of columns in the sprite sheet. </member> <member name="region_enabled" type="bool" setter="set_region" getter="is_region"> + If [code]true[/code] texture will be cut from a larger atlas texture. See [member region_rect]. Default value: [code]false[/code]. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> + The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + [Texture] object to draw. </member> <member name="vframes" type="int" setter="set_vframes" getter="get_vframes"> + The number of rows in the sprite sheet. </member> </members> <signals> <signal name="frame_changed"> <description> + Emitted when the [member frame] changes. </description> </signal> </signals> diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 1640e5dc9f..7ed681ea12 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build"> <brief_description> + 2D Sprite node in 3D environment. </brief_description> <description> + A node that displays 2D texture information in a 3D environment. </description> <tutorials> </tutorials> @@ -164,36 +166,51 @@ <member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="SpriteBase3D.AlphaCutMode"> </member> <member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis"> + The direction in which the front of the texture faces. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered"> + If [code]true[/code] texture will be centered. Default value: [code]true[/code]. </member> <member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag"> + If [code]true[/code] texture can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind. Default value: [code]true[/code]. </member> <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> + If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> + If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. </member> <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate"> + A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + The texture's drawing offset. </member> <member name="opacity" type="float" setter="set_opacity" getter="get_opacity"> + The objects visibility on a scale from [code]0[/code] fully invisible to [code]1[/code] fully visible. </member> <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size"> + The size of one pixel's width on the Sprite to scale it in 3D. </member> <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag"> + If [code]true[/code] the [Light] in the [Environment] has effects on the Sprite. Default value: [code]false[/code]. </member> <member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag"> + If [code]true[/code] the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: [code]true[/code]. </member> </members> <constants> <constant name="FLAG_TRANSPARENT" value="0"> + If set, the texture's transparency and the opacity are used to make those parts of the Sprite invisible. </constant> <constant name="FLAG_SHADED" value="1"> + If set, the Light in the Environment has effects on the Sprite. </constant> <constant name="FLAG_DOUBLE_SIDED" value="2"> + If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind. </constant> <constant name="FLAG_MAX" value="3"> + Used internally to mark the end of the Flags section. </constant> <constant name="ALPHA_CUT_DISABLED" value="0"> </constant> diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index f4a8eeabe4..e46fdc80e0 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -4,7 +4,7 @@ Sprite frame library for AnimatedSprite. </brief_description> <description> - Sprite frame library for [AnimatedSprite]. + Sprite frame library for [AnimatedSprite]. Contains frames and animation data for playback. </description> <tutorials> </tutorials> @@ -17,6 +17,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> + Adds a new animation to the the library. </description> </method> <method name="add_frame"> @@ -29,6 +30,7 @@ <argument index="2" name="at_position" type="int" default="-1"> </argument> <description> + Adds a frame to the given animation. </description> </method> <method name="clear"> @@ -37,12 +39,14 @@ <argument index="0" name="anim" type="String"> </argument> <description> + Removes all frames from the given animation. </description> </method> <method name="clear_all"> <return type="void"> </return> <description> + Removes all animations. A "default" animation will be created. </description> </method> <method name="get_animation_loop" qualifiers="const"> @@ -51,6 +55,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> + If [code]true[/code] the given animation will loop. </description> </method> <method name="get_animation_speed" qualifiers="const"> @@ -59,6 +64,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> + The animation's speed in frames per second. </description> </method> <method name="get_frame" qualifiers="const"> @@ -69,6 +75,7 @@ <argument index="1" name="idx" type="int"> </argument> <description> + Returns the animation's selected frame. </description> </method> <method name="get_frame_count" qualifiers="const"> @@ -77,6 +84,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> + Returns the number of frames in the animation. </description> </method> <method name="has_animation" qualifiers="const"> @@ -85,6 +93,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> + If [code]true[/code] the named animation exists. </description> </method> <method name="remove_animation"> @@ -93,6 +102,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> + Removes the given animation. </description> </method> <method name="remove_frame"> @@ -103,6 +113,7 @@ <argument index="1" name="idx" type="int"> </argument> <description> + Removes the animation's selected frame. </description> </method> <method name="rename_animation"> @@ -113,6 +124,7 @@ <argument index="1" name="newname" type="String"> </argument> <description> + Changes the animation's name to [code]newname[/code]. </description> </method> <method name="set_animation_loop"> @@ -123,6 +135,7 @@ <argument index="1" name="loop" type="bool"> </argument> <description> + If [code]true[/code] the animation will loop. </description> </method> <method name="set_animation_speed"> @@ -133,6 +146,7 @@ <argument index="1" name="speed" type="float"> </argument> <description> + The animation's speed in frames per second. </description> </method> <method name="set_frame"> @@ -145,11 +159,13 @@ <argument index="2" name="txt" type="Texture"> </argument> <description> + Sets the texture of the given frame. </description> </method> </methods> <members> <member name="animations" type="Array" setter="_set_animations" getter="_get_animations"> + An [Array] containing the [code]name[/code], [code]speed[/code], [code]loop[/code], and [code]frames[/code] of each animation. </member> <member name="frames" type="Array" setter="_set_frames" getter="_get_frames"> </member> diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index 2f23ac588b..cff41074b8 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -4,9 +4,8 @@ Static body for 2D Physics. </brief_description> <description> - 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). + Static body for 2D Physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms. + Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt). </description> <tutorials> </tutorials> @@ -80,12 +79,16 @@ </methods> <members> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> + The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). </member> <member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity"> + Constant angular velocity for the body. This does not rotate the body, but affects colliding bodies, as if it were rotating. </member> <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity"> + Constant linear velocity for the body. This does not move the body, but affects colliding bodies, as if it were moving. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction"> + The body's friction. Values range from [code]0[/code] (no friction) to [code]1[/code] (full friction). </member> </members> <constants> diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index e4f00555b3..8e51548c10 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TextureButton" inherits="BaseButton" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Button that can be themed with textures. + Texture-based button. Supports Pressed, Hover, Disabled and Focused states. </brief_description> <description> - 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. + [code]TextureButton[/code] has the same functionality as [Button], except it uses sprites instead of Godot's [Theme] resource. It is faster to create, but it doesn't support localization like more complex Controls. + The Normal state's texture is required. Others are optional. </description> <tutorials> </tutorials> @@ -127,36 +127,51 @@ </methods> <members> <member name="expand" type="bool" setter="set_expand" getter="get_expand"> + If [code]true[/code] the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code] the texture will not scale with the node. Default value: [code]false[/code]. </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode"> + Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more. </member> <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask"> + Pure black and white [Bitmap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. </member> <member name="texture_disabled" type="Texture" setter="set_disabled_texture" getter="get_disabled_texture"> + Texture to display when the node is disabled. See [member BaseButton.disabled]. </member> <member name="texture_focused" type="Texture" setter="set_focused_texture" getter="get_focused_texture"> + Texture to display when the node has mouse or keyboard focus. </member> <member name="texture_hover" type="Texture" setter="set_hover_texture" getter="get_hover_texture"> + Texture to display when the mouse hovers the node. </member> <member name="texture_normal" type="Texture" setter="set_normal_texture" getter="get_normal_texture"> + Texture to display by default, when the node is [b]not[/b] in the disabled, focused, hover or pressed state. </member> <member name="texture_pressed" type="Texture" setter="set_pressed_texture" getter="get_pressed_texture"> + Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the enter key or if the player presses the [member BaseButton.shortcut] key. </member> </members> <constants> <constant name="STRETCH_SCALE" value="0"> + Scale to fit the node's bounding rectangle. </constant> <constant name="STRETCH_TILE" value="1"> + Tile inside the node's bounding rectangle. </constant> <constant name="STRETCH_KEEP" value="2"> + The texture keeps its original size and stays in the bounding rectangle's top-left corner. </constant> <constant name="STRETCH_KEEP_CENTERED" value="3"> + The texture keeps its original size and stays centered in the node's bounding rectangle. </constant> <constant name="STRETCH_KEEP_ASPECT" value="4"> + Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio. </constant> <constant name="STRETCH_KEEP_ASPECT_CENTERED" value="5"> + Scale the texture to fit the node's bounding rectangle, center it, and maintain its aspect ratio. </constant> <constant name="STRETCH_KEEP_ASPECT_COVERED" value="6"> + Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits. </constant> </constants> </class> diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml index 0a6ffcdeb8..f8165753c6 100644 --- a/doc/classes/TextureProgress.xml +++ b/doc/classes/TextureProgress.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TextureProgress" inherits="Range" category="Core" version="3.0.alpha.custom_build"> <brief_description> - Textured progress bar. + Texture-based progress bar. Useful for loading screens and life or stamina bars. </brief_description> <description> - A [ProgressBar] that uses textures to display fill percentage. Can be set to linear or radial mode. + TextureProgress works like [ProgressBar] but it uses up to 3 textures instead of Godot's [Theme] resource. Works horizontally, vertically, and radially. </description> <tutorials> </tutorials> @@ -151,51 +151,59 @@ The fill direction. Uses FILL_* constants. </member> <member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch"> - If [code]true[/code] textures will be stretched as [NinePatchRect]. Uses [code]stretch_margin[/code] properties (see below). Default value: [code]false[/code] + If [code]true[/code] Godot treats the bar's textures like [NinePatchRect]. Use [code]stretch_margin_*[/code], like [member stretch_margin_bottom], to set up the nine patch's 3x3 grid. Default value: [code]false[/code]. </member> <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset"> - The offset amount for radial mode. + Offsets [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code]. </member> <member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees"> - The amount of the texture to use for radial mode. + Upper limit for the fill of [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code]. When the node's [code]value[/code] is equal to its [code]max_value[/code], the texture fills up to this angle. + See [member Range.value], [member Range.max_value]. </member> <member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle"> - Start angle for radial mode. + Starting angle for the fill of [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code]. When the node's [code]value[/code] is equal to its [code]min_value[/code], the texture doesn't show up at all. When the [code]value[/code] increases, the texture fills and tends towards [member radial_fill_degrees]. </member> <member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin"> - Nine-patch texture offset for bottom margin. + The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. </member> <member name="stretch_margin_left" type="int" setter="set_stretch_margin" getter="get_stretch_margin"> - Nine-patch texture offset for left margin. + The width of the 9-patch's left column. </member> <member name="stretch_margin_right" type="int" setter="set_stretch_margin" getter="get_stretch_margin"> - Nine-patch texture offset for right margin. + The width of the 9-patch's right column. </member> <member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin"> - Nine-patch texture offset for top margin. + The height of the 9-patch's top row. </member> <member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture"> - The [Texture] that will be drawn over the progress bar. + [Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress]. </member> <member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture"> - The [Texture] used to display [code]value[/code]. + [Texture] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code]. + The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value]. </member> <member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture"> - The [Texture] that will be drawn under the progress bar. + [Texture] that draws under the progress bar. The bar's background. </member> </members> <constants> <constant name="FILL_LEFT_TO_RIGHT" value="0"> + The [member texture_progress] fills from left to right. </constant> <constant name="FILL_RIGHT_TO_LEFT" value="1"> + The [member texture_progress] fills from right to left. </constant> <constant name="FILL_TOP_TO_BOTTOM" value="2"> + The [member texture_progress] fills from top to bototm. </constant> <constant name="FILL_BOTTOM_TO_TOP" value="3"> + The [member texture_progress] fills from bottom to top. </constant> <constant name="FILL_CLOCKWISE" value="4"> + Turns the node into a radial bar. The [member texture_progress] fills clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to refine its behavior. </constant> <constant name="FILL_COUNTER_CLOCKWISE" value="5"> + Turns the node into a radial bar. The [member texture_progress] fills counter-clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to refine its behavior. </constant> </constants> </class> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index a90013f922..0e39505ac3 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -36,7 +36,7 @@ <method name="Transform2D"> <return type="Transform2D"> </return> - <argument index="0" name="rot" type="float"> + <argument index="0" name="rotation" type="float"> </argument> <argument index="1" name="position" type="Vector2"> </argument> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 82e85126cc..bf9245d23a 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -4,8 +4,8 @@ Control to show a tree of items. </brief_description> <description> - 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. + 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 structured displays and interactions. + Trees are built via code, using [TreeItem] objects to create the structure. They have a single root but multiple roots can be simulated if a dummy hidden root is added. [codeblock] func _ready(): var tree = Tree.new() @@ -26,14 +26,14 @@ <return type="bool"> </return> <description> - Get whether the column titles are being shown. + Returns [code]true[/code] if the column titles are being shown. </description> </method> <method name="clear"> <return type="void"> </return> <description> - Clear the tree. This erases all of the items. + Clears the tree. This removes all items. </description> </method> <method name="create_item"> @@ -42,27 +42,28 @@ <argument index="0" name="parent" type="Object" default="null"> </argument> <description> - 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. + 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 root's last child, or it'll the be the root itself if the tree is empty. </description> </method> <method name="ensure_cursor_is_visible"> <return type="void"> </return> <description> - Make the current selected item visible. This will scroll the tree to make sure the selected item is in sight. + Makes the currently selected item visible. This will scroll the tree to make sure the selected item is visible. </description> </method> <method name="get_allow_reselect" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if a cell that is currently already selected may be selected again. </description> </method> <method name="get_allow_rmb_select" qualifiers="const"> <return type="bool"> </return> <description> - Get whether a right click can select items. + Returns [code]true[/code] if a right click can select items. </description> </method> <method name="get_column_at_position" qualifiers="const"> @@ -71,7 +72,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Get the column index under the given point. + Returns the column index under the given point. </description> </method> <method name="get_column_title" qualifiers="const"> @@ -80,7 +81,7 @@ <argument index="0" name="column" type="int"> </argument> <description> - Get the title of the given column. + Returns the column's title. </description> </method> <method name="get_column_width" qualifiers="const"> @@ -89,28 +90,28 @@ <argument index="0" name="column" type="int"> </argument> <description> - Get the width of the given column in pixels. + Returns the column's width in pixels. </description> </method> <method name="get_columns" qualifiers="const"> <return type="int"> </return> <description> - Get the amount of columns. + Returns the amount of columns. </description> </method> <method name="get_custom_popup_rect" qualifiers="const"> <return type="Rect2"> </return> <description> - Get the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode]. + Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode]. </description> </method> <method name="get_drop_mode_flags" qualifiers="const"> <return type="int"> </return> <description> - Get the flags of the current drop mode. + Returns the current drop mode's flags. </description> </method> <method name="get_drop_section_at_position" qualifiers="const"> @@ -125,14 +126,14 @@ <return type="TreeItem"> </return> <description> - Get the current edited item. This is only available for custom cell mode. + Returns the currently edited item. This is only available for custom cell mode. </description> </method> <method name="get_edited_column" qualifiers="const"> <return type="int"> </return> <description> - Get the column of the cell for the current edited icon. This is only available for custom cell mode. + Returns the column for the currently edited item. This is only available for custom cell mode. </description> </method> <method name="get_item_area_rect" qualifiers="const"> @@ -143,7 +144,7 @@ <argument index="1" name="column" type="int" default="-1"> </argument> <description> - 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. + Returns the rectangle area for the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. </description> </method> <method name="get_item_at_position" qualifiers="const"> @@ -152,7 +153,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Get the tree item at the specified position (relative to the tree origin position). + Returns the tree item at the specified position (relative to the tree origin position). </description> </method> <method name="get_next_selected"> @@ -161,49 +162,49 @@ <argument index="0" name="from" type="Object"> </argument> <description> - Get the next selected item after the given one. + Returns the next selected item after the given one. </description> </method> <method name="get_pressed_button" qualifiers="const"> <return type="int"> </return> <description> - Get the index of the last pressed button. + Returns the last pressed button's index. </description> </method> <method name="get_root"> <return type="TreeItem"> </return> <description> - Get the root item of the tree. + Returns the tree's root item. </description> </method> <method name="get_scroll" qualifiers="const"> <return type="Vector2"> </return> <description> - Get the current scrolling position. + Returns the current scrolling position. </description> </method> <method name="get_selected" qualifiers="const"> <return type="TreeItem"> </return> <description> - Get the currently selected item. + Returns the currently selected item. </description> </method> <method name="get_selected_column" qualifiers="const"> <return type="int"> </return> <description> - Get the column number of the current selection. + Returns the current selection's column. </description> </method> <method name="is_folding_hidden" qualifiers="const"> <return type="bool"> </return> <description> - Get whether the folding arrow is hidden. + Returns [code]true[/code] if the folding arrow is hidden. </description> </method> <method name="set_allow_reselect"> @@ -212,6 +213,7 @@ <argument index="0" name="allow" type="bool"> </argument> <description> + If [code]true[/code] the currently selected cell may be selected again. </description> </method> <method name="set_allow_rmb_select"> @@ -220,7 +222,7 @@ <argument index="0" name="allow" type="bool"> </argument> <description> - Set whether or not a right mouse button click can select items. + If [code]true[/code] a right mouse button click can select items. </description> </method> <method name="set_column_expand"> @@ -231,7 +233,7 @@ <argument index="1" name="expand" type="bool"> </argument> <description> - Set whether a column will have the "Expand" flag of [Control]. + If [code]true[/code] the column will have the "Expand" flag of [Control]. </description> </method> <method name="set_column_min_width"> @@ -262,7 +264,7 @@ <argument index="0" name="visible" type="bool"> </argument> <description> - Set whether the column titles visibility. + If [code]true[/code] column titles are visible. </description> </method> <method name="set_columns"> @@ -289,7 +291,7 @@ <argument index="0" name="hide" type="bool"> </argument> <description> - Set whether the folding arrow should be hidden. + If [code]true[/code] the folding arrow is hidden. </description> </method> <method name="set_hide_root"> @@ -298,7 +300,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Set whether the root of the tree should be hidden. + If [code]true[/code] the tree's root is hidden. </description> </method> <method name="set_select_mode"> @@ -307,7 +309,7 @@ <argument index="0" name="mode" type="int" enum="Tree.SelectMode"> </argument> <description> - Set the selection mode. Use one of the [code]SELECT_*[/code] constants. + Allow single or multiple selection. See the [code]SELECT_*[/code] constants. </description> </method> </methods> @@ -332,6 +334,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Emitted when a column's title is pressed. </description> </signal> <signal name="custom_popup_edited"> @@ -366,15 +369,17 @@ </signal> <signal name="item_double_clicked"> <description> + Emitted when an item is double clicked. </description> </signal> <signal name="item_edited"> <description> - Emitted when an item is editted. + Emitted when an item is edited. </description> </signal> <signal name="item_rmb_edited"> <description> + Emitted when an item is edited using the right mouse button. </description> </signal> <signal name="item_rmb_selected"> @@ -397,15 +402,18 @@ <argument index="2" name="selected" type="bool"> </argument> <description> + Emitted instead of [code]item_selected[/code] when [code]select_mode[/code] is [code]SELECT_MULTI[/code]. </description> </signal> </signals> <constants> <constant name="SELECT_SINGLE" value="0"> + Allow selection of a single item at a time. </constant> <constant name="SELECT_ROW" value="1"> </constant> <constant name="SELECT_MULTI" value="2"> + Allow selection of multiple items at the same time. </constant> <constant name="DROP_MODE_DISABLED" value="0"> </constant> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index d1e45bd10f..10ebc72134 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TreeItem" inherits="Object" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Control for a single item inside a [Tree]. </brief_description> <description> + Control for a single item inside a [Tree]. May have child [TreeItem]\ s and be styled as well as contain buttons. </description> <tutorials> </tutorials> @@ -23,6 +25,7 @@ <argument index="4" name="tooltip" type="String" default=""""> </argument> <description> + Adds a button with [Texture] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [code]get_buton_count()[/code] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code]. </description> </method> <method name="clear_custom_bg_color"> @@ -31,6 +34,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Resets the background color for the given column to default. </description> </method> <method name="clear_custom_color"> @@ -39,6 +43,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Resets the color for the given column to default. </description> </method> <method name="deselect"> @@ -47,6 +52,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Deselects the given column. </description> </method> <method name="erase_button"> @@ -57,6 +63,7 @@ <argument index="1" name="button_idx" type="int"> </argument> <description> + Removes the button at index [code]button_idx[/code] in column [code]column[/code]. </description> </method> <method name="get_button" qualifiers="const"> @@ -67,6 +74,7 @@ <argument index="1" name="button_idx" type="int"> </argument> <description> + Returns the [Texture] of the button at index [code]button_idx[/code] in column [code]column[/code]. </description> </method> <method name="get_button_count" qualifiers="const"> @@ -75,6 +83,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the number of buttons in column [code]column[/code]. May be used to get the most recently added button's index, if no index was specified. </description> </method> <method name="get_cell_mode" qualifiers="const"> @@ -83,12 +92,14 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the column's cell mode. See [code]CELL_MODE_*[/code] constants. </description> </method> <method name="get_children"> <return type="TreeItem"> </return> <description> + Returns the TreeItem's child items. </description> </method> <method name="get_custom_bg_color" qualifiers="const"> @@ -97,12 +108,14 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the custom background color of column [code]column[/code]. </description> </method> <method name="get_custom_minimum_height" qualifiers="const"> <return type="int"> </return> <description> + Returns the custom minimum height. </description> </method> <method name="get_expand_right" qualifiers="const"> @@ -111,6 +124,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns [code]true[/code] if [code]expand_right[/code] is set. </description> </method> <method name="get_icon" qualifiers="const"> @@ -119,6 +133,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the given column's icon [Texture]. Error if no icon is set. </description> </method> <method name="get_icon_max_width" qualifiers="const"> @@ -127,6 +142,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the column's icon's maximum width. </description> </method> <method name="get_icon_region" qualifiers="const"> @@ -135,6 +151,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the icon [Texture] region as [Rect2]. </description> </method> <method name="get_metadata" qualifiers="const"> @@ -149,30 +166,35 @@ <return type="TreeItem"> </return> <description> + Returns the next TreeItem in the tree. </description> </method> <method name="get_next_visible"> <return type="TreeItem"> </return> <description> + Returns the next visible TreeItem in the tree. </description> </method> <method name="get_parent"> <return type="TreeItem"> </return> <description> + Returns the parent TreeItem. </description> </method> <method name="get_prev"> <return type="TreeItem"> </return> <description> + Returns the previous TreeItem in the tree. </description> </method> <method name="get_prev_visible"> <return type="TreeItem"> </return> <description> + Returns the previous visible TreeItem in the tree. </description> </method> <method name="get_range" qualifiers="const"> @@ -197,6 +219,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the given column's text. </description> </method> <method name="get_text_align" qualifiers="const"> @@ -205,6 +228,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the given column's text alignment. </description> </method> <method name="get_tooltip" qualifiers="const"> @@ -213,6 +237,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the given column's tooltip. </description> </method> <method name="is_button_disabled" qualifiers="const"> @@ -223,6 +248,7 @@ <argument index="1" name="button_idx" type="int"> </argument> <description> + Returns [code]true[/code] if the button at index [code]button_idx[/code] for the given column is disabled. </description> </method> <method name="is_checked" qualifiers="const"> @@ -231,12 +257,14 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns [code]true[/code] if the given column is checked. </description> </method> <method name="is_collapsed"> <return type="bool"> </return> <description> + Returns [code]true[/code] if this TreeItem is collapsed. </description> </method> <method name="is_custom_set_as_button" qualifiers="const"> @@ -253,12 +281,14 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns [code]true[/code] if column [code]column[/code] is editable. </description> </method> <method name="is_folding_disabled" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if folding is disabled for this TreeItem. </description> </method> <method name="is_selectable" qualifiers="const"> @@ -267,6 +297,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns [code]true[/code] if column [code]column[/code] is selectable. </description> </method> <method name="is_selected"> @@ -275,18 +306,21 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns [code]true[/code] if column [code]column[/code] is selected. </description> </method> <method name="move_to_bottom"> <return type="void"> </return> <description> + Moves this TreeItem to the bottom in the [Tree] hierarchy. </description> </method> <method name="move_to_top"> <return type="void"> </return> <description> + Moves this TreeItem to the top in the [Tree] hierarchy. </description> </method> <method name="remove_child"> @@ -295,6 +329,7 @@ <argument index="0" name="child" type="Object"> </argument> <description> + Removes the child TreeItem at index [code]index[/code]. </description> </method> <method name="select"> @@ -303,6 +338,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Selects the column [code]column[/code]. </description> </method> <method name="set_button"> @@ -315,6 +351,7 @@ <argument index="2" name="button" type="Texture"> </argument> <description> + Sets the given column's button [Texture] at index [code]button_idx[/code] to [code]button[/code]. </description> </method> <method name="set_cell_mode"> @@ -325,6 +362,7 @@ <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode"> </argument> <description> + Sets the given column's cell mode to [code]mode[/code]. See [code]CELL_MODE_*[/code] constants. </description> </method> <method name="set_checked"> @@ -335,6 +373,7 @@ <argument index="1" name="checked" type="bool"> </argument> <description> + If [code]true[/code] the column [code]column[/code] is checked. </description> </method> <method name="set_collapsed"> @@ -343,6 +382,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> + If [code]true[/code] the TreeItem is collapsed. </description> </method> <method name="set_custom_as_button"> @@ -365,6 +405,7 @@ <argument index="2" name="just_outline" type="bool" default="false"> </argument> <description> + Sets the given column's custom background color and whether to just use it as an outline. </description> </method> <method name="set_custom_color"> @@ -375,6 +416,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the given column's custom color. </description> </method> <method name="set_custom_draw"> @@ -387,6 +429,7 @@ <argument index="2" name="callback" type="String"> </argument> <description> + Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code]. </description> </method> <method name="set_custom_minimum_height"> @@ -395,6 +438,7 @@ <argument index="0" name="height" type="int"> </argument> <description> + Sets the custom minimum height of this TreeItem. </description> </method> <method name="set_disable_folding"> @@ -403,6 +447,7 @@ <argument index="0" name="disable" type="bool"> </argument> <description> + If [code]true[/code] folding is disabled for this TreeItem. </description> </method> <method name="set_editable"> @@ -413,6 +458,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + If [code]true[/code] column [code]column[/code] is editable. </description> </method> <method name="set_expand_right"> @@ -423,6 +469,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code] column [code]column[/code] is expanded to the right. </description> </method> <method name="set_icon"> @@ -433,6 +480,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + Sets the given column's icon [Texture]. </description> </method> <method name="set_icon_max_width"> @@ -443,6 +491,7 @@ <argument index="1" name="width" type="int"> </argument> <description> + Sets the given column's icon's maximum width. </description> </method> <method name="set_icon_region"> @@ -453,6 +502,7 @@ <argument index="1" name="region" type="Rect2"> </argument> <description> + Sets the given column's icon's texture region. </description> </method> <method name="set_metadata"> @@ -499,6 +549,7 @@ <argument index="1" name="selectable" type="bool"> </argument> <description> + If [code]true[/code] the given column is selectable. </description> </method> <method name="set_text"> @@ -519,6 +570,7 @@ <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign"> </argument> <description> + Sets the given column's text alignment. See [code]ALIGN_*[/code] constants. </description> </method> <method name="set_tooltip"> @@ -529,27 +581,36 @@ <argument index="1" name="tooltip" type="String"> </argument> <description> + Sets the given column's tooltip text. </description> </method> </methods> <constants> <constant name="CELL_MODE_STRING" value="0"> + Cell contains a string. </constant> <constant name="CELL_MODE_CHECK" value="1"> + Cell can be checked. </constant> <constant name="CELL_MODE_RANGE" value="2"> + Cell contains a range. </constant> <constant name="CELL_MODE_RANGE_EXPRESSION" value="3"> + Cell contains a range expression. </constant> <constant name="CELL_MODE_ICON" value="4"> + Cell contains an icon. </constant> <constant name="CELL_MODE_CUSTOM" value="5"> </constant> <constant name="ALIGN_LEFT" value="0"> + Align text to the left. See [code]set_text_align()[/code]. </constant> <constant name="ALIGN_CENTER" value="1"> + Center text. See [code]set_text_align()[/code]. </constant> <constant name="ALIGN_RIGHT" value="2"> + Align text to the right. See [code]set_text_align()[/code]. </constant> </constants> </class> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 57e417974e..bac7d1e3b0 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -156,6 +156,15 @@ Set the video stream for this player. </description> </method> + <method name="set_stream_position"> + <return type="void"> + </return> + <argument index="0" name="position" type="float"> + </argument> + <description> + Set the current position of the stream, in seconds. + </description> + </method> <method name="set_volume"> <return type="void"> </return> diff --git a/doc/classes/VisualScript.xml b/doc/classes/VisualScript.xml index 6473b074d3..e44547cd8f 100644 --- a/doc/classes/VisualScript.xml +++ b/doc/classes/VisualScript.xml @@ -1,8 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScript" inherits="Script" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A script implemented in the Visual Script programming environment. </brief_description> <description> + A script implemented in the Visual Script programming environment. The script exends the functionality of all objects that instance it. + [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. + You are most likely to use this class via the Visual Script editor or when writing plugins for it. </description> <tutorials> </tutorials> @@ -15,6 +19,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Add a custom signal with the specified name to the VisualScript. </description> </method> <method name="add_function"> @@ -23,6 +28,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Add a function with the specified name to the VisualScript. </description> </method> <method name="add_node"> @@ -37,6 +43,7 @@ <argument index="3" name="position" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> + Add a node to a function of the VisualScript. </description> </method> <method name="add_variable"> @@ -49,6 +56,7 @@ <argument index="2" name="export" type="bool" default="false"> </argument> <description> + Add a variable to the VisualScript, optionally giving it a default value or marking it as exported. </description> </method> <method name="custom_signal_add_argument"> @@ -63,6 +71,7 @@ <argument index="3" name="index" type="int" default="-1"> </argument> <description> + Add an argument to a custom signal added with [method add_custom_signal]. </description> </method> <method name="custom_signal_get_argument_count" qualifiers="const"> @@ -71,6 +80,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Get the count of a custom signal's arguments. </description> </method> <method name="custom_signal_get_argument_name" qualifiers="const"> @@ -81,6 +91,7 @@ <argument index="1" name="argidx" type="int"> </argument> <description> + Get the name of a custom signal's argument. </description> </method> <method name="custom_signal_get_argument_type" qualifiers="const"> @@ -91,6 +102,7 @@ <argument index="1" name="argidx" type="int"> </argument> <description> + Get the type of a custom signal's argument. </description> </method> <method name="custom_signal_remove_argument"> @@ -101,6 +113,7 @@ <argument index="1" name="argidx" type="int"> </argument> <description> + Remove a specific custom signal's argument. </description> </method> <method name="custom_signal_set_argument_name"> @@ -113,6 +126,7 @@ <argument index="2" name="argname" type="String"> </argument> <description> + Rename a custom signal's argument. </description> </method> <method name="custom_signal_set_argument_type"> @@ -125,6 +139,7 @@ <argument index="2" name="type" type="int" enum="Variant.Type"> </argument> <description> + Change the type of a custom signal's argument. </description> </method> <method name="custom_signal_swap_argument"> @@ -137,6 +152,7 @@ <argument index="2" name="withidx" type="int"> </argument> <description> + Swap two of the arguments of a custom signal. </description> </method> <method name="data_connect"> @@ -153,6 +169,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Connect two data ports. The value of [code]from_node[/code]'s [code]from_port[/code] would be fed into [code]to_node[/code]'s [code]to_port[/code]. </description> </method> <method name="data_disconnect"> @@ -169,6 +186,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Disconnect two data ports previously connected with [method data_connect]. </description> </method> <method name="get_function_node_id" qualifiers="const"> @@ -177,6 +195,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the id of a function's entry point node. </description> </method> <method name="get_function_scroll" qualifiers="const"> @@ -185,6 +204,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the position of the center of the screen for a given function. </description> </method> <method name="get_node" qualifiers="const"> @@ -195,6 +215,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Returns a node given its id and its function. </description> </method> <method name="get_node_position" qualifiers="const"> @@ -205,6 +226,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Returns a node's position in pixels. </description> </method> <method name="get_variable_default_value" qualifiers="const"> @@ -213,6 +235,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the default (initial) value of a variable. </description> </method> <method name="get_variable_export" qualifiers="const"> @@ -221,6 +244,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns whether a variable is exported. </description> </method> <method name="get_variable_info" qualifiers="const"> @@ -229,6 +253,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the info for a given variable as a dictionary. The information includes its name, type, hint and usage. </description> </method> <method name="has_custom_signal" qualifiers="const"> @@ -237,6 +262,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns whether a signal exists with the specified name. </description> </method> <method name="has_data_connection" qualifiers="const"> @@ -253,6 +279,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Returns whether the specified data ports are connected. </description> </method> <method name="has_function" qualifiers="const"> @@ -261,6 +288,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns whether a function exists with the specified name. </description> </method> <method name="has_node" qualifiers="const"> @@ -271,6 +299,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Returns whether a node exists with the given id. </description> </method> <method name="has_sequence_connection" qualifiers="const"> @@ -285,6 +314,7 @@ <argument index="3" name="to_node" type="int"> </argument> <description> + Returns whether the specified sequence ports are connected. </description> </method> <method name="has_variable" qualifiers="const"> @@ -293,6 +323,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns whether a variable exists with the specified name. </description> </method> <method name="remove_custom_signal"> @@ -301,6 +332,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Remove a custom signal with the given name. </description> </method> <method name="remove_function"> @@ -309,6 +341,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Remove a specific function and its nodes from the script. </description> </method> <method name="remove_node"> @@ -319,6 +352,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Remove a specific node. </description> </method> <method name="remove_variable"> @@ -327,6 +361,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Remove a variable with the given name. </description> </method> <method name="rename_custom_signal"> @@ -337,6 +372,7 @@ <argument index="1" name="new_name" type="String"> </argument> <description> + Change the name of a custom signal. </description> </method> <method name="rename_function"> @@ -347,6 +383,7 @@ <argument index="1" name="new_name" type="String"> </argument> <description> + Change the name of a function. </description> </method> <method name="rename_variable"> @@ -357,6 +394,7 @@ <argument index="1" name="new_name" type="String"> </argument> <description> + Change the name of a variable. </description> </method> <method name="sequence_connect"> @@ -371,6 +409,8 @@ <argument index="3" name="to_node" type="int"> </argument> <description> + Connect two sequence ports. The execution will flow from of [code]from_node[/code]'s [code]from_output[/code] into [code]to_node[/code]. + Unlike [method data_connect], there isn't a [code]to_port[/code], since the target node can have only one sequence port. </description> </method> <method name="sequence_disconnect"> @@ -385,6 +425,7 @@ <argument index="3" name="to_node" type="int"> </argument> <description> + Disconnect two sequence ports previously connected with [method sequence_connect]. </description> </method> <method name="set_function_scroll"> @@ -395,6 +436,7 @@ <argument index="1" name="ofs" type="Vector2"> </argument> <description> + Position the center of the screen for a function. </description> </method> <method name="set_instance_base_type"> @@ -403,6 +445,7 @@ <argument index="0" name="type" type="String"> </argument> <description> + Set the base type of the script. </description> </method> <method name="set_node_position"> @@ -415,6 +458,7 @@ <argument index="2" name="position" type="Vector2"> </argument> <description> + Position a node on the screen. </description> </method> <method name="set_variable_default_value"> @@ -425,6 +469,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> + Change the default (initial) value of a variable. </description> </method> <method name="set_variable_export"> @@ -435,6 +480,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Change whether a variable is exported. </description> </method> <method name="set_variable_info"> @@ -445,6 +491,7 @@ <argument index="1" name="value" type="Dictionary"> </argument> <description> + Set a variable's info, using the same format as [method get_variable_info]. </description> </method> </methods> @@ -459,6 +506,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Emitted when the ports of a node are changed. </description> </signal> </signals> diff --git a/doc/classes/VisualScriptBasicTypeConstant.xml b/doc/classes/VisualScriptBasicTypeConstant.xml index 5b066f9925..cc09815481 100644 --- a/doc/classes/VisualScriptBasicTypeConstant.xml +++ b/doc/classes/VisualScriptBasicTypeConstant.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node representing a constant from the base types. </brief_description> <description> + A Visual Script node representing a constant from base types, such as [Vector3.AXIS_X]. </description> <tutorials> </tutorials> @@ -40,8 +42,10 @@ </methods> <members> <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type"> + The type to get the constant from. </member> <member name="constant" type="String" setter="set_basic_type_constant" getter="get_basic_type_constant"> + The name of the constant to return. </member> </members> <constants> diff --git a/doc/classes/VisualScriptBuiltinFunc.xml b/doc/classes/VisualScriptBuiltinFunc.xml index a88633749e..f48f5a5308 100644 --- a/doc/classes/VisualScriptBuiltinFunc.xml +++ b/doc/classes/VisualScriptBuiltinFunc.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node used to call built-in functions. </brief_description> <description> + A built-in function used inside a [VisualScript]. It is usually a math function or an utility function. + See also [@GDScript], for the same functions in the GDScript language. </description> <tutorials> </tutorials> @@ -26,124 +29,183 @@ </methods> <members> <member name="function" type="int" setter="set_func" getter="get_func" enum="VisualScriptBuiltinFunc.BuiltinFunc"> + The function to be executed. </member> </members> <constants> <constant name="MATH_SIN" value="0"> + Return the sine of the input. </constant> <constant name="MATH_COS" value="1"> + Return the cosine of the input. </constant> <constant name="MATH_TAN" value="2"> + Return the tangent of the input. </constant> <constant name="MATH_SINH" value="3"> + Return the hyperbolic sine of the input. </constant> <constant name="MATH_COSH" value="4"> + Return the hyperbolic cosine of the input. </constant> <constant name="MATH_TANH" value="5"> + Return the hyperbolic tangent of the input. </constant> <constant name="MATH_ASIN" value="6"> + Return the arc sine of the input. </constant> <constant name="MATH_ACOS" value="7"> + Return the arc cosine of the input. </constant> <constant name="MATH_ATAN" value="8"> + Return the arc tangent of the input. </constant> <constant name="MATH_ATAN2" value="9"> + Return the arc tangent of the input, using the signs of both parameters to determine the exact angle. </constant> <constant name="MATH_SQRT" value="10"> + Return the square root of the input. </constant> <constant name="MATH_FMOD" value="11"> + Return the remainder of one input divided by the other, using floating-point numbers. </constant> <constant name="MATH_FPOSMOD" value="12"> + Return the positive remainder of one input divided by the other, using floating-point numbers. </constant> <constant name="MATH_FLOOR" value="13"> + Return the input rounded down. </constant> <constant name="MATH_CEIL" value="14"> + Return the input rounded up. </constant> <constant name="MATH_ROUND" value="15"> + Return the input rounded to the nearest integer. </constant> <constant name="MATH_ABS" value="16"> + Return the absolute value of the input. </constant> <constant name="MATH_SIGN" value="17"> + Return the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative. </constant> <constant name="MATH_POW" value="18"> + Return the input raised to a given power. </constant> <constant name="MATH_LOG" value="19"> + Return the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use. </constant> <constant name="MATH_EXP" value="20"> + Return [b]e[/b] raised to the power of the input. [b]e[/b] sometimes called "Euler's number" is a mathematical constant whose value is approximately 2.71828. </constant> <constant name="MATH_ISNAN" value="21"> + Return whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist. </constant> <constant name="MATH_ISINF" value="22"> + Return whether the input is an infinite floating-point number or not. Infinity is usually produced by dividing a number by 0, though other ways exist. </constant> <constant name="MATH_EASE" value="23"> + Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. </constant> <constant name="MATH_DECIMALS" value="24"> + Return the number of digit places after the decimal that the first non-zero digit occurs. </constant> <constant name="MATH_STEPIFY" value="25"> + Return the input snapped to a given step. </constant> <constant name="MATH_LERP" value="26"> + Return a number linearly interpolated between the first two inputs, based on the third input. Uses the formula [code]a + (a - b) * t[/code]. </constant> <constant name="MATH_DECTIME" value="27"> + Return the result of 'value' decreased by 'step' * 'amount'. </constant> <constant name="MATH_RANDOMIZE" value="28"> + Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. </constant> <constant name="MATH_RAND" value="29"> + Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use it with the remainder function. </constant> <constant name="MATH_RANDF" value="30"> + Return a random floating-point value between 0 and 1. To obtain a random value between 0 to N, you can use it with multiplication. </constant> <constant name="MATH_RANDOM" value="31"> + Return a random floating-point value between the two inputs. </constant> <constant name="MATH_SEED" value="32"> + Set the seed for the random number generator. </constant> <constant name="MATH_RANDSEED" value="33"> + Return a random value from the given seed, along with the new seed. </constant> <constant name="MATH_DEG2RAD" value="34"> + Convert the input from degrees to radians. </constant> <constant name="MATH_RAD2DEG" value="35"> + Convert the input from radians to degrees. </constant> <constant name="MATH_LINEAR2DB" value="36"> + Convert the input from linear volume to decibel volume. </constant> <constant name="MATH_DB2LINEAR" value="37"> + Convert the input from decibel volume to linear volume. </constant> <constant name="LOGIC_MAX" value="38"> + Return the greater of the two numbers, also known as their maximum. </constant> <constant name="LOGIC_MIN" value="39"> + Return the lesser of the two numbers, also known as their minimum. </constant> <constant name="LOGIC_CLAMP" value="40"> + Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to `min(max(input, range_low), range_high)` </constant> <constant name="LOGIC_NEAREST_PO2" value="41"> + Return the nearest power of 2 to the input. </constant> <constant name="OBJ_WEAKREF" value="42"> + Create a [WeakRef] from the input. </constant> <constant name="FUNC_FUNCREF" value="43"> + Create a [FuncRef] from the input. </constant> <constant name="TYPE_CONVERT" value="44"> + Convert between types. </constant> <constant name="TYPE_OF" value="45"> + Return the type of the input as an integer. Check [enum Variant.Type] for the integers that might be returned. </constant> <constant name="TYPE_EXISTS" value="46"> + Checks if a type is registered in the [ClassDB]. </constant> <constant name="TEXT_CHAR" value="47"> + Return a character with the given ascii value. </constant> <constant name="TEXT_STR" value="48"> + Convert the input to a string. </constant> <constant name="TEXT_PRINT" value="49"> + Print the given string to the output window. </constant> <constant name="TEXT_PRINTERR" value="50"> + Print the given string to the standard error output. </constant> <constant name="TEXT_PRINTRAW" value="51"> + Print the given string to the standard output, without adding a newline. </constant> <constant name="VAR_TO_STR" value="52"> + Serialize a [Variant] to a string. </constant> <constant name="STR_TO_VAR" value="53"> + Deserialize a [Variant] from a string serialized using [VAR_TO_STR]. </constant> <constant name="VAR_TO_BYTES" value="54"> + Serialize a [Variant] to a [PoolByteArray]. </constant> <constant name="BYTES_TO_VAR" value="55"> + Deserialize a [Variant] from a [PoolByteArray] serialized using [VAR_TO_BYTES]. </constant> <constant name="COLORN" value="56"> + Return the [Color] with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc. </constant> <constant name="FUNC_MAX" value="57"> + The maximum value the [member function] property can have. </constant> </constants> </class> diff --git a/doc/classes/VisualScriptClassConstant.xml b/doc/classes/VisualScriptClassConstant.xml index 5e43b4972c..70e7de5dd9 100644 --- a/doc/classes/VisualScriptClassConstant.xml +++ b/doc/classes/VisualScriptClassConstant.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node representing a constant from a class. </brief_description> <description> + A Visual Script node representing a constant from the classes, such as [@GlobalScope.TYPE_INT]. </description> <tutorials> </tutorials> @@ -40,8 +42,10 @@ </methods> <members> <member name="base_type" type="String" setter="set_base_type" getter="get_base_type"> + The type to get the constant from. </member> <member name="constant" type="String" setter="set_class_constant" getter="get_class_constant"> + The name of the constant to return. </member> </members> <constants> diff --git a/doc/classes/VisualScriptComment.xml b/doc/classes/VisualScriptComment.xml index be4eefd775..69126052d0 100644 --- a/doc/classes/VisualScriptComment.xml +++ b/doc/classes/VisualScriptComment.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node used to annotate the script. </brief_description> <description> + A Visual Script node used to display annotations in the script, so that code may be documented. + Comment nodes can be resized so they encompass a group of nodes. </description> <tutorials> </tutorials> @@ -54,10 +57,13 @@ </methods> <members> <member name="description" type="String" setter="set_description" getter="get_description"> + The text inside the comment node. </member> <member name="size" type="Vector2" setter="set_size" getter="get_size"> + The comment node's size (in pixels). </member> <member name="title" type="String" setter="set_title" getter="get_title"> + The comment node's title. </member> </members> <constants> diff --git a/doc/classes/VisualScriptCondition.xml b/doc/classes/VisualScriptCondition.xml index 73f1b69c02..a776c9bc9b 100644 --- a/doc/classes/VisualScriptCondition.xml +++ b/doc/classes/VisualScriptCondition.xml @@ -1,8 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node which branches the flow. </brief_description> <description> + A Visual Script node that checks a [bool] input port. If [code]true[/code] it will exit via the “true” sequence port. If [code]false[/code] it will exit via the "false" sequence port. After exiting either, it exits via the “done” port. Sequence ports may be left disconnected. + [b]Input Ports:[/b] + - Sequence: [code]if (cond) is[/code] + - Data (boolean): [code]cond[/code] + [b]Output Ports:[/b] + - Sequence: [code]true[/code] + - Sequence: [code]false[/code] + - Sequence: [code]done[/code] </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualScriptConstant.xml b/doc/classes/VisualScriptConstant.xml index b0af3bda98..508087a928 100644 --- a/doc/classes/VisualScriptConstant.xml +++ b/doc/classes/VisualScriptConstant.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node which returns a constant value. </brief_description> <description> + A Visual Script node which returns the specified constant value. </description> <tutorials> </tutorials> @@ -40,8 +42,10 @@ </methods> <members> <member name="type" type="int" setter="set_constant_type" getter="get_constant_type" enum="Variant.Type"> + The constant's type. </member> <member name="value" type="Variant" setter="set_constant_value" getter="get_constant_value"> + The constant's value. </member> </members> <constants> diff --git a/doc/classes/VisualScriptConstructor.xml b/doc/classes/VisualScriptConstructor.xml index e8afd36b9c..3b1fc5e385 100644 --- a/doc/classes/VisualScriptConstructor.xml +++ b/doc/classes/VisualScriptConstructor.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node which calls a base type constructor. </brief_description> <description> + A Visual Script node which calls a base type constructor. It can be used for type conversion as well. </description> <tutorials> </tutorials> @@ -40,8 +42,26 @@ </methods> <members> <member name="constructor" type="Dictionary" setter="set_constructor" getter="get_constructor"> + The constructor function's method info. Has roughly the following structure: + [codeblock] + { + name = "string", + args = [{ + name = "string" + class_name = "string" + type = TYPE_* + hint = PROPERTY_HINT_* + hint_string = "string" + }] + default_args = [] # Array of variants + flags = METHOD_FLAG_* + id = 0 + return = {type = TYPE_*} + } + [/codeblock] </member> <member name="type" type="int" setter="set_constructor_type" getter="get_constructor_type" enum="Variant.Type"> + The type to be constructed. </member> </members> <constants> diff --git a/doc/classes/VisualScriptCustomNode.xml b/doc/classes/VisualScriptCustomNode.xml index ec442e993c..e321c8854a 100644 --- a/doc/classes/VisualScriptCustomNode.xml +++ b/doc/classes/VisualScriptCustomNode.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A scripted Visual Script node. </brief_description> <description> + A custom Visual Script node which can be scripted in powerful ways. </description> <tutorials> </tutorials> @@ -13,18 +15,21 @@ <return type="String"> </return> <description> + Return the node's title. </description> </method> <method name="_get_category" qualifiers="virtual"> <return type="String"> </return> <description> + Return the node's category. </description> </method> <method name="_get_input_value_port_count" qualifiers="virtual"> <return type="int"> </return> <description> + Return the count of input value ports. </description> </method> <method name="_get_input_value_port_name" qualifiers="virtual"> @@ -33,6 +38,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the specified input port's name. </description> </method> <method name="_get_input_value_port_type" qualifiers="virtual"> @@ -41,12 +47,14 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the specified input port's type. See the TYPE_* enum in [@GlobalScope]. </description> </method> <method name="_get_output_sequence_port_count" qualifiers="virtual"> <return type="int"> </return> <description> + Return the amount of output [b]sequence[/b] ports. </description> </method> <method name="_get_output_sequence_port_text" qualifiers="virtual"> @@ -55,12 +63,14 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the specified [b]sequence[/b] output's name. </description> </method> <method name="_get_output_value_port_count" qualifiers="virtual"> <return type="int"> </return> <description> + Return the amount of output value ports. </description> </method> <method name="_get_output_value_port_name" qualifiers="virtual"> @@ -69,6 +79,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the specified output's name. </description> </method> <method name="_get_output_value_port_type" qualifiers="virtual"> @@ -77,24 +88,28 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the specified output's type. See the TYPE_* enum in [@GlobalScope]. </description> </method> <method name="_get_text" qualifiers="virtual"> <return type="String"> </return> <description> + Return the custom node's text, which is shown right next to the input [b]sequence[/b] port (if there is none, on the place that is usually taken by it). </description> </method> <method name="_get_working_memory_size" qualifiers="virtual"> <return type="int"> </return> <description> + Return the size of the custom node's working memory. See [method _step] for more details. </description> </method> <method name="_has_input_sequence_port" qualifiers="virtual"> <return type="bool"> </return> <description> + Return whether the custom node has an input [b]sequence[/b] port. </description> </method> <method name="_step" qualifiers="virtual"> @@ -109,25 +124,42 @@ <argument index="3" name="working_mem" type="Array"> </argument> <description> + Execute the custom node's logic, returning the index of the output sequence port to use or a [String] when there is an error. + + The [code]inputs[/code] array contains the values of the input ports. + [code]outputs[/code] is an array whose indices should be set to the respective outputs. + The [code]start_mode[/code] is usually [code]START_MODE_BEGIN_SEQUENCE[/code], unless you have used the STEP_* constants. + [code]working_mem[/code] is an array which can be used to persist information between runs of the custom node. + + When returning, you can mask the returned value with one of the STEP_* constants. </description> </method> </methods> <constants> <constant name="START_MODE_BEGIN_SEQUENCE" value="0"> + The start mode used the first time when [method _step] is called. </constant> <constant name="START_MODE_CONTINUE_SEQUENCE" value="1"> + The start mode used when [method _step] is called after coming back from a STEP_PUSH_STACK_BIT. </constant> <constant name="START_MODE_RESUME_YIELD" value="2"> + The start mode used when [method _step] is called after resuming from STEP_YIELD_BIT. </constant> <constant name="STEP_PUSH_STACK_BIT" value="16777216" enum=""> + Hint used by [method _step] to tell that control should return to it when there is no other node left to execute. + This is used by [VisualScriptCondition] to redirect the sequence to the "Done" port after the true/false branch has finished execution. </constant> <constant name="STEP_GO_BACK_BIT" value="33554432" enum=""> + Hint used by [method _step] to tell that control should return back, either hitting a previous STEP_PUSH_STACK_BIT or exiting the function. </constant> <constant name="STEP_NO_ADVANCE_BIT" value="67108864" enum=""> </constant> <constant name="STEP_EXIT_FUNCTION_BIT" value="134217728" enum=""> + Hint used by [method _step] to tell that control should stop and exit the function. </constant> <constant name="STEP_YIELD_BIT" value="268435456" enum=""> + Hint used by [method _step] to tell that the function should be yielded. + Using this requires you to have at least one working memory slot, which is used for the [VisualScriptFunctionState]. </constant> </constants> </class> diff --git a/doc/classes/VisualScriptDeconstruct.xml b/doc/classes/VisualScriptDeconstruct.xml index 5bb12539af..cd7d79ae56 100644 --- a/doc/classes/VisualScriptDeconstruct.xml +++ b/doc/classes/VisualScriptDeconstruct.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node which deconstructs a base type instance into its parts. </brief_description> <description> + A Visual Script node which deconstructs a base type instance into its parts. </description> <tutorials> </tutorials> @@ -28,6 +30,7 @@ <member name="elem_cache" type="Array" setter="_set_elem_cache" getter="_get_elem_cache"> </member> <member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" enum="Variant.Type"> + The type to deconstruct. </member> </members> <constants> diff --git a/doc/classes/VisualScriptEmitSignal.xml b/doc/classes/VisualScriptEmitSignal.xml index 21af3c6ea0..844b5a40ec 100644 --- a/doc/classes/VisualScriptEmitSignal.xml +++ b/doc/classes/VisualScriptEmitSignal.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node which emits a specified signal. </brief_description> <description> + A Visual Script node which emits a specified signal when it is executed. </description> <tutorials> </tutorials> @@ -26,6 +28,7 @@ </methods> <members> <member name="signal" type="String" setter="set_signal" getter="get_signal"> + The signal to emit. </member> </members> <constants> diff --git a/doc/classes/VisualScriptEngineSingleton.xml b/doc/classes/VisualScriptEngineSingleton.xml index c00fd2a0a4..6606f10f11 100644 --- a/doc/classes/VisualScriptEngineSingleton.xml +++ b/doc/classes/VisualScriptEngineSingleton.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node returning a singleton from [@GlobalScope] </brief_description> <description> + A Visual Script node returning a singleton from [@GlobalScope] </description> <tutorials> </tutorials> @@ -26,6 +28,7 @@ </methods> <members> <member name="constant" type="String" setter="set_singleton" getter="get_singleton"> + The singleton's name. </member> </members> <constants> diff --git a/doc/classes/VisualScriptNode.xml b/doc/classes/VisualScriptNode.xml index dbb75e69fa..74ec9bdc2e 100644 --- a/doc/classes/VisualScriptNode.xml +++ b/doc/classes/VisualScriptNode.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptNode" inherits="Resource" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A node which is part of a [VisualScript]. </brief_description> <description> + A node which is part of a [VisualScript]. Not to be confused with [Node], which is a part of a [SceneTree]. </description> <tutorials> </tutorials> @@ -15,12 +17,21 @@ <argument index="0" name="port_idx" type="int"> </argument> <description> + Returns the default value of a given port. The default value is used when nothing is connected to the port. </description> </method> <method name="get_visual_script" qualifiers="const"> <return type="VisualScript"> </return> <description> + Returns the [VisualScript] instance the node is bound to. + </description> + </method> + <method name="ports_changed_notify"> + <return type="void"> + </return> + <description> + Notify that the node's ports have changed. Usually used in conjunction with [VisualScriptCustomNode] . </description> </method> <method name="set_default_input_value"> @@ -31,6 +42,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> + Change the default value of a given port. </description> </method> </methods> @@ -41,6 +53,7 @@ <signals> <signal name="ports_changed"> <description> + Emitted when the available input/output ports are changed. </description> </signal> </signals> diff --git a/doc/classes/VisualScriptOperator.xml b/doc/classes/VisualScriptOperator.xml index 82951c9e0c..7e85af8af2 100644 --- a/doc/classes/VisualScriptOperator.xml +++ b/doc/classes/VisualScriptOperator.xml @@ -3,6 +3,13 @@ <brief_description> </brief_description> <description> + [b]Input Ports:[/b] + - Data (variant): [code]A[/code] + - Data (variant): [code]B[/code] + [b]Output Ports:[/b] + - Sequence: [code]true[/code] + - Sequence: [code]false[/code] + - Sequence: [code]done[/code] </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualScriptSceneNode.xml b/doc/classes/VisualScriptSceneNode.xml index 90a8f132c0..b71bd9adfb 100644 --- a/doc/classes/VisualScriptSceneNode.xml +++ b/doc/classes/VisualScriptSceneNode.xml @@ -1,8 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptSceneNode" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Node reference. </brief_description> <description> + A direct reference to a node. + [b]Input Ports:[/b] + none + [b]Output Ports:[/b] + - Data: [code]node[/code] (obj) </description> <tutorials> </tutorials> @@ -26,6 +32,7 @@ </methods> <members> <member name="node_path" type="NodePath" setter="set_node_path" getter="get_node_path"> + The node's path in the scene tree. </member> </members> <constants> diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index 6b6b794f11..e89b49eb4d 100644 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -1,5 +1,6 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python +import fnmatch import os import sys import re @@ -22,6 +23,7 @@ flags = { 'o': True, 'i': False, 'a': True, + 'e': False, } flag_descriptions = { 'c': 'Toggle colors when outputting.', @@ -34,6 +36,7 @@ flag_descriptions = { 'o': 'Toggle overall column.', 'i': 'Toggle collapse of class items columns.', 'a': 'Toggle showing all items.', + 'e': 'Toggle hiding empty items.', } long_flags = { 'colors': 'c', @@ -63,6 +66,8 @@ long_flags = { 'collapse': 'i', 'all': 'a', + + 'empty': 'e', } table_columns = ['name', 'brief_description', 'description', 'methods', 'constants', 'members', 'signals'] table_column_names = ['Name', 'Brief Desc.', 'Desc.', 'Methods', 'Constants', 'Members', 'Signals'] @@ -91,7 +96,7 @@ def validate_tag(elem, tag): def color(color, string): - if flags['c']: + if flags['c'] and terminal_supports_color(): color_format = '' for code in colors[color]: color_format += '\033[' + str(code) + 'm' @@ -105,6 +110,15 @@ ansi_escape = re.compile(r'\x1b[^m]*m') def nonescape_len(s): return len(ansi_escape.sub('', s)) +def terminal_supports_color(): + p = sys.platform + supported_platform = p != 'Pocket PC' and (p != 'win32' or + 'ANSICON' in os.environ) + + is_a_tty = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty() + if not supported_platform or not is_a_tty: + return False + return True ################################################################################ # Classes # @@ -134,8 +148,8 @@ class ClassStatusProgress: return self.to_colored_string() def to_colored_string(self, format='{has}/{total}', pad_format='{pad_described}{s}{pad_total}'): - ratio = self.described / self.total if self.total != 0 else 1 - percent = round(100 * ratio) + ratio = float(self.described) / float(self.total) if self.total != 0 else 1 + percent = int(round(100 * ratio)) s = format.format(has=str(self.described), total=str(self.total), percent=str(percent)) if self.described >= self.total: s = color('part_good', s) @@ -182,6 +196,14 @@ class ClassStatus: ok = ok and self.progresses[k].is_ok() return ok + def is_empty(self): + sum = 0 + for k in self.progresses: + if self.progresses[k].is_ok(): + continue + sum += self.progresses[k].total + return sum < 1 + def make_output(self): output = {} output['name'] = color('name', self.name) @@ -218,6 +240,7 @@ class ClassStatus: return output + @staticmethod def generate_for_class(c): status = ClassStatus() status.name = c.attrib['name'] @@ -274,17 +297,21 @@ input_class_list = [] merged_file = "" for arg in sys.argv[1:]: - if arg.startswith('--'): - flags[long_flags[arg[2:]]] = not flags[long_flags[arg[2:]]] - elif arg.startswith('-'): - for f in arg[1:]: - flags[f] = not flags[f] - elif os.path.isdir(arg): - for f in os.listdir(arg): - if f.endswith('.xml'): - input_file_list.append(os.path.join(arg, f)); - else: - input_class_list.append(arg) + try: + if arg.startswith('--'): + flags[long_flags[arg[2:]]] = not flags[long_flags[arg[2:]]] + elif arg.startswith('-'): + for f in arg[1:]: + flags[f] = not flags[f] + elif os.path.isdir(arg): + for f in os.listdir(arg): + if f.endswith('.xml'): + input_file_list.append(os.path.join(arg, f)); + else: + input_class_list.append(arg) + except KeyError: + print("Unknown command line flag: " + arg) + sys.exit(1) if flags['i']: for r in ['methods', 'constants', 'members', 'signals']: @@ -356,8 +383,13 @@ for file in input_file_list: class_names.sort() if len(input_class_list) < 1: - input_class_list = class_names + input_class_list = ['*'] +filtered_classes = set() +for pattern in input_class_list: + filtered_classes |= set(fnmatch.filter(class_names, pattern)) +filtered_classes = list(filtered_classes) +filtered_classes.sort() ################################################################################ # Make output table # @@ -369,10 +401,7 @@ table_column_chars = '|' total_status = ClassStatus('Total') -for cn in input_class_list: - if not cn in classes: - print('Cannot find class ' + cn + '!') - sys.exit(255) +for cn in filtered_classes: c = classes[cn] validate_tag(c, 'class') @@ -383,6 +412,9 @@ for cn in input_class_list: if (flags['b'] and status.is_ok()) or (flags['g'] and not status.is_ok()) or (not flags['a']): continue + if flags['e'] and status.is_empty(): + continue + out = status.make_output() row = [] for column in table_columns: @@ -436,7 +468,7 @@ for row_i, row in enumerate(table): if cell_i == 0: row_string += table_row_chars[3] + cell + table_row_chars[3] * (padding_needed - 1) else: - row_string += table_row_chars[3] * math.floor(padding_needed / 2) + cell + table_row_chars[3] * math.ceil((padding_needed / 2)) + row_string += table_row_chars[3] * int(math.floor(float(padding_needed) / 2)) + cell + table_row_chars[3] * int(math.ceil(float(padding_needed) / 2)) row_string += table_column_chars print(row_string) diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 696e3c9c78..c4dff588b0 100644 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -3,15 +3,19 @@ import codecs import sys +import os import xml.etree.ElementTree as ET input_list = [] for arg in sys.argv[1:]: + if arg.endswith(os.sep): + arg = arg[:-1] input_list.append(arg) if len(input_list) < 1: - print 'usage: makerst.py <classes.xml>' + print 'usage: makerst.py <path to folders> and/or <path to .xml files> (order of arguments irrelevant)' + print 'example: makerst.py "../../modules/" "../classes" path_to/some_class.xml' sys.exit(0) @@ -34,7 +38,6 @@ def ul_string(str, ul): def make_class_list(class_list, columns): - f = codecs.open('class_list.rst', 'wb', 'utf-8') prev = 0 col_max = len(class_list) / columns + 1 @@ -102,7 +105,6 @@ def make_class_list(class_list, columns): def rstize_text(text, cclass): - # Linebreak + tabs in the XML should become two line breaks unless in a "codeblock" pos = 0 while True: @@ -250,9 +252,6 @@ def rstize_text(text, cclass): text = pre_text + tag_text + post_text pos = len(pre_text) + len(tag_text) - # tnode = ET.SubElement(parent,"div") - # tnode.text=text - return text @@ -272,7 +271,6 @@ def make_method( event=False, pp=None ): - if (declare or pp == None): t = '- ' else: @@ -340,7 +338,6 @@ def make_method( if 'qualifiers' in m.attrib: s += ' ' + m.attrib['qualifiers'] -# f.write(s) if (not declare): if (pp != None): pp.append((t, s)) @@ -355,24 +352,23 @@ def make_heading(title, underline): def make_rst_class(node): - name = node.attrib['name'] f = codecs.open("class_" + name.lower() + '.rst', 'wb', 'utf-8') # Warn contributors not to edit this file directly f.write(".. Generated automatically by doc/tools/makerst.py in Godot's source tree.\n") - f.write(".. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.\n\n") + f.write(".. DO NOT EDIT THIS FILE, but the " + name + ".xml source instead.\n") + f.write(".. The source is found in doc/classes or modules/<name>/doc_classes.\n\n") f.write(".. _class_" + name + ":\n\n") f.write(make_heading(name, '=')) if 'inherits' in node.attrib: inh = node.attrib['inherits'].strip() -# whle inh in classes[cn] f.write('**Inherits:** ') first = True - while(inh in classes): + while (inh in classes): if (not first): f.write(" **<** ") else: @@ -436,10 +432,10 @@ def make_rst_class(node): f.write(sep) for s in ml: rt = s[0] - while(len(rt) < longest_s): + while (len(rt) < longest_s): rt += " " st = s[1] - while(len(st) < longest_t): + while (len(st) < longest_t): st += " " f.write("| " + rt + " | " + st + " |\n") f.write(sep) @@ -494,8 +490,6 @@ def make_rst_class(node): f.write(make_heading('Member Function Description', '-')) for m in list(methods): f.write(".. _class_" + name + "_" + m.attrib['name'] + ":\n\n") -# f.write(ul_string(m.attrib['name'],"^")) - #f.write('\n<a name="'+m.attrib['name']+'">' + m.attrib['name'] + '</a>\n------\n') make_method(f, node.attrib['name'], m, True, name) f.write('\n') d = m.find('description') @@ -506,7 +500,21 @@ def make_rst_class(node): f.write('\n') -for file in input_list: +file_list = [] + +for path in input_list: + if os.path.basename(path) == 'modules': + for subdir, dirs, _ in os.walk(path): + if 'doc_classes' in dirs: + doc_dir = os.path.join(subdir, 'doc_classes') + class_file_name = [f for f in os.listdir(doc_dir) if f.endswith('.xml')][0] + file_list.append(os.path.join(doc_dir, class_file_name)) + elif not os.path.isfile(path): + file_list += [os.path.join(path, f) for f in os.listdir(path) if f.endswith('.xml')] + elif os.path.isfile(path) and path.endswith('.xml'): + file_list.append(path) + +for file in file_list: tree = ET.parse(file) doc = tree.getroot() @@ -515,17 +523,15 @@ for file in input_list: sys.exit(255) version = doc.attrib['version'] - - for c in list(doc): - if c.attrib['name'] in class_names: - continue - class_names.append(c.attrib['name']) - classes[c.attrib['name']] = c + if doc.attrib['name'] in class_names: + continue + class_names.append(doc.attrib['name']) + classes[doc.attrib['name']] = doc class_names.sort() # Don't make class list for Sphinx, :toctree: handles it -#make_class_list(class_names, 2) +# make_class_list(class_names, 2) for cn in class_names: c = classes[cn] |