diff options
Diffstat (limited to 'doc')
41 files changed, 725 insertions, 118 deletions
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/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml index 809890bea1..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. + Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel. </description> <tutorials> </tutorials> @@ -149,7 +149,7 @@ </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 is changed, the [code]frame[/code] counter is reset. + 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]. @@ -161,7 +161,7 @@ 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 current frame index. + 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). @@ -170,7 +170,7 @@ The texture's drawing offset. </member> <member name="playing" type="bool" setter="_set_playing" getter="_is_playing"> - If [code]true[/code] the [code]animation[/code] is currently playing. + If [code]true[/code] the [member animation] is currently playing. </member> </members> <signals> @@ -181,7 +181,7 @@ </signal> <signal name="frame_changed"> <description> - Emitted when [code]frame[/code] changes. + 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/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/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/File.xml b/doc/classes/File.xml index e1a024270e..fd71f42a04 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -37,7 +37,7 @@ <return type="bool"> </return> <description> - Return whether the file cursor reached the end of the file. + Returns [code]true[/code] if the file cursor reached the end of the file. </description> </method> <method name="file_exists" qualifiers="const"> @@ -46,7 +46,7 @@ <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 in the specified path exists. </description> </method> <method name="get_16" qualifiers="const"> @@ -113,7 +113,7 @@ <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"> @@ -134,7 +134,7 @@ <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"> @@ -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 a 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,6 +159,7 @@ <argument index="0" name="file" type="String"> </argument> <description> + Returns the modified time in unix timestamp of the [code]file[/code] 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"> @@ -172,7 +173,7 @@ <return type="int"> </return> <description> - Return the file cursor position. + Returns the file cursor position. </description> </method> <method name="get_real" qualifiers="const"> @@ -188,7 +189,7 @@ <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"> @@ -202,7 +203,7 @@ <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"> @@ -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> @@ -394,16 +395,16 @@ </methods> <constants> <constant name="READ" value="1"> - Open the file for reading. + Open 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. + Open 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. + Open 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. + Open 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. @@ -415,6 +416,7 @@ Use the Zstd compression method. </constant> <constant name="COMPRESSION_GZIP" value="3"> + Use the GZip compression method. </constant> </constants> </class> 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/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..d411d07979 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -326,6 +326,7 @@ <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"> @@ -340,6 +341,7 @@ <return type="int"> </return> <description> + Returns the epoch time of the operating system in seconds. </description> </method> <method name="get_ticks_msec" qualifiers="const"> @@ -435,6 +437,9 @@ <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"> @@ -472,10 +477,18 @@ Return true 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"> @@ -688,6 +701,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"> 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/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/Sprite.xml b/doc/classes/Sprite.xml index c0c491140f..0cdc8f7099 100644 --- a/doc/classes/Sprite.xml +++ b/doc/classes/Sprite.xml @@ -202,7 +202,7 @@ </methods> <members> <member name="centered" type="bool" setter="set_centered" getter="is_centered"> - If [code]true[/code] texture will be centered. Default value: [code]true[/code]. + 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]. @@ -211,40 +211,42 @@ 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. [code]vframes[/code] or [code]hframes[/code] must be greater than 1. + 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 horizontal frames in the sprite sheet. + 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 will be cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code]. + 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. [code]region_enabled[/code] must be [code]true[/code]. + 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 vertical frames in the sprite sheet. + The number of rows in the sprite sheet. </member> </members> <signals> <signal name="frame_changed"> <description> - Emitted when the [code]frame[/code] changes. + Emitted when the [member frame] changes. </description> </signal> <signal name="texture_changed"> <description> - Emitted when the [code]texture[/code] changes. + 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/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/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..da65998e78 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 store information for the developer. </brief_description> <description> + A Visual Script node used to display text, so that code is more readable and better 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 size (in pixels) of the comment node. </member> <member name="title" type="String" setter="set_title" getter="get_title"> + The title of the comment node. </member> </members> <constants> diff --git a/doc/classes/VisualScriptCondition.xml b/doc/classes/VisualScriptCondition.xml index 73f1b69c02..de814a6b17 100644 --- a/doc/classes/VisualScriptCondition.xml +++ b/doc/classes/VisualScriptCondition.xml @@ -1,8 +1,10 @@ <?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 which switches the flow based on a boolean. It acts similar to if/else in typical programming languages. </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/tools/doc_status.py b/doc/tools/doc_status.py index 75e18bbe81..6b936899d8 100644 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -23,6 +23,7 @@ flags = { 'o': True, 'i': False, 'a': True, + 'e': False, } flag_descriptions = { 'c': 'Toggle colors when outputting.', @@ -35,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', @@ -64,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'] @@ -192,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) @@ -396,6 +408,9 @@ for cn in filtered_classes: 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: |