From b5f08bfa2218ce32d834c9fc5762bc856d357923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 21 Oct 2017 13:55:03 +0200 Subject: [PATCH] classref: Sync with current master branch, fix members markup parsing --- classes/class_@global scope.rst | 37 +- classes/class_acceptdialog.rst | 2 +- classes/class_animatedsprite.rst | 12 +- classes/class_animatedsprite3d.rst | 6 +- classes/class_area.rst | 18 +- classes/class_area2d.rst | 18 +- classes/class_arvrinterfacegdnative.rst | 17 - classes/class_atlastexture.rst | 4 +- classes/class_audioeffectamplify.rst | 2 +- classes/class_audioeffectcompressor.rst | 10 +- classes/class_audioeffectdelay.rst | 26 +- classes/class_audioeffectdistortion.rst | 10 +- classes/class_audioeffectlimiter.rst | 6 +- classes/class_audioeffectphaser.rst | 8 +- classes/class_audioeffectreverb.rst | 16 +- classes/class_audiostreamoggvorbis.rst | 4 +- classes/class_audiostreamplayer.rst | 8 +- classes/class_audiostreamplayer2d.rst | 6 +- classes/class_audiostreamplayer3d.rst | 8 +- classes/class_audiostreamrandompitch.rst | 2 +- classes/class_audiostreamsample.rst | 6 +- classes/class_backbuffercopy.rst | 4 +- classes/class_bitmap.rst | 8 +- classes/class_bitmapfont.rst | 6 +- classes/class_button.rst | 2 +- classes/class_camera2d.rst | 14 +- classes/class_canvaslayer.rst | 2 +- classes/class_collisionobject2d.rst | 2 +- classes/class_collisionpolygon2d.rst | 6 +- classes/class_colorrect.rst | 9 +- classes/class_conetwistjoint.rst | 53 +- classes/class_control.rst | 48 +- classes/class_dynamicfont.rst | 4 +- classes/class_editorinterface.rst | 39 +- classes/class_editorscript.rst | 22 +- classes/class_environment.rst | 14 +- classes/class_gdnative.rst | 24 +- classes/class_generic6dofjoint.rst | 149 +-- classes/class_gradient.rst | 4 +- classes/class_gradienttexture.rst | 4 +- classes/class_gridcontainer.rst | 2 +- classes/class_gridmap.rst | 67 +- classes/class_hingejoint.rst | 47 +- classes/class_inputevent.rst | 25 +- classes/class_inputeventaction.rst | 9 +- classes/class_inputeventjoypadbutton.rst | 13 +- classes/class_inputeventjoypadmotion.rst | 11 +- classes/class_inputeventkey.rst | 13 +- classes/class_inputeventmouse.rst | 11 +- classes/class_inputeventmousebutton.rst | 13 +- classes/class_inputeventmousemotion.rst | 9 +- classes/class_inputeventscreendrag.rst | 13 +- classes/class_inputeventscreentouch.rst | 13 +- classes/class_inputeventwithmodifiers.rst | 7 +- classes/class_inputmap.rst | 27 +- classes/class_joint.rst | 15 +- classes/class_jsonparseresult.rst | 24 +- classes/class_kinematiccollision.rst | 6 +- classes/class_kinematiccollision2d.rst | 6 +- classes/class_label.rst | 14 +- classes/class_largetexture.rst | 11 +- classes/class_light2d.rst | 32 +- classes/class_lightoccluder2d.rst | 2 +- classes/class_line2d.rst | 10 +- classes/class_meshinstance.rst | 4 +- classes/class_ninepatchrect.rst | 2 +- classes/class_node2d.rst | 4 +- classes/class_particles.rst | 18 +- classes/class_particles2d.rst | 30 +- classes/class_particlesmaterial.rst | 72 +- classes/class_physics2dserver.rst | 176 +-- classes/class_physics2dserversw.rst | 2 +- classes/class_physicsbody.rst | 6 +- classes/class_physicsbody2d.rst | 6 +- classes/class_physicsserver.rst | 465 +++++-- classes/class_physicsserversw.rst | 5 + classes/class_pinjoint.rst | 27 +- classes/class_pinjoint2d.rst | 2 +- classes/class_pluginscript.rst | 18 + classes/class_polygon2d.rst | 18 +- classes/class_primitivemesh.rst | 2 +- classes/class_range.rst | 12 +- classes/class_raycast.rst | 16 +- classes/class_raycast2d.rst | 18 +- classes/class_richtextlabel.rst | 13 + classes/class_rigidbody.rst | 15 +- classes/class_rigidbody2d.rst | 105 +- classes/class_scenetree.rst | 6 +- classes/class_script.rst | 2 +- classes/class_sliderjoint.rst | 103 +- classes/class_spatial.rst | 4 +- classes/class_sprite.rst | 16 +- classes/class_sprite3d.rst | 8 +- classes/class_spritebase3d.rst | 14 +- classes/class_spriteframes.rst | 2 +- classes/class_staticbody2d.rst | 4 +- classes/class_styleboxflat.rst | 12 +- classes/class_tabcontainer.rst | 4 +- classes/class_textedit.rst | 13 + classes/class_texturebutton.rst | 12 +- classes/class_textureprogress.rst | 22 +- classes/class_texturerect.rst | 6 +- classes/class_tilemap.rst | 20 +- classes/class_timer.rst | 6 +- classes/class_touchscreenbutton.rst | 10 +- classes/class_transform.rst | 2 +- classes/class_transform2d.rst | 4 +- classes/class_visualscriptbuiltinfunc.rst | 64 +- classes/class_visualscriptclassconstant.rst | 16 +- classes/class_visualscriptconstant.rst | 12 +- classes/class_visualscriptconstructor.rst | 33 +- classes/class_visualscriptemitsignal.rst | 12 +- classes/class_visualscriptiterator.rst | 19 + classes/class_visualscriptlocalvar.rst | 19 +- classes/class_visualscriptlocalvarset.rst | 23 +- classes/class_visualscriptmathconstant.rst | 33 +- classes/class_visualscriptoperator.rst | 6 +- classes/class_visualscriptpreload.rst | 17 +- classes/class_visualscriptreturn.rst | 21 +- classes/class_visualscriptselect.rst | 21 +- classes/class_visualscriptself.rst | 13 + classes/class_visualscriptsequence.rst | 21 +- classes/class_visualscriptswitch.rst | 23 + classes/class_visualscriptvariableget.rst | 17 +- classes/class_visualscriptvariableset.rst | 19 +- classes/class_visualscriptwhile.rst | 17 + classes/class_visualserver.rst | 1198 ++++++++++++++++++- 127 files changed, 2951 insertions(+), 999 deletions(-) create mode 100644 classes/class_pluginscript.rst diff --git a/classes/class_@global scope.rst b/classes/class_@global scope.rst index cfdaf173c..39d85a7b6 100644 --- a/classes/class_@global scope.rst +++ b/classes/class_@global scope.rst @@ -17,25 +17,26 @@ Global scope constants and variables. Member Variables ---------------- -- :ref:`ARVRServer` **ARVRServer** - [ARVRServer] singleton -- :ref:`AudioServer` **AudioServer** - [AudioServer] singleton -- :ref:`ClassDB` **ClassDB** - [ClassDB] singleton -- :ref:`Engine` **Engine** - [Engine] singleton -- :ref:`Geometry` **Geometry** - [Geometry] singleton -- :ref:`IP` **IP** - [IP] singleton -- :ref:`Input` **Input** - [Input] singleton -- :ref:`InputMap` **InputMap** - [InputMap] singleton +- :ref:`ARVRServer` **ARVRServer** - :ref:`ARVRServer` singleton +- :ref:`AudioServer` **AudioServer** - :ref:`AudioServer` singleton +- :ref:`ClassDB` **ClassDB** - :ref:`ClassDB` singleton +- :ref:`Engine` **Engine** - :ref:`Engine` singleton +- :ref:`Geometry` **Geometry** - :ref:`Geometry` singleton +- :ref:`GodotSharp` **GodotSharp** +- :ref:`IP` **IP** - :ref:`IP` singleton +- :ref:`Input` **Input** - :ref:`Input` singleton +- :ref:`InputMap` **InputMap** - :ref:`InputMap` singleton - :ref:`JSON` **JSON** -- :ref:`Reference` **Marshalls** - [Marshalls] singleton -- :ref:`OS` **OS** - [OS] singleton -- :ref:`Performance` **Performance** - [Performance] singleton -- :ref:`Physics2DServer` **Physics2DServer** - [Physics2DServer] singleton -- :ref:`PhysicsServer` **PhysicsServer** - [PhysicsServer] singleton -- :ref:`ProjectSettings` **ProjectSettings** - [ProjectSettings] singleton -- :ref:`ResourceLoader` **ResourceLoader** - [ResourceLoader] singleton -- :ref:`ResourceSaver` **ResourceSaver** - [ResourceSaver] singleton -- :ref:`TranslationServer` **TranslationServer** - [TranslationServer] singleton -- :ref:`VisualServer` **VisualServer** - [VisualServer] singleton +- :ref:`Reference` **Marshalls** - :ref:`Marshalls` singleton +- :ref:`OS` **OS** - :ref:`OS` singleton +- :ref:`Performance` **Performance** - :ref:`Performance` singleton +- :ref:`Physics2DServer` **Physics2DServer** - :ref:`Physics2DServer` singleton +- :ref:`PhysicsServer` **PhysicsServer** - :ref:`PhysicsServer` singleton +- :ref:`ProjectSettings` **ProjectSettings** - :ref:`ProjectSettings` singleton +- :ref:`ResourceLoader` **ResourceLoader** - :ref:`ResourceLoader` singleton +- :ref:`ResourceSaver` **ResourceSaver** - :ref:`ResourceSaver` singleton +- :ref:`TranslationServer` **TranslationServer** - :ref:`TranslationServer` singleton +- :ref:`VisualServer` **VisualServer** - :ref:`VisualServer` singleton Numeric Constants ----------------- diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index 762beaf7d..50d5ca9e3 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -56,7 +56,7 @@ Emitted when a custom button is pressed. See :ref:`add_button` **dialog_hide_on_ok** - If [code]true[/code] the dialog is hidden when accepted. Default value: [code]true[/code]. +- :ref:`bool` **dialog_hide_on_ok** - If ``true`` the dialog is hidden when accepted. Default value: ``true``. - :ref:`String` **dialog_text** - The text displayed by this dialog. Description diff --git a/classes/class_animatedsprite.rst b/classes/class_animatedsprite.rst index 26856780b..104c97557 100644 --- a/classes/class_animatedsprite.rst +++ b/classes/class_animatedsprite.rst @@ -70,14 +70,14 @@ Emitted when member frame changed. Member Variables ---------------- -- :ref:`String` **animation** - The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. -- :ref:`bool` **centered** - If [code]true[/code] texture will be centered. Default value: [code]true[/code]. -- :ref:`bool` **flip_h** - If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. -- :ref:`bool` **flip_v** - If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. +- :ref:`String` **animation** - The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset. +- :ref:`bool` **centered** - If ``true`` texture will be centered. Default value: ``true``. +- :ref:`bool` **flip_h** - If ``true`` texture is flipped horizontally. Default value: ``false``. +- :ref:`bool` **flip_v** - If ``true`` texture is flipped vertically. Default value: ``false``. - :ref:`int` **frame** - The displayed animation frame's index. -- :ref:`SpriteFrames` **frames** - The [SpriteFrames] resource containing the animation(s). +- :ref:`SpriteFrames` **frames** - The :ref:`SpriteFrames` resource containing the animation(s). - :ref:`Vector2` **offset** - The texture's drawing offset. -- :ref:`bool` **playing** - If [code]true[/code] the [member animation] is currently playing. +- :ref:`bool` **playing** - If ``true`` the member animation is currently playing. Description ----------- diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 4117a8a25..1b09ed865 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -50,10 +50,10 @@ Emitted when member frame changed. Member Variables ---------------- -- :ref:`String` **animation** - The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. +- :ref:`String` **animation** - The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset. - :ref:`int` **frame** - The displayed animation frame's index. -- :ref:`SpriteFrames` **frames** - The [SpriteFrames] resource containing the animation(s). -- :ref:`bool` **playing** - If [code]true[/code] the [member animation] is currently playing. +- :ref:`SpriteFrames` **frames** - The :ref:`SpriteFrames` resource containing the animation(s). +- :ref:`bool` **playing** - If ``true`` the member animation is currently playing. Description ----------- diff --git a/classes/class_area.rst b/classes/class_area.rst index 37ea80082..02f9ad82c 100644 --- a/classes/class_area.rst +++ b/classes/class_area.rst @@ -148,24 +148,24 @@ Emitted when a :ref:`PhysicsBody2D` object exits, reporting Member Variables ---------------- -- :ref:`float` **angular_damp** - The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). +- :ref:`float` **angular_damp** - The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping). - :ref:`String` **audio_bus_name** - The name of the area's audio bus. -- :ref:`bool` **audio_bus_override** - If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. -- :ref:`int` **collision_layer** - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code]. +- :ref:`bool` **audio_bus_override** - If ``true`` the area's audio bus overrides the default audio bus. Default value: ``false``. +- :ref:`int` **collision_layer** - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also ``collision_mask``. - :ref:`int` **collision_mask** - The physics layers this area scans to determine collision detection. - :ref:`float` **gravity** - The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. - :ref:`float` **gravity_distance_scale** - The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. -- :ref:`bool` **gravity_point** - If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code]. -- :ref:`Vector3` **gravity_vec** - The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction. -- :ref:`float` **linear_damp** - The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). -- :ref:`bool` **monitorable** - If [code]true[/code] other monitoring areas can detect this area. Default value: [code]true[/code]. -- :ref:`bool` **monitoring** - If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. +- :ref:`bool` **gravity_point** - If ``true`` gravity is calculated from a point (set via ``gravity_vec``). Also see ``space_override``. Default value: ``false``. +- :ref:`Vector3` **gravity_vec** - The area's gravity vector (not normalized). If gravity is a point (see :ref:`is_gravity_a_point`), this will be the point of attraction. +- :ref:`float` **linear_damp** - The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping). +- :ref:`bool` **monitorable** - If ``true`` other monitoring areas can detect this area. Default value: ``true``. +- :ref:`bool` **monitoring** - If ``true`` the area detects bodies or areas entering and exiting it. Default value: ``true``. - :ref:`float` **priority** - The area's priority. Higher priority areas are processed first. Default value: 0. - :ref:`float` **reverb_bus_amount** - :ref:`bool` **reverb_bus_enable** - :ref:`String` **reverb_bus_name** - :ref:`float` **reverb_bus_uniformity** -- :ref:`int` **space_override** - Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values. +- :ref:`int` **space_override** - Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE\_\* constants for values. Numeric Constants ----------------- diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index bbaa6f54b..da1d35101 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -132,20 +132,20 @@ Emitted when a :ref:`PhysicsBody2D` object exits, reporting Member Variables ---------------- -- :ref:`float` **angular_damp** - The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). +- :ref:`float` **angular_damp** - The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping). - :ref:`String` **audio_bus_name** - The name of the area's audio bus. -- :ref:`bool` **audio_bus_override** - If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. -- :ref:`int` **collision_layer** - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code]. +- :ref:`bool` **audio_bus_override** - If ``true`` the area's audio bus overrides the default audio bus. Default value: ``false``. +- :ref:`int` **collision_layer** - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also ``collision_mask``. - :ref:`int` **collision_mask** - The physics layers this area scans to determine collision detection. - :ref:`float` **gravity** - The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. - :ref:`float` **gravity_distance_scale** - The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. -- :ref:`bool` **gravity_point** - If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code]. -- :ref:`Vector2` **gravity_vec** - The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction. -- :ref:`float` **linear_damp** - The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). -- :ref:`bool` **monitorable** - If [code]true[/code] other monitoring areas can detect this area. Default value: [code]true[/code]. -- :ref:`bool` **monitoring** - If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. +- :ref:`bool` **gravity_point** - If ``true`` gravity is calculated from a point (set via ``gravity_vec``). Also see ``space_override``. Default value: ``false``. +- :ref:`Vector2` **gravity_vec** - The area's gravity vector (not normalized). If gravity is a point (see :ref:`is_gravity_a_point`), this will be the point of attraction. +- :ref:`float` **linear_damp** - The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from ``0`` (no damping) to ``1`` (full damping). +- :ref:`bool` **monitorable** - If ``true`` other monitoring areas can detect this area. Default value: ``true``. +- :ref:`bool` **monitoring** - If ``true`` the area detects bodies or areas entering and exiting it. Default value: ``true``. - :ref:`float` **priority** - The area's priority. Higher priority areas are processed first. Default value: 0. -- :ref:`int` **space_override** - Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values. +- :ref:`int` **space_override** - Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE\_\* constants for values. Numeric Constants ----------------- diff --git a/classes/class_arvrinterfacegdnative.rst b/classes/class_arvrinterfacegdnative.rst index 4d55c8cac..fab87f4b2 100644 --- a/classes/class_arvrinterfacegdnative.rst +++ b/classes/class_arvrinterfacegdnative.rst @@ -16,25 +16,8 @@ Brief Description GDNative wrapper for an ARVR interface -Member Functions ----------------- - -+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_gdnative_library` **(** :ref:`GDNativeLibrary` library **)** | -+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - Description ----------- This is a wrapper class for GDNative implementations of the ARVR interface. To use a GDNative ARVR interface simply instantiate this object and set your GDNative library containing the ARVR interface implementation. -Member Function Description ---------------------------- - -.. _class_ARVRInterfaceGDNative_set_gdnative_library: - -- void **set_gdnative_library** **(** :ref:`GDNativeLibrary` library **)** - -Bind this GDNative library to our interface. The library must be a GDNative ARVR Interface for this to work. - - diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst index 42257e584..c6b37c126 100644 --- a/classes/class_atlastexture.rst +++ b/classes/class_atlastexture.rst @@ -36,8 +36,8 @@ Member Functions Member Variables ---------------- -- :ref:`Texture` **atlas** - The texture that contains the atlas. Can be any [Texture] subtype. -- :ref:`Rect2` **margin** - The margin around the region. The [Rect2]'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin. +- :ref:`Texture` **atlas** - The texture that contains the atlas. Can be any :ref:`Texture` subtype. +- :ref:`Rect2` **margin** - The margin around the region. The :ref:`Rect2`'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin. - :ref:`Rect2` **region** - The AtlasTexture's used region. Description diff --git a/classes/class_audioeffectamplify.rst b/classes/class_audioeffectamplify.rst index c10fa6cc2..fac95df46 100644 --- a/classes/class_audioeffectamplify.rst +++ b/classes/class_audioeffectamplify.rst @@ -30,7 +30,7 @@ Member Functions Member Variables ---------------- -- :ref:`float` **volume_db** - Amount of amplification. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. Default value: [code]0[/code]. +- :ref:`float` **volume_db** - Amount of amplification. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. Default value: ``0``. Description ----------- diff --git a/classes/class_audioeffectcompressor.rst b/classes/class_audioeffectcompressor.rst index b12e08ab1..df306d6c4 100644 --- a/classes/class_audioeffectcompressor.rst +++ b/classes/class_audioeffectcompressor.rst @@ -54,13 +54,13 @@ Member Functions Member Variables ---------------- -- :ref:`float` **attack_us** - Compressor's reaction time when the signal exceeds the threshold. Value can range from 20 to 2000. Default value: [code]20ms[/code]. +- :ref:`float` **attack_us** - Compressor's reaction time when the signal exceeds the threshold. Value can range from 20 to 2000. Default value: ``20ms``. - :ref:`float` **gain** - Gain applied to the output signal. -- :ref:`float` **mix** - Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). Default value: [code]1[/code]. -- :ref:`float` **ratio** - Amount of compression applied to the audio once it passes the threshold level. The higher the ratio the more the loud parts of the audio will be compressed. Value can range from 1 to 48. Default value: [code]4[/code]. -- :ref:`float` **release_ms** - Compressor's delay time to stop reducing the signal after the signal level falls below the threshold. Value can range from 20 to 2000. Default value: [code]250ms[/code]. +- :ref:`float` **mix** - Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). Default value: ``1``. +- :ref:`float` **ratio** - Amount of compression applied to the audio once it passes the threshold level. The higher the ratio the more the loud parts of the audio will be compressed. Value can range from 1 to 48. Default value: ``4``. +- :ref:`float` **release_ms** - Compressor's delay time to stop reducing the signal after the signal level falls below the threshold. Value can range from 20 to 2000. Default value: ``250ms``. - :ref:`String` **sidechain** - Reduce the sound level using another audio bus for threshold detection. -- :ref:`float` **threshold** - The level above which compression is applied to the audio. Value can range from -60 to 0. Default value: [code]0[/code]. +- :ref:`float` **threshold** - The level above which compression is applied to the audio. Value can range from -60 to 0. Default value: ``0``. Description ----------- diff --git a/classes/class_audioeffectdelay.rst b/classes/class_audioeffectdelay.rst index 3e7b4201a..94319ec84 100644 --- a/classes/class_audioeffectdelay.rst +++ b/classes/class_audioeffectdelay.rst @@ -78,19 +78,19 @@ Member Functions Member Variables ---------------- -- :ref:`float` **dry** - Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. Default value: [code]1[/code]. -- :ref:`bool` **feedback/active** - If [code]true[/code] feedback is enabled. Default value: [code]false[/code]. -- :ref:`float` **feedback/delay_ms** - Feedback delay time in milliseconds. Default value: [code]340[/code]. -- :ref:`float` **feedback/level_db** - Sound level for [code]tap1[/code]. Default value: [code]-6 dB[/code]. -- :ref:`float` **feedback/lowpass** - Low-pass filter for feedback. Frequencies below the Low Cut value are filtered out of the source signal. Default value: [code]16000[/code]. -- :ref:`bool` **tap1/active** - If [code]true[/code], [code]tap1[/code] will be enabled. Default value: [code]true[/code]. -- :ref:`float` **tap1/delay_ms** - [b]Tap1[/b] delay time in milliseconds. Default value: [code]250ms[/code]. -- :ref:`float` **tap1/level_db** - Sound level for [code]tap1[/code]. Default value: [code]-6 dB[/code]. -- :ref:`float` **tap1/pan** - Pan position for [code]tap1[/code]. Value can range from -1 (fully left) to 1 (fully right). Default value: [code]0.2[/code]. -- :ref:`bool` **tap2/active** - If [code]true[/code], [code]tap2[/code] will be enabled. Default value: [code]true[/code]. -- :ref:`float` **tap2/delay_ms** - [b]Tap2[/b] delay time in milliseconds. Default value: [code]500ms[/code]. -- :ref:`float` **tap2/level_db** - Sound level for [code]tap2[/code]. Default value: [code]-12 dB[/code]. -- :ref:`float` **tap2/pan** - Pan position for [code]tap2[/code]. Value can range from -1 (fully left) to 1 (fully right). Default value: [code]-0.4[/code]. +- :ref:`float` **dry** - Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. Default value: ``1``. +- :ref:`bool` **feedback/active** - If ``true`` feedback is enabled. Default value: ``false``. +- :ref:`float` **feedback/delay_ms** - Feedback delay time in milliseconds. Default value: ``340``. +- :ref:`float` **feedback/level_db** - Sound level for ``tap1``. Default value: ``-6 dB``. +- :ref:`float` **feedback/lowpass** - Low-pass filter for feedback. Frequencies below the Low Cut value are filtered out of the source signal. Default value: ``16000``. +- :ref:`bool` **tap1/active** - If ``true``, ``tap1`` will be enabled. Default value: ``true``. +- :ref:`float` **tap1/delay_ms** - **Tap1** delay time in milliseconds. Default value: ``250ms``. +- :ref:`float` **tap1/level_db** - Sound level for ``tap1``. Default value: ``-6 dB``. +- :ref:`float` **tap1/pan** - Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully right). Default value: ``0.2``. +- :ref:`bool` **tap2/active** - If ``true``, ``tap2`` will be enabled. Default value: ``true``. +- :ref:`float` **tap2/delay_ms** - **Tap2** delay time in milliseconds. Default value: ``500ms``. +- :ref:`float` **tap2/level_db** - Sound level for ``tap2``. Default value: ``-12 dB``. +- :ref:`float` **tap2/pan** - Pan position for ``tap2``. Value can range from -1 (fully left) to 1 (fully right). Default value: ``-0.4``. Description ----------- diff --git a/classes/class_audioeffectdistortion.rst b/classes/class_audioeffectdistortion.rst index 63e49293f..7cc0871db 100644 --- a/classes/class_audioeffectdistortion.rst +++ b/classes/class_audioeffectdistortion.rst @@ -46,11 +46,11 @@ Member Functions Member Variables ---------------- -- :ref:`float` **drive** - Distortion power. Value can range from 0 to 1. Default value: [code]0[/code]. -- :ref:`float` **keep_hf_hz** - High-pass filter. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. Default value: [code]16000[/code]. -- :ref:`int` **mode** - Distortion type. Default value: [code]MODE_CLIP[/code]. -- :ref:`float` **post_gain** - Increases or decreases the volume after the effect. Value can range from -80 to 24. Default value: [code]0[/code]. -- :ref:`float` **pre_gain** - Increases or decreases the volume before the effect. Value can range from -60 to 60. Default value: [code]0[/code]. +- :ref:`float` **drive** - Distortion power. Value can range from 0 to 1. Default value: ``0``. +- :ref:`float` **keep_hf_hz** - High-pass filter. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. Default value: ``16000``. +- :ref:`int` **mode** - Distortion type. Default value: ``MODE_CLIP``. +- :ref:`float` **post_gain** - Increases or decreases the volume after the effect. Value can range from -80 to 24. Default value: ``0``. +- :ref:`float` **pre_gain** - Increases or decreases the volume before the effect. Value can range from -60 to 60. Default value: ``0``. Numeric Constants ----------------- diff --git a/classes/class_audioeffectlimiter.rst b/classes/class_audioeffectlimiter.rst index d6b77fd13..2576499ab 100644 --- a/classes/class_audioeffectlimiter.rst +++ b/classes/class_audioeffectlimiter.rst @@ -40,10 +40,10 @@ Member Functions Member Variables ---------------- -- :ref:`float` **ceiling_db** - The waveform's maximum allowed value. Value can range from -20 to -0.1. Default value: [code]-0.1dB[/code]. -- :ref:`float` **soft_clip_db** - Applies a gain to the limited waves. Value can range from 0 to 6. Default value: [code]2dB[/code]. +- :ref:`float` **ceiling_db** - The waveform's maximum allowed value. Value can range from -20 to -0.1. Default value: ``-0.1dB``. +- :ref:`float` **soft_clip_db** - Applies a gain to the limited waves. Value can range from 0 to 6. Default value: ``2dB``. - :ref:`float` **soft_clip_ratio** -- :ref:`float` **threshold_db** - Threshold from which the limiter begins to be active. Value can range from -30 to 0. Default value: [code]0dB[/code]. +- :ref:`float` **threshold_db** - Threshold from which the limiter begins to be active. Value can range from -30 to 0. Default value: ``0dB``. Description ----------- diff --git a/classes/class_audioeffectphaser.rst b/classes/class_audioeffectphaser.rst index a8341ed23..f2cda75d4 100644 --- a/classes/class_audioeffectphaser.rst +++ b/classes/class_audioeffectphaser.rst @@ -46,10 +46,10 @@ Member Functions Member Variables ---------------- -- :ref:`float` **depth** - Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. Default value: [code]1[/code]. -- :ref:`float` **feedback** - Output percent of modified sound. Value can range from 0.1 to 0.9. Default value: [code]0.7[/code]. -- :ref:`float` **range_max_hz** - Determines the maximum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: [code]1600hz[/code]. -- :ref:`float` **range_min_hz** - Determines the minimum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: [code]440hz[/code]. +- :ref:`float` **depth** - Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. Default value: ``1``. +- :ref:`float` **feedback** - Output percent of modified sound. Value can range from 0.1 to 0.9. Default value: ``0.7``. +- :ref:`float` **range_max_hz** - Determines the maximum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: ``1600hz``. +- :ref:`float` **range_min_hz** - Determines the minimum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: ``440hz``. - :ref:`float` **rate_hz** - Adjusts the rate at which the effect sweeps up and down across the frequency range. Description diff --git a/classes/class_audioeffectreverb.rst b/classes/class_audioeffectreverb.rst index 07f611c3e..ba381ae2f 100644 --- a/classes/class_audioeffectreverb.rst +++ b/classes/class_audioeffectreverb.rst @@ -58,14 +58,14 @@ Member Functions Member Variables ---------------- -- :ref:`float` **damping** - Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. Default value: [code]1[/code]. -- :ref:`float` **dry** - Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. Default value: [code]1[/code]. -- :ref:`float` **hipass** - High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1. Default value: [code]0[/code]. -- :ref:`float` **predelay_feedback** - Output percent of predelay. Value can range from 0 to 1. Default value: [code]1[/code]. -- :ref:`float` **predelay_msec** - Time between the original signal and the early reflections of the reverb signal. Default value: [code]150ms[/code]. -- :ref:`float` **room_size** - Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. Default value: [code]0.8[/code]. -- :ref:`float` **spread** - Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: [code]1[/code]. -- :ref:`float` **wet** - Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. Default value: [code]0.5[/code]. +- :ref:`float` **damping** - Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. Default value: ``1``. +- :ref:`float` **dry** - Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. Default value: ``1``. +- :ref:`float` **hipass** - High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1. Default value: ``0``. +- :ref:`float` **predelay_feedback** - Output percent of predelay. Value can range from 0 to 1. Default value: ``1``. +- :ref:`float` **predelay_msec** - Time between the original signal and the early reflections of the reverb signal. Default value: ``150ms``. +- :ref:`float` **room_size** - Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. Default value: ``0.8``. +- :ref:`float` **spread** - Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: ``1``. +- :ref:`float` **wet** - Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. Default value: ``0.5``. Description ----------- diff --git a/classes/class_audiostreamoggvorbis.rst b/classes/class_audiostreamoggvorbis.rst index 3b40249c2..00dd278b4 100644 --- a/classes/class_audiostreamoggvorbis.rst +++ b/classes/class_audiostreamoggvorbis.rst @@ -37,8 +37,8 @@ Member Variables ---------------- - :ref:`PoolByteArray` **data** - Raw audio data. -- :ref:`bool` **loop** - If [code]true[/code], audio will loop continuously. Default value: [code]false[/code]. -- :ref:`float` **loop_offset** - If loop is [code]true[/code], loop starts from this position, in seconds. +- :ref:`bool` **loop** - If ``true``, audio will loop continuously. Default value: ``false``. +- :ref:`float` **loop_offset** - If loop is ``true``, loop starts from this position, in seconds. Description ----------- diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 180cbf60a..874582021 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -62,11 +62,11 @@ Emitted when the audio stops playing. Member Variables ---------------- -- :ref:`bool` **autoplay** - If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. +- :ref:`bool` **autoplay** - If ``true`` audio plays when added to scene tree. Default value: ``false``. - :ref:`String` **bus** - Bus on which this audio is playing. -- :ref:`int` **mix_target** - If the audio configuration has more than two speakers, this sets the target channels. See [code]MIX_TARGET_*[/code] constants. -- :ref:`bool` **playing** - If [code]true[/code] audio is playing. -- :ref:`AudioStream` **stream** - The [AudioStream] object to be played. +- :ref:`int` **mix_target** - If the audio configuration has more than two speakers, this sets the target channels. See ``MIX_TARGET\_\*`` constants. +- :ref:`bool` **playing** - If ``true`` audio is playing. +- :ref:`AudioStream` **stream** - The :ref:`AudioStream` object to be played. - :ref:`float` **volume_db** - Volume of sound, in dB. Numeric Constants diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 73827f743..cc0bac737 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -72,11 +72,11 @@ Member Variables - :ref:`int` **area_mask** - Areas in which this sound plays. - :ref:`float` **attenuation** - Dampens audio over distance with this as an exponent. -- :ref:`bool` **autoplay** - If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. +- :ref:`bool` **autoplay** - If ``true`` audio plays when added to scene tree. Default value: ``false``. - :ref:`String` **bus** - Bus on which this audio is playing. - :ref:`float` **max_distance** - Maximum distance from which audio is still hearable. -- :ref:`bool` **playing** - If [code]true[/code] audio is playing. -- :ref:`AudioStream` **stream** - The [AudioStream] object to be played. +- :ref:`bool` **playing** - If ``true`` audio is playing. +- :ref:`AudioStream` **stream** - The :ref:`AudioStream` object to be played. - :ref:`float` **volume_db** - Base volume without dampening. Description diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index 41ceecfcf..d222e4566 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -110,17 +110,17 @@ Member Variables - :ref:`float` **attenuation_filter_cutoff_hz** - Dampens audio above this frequency, in Hz. - :ref:`float` **attenuation_filter_db** - Amount how much the filter affects the loudness, in dB. - :ref:`int` **attenuation_model** - Decides if audio should get quieter with distance linearly, quadratically or logarithmically. -- :ref:`bool` **autoplay** - If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. +- :ref:`bool` **autoplay** - If ``true`` audio plays when added to scene tree. Default value: ``false``. - :ref:`String` **bus** - Bus on which this audio is playing. - :ref:`int` **doppler_tracking** - Decides in which step the Doppler effect should be calculated. - :ref:`float` **emission_angle_degrees** - The angle in which the audio reaches cameras undampened. -- :ref:`bool` **emission_angle_enabled** - If [code]true[/code] the audio should be dampened according to the direction of the sound. +- :ref:`bool` **emission_angle_enabled** - If ``true`` the audio should be dampened according to the direction of the sound. - :ref:`float` **emission_angle_filter_attenuation_db** - dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB. - :ref:`float` **max_db** - Sets the absolute maximum of the soundlevel, in dB. - :ref:`float` **max_distance** - Sets the distance from which the 'out_of_range_mode' takes effect. Has no effect if set to 0. - :ref:`int` **out_of_range_mode** - Decides if audio should pause when source is outside of 'max_distance' range. -- :ref:`bool` **playing** - If [code]true[/code], audio is playing. -- :ref:`AudioStream` **stream** - The [AudioStream] object to be played. +- :ref:`bool` **playing** - If ``true``, audio is playing. +- :ref:`AudioStream` **stream** - The :ref:`AudioStream` object to be played. - :ref:`float` **unit_db** - Base sound level unaffected by dampening, in dB. - :ref:`float` **unit_size** - Factor for the attenuation effect. diff --git a/classes/class_audiostreamrandompitch.rst b/classes/class_audiostreamrandompitch.rst index 87da5c169..e75305e08 100644 --- a/classes/class_audiostreamrandompitch.rst +++ b/classes/class_audiostreamrandompitch.rst @@ -32,7 +32,7 @@ Member Functions Member Variables ---------------- -- :ref:`AudioStream` **audio_stream** - The current [AudioStream]. +- :ref:`AudioStream` **audio_stream** - The current :ref:`AudioStream`. - :ref:`float` **random_pitch** - The intensity of random pitch variation. Description diff --git a/classes/class_audiostreamsample.rst b/classes/class_audiostreamsample.rst index 1cd68586c..26e621a8b 100644 --- a/classes/class_audiostreamsample.rst +++ b/classes/class_audiostreamsample.rst @@ -53,12 +53,12 @@ Member Variables ---------------- - :ref:`PoolByteArray` **data** - Raw audio data. -- :ref:`int` **format** - Audio format. See FORMAT_* constants for values. +- :ref:`int` **format** - Audio format. See FORMAT\_\* constants for values. - :ref:`int` **loop_begin** - Loop start in bytes. - :ref:`int` **loop_end** - Loop end in bytes. -- :ref:`int` **loop_mode** - Loop mode. See LOOP_* constants for values. +- :ref:`int` **loop_mode** - Loop mode. See LOOP\_\* constants for values. - :ref:`int` **mix_rate** - The sample rate for mixing this audio. -- :ref:`bool` **stereo** - If [code]true[/code], audio is stereo. Default value: [code]false[/code]. +- :ref:`bool` **stereo** - If ``true``, audio is stereo. Default value: ``false``. Numeric Constants ----------------- diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst index 471fe5f36..718f36cd9 100644 --- a/classes/class_backbuffercopy.rst +++ b/classes/class_backbuffercopy.rst @@ -32,8 +32,8 @@ Member Functions Member Variables ---------------- -- :ref:`int` **copy_mode** - Buffer mode. See [code]COPY_MODE_*[/code] constants. -- :ref:`Rect2` **rect** - The area covered by the BackBufferCopy. Only used if [code]copy_mode[/code] is [code]COPY_MODE_RECT[/code]. +- :ref:`int` **copy_mode** - Buffer mode. See ``COPY_MODE\_\*`` constants. +- :ref:`Rect2` **rect** - The area covered by the BackBufferCopy. Only used if ``copy_mode`` is ``COPY_MODE_RECT``. Numeric Constants ----------------- diff --git a/classes/class_bitmap.rst b/classes/class_bitmap.rst index 524bf2e89..2e2cbcfa1 100644 --- a/classes/class_bitmap.rst +++ b/classes/class_bitmap.rst @@ -38,9 +38,11 @@ Member Functions Member Variables ---------------- -- :ref:`Dictionary` **data** - Returns a [Dictionary] with two keys : - [code]data[/code] : [PoolByteArray] with [code]true[/code]/[code]false[/code] [code]BitMap[/code] data. - [code]size[/code] : The [code]Bitmap[/code]'s size. +- :ref:`Dictionary` **data** - Returns a :ref:`Dictionary` with two keys : + +``data`` : :ref:`PoolByteArray` with ``true``/``false`` ``BitMap`` data. + +``size`` : The ``Bitmap``'s size. Description ----------- diff --git a/classes/class_bitmapfont.rst b/classes/class_bitmapfont.rst index 43a62cfff..526e4fa95 100644 --- a/classes/class_bitmapfont.rst +++ b/classes/class_bitmapfont.rst @@ -54,11 +54,11 @@ Member Variables - :ref:`float` **ascent** - Ascent (number of pixels above the baseline). - :ref:`PoolIntArray` **chars** - The characters in the BitmapFont. -- :ref:`bool` **distance_field** - If [code]true[/code] distance field hint is enabled. +- :ref:`bool` **distance_field** - If ``true`` distance field hint is enabled. - :ref:`BitmapFont` **fallback** - The fallback font. - :ref:`float` **height** - Total font height (ascent plus descent) in pixels. -- :ref:`PoolIntArray` **kernings** - The font's kernings as [PoolIntArray]. -- :ref:`Array` **textures** - The font's [Texture]\ s. +- :ref:`PoolIntArray` **kernings** - The font's kernings as :ref:`PoolIntArray`. +- :ref:`Array` **textures** - The font's :ref:`Texture`\ s. Description ----------- diff --git a/classes/class_button.rst b/classes/class_button.rst index fefc8a2f8..33de2a083 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -46,7 +46,7 @@ Member Functions Member Variables ---------------- -- :ref:`int` **align** - Text alignment policy for the button's text, use one of the ALIGN_* constants. +- :ref:`int` **align** - Text alignment policy for the button's text, use one of the ALIGN\_\* constants. - :ref:`bool` **clip_text** - When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default. - :ref:`bool` **flat** - Flat buttons don't display decoration. - :ref:`Texture` **icon** - Button's icon, if text is present the icon will be placed before the text. diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 3b2aeddb4..6b539fc1d 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -108,13 +108,13 @@ Member Functions Member Variables ---------------- -- :ref:`int` **anchor_mode** - The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants. -- :ref:`bool` **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. -- :ref:`float` **drag_margin_bottom** - 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. +- :ref:`int` **anchor_mode** - The Camera2D's anchor point. See ``ANCHOR_MODE\_\*`` constants. +- :ref:`bool` **current** - If ``true`` this camera is the active camera for the current scene. Only one camera can be current, so setting a different camera ``current`` will disable this one. +- :ref:`float` **drag_margin_bottom** - Bottom margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen. - :ref:`bool` **drag_margin_h_enabled** -- :ref:`float` **drag_margin_left** - 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. -- :ref:`float` **drag_margin_right** - 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. -- :ref:`float` **drag_margin_top** - 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. +- :ref:`float` **drag_margin_left** - Left margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen. +- :ref:`float` **drag_margin_right** - Right margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen. +- :ref:`float` **drag_margin_top** - Top margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the edge of the screen. - :ref:`bool` **drag_margin_v_enabled** - :ref:`bool` **editor_draw_drag_margin** - :ref:`bool` **editor_draw_limits** @@ -128,7 +128,7 @@ Member Variables - :ref:`bool` **rotating** - :ref:`bool` **smoothing_enabled** - :ref:`float` **smoothing_speed** -- :ref:`Vector2` **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. +- :ref:`Vector2` **zoom** - The camera's zoom relative to the viewport. Values larger than ``Vector2(1, 1)`` zoom out and smaller values zoom in. For an example, use ``Vector2(0.5, 0.5)`` for a 2x zoom in, and ``Vector2(4, 4)`` for a 4x zoom out. Numeric Constants ----------------- diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index 6c526a201..4fba0b713 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -56,7 +56,7 @@ Member Functions Member Variables ---------------- -- :ref:`int` **layer** - Layer index for draw order. Lower values are drawn first. Default value: [code]1[/code]. +- :ref:`int` **layer** - Layer index for draw order. Lower values are drawn first. Default value: ``1``. - :ref:`Vector2` **offset** - The layer's base offset. - :ref:`float` **rotation** - The layer's rotation in degrees. - :ref:`Vector2` **scale** - The layer's scale. diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index 1059a3e5a..5ae7c1be2 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -84,7 +84,7 @@ Emitted when the mouse pointer exits all this object's shapes. Member Variables ---------------- -- :ref:`bool` **input_pickable** - If [code]true[/code] this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. +- :ref:`bool` **input_pickable** - If ``true`` this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Description ----------- diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index cc05921cf..afd3cf3ec 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -40,9 +40,9 @@ Member Functions Member Variables ---------------- -- :ref:`int` **build_mode** - Collision build mode. Use one of the [code]BUILD_*[/code] constants. Default value: [code]BUILD_SOLIDS[/code]. -- :ref:`bool` **disabled** - If [code]true[/code] no collisions will be detected. -- :ref:`bool` **one_way_collision** - If [code]true[/code] only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. +- :ref:`int` **build_mode** - Collision build mode. Use one of the ``BUILD\_\*`` constants. Default value: ``BUILD_SOLIDS``. +- :ref:`bool` **disabled** - If ``true`` no collisions will be detected. +- :ref:`bool` **one_way_collision** - If ``true`` only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. - :ref:`PoolVector2Array` **polygon** - The polygon's list of vertices. The final point will be connected to the first. Numeric Constants diff --git a/classes/class_colorrect.rst b/classes/class_colorrect.rst index e3e8cd7d6..8ee5386f7 100644 --- a/classes/class_colorrect.rst +++ b/classes/class_colorrect.rst @@ -28,10 +28,11 @@ Member Functions Member Variables ---------------- -- :ref:`Color` **color** - The color to fill the [code]ColorRect[/code]. - [codeblock] - $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect node's color to red - [/codeblock] +- :ref:`Color` **color** - The color to fill the ``ColorRect``. + +:: + + $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect node's color to red Description ----------- diff --git a/classes/class_conetwistjoint.rst b/classes/class_conetwistjoint.rst index 8bbecbbcf..b4958b268 100644 --- a/classes/class_conetwistjoint.rst +++ b/classes/class_conetwistjoint.rst @@ -14,7 +14,7 @@ ConeTwistJoint Brief Description ----------------- - +A twist joint between two 3D bodies Member Functions ---------------- @@ -28,21 +28,50 @@ Member Functions Member Variables ---------------- -- :ref:`float` **bias** -- :ref:`float` **relaxation** -- :ref:`float` **softness** -- :ref:`float` **swing_span** -- :ref:`float` **twist_span** +- :ref:`float` **bias** - The speed with which the swing or twist will take place. + +The higher, the faster. +- :ref:`float` **relaxation** - Defines, how fast the swing- and twist-speed-difference on both sides gets synced. +- :ref:`float` **softness** - The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. +- :ref:`float` **swing_span** - Swing is rotation from side to side, around the axis perpendicular to the twist axis. + +The swing span defines, how much rotation will not get corrected allong the swing axis. + +Could be defined as looseness in the :ref:`ConeTwistJoint`. + +If below 0.05, this behaviour is locked. Default value: ``PI/4``. +- :ref:`float` **twist_span** - Twist is the rotation around the twist axis, this value defined how far the joint can twist. + +Twist is locked if below 0.05. Numeric Constants ----------------- -- **PARAM_SWING_SPAN** = **0** -- **PARAM_TWIST_SPAN** = **1** -- **PARAM_BIAS** = **2** -- **PARAM_SOFTNESS** = **3** -- **PARAM_RELAXATION** = **4** -- **PARAM_MAX** = **5** +- **PARAM_SWING_SPAN** = **0** --- Swing is rotation from side to side, around the axis perpendicular to the twist axis. + +The swing span defines, how much rotation will not get corrected allong the swing axis. + +Could be defined as looseness in the :ref:`ConeTwistJoint`. + +If below 0.05, this behaviour is locked. Default value: ``PI/4``. +- **PARAM_TWIST_SPAN** = **1** --- Twist is the rotation around the twist axis, this value defined how far the joint can twist. + +Twist is locked if below 0.05. +- **PARAM_BIAS** = **2** --- The speed with which the swing or twist will take place. + +The higher, the faster. +- **PARAM_SOFTNESS** = **3** --- The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. +- **PARAM_RELAXATION** = **4** --- Defines, how fast the swing- and twist-speed-difference on both sides gets synced. +- **PARAM_MAX** = **5** --- End flag of PARAM\_\* constants, used internally. + +Description +----------- + +The joint can rotate the bodies across an axis defined by the local x-axes of the :ref:`Joint`. + +The twist axis is initiated as the x-axis of the :ref:`Joint`. + +Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint in the local space of the two Bodies. Member Function Description --------------------------- diff --git a/classes/class_control.rst b/classes/class_control.rst index ebc65012c..4fbabc765 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -262,35 +262,37 @@ Emitted when one of the size flags changes. See member size_flags_horizontal and Member Variables ---------------- -- :ref:`float` **anchor_bottom** - Anchors the bottom edge of the node to the origin, the center, or the end of its parent container. It changes how the bottom margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. -- :ref:`float` **anchor_left** - Anchors the left edge of the node to the origin, the center or the end of its parent container. It changes how the left margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. -- :ref:`float` **anchor_right** - Anchors the right edge of the node to the origin, the center or the end of its parent container. It changes how the right margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. -- :ref:`float` **anchor_top** - Anchors the top edge of the node to the origin, the center or the end of its parent container. It changes how the top margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. -- :ref:`NodePath` **focus_neighbour_bottom** - Tells Godot which node it should give keyboard focus to if the user presses Tab, the down arrow on the keyboard, or down on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. - If the user presses Tab, Godot will give focus to the closest node to the right first, then to the bottom. If the user presses Shift+Tab, Godot will look to the left of the node, then above it. -- :ref:`NodePath` **focus_neighbour_left** - Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab, the left arrow on the keyboard or left on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the left of this one. -- :ref:`NodePath` **focus_neighbour_right** - Tells Godot which node it should give keyboard focus to if the user presses Tab, the right arrow on the keyboard or right on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. -- :ref:`NodePath` **focus_neighbour_top** - Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab, the top arrow on the keyboard or top on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. +- :ref:`float` **anchor_bottom** - Anchors the bottom edge of the node to the origin, the center, or the end of its parent container. It changes how the bottom margin updates when the node moves or changes size. Use one of the ``ANCHOR\_\*`` constants. Default value: ``ANCHOR_BEGIN``. +- :ref:`float` **anchor_left** - Anchors the left edge of the node to the origin, the center or the end of its parent container. It changes how the left margin updates when the node moves or changes size. Use one of the ``ANCHOR\_\*`` constants. Default value: ``ANCHOR_BEGIN``. +- :ref:`float` **anchor_right** - Anchors the right edge of the node to the origin, the center or the end of its parent container. It changes how the right margin updates when the node moves or changes size. Use one of the ``ANCHOR\_\*`` constants. Default value: ``ANCHOR_BEGIN``. +- :ref:`float` **anchor_top** - Anchors the top edge of the node to the origin, the center or the end of its parent container. It changes how the top margin updates when the node moves or changes size. Use one of the ``ANCHOR\_\*`` constants. Default value: ``ANCHOR_BEGIN``. +- :ref:`NodePath` **focus_neighbour_bottom** - Tells Godot which node it should give keyboard focus to if the user presses Tab, the down arrow on the keyboard, or down on a gamepad. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one. + +If the user presses Tab, Godot will give focus to the closest node to the right first, then to the bottom. If the user presses Shift+Tab, Godot will look to the left of the node, then above it. +- :ref:`NodePath` **focus_neighbour_left** - Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab, the left arrow on the keyboard or left on a gamepad. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the left of this one. +- :ref:`NodePath` **focus_neighbour_right** - Tells Godot which node it should give keyboard focus to if the user presses Tab, the right arrow on the keyboard or right on a gamepad. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one. +- :ref:`NodePath` **focus_neighbour_top** - Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab, the top arrow on the keyboard or top on a gamepad. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one. - :ref:`int` **grow_horizontal** - :ref:`int` **grow_vertical** - :ref:`String` **hint_tooltip** - Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments. -- :ref:`float` **margin_bottom** - Distance between the node's bottom edge and its parent container, based on [member anchor_bottom]. - Margins are often controlled by one or multiple parent [Container] nodes. Margins update automatically when you move or resize the node. -- :ref:`float` **margin_left** - Distance between the node's left edge and its parent container, based on [member anchor_left]. -- :ref:`float` **margin_right** - Distance between the node's right edge and its parent container, based on [member anchor_right]. -- :ref:`float` **margin_top** - Distance between the node's top edge and its parent container, based on [member anchor_top]. +- :ref:`float` **margin_bottom** - Distance between the node's bottom edge and its parent container, based on member anchor_bottom. + +Margins are often controlled by one or multiple parent :ref:`Container` nodes. Margins update automatically when you move or resize the node. +- :ref:`float` **margin_left** - Distance between the node's left edge and its parent container, based on member anchor_left. +- :ref:`float` **margin_right** - Distance between the node's right edge and its parent container, based on member anchor_right. +- :ref:`float` **margin_top** - Distance between the node's top edge and its parent container, based on member anchor_top. - :ref:`int` **mouse_filter** - :ref:`bool` **rect_clip_content** - :ref:`Vector2` **rect_min_size** - The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. -- :ref:`Vector2` **rect_pivot_offset** - By default, the node's pivot is its top-left corner. When you change its [member rect_scale], it will scale around this pivot. Set this property to [member rect_size] / 2 to center the pivot in the node's rectangle. -- :ref:`Vector2` **rect_position** - The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member rect_pivot_offset]. -- :ref:`float` **rect_rotation** - The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position. -- :ref:`Vector2` **rect_scale** - The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. -- :ref:`Vector2` **rect_size** - The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically. -- :ref:`int` **size_flags_horizontal** - Tells the parent [Container] nodes how they should resize and place the node on the X axis. Use one of the [code]SIZE_*[/code] constants to change the flags. See the constants to learn what each does. -- :ref:`float` **size_flags_stretch_ratio** - If the node and at least one of its neighbours uses the [code]SIZE_EXPAND[/code] size flag, the parent [Container] will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space. -- :ref:`int` **size_flags_vertical** - Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [code]SIZE_*[/code] constants to change the flags. See the constants to learn what each does. -- :ref:`Theme` **theme** - Changing this property replaces the current [Theme] resource this node and all its [code]Control[/code] children use. +- :ref:`Vector2` **rect_pivot_offset** - By default, the node's pivot is its top-left corner. When you change its member rect_scale, it will scale around this pivot. Set this property to member rect_size / 2 to center the pivot in the node's rectangle. +- :ref:`Vector2` **rect_position** - The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by member rect_pivot_offset. +- :ref:`float` **rect_rotation** - The node's rotation around its pivot, in degrees. See member rect_pivot_offset to change the pivot's position. +- :ref:`Vector2` **rect_scale** - The node's scale, relative to its member rect_size. Change this property to scale the node around its member rect_pivot_offset. +- :ref:`Vector2` **rect_size** - The size of the node's bounding rectangle, in pixels. :ref:`Container` nodes update this property automatically. +- :ref:`int` **size_flags_horizontal** - Tells the parent :ref:`Container` nodes how they should resize and place the node on the X axis. Use one of the ``SIZE\_\*`` constants to change the flags. See the constants to learn what each does. +- :ref:`float` **size_flags_stretch_ratio** - If the node and at least one of its neighbours uses the ``SIZE_EXPAND`` size flag, the parent :ref:`Container` will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space. +- :ref:`int` **size_flags_vertical** - Tells the parent :ref:`Container` nodes how they should resize and place the node on the Y axis. Use one of the ``SIZE\_\*`` constants to change the flags. See the constants to learn what each does. +- :ref:`Theme` **theme** - Changing this property replaces the current :ref:`Theme` resource this node and all its ``Control`` children use. Numeric Constants ----------------- diff --git a/classes/class_dynamicfont.rst b/classes/class_dynamicfont.rst index 1f94287f6..9f8530229 100644 --- a/classes/class_dynamicfont.rst +++ b/classes/class_dynamicfont.rst @@ -60,8 +60,8 @@ Member Variables - :ref:`int` **extra_spacing_top** - Extra spacing at the top in pixels. - :ref:`DynamicFontData` **font_data** - The font data. - :ref:`int` **size** - The font size. -- :ref:`bool` **use_filter** - If [code]true[/code] filtering is used. -- :ref:`bool` **use_mipmaps** - If [code]true[/code] mipmapping is used. +- :ref:`bool` **use_filter** - If ``true`` filtering is used. +- :ref:`bool` **use_mipmaps** - If ``true`` mipmapping is used. Numeric Constants ----------------- diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 541b8bf05..ff4188c23 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -14,7 +14,7 @@ EditorInterface Brief Description ----------------- - +Editor interface and main components. Member Functions ---------------- @@ -53,6 +53,11 @@ Member Functions | void | :ref:`save_scene_as` **(** :ref:`String` path, :ref:`bool` with_preview=true **)** | +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +Editor interface. Allows saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects and provides access to :ref:`EditorSettings`, :ref:`EditorFileSystem`, :ref:`EditorResourcePreview`\ er, :ref:`ScriptEditor`, the editor viewport, as well as information about scenes. Also see :ref:`EditorPlugin` and :ref:`EditorScript`. + Member Function Description --------------------------- @@ -60,64 +65,96 @@ Member Function Description - void **edit_resource** **(** :ref:`Resource` resource **)** +Edits the given :ref:`Resource`. + .. _class_EditorInterface_get_base_control: - :ref:`Control` **get_base_control** **(** **)** +Returns the base :ref:`Control`. + .. _class_EditorInterface_get_edited_scene_root: - :ref:`Node` **get_edited_scene_root** **(** **)** +Returns the edited scene's root :ref:`Node`. + .. _class_EditorInterface_get_editor_settings: - :ref:`EditorSettings` **get_editor_settings** **(** **)** +Returns the :ref:`EditorSettings`. + .. _class_EditorInterface_get_editor_viewport: - :ref:`Control` **get_editor_viewport** **(** **)** +Returns the editor :ref:`Viewport`. + .. _class_EditorInterface_get_open_scenes: - :ref:`Array` **get_open_scenes** **(** **)** const +Returns an :ref:`Array` of the currently opened scenes. + .. _class_EditorInterface_get_resource_filesystem: - :ref:`EditorFileSystem` **get_resource_filesystem** **(** **)** +Returns the :ref:`EditorFileSystem`. + .. _class_EditorInterface_get_resource_previewer: - :ref:`EditorResourcePreview` **get_resource_previewer** **(** **)** +Returns the :ref:`EditorResourcePreview`\ er. + .. _class_EditorInterface_get_script_editor: - :ref:`ScriptEditor` **get_script_editor** **(** **)** +Returns the :ref:`ScriptEditor`. + .. _class_EditorInterface_get_selection: - :ref:`EditorSelection` **get_selection** **(** **)** +Returns the :ref:`EditorSelection`. + .. _class_EditorInterface_inspect_object: - void **inspect_object** **(** :ref:`Object` object, :ref:`String` for_property="" **)** +Shows the given property on the given ``object`` in the Editor's Inspector dock. + .. _class_EditorInterface_make_mesh_previews: - :ref:`Array` **make_mesh_previews** **(** :ref:`Array` meshes, :ref:`int` preview_size **)** +Returns mesh previews rendered at the given size as an :ref:`Array` of :ref:`Texture`\ s. + .. _class_EditorInterface_open_scene_from_path: - void **open_scene_from_path** **(** :ref:`String` scene_filepath **)** +Opens the scene at the given path. + .. _class_EditorInterface_reload_scene_from_path: - void **reload_scene_from_path** **(** :ref:`String` scene_filepath **)** +Reloads the scene at the given path. + .. _class_EditorInterface_save_scene: - :ref:`int` **save_scene** **(** **)** +Saves the scene. Returns either OK or ERR_CANT_CREATE. See :ref:`@Global Scope` constants. + .. _class_EditorInterface_save_scene_as: - void **save_scene_as** **(** :ref:`String` path, :ref:`bool` with_preview=true **)** +Saves the scene as a file at ``path``. + diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index bef69da94..42f65e363 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -14,7 +14,7 @@ EditorScript Brief Description ----------------- -Simple script to perform changes in the currently edited scene. +Base script that can be used to add extension functions to the editor. Member Functions ---------------- @@ -32,7 +32,19 @@ Member Functions Description ----------- -This script can be run from the Scene -> Run Script menu option. +Scripts extending this class and implementing its ``_run()`` method can be executed from the Script Editor's ``File -> Run`` menu option (or by pressing ``CTRL+Shift+X``) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using :ref:`EditorPlugin`\ s instead. Note that extending scripts need to have ``tool mode`` enabled. + +Example script: + +:: + + tool + extends EditorScript + + func _run(): + print("Hello from the Godot Editor!") + +Note that the script is run in the Editor context, which means the output is visible in the console window started with the Editor (STDOUT) instead of the usual Godot \*Output\* dock. Member Function Description --------------------------- @@ -41,6 +53,8 @@ Member Function Description - void **_run** **(** **)** virtual +This method is executed by the Editor when ``File -> Run`` is used. + .. _class_EditorScript_add_root_node: - void **add_root_node** **(** :ref:`Node` node **)** @@ -49,8 +63,12 @@ Member Function Description - :ref:`EditorInterface` **get_editor_interface** **(** **)** +Returns the :ref:`EditorInterface` singleton instance. + .. _class_EditorScript_get_scene: - :ref:`Node` **get_scene** **(** **)** +Returns the Editor's currently active scene. + diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 623c5a2fd..a1662bd04 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -301,11 +301,11 @@ Member Variables ---------------- - :ref:`float` **adjustment_brightness** - Global brightness value of the rendered scene (default value is 1). -- :ref:`Texture` **adjustment_color_correction** - Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. +- :ref:`Texture` **adjustment_color_correction** - Applies the provided :ref:`Texture` resource to affect the global color aspect of the rendered scene. - :ref:`float` **adjustment_contrast** - Global contrast value of the rendered scene (default value is 1). -- :ref:`bool` **adjustment_enabled** - Enables the adjustment_* options provided by this resource. If false, adjustments modifications will have no effect on the rendered scene. +- :ref:`bool` **adjustment_enabled** - Enables the adjustment\_\* options provided by this resource. If false, adjustments modifications will have no effect on the rendered scene. - :ref:`float` **adjustment_saturation** - Global color saturation value of the rendered scene (default value is 1). -- :ref:`Color` **ambient_light_color** - [Color] of the ambient light. +- :ref:`Color` **ambient_light_color** - :ref:`Color` of the ambient light. - :ref:`float` **ambient_light_energy** - Energy of the ambient light. The higher the value, the stronger the light. - :ref:`float` **ambient_light_sky_contribution** - Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. - :ref:`bool` **auto_exposure_enabled** - Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light. @@ -317,8 +317,8 @@ Member Variables - :ref:`Color` **background_color** - Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). - :ref:`float` **background_energy** - Power of light emitted by the background. - :ref:`int` **background_mode** - Defines the mode of background. -- :ref:`Sky` **background_sky** - [Sky] resource defined as background. -- :ref:`float` **background_sky_custom_fov** - [Sky] resource's custom field of view. +- :ref:`Sky` **background_sky** - :ref:`Sky` resource defined as background. +- :ref:`float` **background_sky_custom_fov** - :ref:`Sky` resource's custom field of view. - :ref:`float` **dof_blur_far_amount** - Amount of far blur. - :ref:`float` **dof_blur_far_distance** - Distance from the camera where the far blur effect affects the rendering. - :ref:`bool` **dof_blur_far_enabled** - Enables the far blur effect. @@ -329,7 +329,7 @@ Member Variables - :ref:`bool` **dof_blur_near_enabled** - Enables the near blur effect. - :ref:`int` **dof_blur_near_quality** - Quality of the near blur quality. - :ref:`float` **dof_blur_near_transition** - Transition between near blur and no-blur area. -- :ref:`Color` **fog_color** - Fog's [Color]. +- :ref:`Color` **fog_color** - Fog's :ref:`Color`. - :ref:`float` **fog_depth_begin** - Fog's depth starting distance from the camera. - :ref:`float` **fog_depth_curve** - Value defining the fog depth intensity. - :ref:`bool` **fog_depth_enabled** - Enables the fog depth. @@ -339,7 +339,7 @@ Member Variables - :ref:`float` **fog_height_max** - Maximum height of fog. - :ref:`float` **fog_height_min** - Minimum height of fog. - :ref:`float` **fog_sun_amount** - Amount of sun that affects the fog rendering. -- :ref:`Color` **fog_sun_color** - Sun [Color]. +- :ref:`Color` **fog_sun_color** - Sun :ref:`Color`. - :ref:`float` **fog_transmit_curve** - Amount of light that the fog transmits. - :ref:`bool` **fog_transmit_enabled** - Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog. - :ref:`bool` **glow_bicubic_upscale** diff --git a/classes/class_gdnative.rst b/classes/class_gdnative.rst index 8bcb7d055..5869d56ee 100644 --- a/classes/class_gdnative.rst +++ b/classes/class_gdnative.rst @@ -19,17 +19,17 @@ Brief Description Member Functions ---------------- -+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`call_native` **(** :ref:`String` procedure_name, :ref:`String` arguments, :ref:`Array` arg2 **)** | -+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`GDNativeLibrary` | :ref:`get_library` **(** **)** | -+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`initialize` **(** **)** | -+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_library` **(** :ref:`GDNativeLibrary` library **)** | -+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`terminate` **(** **)** | -+------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`call_native` **(** :ref:`String` calling_type, :ref:`String` procedure_name, :ref:`Array` arguments **)** | ++------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`GDNativeLibrary` | :ref:`get_library` **(** **)** | ++------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`initialize` **(** **)** | ++------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_library` **(** :ref:`GDNativeLibrary` library **)** | ++------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`terminate` **(** **)** | ++------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- @@ -41,7 +41,7 @@ Member Function Description .. _class_GDNative_call_native: -- :ref:`Variant` **call_native** **(** :ref:`String` procedure_name, :ref:`String` arguments, :ref:`Array` arg2 **)** +- :ref:`Variant` **call_native** **(** :ref:`String` calling_type, :ref:`String` procedure_name, :ref:`Array` arguments **)** .. _class_GDNative_get_library: diff --git a/classes/class_generic6dofjoint.rst b/classes/class_generic6dofjoint.rst index 6766b3557..cc8e6fda7 100644 --- a/classes/class_generic6dofjoint.rst +++ b/classes/class_generic6dofjoint.rst @@ -14,7 +14,7 @@ Generic6DOFJoint Brief Description ----------------- - +The generic 6 degrees of freedom joint can implement a variety of joint-types by locking certain axes' rotation or translation. Member Functions ---------------- @@ -48,80 +48,87 @@ Member Functions Member Variables ---------------- -- :ref:`float` **angular_limit_x/damping** -- :ref:`bool` **angular_limit_x/enabled** -- :ref:`float` **angular_limit_x/erp** -- :ref:`float` **angular_limit_x/force_limit** -- :ref:`float` **angular_limit_x/lower_angle** -- :ref:`float` **angular_limit_x/restitution** -- :ref:`float` **angular_limit_x/softness** -- :ref:`float` **angular_limit_x/upper_angle** -- :ref:`float` **angular_limit_y/damping** -- :ref:`bool` **angular_limit_y/enabled** -- :ref:`float` **angular_limit_y/erp** -- :ref:`float` **angular_limit_y/force_limit** -- :ref:`float` **angular_limit_y/lower_angle** -- :ref:`float` **angular_limit_y/restitution** -- :ref:`float` **angular_limit_y/softness** -- :ref:`float` **angular_limit_y/upper_angle** -- :ref:`float` **angular_limit_z/damping** -- :ref:`bool` **angular_limit_z/enabled** -- :ref:`float` **angular_limit_z/erp** -- :ref:`float` **angular_limit_z/force_limit** -- :ref:`float` **angular_limit_z/lower_angle** -- :ref:`float` **angular_limit_z/restitution** -- :ref:`float` **angular_limit_z/softness** -- :ref:`float` **angular_limit_z/upper_angle** -- :ref:`bool` **angular_motor_x/enabled** -- :ref:`float` **angular_motor_x/force_limit** -- :ref:`float` **angular_motor_x/target_velocity** -- :ref:`bool` **angular_motor_y/enabled** -- :ref:`float` **angular_motor_y/force_limit** -- :ref:`float` **angular_motor_y/target_velocity** -- :ref:`bool` **angular_motor_z/enabled** -- :ref:`float` **angular_motor_z/force_limit** -- :ref:`float` **angular_motor_z/target_velocity** -- :ref:`float` **linear_limit_x/damping** -- :ref:`bool` **linear_limit_x/enabled** -- :ref:`float` **linear_limit_x/lower_distance** -- :ref:`float` **linear_limit_x/restitution** -- :ref:`float` **linear_limit_x/softness** -- :ref:`float` **linear_limit_x/upper_distance** -- :ref:`float` **linear_limit_y/damping** -- :ref:`bool` **linear_limit_y/enabled** -- :ref:`float` **linear_limit_y/lower_distance** -- :ref:`float` **linear_limit_y/restitution** -- :ref:`float` **linear_limit_y/softness** -- :ref:`float` **linear_limit_y/upper_distance** -- :ref:`float` **linear_limit_z/damping** -- :ref:`bool` **linear_limit_z/enabled** -- :ref:`float` **linear_limit_z/lower_distance** -- :ref:`float` **linear_limit_z/restitution** -- :ref:`float` **linear_limit_z/softness** -- :ref:`float` **linear_limit_z/upper_distance** +- :ref:`float` **angular_limit_x/damping** - The amount of rotational damping across the x-axis. + +The lower, the longer an impulse from one side takes to travel to the other side. +- :ref:`bool` **angular_limit_x/enabled** - If ``true`` rotation across the x-axis is enabled. +- :ref:`float` **angular_limit_x/erp** - When rotating across x-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +- :ref:`float` **angular_limit_x/force_limit** - The maximum amount of force that can occur, when rotating arround x-axis. +- :ref:`float` **angular_limit_x/lower_angle** - The minimum rotation in negative direction to break loose and rotate arround the x-axis. +- :ref:`float` **angular_limit_x/restitution** - The amount of rotational restitution across the x-axis. The lower, the more restitution occurs. +- :ref:`float` **angular_limit_x/softness** - The speed of all rotations across the x-axis. +- :ref:`float` **angular_limit_x/upper_angle** - The minimum rotation in positive direction to break loose and rotate arround the x-axis. +- :ref:`float` **angular_limit_y/damping** - The amount of rotational damping across the y-axis. The lower, the more dampening occurs. +- :ref:`bool` **angular_limit_y/enabled** - If ``true`` rotation across the y-axis is enabled. +- :ref:`float` **angular_limit_y/erp** - When rotating across y-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +- :ref:`float` **angular_limit_y/force_limit** - The maximum amount of force that can occur, when rotating arround y-axis. +- :ref:`float` **angular_limit_y/lower_angle** - The minimum rotation in negative direction to break loose and rotate arround the y-axis. +- :ref:`float` **angular_limit_y/restitution** - The amount of rotational restitution across the y-axis. The lower, the more restitution occurs. +- :ref:`float` **angular_limit_y/softness** - The speed of all rotations across the y-axis. +- :ref:`float` **angular_limit_y/upper_angle** - The minimum rotation in positive direction to break loose and rotate arround the y-axis. +- :ref:`float` **angular_limit_z/damping** - The amount of rotational damping across the z-axis. The lower, the more dampening occurs. +- :ref:`bool` **angular_limit_z/enabled** - If ``true`` rotation across the z-axis is enabled. +- :ref:`float` **angular_limit_z/erp** - When rotating across z-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +- :ref:`float` **angular_limit_z/force_limit** - The maximum amount of force that can occur, when rotating arround z-axis. +- :ref:`float` **angular_limit_z/lower_angle** - The minimum rotation in negative direction to break loose and rotate arround the z-axis. +- :ref:`float` **angular_limit_z/restitution** - The amount of rotational restitution across the z-axis. The lower, the more restitution occurs. +- :ref:`float` **angular_limit_z/softness** - The speed of all rotations across the z-axis. +- :ref:`float` **angular_limit_z/upper_angle** - The minimum rotation in positive direction to break loose and rotate arround the z-axis. +- :ref:`bool` **angular_motor_x/enabled** - If ``true`` a rotating motor at the x-axis is enabled. +- :ref:`float` **angular_motor_x/force_limit** - Maximum acceleration for the motor at the x-axis. +- :ref:`float` **angular_motor_x/target_velocity** - Target speed for the motor at the x-axis. +- :ref:`bool` **angular_motor_y/enabled** - If ``true`` a rotating motor at the y-axis is enabled. +- :ref:`float` **angular_motor_y/force_limit** - Maximum acceleration for the motor at the y-axis. +- :ref:`float` **angular_motor_y/target_velocity** - Target speed for the motor at the y-axis. +- :ref:`bool` **angular_motor_z/enabled** - If ``true`` a rotating motor at the z-axis is enabled. +- :ref:`float` **angular_motor_z/force_limit** - Maximum acceleration for the motor at the z-axis. +- :ref:`float` **angular_motor_z/target_velocity** - Target speed for the motor at the z-axis. +- :ref:`float` **linear_limit_x/damping** - The amount of damping that happens at the x-motion. +- :ref:`bool` **linear_limit_x/enabled** - If ``true`` the linear motion across the x-axis is enabled. +- :ref:`float` **linear_limit_x/lower_distance** - The minimum difference between the pivot points' x-axis. +- :ref:`float` **linear_limit_x/restitution** - The amount of restitution on the x-axis movement The lower, the more momentum gets lost. +- :ref:`float` **linear_limit_x/softness** - A factor applied to the movement across the x-axis The lower, the slower the movement. +- :ref:`float` **linear_limit_x/upper_distance** - The maximum difference between the pivot points' x-axis. +- :ref:`float` **linear_limit_y/damping** - The amount of damping that happens at the y-motion. +- :ref:`bool` **linear_limit_y/enabled** - If ``true`` the linear motion across the y-axis is enabled. +- :ref:`float` **linear_limit_y/lower_distance** - The minimum difference between the pivot points' y-axis. +- :ref:`float` **linear_limit_y/restitution** - The amount of restitution on the y-axis movement The lower, the more momentum gets lost. +- :ref:`float` **linear_limit_y/softness** - A factor applied to the movement across the y-axis The lower, the slower the movement. +- :ref:`float` **linear_limit_y/upper_distance** - The maximum difference between the pivot points' y-axis. +- :ref:`float` **linear_limit_z/damping** - The amount of damping that happens at the z-motion. +- :ref:`bool` **linear_limit_z/enabled** - If ``true`` the linear motion across the z-axis is enabled. +- :ref:`float` **linear_limit_z/lower_distance** - The minimum difference between the pivot points' z-axis. +- :ref:`float` **linear_limit_z/restitution** - The amount of restitution on the z-axis movement The lower, the more momentum gets lost. +- :ref:`float` **linear_limit_z/softness** - A factor applied to the movement across the z-axis The lower, the slower the movement. +- :ref:`float` **linear_limit_z/upper_distance** - The maximum difference between the pivot points' z-axis. Numeric Constants ----------------- -- **PARAM_LINEAR_LOWER_LIMIT** = **0** -- **PARAM_LINEAR_UPPER_LIMIT** = **1** -- **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** -- **PARAM_LINEAR_RESTITUTION** = **3** -- **PARAM_LINEAR_DAMPING** = **4** -- **PARAM_ANGULAR_LOWER_LIMIT** = **5** -- **PARAM_ANGULAR_UPPER_LIMIT** = **6** -- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **7** -- **PARAM_ANGULAR_DAMPING** = **8** -- **PARAM_ANGULAR_RESTITUTION** = **9** -- **PARAM_ANGULAR_FORCE_LIMIT** = **10** -- **PARAM_ANGULAR_ERP** = **11** -- **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY** = **12** -- **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = **13** -- **PARAM_MAX** = **14** -- **FLAG_ENABLE_LINEAR_LIMIT** = **0** -- **FLAG_ENABLE_ANGULAR_LIMIT** = **1** -- **FLAG_ENABLE_MOTOR** = **2** -- **FLAG_MAX** = **3** +- **PARAM_LINEAR_LOWER_LIMIT** = **0** --- The minimum difference between the pivot points' axes. +- **PARAM_LINEAR_UPPER_LIMIT** = **1** --- The maximum difference between the pivot points' axes. +- **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the axes The lower, the slower the movement. +- **PARAM_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes movement The lower, the more momentum gets lost. +- **PARAM_LINEAR_DAMPING** = **4** --- The amount of damping that happens at the linear motion across the axes. +- **PARAM_ANGULAR_LOWER_LIMIT** = **5** --- The minimum rotation in negative direction to break loose and rotate arround the axes. +- **PARAM_ANGULAR_UPPER_LIMIT** = **6** --- The minimum rotation in positive direction to break loose and rotate arround the axes. +- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **7** --- The speed of all rotations across the axes. +- **PARAM_ANGULAR_DAMPING** = **8** --- The amount of rotational damping across the axes. The lower, the more dampening occurs. +- **PARAM_ANGULAR_RESTITUTION** = **9** --- The amount of rotational restitution across the axes. The lower, the more restitution occurs. +- **PARAM_ANGULAR_FORCE_LIMIT** = **10** --- The maximum amount of force that can occur, when rotating arround the axes. +- **PARAM_ANGULAR_ERP** = **11** --- When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +- **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY** = **12** --- Target speed for the motor at the axes. +- **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = **13** --- Maximum acceleration for the motor at the axes. +- **PARAM_MAX** = **14** --- End flag of PARAM\_\* constants, used internally. +- **FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If ``set`` there is linear motion possible within the given limits. +- **FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If ``set`` there is rotational motion possible. +- **FLAG_ENABLE_MOTOR** = **2** --- If ``set`` there is a rotational motor across these axes. +- **FLAG_MAX** = **3** --- End flag of FLAG\_\* constants, used internally. + +Description +----------- + +The first 3 dof axes are linear axes, which represent translation of Bodies, and the latter 3 dof axes represent the angular motion. Each axis can be either locked, or limited. Member Function Description --------------------------- diff --git a/classes/class_gradient.rst b/classes/class_gradient.rst index 9ce71c8e1..ba916ef94 100644 --- a/classes/class_gradient.rst +++ b/classes/class_gradient.rst @@ -48,8 +48,8 @@ Member Functions Member Variables ---------------- -- :ref:`PoolColorArray` **colors** - Gradient's colors returned as a [PoolColorArray]. -- :ref:`PoolRealArray` **offsets** - Gradient's offsets returned as a [PoolRealArray]. +- :ref:`PoolColorArray` **colors** - Gradient's colors returned as a :ref:`PoolColorArray`. +- :ref:`PoolRealArray` **offsets** - Gradient's offsets returned as a :ref:`PoolRealArray`. Description ----------- diff --git a/classes/class_gradienttexture.rst b/classes/class_gradienttexture.rst index bec9e4d08..3e0ecfac8 100644 --- a/classes/class_gradienttexture.rst +++ b/classes/class_gradienttexture.rst @@ -30,8 +30,8 @@ Member Functions Member Variables ---------------- -- :ref:`Gradient` **gradient** - The [Gradient] that will be used to fill the texture. -- :ref:`int` **width** - The number of color samples that will be obtained from the [Gradient]. +- :ref:`Gradient` **gradient** - The :ref:`Gradient` that will be used to fill the texture. +- :ref:`int` **width** - The number of color samples that will be obtained from the :ref:`Gradient`. Description ----------- diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index 265acb129..f6d00945c 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -28,7 +28,7 @@ Member Functions Member Variables ---------------- -- :ref:`int` **columns** - The number of columns in the [code]GridContainer[/code]. If modified, [code]GridContainer[/code] reorders its children to accommodate the new layout. +- :ref:`int` **columns** - The number of columns in the ``GridContainer``. If modified, ``GridContainer`` reorders its children to accommodate the new layout. Description ----------- diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index 775738c54..6f8afb6e3 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -14,7 +14,7 @@ GridMap Brief Description ----------------- - +Node for 3D tile-based maps. Member Functions ---------------- @@ -42,6 +42,8 @@ Member Functions +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_used_cells` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`map_to_world` **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_cell_item` **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` item, :ref:`int` orientation=0 **)** | @@ -60,11 +62,24 @@ Member Functions +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_theme` **(** :ref:`MeshLibrary` theme **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`world_to_map` **(** :ref:`Vector3` pos **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- -- **INVALID_CELL_ITEM** = **-1** +- **INVALID_CELL_ITEM** = **-1** --- Invalid cell item that can be used in :ref:`set_cell_item` to clear cells (or represent an empty cell in :ref:`get_cell_item`). + +Description +----------- + +GridMap lets you place meshes on a grid interactively. It works both from the editor and can help you create in-game level editors. + +GridMaps use a :ref:`MeshLibrary` which contain a list of tiles: meshes with materials plus optional collisions and extra elements. + +A GridMap contains a collection of cells. Each grid cell refers to a :ref:`MeshLibrary` item. All cells in the map have the same dimensions. + +A GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells. Member Function Description --------------------------- @@ -73,46 +88,72 @@ Member Function Description - void **clear** **(** **)** +Clear all cells. + .. _class_GridMap_get_cell_item: - :ref:`int` **get_cell_item** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** const +The :ref:`MeshLibrary` item index located at the grid-based X, Y and Z coordinates. If the cell is empty, INVALID_CELL_ITEM will be returned. + .. _class_GridMap_get_cell_item_orientation: - :ref:`int` **get_cell_item_orientation** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** const +The orientation of the cell at the grid-based X, Y and Z coordinates. -1 is retuned if the cell is empty. + .. _class_GridMap_get_cell_size: - :ref:`Vector3` **get_cell_size** **(** **)** const +The dimensions of the grid's cells. + .. _class_GridMap_get_center_x: - :ref:`bool` **get_center_x** **(** **)** const +Returns whether or not grid items are centered on the X axis. + .. _class_GridMap_get_center_y: - :ref:`bool` **get_center_y** **(** **)** const +Returns whether or not grid items are centered on the Y axis. + .. _class_GridMap_get_center_z: - :ref:`bool` **get_center_z** **(** **)** const +Returns whether or not grid items are centered on the Z axis. + .. _class_GridMap_get_meshes: - :ref:`Array` **get_meshes** **(** **)** +Array of :ref:`Transform` and :ref:`Mesh` references corresponding to the non empty cells in the grid. The transforms are specified in world space. + .. _class_GridMap_get_octant_size: - :ref:`int` **get_octant_size** **(** **)** const +The size of each octant measured in number of cells. This applies to all three axis. + .. _class_GridMap_get_theme: - :ref:`MeshLibrary` **get_theme** **(** **)** const +The assigned :ref:`MeshLibrary`. + .. _class_GridMap_get_used_cells: - :ref:`Array` **get_used_cells** **(** **)** const +Array of :ref:`Vector3` with the non empty cell coordinates in the grid map. + +.. _class_GridMap_map_to_world: + +- :ref:`Vector3` **map_to_world** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** const + .. _class_GridMap_resource_changed: - void **resource_changed** **(** :ref:`Resource` resource **)** @@ -121,22 +162,36 @@ Member Function Description - void **set_cell_item** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` item, :ref:`int` orientation=0 **)** +Set the mesh index for the cell referenced by its grid-based X, Y and Z coordinates. + +A negative item index will clear the cell. + +Optionally, the item's orientation can be passed. + .. _class_GridMap_set_cell_size: - void **set_cell_size** **(** :ref:`Vector3` size **)** +Sets the height, width and depth of the grid's cells. + .. _class_GridMap_set_center_x: - void **set_center_x** **(** :ref:`bool` enable **)** +Set grid items to be centered on the X axis. By default it is enabled. + .. _class_GridMap_set_center_y: - void **set_center_y** **(** :ref:`bool` enable **)** +Set grid items to be centered on the Y axis. By default it is enabled. + .. _class_GridMap_set_center_z: - void **set_center_z** **(** :ref:`bool` enable **)** +Set grid items to be centered on the Z axis. By default it is enabled. + .. _class_GridMap_set_clip: - void **set_clip** **(** :ref:`bool` enabled, :ref:`bool` clipabove=true, :ref:`int` floor=0, :ref:`int` axis=0 **)** @@ -145,8 +200,16 @@ Member Function Description - void **set_octant_size** **(** :ref:`int` size **)** +Sets the size for each octant measured in number of cells. This applies to all three axis. + .. _class_GridMap_set_theme: - void **set_theme** **(** :ref:`MeshLibrary` theme **)** +Sets the collection of meshes for the map. + +.. _class_GridMap_world_to_map: + +- :ref:`Vector3` **world_to_map** **(** :ref:`Vector3` pos **)** const + diff --git a/classes/class_hingejoint.rst b/classes/class_hingejoint.rst index 145d1c883..61c5024d3 100644 --- a/classes/class_hingejoint.rst +++ b/classes/class_hingejoint.rst @@ -14,7 +14,7 @@ HingeJoint Brief Description ----------------- - +A hinge between two 3D bodies. Member Functions ---------------- @@ -32,32 +32,37 @@ Member Functions Member Variables ---------------- -- :ref:`float` **angular_limit/bias** -- :ref:`bool` **angular_limit/enable** -- :ref:`float` **angular_limit/lower** -- :ref:`float` **angular_limit/relaxation** +- :ref:`float` **angular_limit/bias** - The speed with which the rotation across the axis perpendicular to the hinge gets corrected. +- :ref:`bool` **angular_limit/enable** - If ``true`` the hinges maximum and minimum rotation, defined by member angular_limit/lower and member angular_limit/upper has effects. +- :ref:`float` **angular_limit/lower** - The minimum rotation. only active if member angular_limit/enable is ``true``. +- :ref:`float` **angular_limit/relaxation** - The lower this value, the more the rotation gets slowed down. - :ref:`float` **angular_limit/softness** -- :ref:`float` **angular_limit/upper** -- :ref:`bool` **motor/enable** -- :ref:`float` **motor/max_impulse** -- :ref:`float` **motor/target_velocity** -- :ref:`float` **params/bias** +- :ref:`float` **angular_limit/upper** - The maximum rotation. only active if member angular_limit/enable is ``true``. +- :ref:`bool` **motor/enable** - When activated, a motor turns the hinge. +- :ref:`float` **motor/max_impulse** - Maximum acceleration for the motor. +- :ref:`float` **motor/target_velocity** - Target speed for the motor. +- :ref:`float` **params/bias** - The speed with wich the two bodies get pulled together when they move in different directions. Numeric Constants ----------------- -- **PARAM_BIAS** = **0** -- **PARAM_LIMIT_UPPER** = **1** -- **PARAM_LIMIT_LOWER** = **2** -- **PARAM_LIMIT_BIAS** = **3** +- **PARAM_BIAS** = **0** --- The speed with wich the two bodies get pulled together when they move in different directions. +- **PARAM_LIMIT_UPPER** = **1** --- The maximum rotation. only active if member angular_limit/enable is ``true``. +- **PARAM_LIMIT_LOWER** = **2** --- The minimum rotation. only active if member angular_limit/enable is ``true``. +- **PARAM_LIMIT_BIAS** = **3** --- The speed with which the rotation across the axis perpendicular to the hinge gets corrected. - **PARAM_LIMIT_SOFTNESS** = **4** -- **PARAM_LIMIT_RELAXATION** = **5** -- **PARAM_MOTOR_TARGET_VELOCITY** = **6** -- **PARAM_MOTOR_MAX_IMPULSE** = **7** -- **PARAM_MAX** = **8** -- **FLAG_USE_LIMIT** = **0** -- **FLAG_ENABLE_MOTOR** = **1** -- **FLAG_MAX** = **2** +- **PARAM_LIMIT_RELAXATION** = **5** --- The lower this value, the more the rotation gets slowed down. +- **PARAM_MOTOR_TARGET_VELOCITY** = **6** --- Target speed for the motor. +- **PARAM_MOTOR_MAX_IMPULSE** = **7** --- Maximum acceleration for the motor. +- **PARAM_MAX** = **8** --- End flag of PARAM\_\* constants, used internally. +- **FLAG_USE_LIMIT** = **0** --- If ``true`` the hinges maximum and minimum rotation, defined by member angular_limit/lower and member angular_limit/upper has effects. +- **FLAG_ENABLE_MOTOR** = **1** --- When activated, a motor turns the hinge. +- **FLAG_MAX** = **2** --- End flag of FLAG\_\* constants, used internally. + +Description +----------- + +Normaly uses the z-axis of body A as the hinge axis, another axis can be specified when adding it manually though. Member Function Description --------------------------- diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index 698019f68..c1a1ec378 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -54,7 +54,12 @@ Member Functions Member Variables ---------------- -- :ref:`int` **device** +- :ref:`int` **device** - The event's device ID. + +Description +----------- + +Base class of all sort of input event. See :ref:`Node._input`. Member Function Description --------------------------- @@ -63,7 +68,7 @@ Member Function Description - :ref:`bool` **action_match** **(** :ref:`InputEvent` event **)** const -Returns true if this input event matches the event passed. +Returns ``true`` if this event matches ``event[event]. .. _class_InputEvent_as_text: @@ -75,47 +80,49 @@ Returns a :ref:`String` representation of the event. - :ref:`int` **get_device** **(** **)** const -Returns the id of the device that generated the event. +Returns the device's id that generated the event. .. _class_InputEvent_get_id: - :ref:`int` **get_id** **(** **)** const -Returns the id of the event. +Returns the event's ID. .. _class_InputEvent_is_action: - :ref:`bool` **is_action** **(** :ref:`String` action **)** const -Returns true if this input event matches a pre-defined action, no matter the type. +Returns ``true`` if this input event matches a pre-defined action of any type. .. _class_InputEvent_is_action_pressed: - :ref:`bool` **is_action_pressed** **(** :ref:`String` action **)** const -Returns true if the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. +Returns ``true`` if the given action is being pressed (and is not an echo event for KEY events). Not relevant for the event types ``MOUSE_MOTION``, ``SCREEN_DRAG`` or ``NONE``. .. _class_InputEvent_is_action_released: - :ref:`bool` **is_action_released** **(** :ref:`String` action **)** const -Returns true if the given action is released (i.e. not pressed). Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. +Returns ``true`` if the given action is released (i.e. not pressed). Not relevant for the event types ``MOUSE_MOTION``, ``SCREEN_DRAG`` or ``NONE``. .. _class_InputEvent_is_action_type: - :ref:`bool` **is_action_type** **(** **)** const +Returns ``true`` if this input event's type is one of the ``InputEvent`` constants. + .. _class_InputEvent_is_echo: - :ref:`bool` **is_echo** **(** **)** const -Returns true if this input event is an echo event (only for events of type KEY, it will return false for other types). +Returns ``true`` if this input event is an echo event (only for events of type KEY). .. _class_InputEvent_is_pressed: - :ref:`bool` **is_pressed** **(** **)** const -Returns true if this input event is pressed. Not relevant for the event types MOUSE_MOTION, SCREEN_DRAG and NONE. +Returns ``true`` if this input event is pressed. Not relevant for the event types ``MOUSE_MOTION``, ``SCREEN_DRAG`` or ``NONE``. .. _class_InputEvent_set_device: diff --git a/classes/class_inputeventaction.rst b/classes/class_inputeventaction.rst index 4fbec9bdb..e509abf34 100644 --- a/classes/class_inputeventaction.rst +++ b/classes/class_inputeventaction.rst @@ -30,8 +30,13 @@ Member Functions Member Variables ---------------- -- :ref:`String` **action** -- :ref:`bool` **pressed** +- :ref:`String` **action** - The action's name. Actions are accessed via this :ref:`String`. +- :ref:`bool` **pressed** - If ``true`` the action's state is pressed. If ``false`` the action's state is released. + +Description +----------- + +Contains a generic action which can be targeted from several type of inputs. Actions can be created from the project settings menu ``Project > Project Settings > Input Map[/Code]. See [method Node._input]. Member Function Description --------------------------- diff --git a/classes/class_inputeventjoypadbutton.rst b/classes/class_inputeventjoypadbutton.rst index c8ad1f4ca..a72f6b9fa 100644 --- a/classes/class_inputeventjoypadbutton.rst +++ b/classes/class_inputeventjoypadbutton.rst @@ -14,7 +14,7 @@ InputEventJoypadButton Brief Description ----------------- -Input event type for joypad button events. +Input event for gamepad buttons. Member Functions ---------------- @@ -34,9 +34,14 @@ Member Functions Member Variables ---------------- -- :ref:`int` **button_index** - Joypad button identifier, one of the JOY_BUTTON_* constants in [@Global Scope]. -- :ref:`bool` **pressed** - Pressed state of the joypad button. -- :ref:`float` **pressure** - Intensity of the button pressure, ranges from 0 to 1.0. +- :ref:`int` **button_index** - Button identifier. One of the ``JOY_BUTTON\_\*`` constants from @global Scope. +- :ref:`bool` **pressed** - If ``true`` the button's state is pressed. If ``false`` the button's state is released. +- :ref:`float` **pressure** - Represents the pressure the user puts on the button with his finger, if the controller supports it. Ranges from ``0`` to ``1``. + +Description +----------- + +Input event type for gamepad buttons. For joysticks see :ref:`InputEventJoypadMotion`. Member Function Description --------------------------- diff --git a/classes/class_inputeventjoypadmotion.rst b/classes/class_inputeventjoypadmotion.rst index 4377354ac..527dd94b7 100644 --- a/classes/class_inputeventjoypadmotion.rst +++ b/classes/class_inputeventjoypadmotion.rst @@ -14,7 +14,7 @@ InputEventJoypadMotion Brief Description ----------------- -Input event type for joypad motion/axis events. +Input event type for gamepad joysticks and other motions. For buttons see :ref:`InputEventJoypadMotion`. Member Functions ---------------- @@ -32,8 +32,13 @@ Member Functions Member Variables ---------------- -- :ref:`int` **axis** - Joypad axis identifier, one of the JOY_AXIS_* constants in [@Global Scope]. -- :ref:`float` **axis_value** - Position of the axis, ranging from -1.0 to 1.0. A value of 0 means that the axis is in its neutral position. +- :ref:`int` **axis** - Axis identifier. Use one of the ``JOY_AXIS\_\*`` constants in @global Scope. +- :ref:`float` **axis_value** - Current position of the joystick on the given axis. The value ranges from ``-1.0`` to ``1.0``. A value of ``0`` means the axis is in its resting position. + +Description +----------- + +Stores information about joystick motions. One ``InputEventJoypadMotion`` represents one axis at a time. Member Function Description --------------------------- diff --git a/classes/class_inputeventkey.rst b/classes/class_inputeventkey.rst index 436f136ea..e2d7f6749 100644 --- a/classes/class_inputeventkey.rst +++ b/classes/class_inputeventkey.rst @@ -38,10 +38,15 @@ Member Functions Member Variables ---------------- -- :ref:`bool` **echo** - Echo state of the key, i.e. whether it's a repeat event or not. -- :ref:`bool` **pressed** - Pressed state of the key. -- :ref:`int` **scancode** - Scancode of the key, one of the KEY_* constants in [@Global Scope]. -- :ref:`int` **unicode** - Unicode identifier of the key (when relevant). +- :ref:`bool` **echo** - If ``true`` the key was already pressed before this event. It means the user is holding the key down. +- :ref:`bool` **pressed** - If ``true`` the key's state is pressed. If ``false`` the key's state is released. +- :ref:`int` **scancode** - Key scancode, one of the ``KEY\_\*`` constants in @global Scope. +- :ref:`int` **unicode** - Key unicode identifier when relevant. + +Description +----------- + +Stores key presses on the keyboard. Supports key presses, key releases and member echo events. Member Function Description --------------------------- diff --git a/classes/class_inputeventmouse.rst b/classes/class_inputeventmouse.rst index 0192acb3a..1937fcfbd 100644 --- a/classes/class_inputeventmouse.rst +++ b/classes/class_inputeventmouse.rst @@ -38,9 +38,14 @@ Member Functions Member Variables ---------------- -- :ref:`int` **button_mask** - Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK_* constants in [@Global Scope]. -- :ref:`Vector2` **global_position** - Global position of the mouse click. -- :ref:`Vector2` **position** - Local position of the mouse click. +- :ref:`int` **button_mask** - Mouse button mask identifier, one of or a bitwise combination of the BUTTON_MASK\_\* constants in :ref:`@Global Scope`. +- :ref:`Vector2` **global_position** - Mouse position relative to the current :ref:`Viewport` when used in :ref:`Control._gui_input`, otherwise is at 0,0. +- :ref:`Vector2` **position** - Mouse local position relative to the :ref:`Viewport`. If used in :ref:`Control._gui_input` the position is relative to the current :ref:`Control` wich is under the mouse. + +Description +----------- + +Stores general mouse events informations. Member Function Description --------------------------- diff --git a/classes/class_inputeventmousebutton.rst b/classes/class_inputeventmousebutton.rst index 8c3d582c2..5efcc3767 100644 --- a/classes/class_inputeventmousebutton.rst +++ b/classes/class_inputeventmousebutton.rst @@ -38,10 +38,15 @@ Member Functions Member Variables ---------------- -- :ref:`int` **button_index** - Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@Global Scope]. -- :ref:`bool` **doubleclick** - Whether the event is a double-click. -- :ref:`float` **factor** -- :ref:`bool` **pressed** - Pressed state of the mouse button. +- :ref:`int` **button_index** - Mouse button identifier, one of the BUTTON\_\* or BUTTON_WHEEL\_\* constants in :ref:`@Global Scope`. +- :ref:`bool` **doubleclick** - If ``true`` the mouse button's state is a double-click. If ``false`` the mouse button's state is released. +- :ref:`float` **factor** - TO TALK in PR, reduz said : i think it's used for apple touch but i don't remember what it does +- :ref:`bool` **pressed** - If ``true`` the mouse button's state is pressed. If ``false`` the mouse button's state is released. + +Description +----------- + +Contains mouse click informations. See :ref:`Node._input`. Member Function Description --------------------------- diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index bd399bd82..0828883ba 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -32,8 +32,13 @@ Member Functions Member Variables ---------------- -- :ref:`Vector2` **relative** - Position of the mouse pointer relative to the previous mouse position. -- :ref:`Vector2` **speed** - Speed of the mouse pointer. +- :ref:`Vector2` **relative** - Mouse position relative to the previous position (position at the last frame). +- :ref:`Vector2` **speed** - Mouse speed. + +Description +----------- + +Contains mouse motion informations. Supports relative, absolute positions and speed. See :ref:`Node._input`. Member Function Description --------------------------- diff --git a/classes/class_inputeventscreendrag.rst b/classes/class_inputeventscreendrag.rst index 5f6e7b35e..504d01072 100644 --- a/classes/class_inputeventscreendrag.rst +++ b/classes/class_inputeventscreendrag.rst @@ -16,6 +16,8 @@ Brief Description Input event type for screen drag events. +(only available on mobile devices) + Member Functions ---------------- @@ -41,9 +43,14 @@ Member Variables ---------------- - :ref:`int` **index** - Drag event index in the case of a multi-drag event. -- :ref:`Vector2` **position** - Position of the drag event. -- :ref:`Vector2` **relative** - Position of the drag event relative to its start position. -- :ref:`Vector2` **speed** - Speed of the drag event. +- :ref:`Vector2` **position** - Drag position. +- :ref:`Vector2` **relative** - Drag position relative to its start position. +- :ref:`Vector2` **speed** - Drag speed. + +Description +----------- + +Contains screen drag informations. See :ref:`Node._input`. Member Function Description --------------------------- diff --git a/classes/class_inputeventscreentouch.rst b/classes/class_inputeventscreentouch.rst index 596c639f0..7d4219725 100644 --- a/classes/class_inputeventscreentouch.rst +++ b/classes/class_inputeventscreentouch.rst @@ -16,6 +16,8 @@ Brief Description Input event type for screen touch events. +(only available on mobile devices) + Member Functions ---------------- @@ -34,9 +36,14 @@ Member Functions Member Variables ---------------- -- :ref:`int` **index** - Touch event index in the case of a multi-touch event. -- :ref:`Vector2` **position** - Position of the touch event. -- :ref:`bool` **pressed** - Pressed state of the touch event. +- :ref:`int` **index** - Touch index in the case of a multi-touch event. One index = one finger. +- :ref:`Vector2` **position** - Touch position. +- :ref:`bool` **pressed** - If ``true`` the touch's state is pressed. If ``false`` the touch's state is released. + +Description +----------- + +Stores multi-touch press/release information. Supports touch press, touch release and member index for multi-touch count and order. Member Function Description --------------------------- diff --git a/classes/class_inputeventwithmodifiers.rst b/classes/class_inputeventwithmodifiers.rst index 100ed7446..8b75beb49 100644 --- a/classes/class_inputeventwithmodifiers.rst +++ b/classes/class_inputeventwithmodifiers.rst @@ -16,7 +16,7 @@ InputEventWithModifiers Brief Description ----------------- -Base class for input events with modifiers. +Base class for keys events with modifiers. Member Functions ---------------- @@ -52,6 +52,11 @@ Member Variables - :ref:`bool` **meta** - State of the Meta modifier. - :ref:`bool` **shift** - State of the Shift modifier. +Description +----------- + +Contains keys events informations with modifiers support like ``SHIFT`` or ``ALT``. See :ref:`Node._input`. + Member Function Description --------------------------- diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index 342731656..63ef838a3 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -14,7 +14,7 @@ InputMap Brief Description ----------------- -Singleton that manages actions. +Singleton that manages :ref:`InputEventAction`. Member Functions ---------------- @@ -41,6 +41,11 @@ Member Functions | void | :ref:`load_from_globals` **(** **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +Manages all :ref:`InputEventAction` which can be created/modified from the project settings menu ``Project > Project Settings > Input Map[/Code] or in code with [method add_action] and [method action_add_event]. See [method Node._input]. + Member Function Description --------------------------- @@ -48,60 +53,60 @@ Member Function Description - void **action_add_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** -Add an :ref:`InputEvent` to an action. This :ref:`InputEvent` will trigger the action. +Adds an :ref:`InputEvent` to an action. This :ref:`InputEvent` will trigger the action. .. _class_InputMap_action_erase_event: - void **action_erase_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** -Remove an :ref:`InputEvent` from an action. +Removes an :ref:`InputEvent` from an action. .. _class_InputMap_action_has_event: - :ref:`bool` **action_has_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** -Whether an action has an :ref:`InputEvent` associated with it. +Returns true if an action has an :ref:`InputEvent` associated with it. .. _class_InputMap_add_action: - void **add_action** **(** :ref:`String` action **)** -Add an (empty) action to the :ref:`InputMap`. An :ref:`InputEvent` can then be added to this action with :ref:`action_add_event`. +Adds an (empty) action to the :ref:`InputMap`. An :ref:`InputEvent` can then be added to this action with :ref:`action_add_event`. .. _class_InputMap_erase_action: - void **erase_action** **(** :ref:`String` action **)** -Remove an action from the :ref:`InputMap`. +Removes an action from the ``InputMap``. .. _class_InputMap_event_is_action: - :ref:`bool` **event_is_action** **(** :ref:`InputEvent` event, :ref:`String` action **)** const -Return whether the given event is part of an existing action. This method ignores keyboard modifiers if the given :ref:`InputEvent` is not pressed (for proper release detection). See :ref:`action_has_event` if you don't want this behavior. +Returns true if the given event is part of an existing action. This method ignores keyboard modifiers if the given :ref:`InputEvent` is not pressed (for proper release detection). See :ref:`action_has_event` if you don't want this behavior. .. _class_InputMap_get_action_list: - :ref:`Array` **get_action_list** **(** :ref:`String` action **)** -Return an array of InputEvents associated with a given action. +Returns an array of :ref:`InputEvent`\ s associated with a given action. .. _class_InputMap_get_actions: - :ref:`Array` **get_actions** **(** **)** -Return an array of all actions in the :ref:`InputMap`. +Returns an array of all actions in the ``InputMap``. .. _class_InputMap_has_action: - :ref:`bool` **has_action** **(** :ref:`String` action **)** const -Whether this InputMap has a registered action with the given name. +Returns ``true`` if the ``InputMap`` has a registered action with the given name. .. _class_InputMap_load_from_globals: - void **load_from_globals** **(** **)** -Clear the :ref:`InputMap` and load it anew from :ref:`ProjectSettings`. +Clears all :ref:`InputEventAction` in the ``InputMap`` and load it anew from :ref:`ProjectSettings`. diff --git a/classes/class_joint.rst b/classes/class_joint.rst index 92659bab0..c519e6540 100644 --- a/classes/class_joint.rst +++ b/classes/class_joint.rst @@ -16,7 +16,7 @@ Joint Brief Description ----------------- - +Base class for all 3D joints Member Functions ---------------- @@ -42,10 +42,15 @@ Member Functions Member Variables ---------------- -- :ref:`bool` **collision/exclude_nodes** -- :ref:`NodePath` **nodes/node_a** -- :ref:`NodePath` **nodes/node_b** -- :ref:`int` **solver/priority** +- :ref:`bool` **collision/exclude_nodes** - If ``true`` the two bodies of the nodes are not able to collide with each other. +- :ref:`NodePath` **nodes/node_a** - The :ref:`Node`, the first side of the Joint attaches to. +- :ref:`NodePath` **nodes/node_b** - The :ref:`Node`, the second side of the Joint attaches to. +- :ref:`int` **solver/priority** - The order in wich the solver is executed compared to the other Joints, the lower, the earlier. + +Description +----------- + +All 3D joints link two nodes, has a priority, and can decide if the two bodies of the nodes should be able to collide with each other Member Function Description --------------------------- diff --git a/classes/class_jsonparseresult.rst b/classes/class_jsonparseresult.rst index fe83301b5..de6632c1c 100644 --- a/classes/class_jsonparseresult.rst +++ b/classes/class_jsonparseresult.rst @@ -40,18 +40,20 @@ Member Functions Member Variables ---------------- -- :ref:`int` **error** - The error type if JSON source was not successfully parsed. See [@Global Scope]ERR_* constants. +- :ref:`int` **error** - The error type if JSON source was not successfully parsed. See :ref:`@Global Scope`\ ERR\_\* constants. - :ref:`int` **error_line** - The line number where the error occurred if JSON source was not successfully parsed. -- :ref:`String` **error_string** - The error message if JSON source was not successfully parsed. See [@Global Scope]ERR_* constants. -- :ref:`Variant` **result** - A [Variant] containing the parsed JSON. Use typeof() to check if it is what you expect. For example, if JSON source starts with braces [code]{}[/code] a [Dictionary] will be returned, if JSON source starts with array braces [code][][/code] an [Array] will be returned. - [i]Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types.[/i] - [codeblock] - p = JSON.parse('["hello", "world", "!"]') - if typeof(p) == TYPE_ARRAY: - print(p[0]) # prints 'hello' - else: - print("unexpected results") - [/codeblock] +- :ref:`String` **error_string** - The error message if JSON source was not successfully parsed. See :ref:`@Global Scope`\ ERR\_\* constants. +- :ref:`Variant` **result** - A :ref:`Variant` containing the parsed JSON. Use typeof() to check if it is what you expect. For example, if JSON source starts with braces ``{}`` a :ref:`Dictionary` will be returned, if JSON source starts with array braces ``[]`` an :ref:`Array` will be returned. + +*Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types.* + +:: + + p = JSON.parse('["hello", "world", "!"]') + if typeof(p) == TYPE_ARRAY: + print(p[0]) # prints 'hello' + else: + print("unexpected results") Description ----------- diff --git a/classes/class_kinematiccollision.rst b/classes/class_kinematiccollision.rst index 84377bceb..52736cfba 100644 --- a/classes/class_kinematiccollision.rst +++ b/classes/class_kinematiccollision.rst @@ -47,10 +47,10 @@ Member Variables ---------------- - :ref:`Object` **collider** - The colliding body. -- :ref:`int` **collider_id** - The colliding body's unique [RID]. -- :ref:`Variant` **collider_metadata** - The colliding body's metadata. See [Object]. +- :ref:`int` **collider_id** - The colliding body's unique :ref:`RID`. +- :ref:`Variant` **collider_metadata** - The colliding body's metadata. See :ref:`Object`. - :ref:`Object` **collider_shape** - The colliding body's shape. -- :ref:`int` **collider_shape_index** - The colliding shape's index. See [CollisionObject]. +- :ref:`int` **collider_shape_index** - The colliding shape's index. See :ref:`CollisionObject`. - :ref:`Vector3` **collider_velocity** - The colliding object's velocity. - :ref:`Object` **local_shape** - The moving object's colliding shape. - :ref:`Vector3` **normal** - The colliding body's shape's normal at the point of collision. diff --git a/classes/class_kinematiccollision2d.rst b/classes/class_kinematiccollision2d.rst index 1b5ce1352..61459318f 100644 --- a/classes/class_kinematiccollision2d.rst +++ b/classes/class_kinematiccollision2d.rst @@ -47,10 +47,10 @@ Member Variables ---------------- - :ref:`Object` **collider** - The colliding body. -- :ref:`int` **collider_id** - The colliding body's unique [RID]. -- :ref:`Variant` **collider_metadata** - The colliding body's metadata. See [Object]. +- :ref:`int` **collider_id** - The colliding body's unique :ref:`RID`. +- :ref:`Variant` **collider_metadata** - The colliding body's metadata. See :ref:`Object`. - :ref:`Object` **collider_shape** - The colliding body's shape. -- :ref:`int` **collider_shape_index** - The colliding shape's index. See [CollisionObject2D]. +- :ref:`int` **collider_shape_index** - The colliding shape's index. See :ref:`CollisionObject2D`. - :ref:`Vector2` **collider_velocity** - The colliding object's velocity. - :ref:`Object` **local_shape** - The moving object's colliding shape. - :ref:`Vector2` **normal** - The colliding body's shape's normal at the point of collision. diff --git a/classes/class_label.rst b/classes/class_label.rst index c73489fe1..5c04d47d4 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -72,15 +72,15 @@ Member Functions Member Variables ---------------- -- :ref:`int` **align** - Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [code]ALIGN_*[/code] constants. -- :ref:`bool` **autowrap** - If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. Default: false. -- :ref:`bool` **clip_text** - If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely. -- :ref:`int` **lines_skipped** - The node ignores the first [code]lines_skipped[/code] lines before it starts to display text. +- :ref:`int` **align** - Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the ``ALIGN\_\*`` constants. +- :ref:`bool` **autowrap** - If ``true``, wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. Default: false. +- :ref:`bool` **clip_text** - If ``true``, the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely. +- :ref:`int` **lines_skipped** - The node ignores the first ``lines_skipped`` lines before it starts to display text. - :ref:`int` **max_lines_visible** - Limits the lines of text the node shows on screen. -- :ref:`float` **percent_visible** - Limits the count of visible characters. If you set [code]percent_visible[/code] to 50, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box. +- :ref:`float` **percent_visible** - Limits the count of visible characters. If you set ``percent_visible`` to 50, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box. - :ref:`String` **text** - The text to display on screen. -- :ref:`bool` **uppercase** - If [code]true[/code], all the text displays as UPPERCASE. -- :ref:`int` **valign** - Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants. +- :ref:`bool` **uppercase** - If ``true``, all the text displays as UPPERCASE. +- :ref:`int` **valign** - Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the ``VALIGN\_\*`` constants. Numeric Constants ----------------- diff --git a/classes/class_largetexture.rst b/classes/class_largetexture.rst index aec038d59..3a403e1ba 100644 --- a/classes/class_largetexture.rst +++ b/classes/class_largetexture.rst @@ -40,10 +40,13 @@ Member Functions Member Variables ---------------- -- :ref:`Array` **_data** - Returns an [Array] with offsets and textures data of each added piece. Schema is [offsets1, texture1, offsets2, texture2, large_texture_size]. - [code]offsets[/code] : [Vector2] offsets of the texture piece. - [code]second[/code] : [StreamTexture] data of the texture piece. - [code]last entry[/code] : [Vector2] size of the entire large texture. +- :ref:`Array` **_data** - Returns an :ref:`Array` with offsets and textures data of each added piece. Schema is offsets1, texture1, offsets2, texture2, large_texture_size. + +``offsets`` : :ref:`Vector2` offsets of the texture piece. + +``second`` : :ref:`StreamTexture` data of the texture piece. + +``last entry`` : :ref:`Vector2` size of the entire large texture. Description ----------- diff --git a/classes/class_light2d.rst b/classes/class_light2d.rst index 2cc960b00..87c81d952 100644 --- a/classes/class_light2d.rst +++ b/classes/class_light2d.rst @@ -108,27 +108,27 @@ Member Functions Member Variables ---------------- -- :ref:`Color` **color** - The Light2D's [Color]. -- :ref:`bool` **editor_only** - If [code]true[/code] Light2D will only appear when editing the scene. Default value: [code]false[/code]. -- :ref:`bool` **enabled** - If [code]true[/code] Light2D will emit light. Default value: [code]true[/code]. +- :ref:`Color` **color** - The Light2D's :ref:`Color`. +- :ref:`bool` **editor_only** - If ``true`` Light2D will only appear when editing the scene. Default value: ``false``. +- :ref:`bool` **enabled** - If ``true`` Light2D will emit light. Default value: ``true``. - :ref:`float` **energy** - The Light2D's energy value. The larger the value, the stronger the light. -- :ref:`int` **mode** - The Light2D's mode. See MODE_* constants for values. -- :ref:`Vector2` **offset** - The offset of the Light2D's [code]texture[/code]. +- :ref:`int` **mode** - The Light2D's mode. See MODE\_\* constants for values. +- :ref:`Vector2` **offset** - The offset of the Light2D's ``texture``. - :ref:`float` **range_height** - The height of the Light2D. Used with 2D normal mapping. - :ref:`int` **range_item_cull_mask** - The layer mask. Only objects with a matching mask will be affected by the Light2D. -- :ref:`int` **range_layer_max** - Maximum layer value of objects that are affected by the Light2D. Default value: [code]0[/code]. -- :ref:`int` **range_layer_min** - Minimum layer value of objects that are affected by the Light2D. Default value: [code]0[/code]. -- :ref:`int` **range_z_max** - Maximum [code]Z[/code] value of objects that are affected by the Light2D. Default value: [code]1024[/code]. -- :ref:`int` **range_z_min** - Minimum [code]z[/code] value of objects that are affected by the Light2D. Default value: [code]-1024[/code]. -- :ref:`int` **shadow_buffer_size** - Shadow buffer size. Default value: [code]2048[/code]. -- :ref:`Color` **shadow_color** - [Color] of shadows cast by the Light2D. -- :ref:`bool` **shadow_enabled** - If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code]. -- :ref:`int` **shadow_filter** - Shadow filter type. Use SHADOW_FILTER_* constants to set [code]shadow_filter[/code]. Default value: [code]None[/code]. +- :ref:`int` **range_layer_max** - Maximum layer value of objects that are affected by the Light2D. Default value: ``0``. +- :ref:`int` **range_layer_min** - Minimum layer value of objects that are affected by the Light2D. Default value: ``0``. +- :ref:`int` **range_z_max** - Maximum ``Z`` value of objects that are affected by the Light2D. Default value: ``1024``. +- :ref:`int` **range_z_min** - Minimum ``z`` value of objects that are affected by the Light2D. Default value: ``-1024``. +- :ref:`int` **shadow_buffer_size** - Shadow buffer size. Default value: ``2048``. +- :ref:`Color` **shadow_color** - :ref:`Color` of shadows cast by the Light2D. +- :ref:`bool` **shadow_enabled** - If ``true`` the Light2D will cast shadows. Default value: ``false``. +- :ref:`int` **shadow_filter** - Shadow filter type. Use SHADOW_FILTER\_\* constants to set ``shadow_filter``. Default value: ``None``. - :ref:`float` **shadow_filter_smooth** - Smoothing value for shadows. - :ref:`float` **shadow_gradient_length** - Smooth shadow gradient length. -- :ref:`int` **shadow_item_cull_mask** - The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching shadow mask will cast shadows. -- :ref:`Texture` **texture** - [Texture] used for the Light2D's appearance. -- :ref:`float` **texture_scale** - The [code]texture[/code]'s scale factor. +- :ref:`int` **shadow_item_cull_mask** - The shadow mask. Used with :ref:`LightOccluder2D` to cast shadows. Only occluders with a matching shadow mask will cast shadows. +- :ref:`Texture` **texture** - :ref:`Texture` used for the Light2D's appearance. +- :ref:`float` **texture_scale** - The ``texture``'s scale factor. Numeric Constants ----------------- diff --git a/classes/class_lightoccluder2d.rst b/classes/class_lightoccluder2d.rst index ffe99a277..e08a19dd9 100644 --- a/classes/class_lightoccluder2d.rst +++ b/classes/class_lightoccluder2d.rst @@ -33,7 +33,7 @@ Member Variables ---------------- - :ref:`int` **light_mask** - The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s). -- :ref:`OccluderPolygon2D` **occluder** - The [OccluderPolygon2D] used to compute the shadow. +- :ref:`OccluderPolygon2D` **occluder** - The :ref:`OccluderPolygon2D` used to compute the shadow. Description ----------- diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index 3d5991076..e05a06edc 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -78,16 +78,16 @@ Member Functions Member Variables ---------------- -- :ref:`int` **begin_cap_mode** - Controls the style of the line's first point. Use [code]LINE_CAP_*[/code] constants. Default value: [code]LINE_CAP_NONE[/code]. +- :ref:`int` **begin_cap_mode** - Controls the style of the line's first point. Use ``LINE_CAP\_\*`` constants. Default value: ``LINE_CAP_NONE``. - :ref:`Color` **default_color** - The line's color. Will not be used if a gradient is set. -- :ref:`int` **end_cap_mode** - Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants. Default value: [code]LINE_CAP_NONE[/code]. +- :ref:`int` **end_cap_mode** - Controls the style of the line's last point. Use ``LINE_CAP\_\*`` constants. Default value: ``LINE_CAP_NONE``. - :ref:`Gradient` **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. - :ref:`int` **joint_mode** - The style for the points inbetween the start and the end. - :ref:`PoolVector2Array` **points** - The points that form the lines. The line is drawn between every point set in this array. - :ref:`int` **round_precision** - The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round. -- :ref:`float` **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]. -- :ref:`Texture` **texture** - The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style. -- :ref:`int` **texture_mode** - The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants. Default value: [code]LINE_TEXTURE_NONE[/code]. +- :ref:`float` **sharp_limit** - The direction difference in radians between vector points. This value is only used if ``joint mode`` is set to ``LINE_JOINT_SHARP``. +- :ref:`Texture` **texture** - The texture used for the line's texture. Uses ``texture_mode`` for drawing style. +- :ref:`int` **texture_mode** - The style to render the ``texture`` on the line. Use ``LINE_TEXTURE\_\*`` constants. Default value: ``LINE_TEXTURE_NONE``. - :ref:`float` **width** - The line's width. Numeric Constants diff --git a/classes/class_meshinstance.rst b/classes/class_meshinstance.rst index f8d3fd194..b93a7c29f 100644 --- a/classes/class_meshinstance.rst +++ b/classes/class_meshinstance.rst @@ -42,8 +42,8 @@ Member Functions Member Variables ---------------- -- :ref:`Mesh` **mesh** - The [Mesh] resource for the instance. -- :ref:`NodePath` **skeleton** - [NodePath] to the [Skeleton] associated with the instance. +- :ref:`Mesh` **mesh** - The :ref:`Mesh` resource for the instance. +- :ref:`NodePath` **skeleton** - :ref:`NodePath` to the :ref:`Skeleton` associated with the instance. Description ----------- diff --git a/classes/class_ninepatchrect.rst b/classes/class_ninepatchrect.rst index cf6abfd97..8f9d34bd1 100644 --- a/classes/class_ninepatchrect.rst +++ b/classes/class_ninepatchrect.rst @@ -58,7 +58,7 @@ Member Variables - :ref:`int` **axis_stretch_horizontal** - Doesn't do anything at the time of writing. - :ref:`int` **axis_stretch_vertical** - Doesn't do anything at the time of writing. -- :ref:`bool` **draw_center** - If [code]true[/code], draw the panel's center. Else, only draw the 9-slice's borders. Default value: [code]true[/code] +- :ref:`bool` **draw_center** - If ``true``, draw the panel's center. Else, only draw the 9-slice's borders. Default value: ``true`` - :ref:`int` **patch_margin_bottom** - The height of the 9-slice'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. - :ref:`int` **patch_margin_left** - The height of the 9-slice's left column. - :ref:`int` **patch_margin_right** - The height of the 9-slice's right column. diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index d9cac7fae..dc705e61c 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -98,12 +98,12 @@ Member Variables - :ref:`float` **global_rotation** - Global rotation in radians. - :ref:`float` **global_rotation_deg** - Global rotation in degrees. - :ref:`Vector2` **global_scale** - Global scale. -- :ref:`Transform2D` **global_transform** - Global [Transform2D]. +- :ref:`Transform2D` **global_transform** - Global :ref:`Transform2D`. - :ref:`Vector2` **position** - Position, relative to the node's parent. - :ref:`float` **rotation** - Rotation in radians. - :ref:`float` **rotation_deg** - Rotation in degrees. - :ref:`Vector2` **scale** - Rotation in degrees. -- :ref:`Transform2D` **transform** - Local [Transform2D]. +- :ref:`Transform2D` **transform** - Local :ref:`Transform2D`. - :ref:`int` **z** - Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others. - :ref:`bool` **z_as_relative** - Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. diff --git a/classes/class_particles.rst b/classes/class_particles.rst index 3c2139a02..bd50f8050 100644 --- a/classes/class_particles.rst +++ b/classes/class_particles.rst @@ -93,23 +93,23 @@ Member Variables ---------------- - :ref:`int` **amount** - Number of particles to emit. -- :ref:`int` **draw_order** - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [code]DRAW_ORDER_INDEX[/code]. +- :ref:`int` **draw_order** - Particle draw order. Uses ``DRAW_ORDER\_\*`` values. Default value: ``DRAW_ORDER_INDEX``. - :ref:`Mesh` **draw_pass_1** - :ref:`Mesh` **draw_pass_2** - :ref:`Mesh` **draw_pass_3** - :ref:`Mesh` **draw_pass_4** - :ref:`int` **draw_passes** -- :ref:`bool` **emitting** - If [code]true[/code] particles are being emitted. Default value: [code]true[/code]. -- :ref:`float` **explosiveness** - 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]. +- :ref:`bool` **emitting** - If ``true`` particles are being emitted. Default value: ``true``. +- :ref:`float` **explosiveness** - Time ratio between each emission. If ``0`` particles are emitted continuously. If ``1`` all particles are emitted simultaneously. Default value: ``0``. - :ref:`int` **fixed_fps** - :ref:`bool` **fract_delta** -- :ref:`float` **lifetime** - Amount of time each particle will exist. Default value: [code]1[/code]. -- :ref:`bool` **local_coords** - 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]. -- :ref:`bool` **one_shot** - If [code]true[/code] only [code]amount[/code] particles will be emitted. Default value: [code]false[/code]. +- :ref:`float` **lifetime** - Amount of time each particle will exist. Default value: ``1``. +- :ref:`bool` **local_coords** - If ``true`` particles use the parent node's coordinate space. If ``false`` they use global coordinates. Default value: ``true``. +- :ref:`bool` **one_shot** - If ``true`` only ``amount`` particles will be emitted. Default value: ``false``. - :ref:`float` **preprocess** -- :ref:`Material` **process_material** - [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. -- :ref:`float` **randomness** - Emission randomness ratio. Default value: [code]0[/code]. -- :ref:`float` **speed_scale** - Speed scaling ratio. Default value: [code]1[/code]. +- :ref:`Material` **process_material** - :ref:`Material` for processing particles. Can be a :ref:`ParticlesMaterial` or a :ref:`ShaderMaterial`. +- :ref:`float` **randomness** - Emission randomness ratio. Default value: ``0``. +- :ref:`float` **speed_scale** - Speed scaling ratio. Default value: ``1``. - :ref:`Rect3` **visibility_aabb** Numeric Constants diff --git a/classes/class_particles2d.rst b/classes/class_particles2d.rst index a28b56695..9a6edf31a 100644 --- a/classes/class_particles2d.rst +++ b/classes/class_particles2d.rst @@ -100,24 +100,24 @@ Member Functions Member Variables ---------------- -- :ref:`int` **amount** - Number of particles to emit. -- :ref:`int` **draw_order** - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [code]DRAW_ORDER_INDEX[/code]. -- :ref:`bool` **emitting** - If [code]true[/code] particles are being emitted. Default value: [code]true[/code]. -- :ref:`float` **explosiveness** - 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]. +- :ref:`int` **amount** - Number of particles emitted in one emission cycle. +- :ref:`int` **draw_order** - Particle draw order. Uses ``DRAW_ORDER\_\*`` values. Default value: ``DRAW_ORDER_INDEX``. +- :ref:`bool` **emitting** - If ``true`` particles are being emitted. Default value: ``true``. +- :ref:`float` **explosiveness** - How rapidly particles in an emission cycle are emitted. If greater than ``0``, there will be a gap in emissions before the next cycle begins. Default value: ``0``. - :ref:`int` **fixed_fps** - :ref:`bool` **fract_delta** -- :ref:`int` **h_frames** - Number of horizontal frames in [code]texture[/code]. -- :ref:`float` **lifetime** - Amount of time each particle will exist. Default value: [code]1[/code]. -- :ref:`bool` **local_coords** - 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]. +- :ref:`int` **h_frames** - Number of horizontal frames in ``texture``. +- :ref:`float` **lifetime** - Amount of time each particle will exist. Default value: ``1``. +- :ref:`bool` **local_coords** - If ``true`` particles use the parent node's coordinate space. If ``false`` they use global coordinates. Default value: ``true``. - :ref:`Texture` **normal_map** -- :ref:`bool` **one_shot** - If [code]true[/code] only [code]amount[/code] particles will be emitted. Default value: [code]false[/code]. -- :ref:`float` **preprocess** -- :ref:`Material` **process_material** - [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. -- :ref:`float` **randomness** - Emission randomness ratio. Default value: [code]0[/code]. -- :ref:`float` **speed_scale** - Speed scaling ratio. Default value: [code]1[/code]. -- :ref:`Texture` **texture** - Particle texture. If [code]null[/code] particles will be squares. -- :ref:`int` **v_frames** - Number of vertical frames in [code]texture[/code]. -- :ref:`Rect2` **visibility_rect** +- :ref:`bool` **one_shot** - If ``true`` only one emission cycle occurs. If set ``true`` during a cycle, emission will stop at the cycle's end. Default value: ``false``. +- :ref:`float` **preprocess** - Particle system starts as if it had already run for this many seconds. +- :ref:`Material` **process_material** - :ref:`Material` for processing particles. Can be a :ref:`ParticlesMaterial` or a :ref:`ShaderMaterial`. +- :ref:`float` **randomness** - Emission lifetime randomness ratio. Default value: ``0``. +- :ref:`float` **speed_scale** - Particle system's running speed scaling ratio. Default value: ``1``. +- :ref:`Texture` **texture** - Particle texture. If ``null`` particles will be squares. +- :ref:`int` **v_frames** - Number of vertical frames in ``texture``. +- :ref:`Rect2` **visibility_rect** - Editor visibility helper. Numeric Constants ----------------- diff --git a/classes/class_particlesmaterial.rst b/classes/class_particlesmaterial.rst index 2e6834bbc..0e7c73b7a 100644 --- a/classes/class_particlesmaterial.rst +++ b/classes/class_particlesmaterial.rst @@ -101,59 +101,59 @@ Member Variables ---------------- - :ref:`float` **angle** - Initial rotation applied to each particle. -- :ref:`Texture` **angle_curve** - Each particle's rotation will be animated along this [CurveTexture]. -- :ref:`float` **angle_random** - Rotation randomness ratio. Default value: [code]0[/code]. +- :ref:`Texture` **angle_curve** - Each particle's rotation will be animated along this :ref:`CurveTexture`. +- :ref:`float` **angle_random** - Rotation randomness ratio. Default value: ``0``. - :ref:`float` **angular_velocity** - Initial angular velocity applied to each particle. -- :ref:`Texture` **angular_velocity_curve** - Each particle's angular velocity will vary along this [CurveTexture]. -- :ref:`float` **angular_velocity_random** - Angular velocity randomness ratio. Default value: [code]0[/code]. -- :ref:`bool` **anim_loop** - If [code]true[/code] animation will loop. Default value: [code]false[/code]. +- :ref:`Texture` **angular_velocity_curve** - Each particle's angular velocity will vary along this :ref:`CurveTexture`. +- :ref:`float` **angular_velocity_random** - Angular velocity randomness ratio. Default value: ``0``. +- :ref:`bool` **anim_loop** - If ``true`` animation will loop. Default value: ``false``. - :ref:`float` **anim_offset** - Particle animation offset. -- :ref:`Texture` **anim_offset_curve** - Each particle's animation offset will vary along this [CurveTexture]. -- :ref:`float` **anim_offset_random** - Animation offset randomness ratio. Default value: [code]0[/code]. +- :ref:`Texture` **anim_offset_curve** - Each particle's animation offset will vary along this :ref:`CurveTexture`. +- :ref:`float` **anim_offset_random** - Animation offset randomness ratio. Default value: ``0``. - :ref:`float` **anim_speed** - Particle animation speed. -- :ref:`Texture` **anim_speed_curve** - Each particle's animation speed will vary along this [CurveTexture]. -- :ref:`float` **anim_speed_random** - Animation speed randomness ratio. Default value: [code]0[/code]. -- :ref:`Color` **color** - Each particle's initial color. If the [Particle2D]'s [code]texture[/code] is defined, it will be multiplied by this color. -- :ref:`Texture` **color_ramp** - Each particle's color will vary along this [GradientTexture]. +- :ref:`Texture` **anim_speed_curve** - Each particle's animation speed will vary along this :ref:`CurveTexture`. +- :ref:`float` **anim_speed_random** - Animation speed randomness ratio. Default value: ``0``. +- :ref:`Color` **color** - Each particle's initial color. If the Particle2D's ``texture`` is defined, it will be multiplied by this color. +- :ref:`Texture` **color_ramp** - Each particle's color will vary along this :ref:`GradientTexture`. - :ref:`float` **damping** - The rate at which particles lose velocity. -- :ref:`Texture` **damping_curve** - Damping will vary along this [CurveTexture]. -- :ref:`float` **damping_random** - Damping randomness ratio. Default value: [code]0[/code]. -- :ref:`Vector3` **emission_box_extents** - The box's extents if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_BOX[/code]. +- :ref:`Texture` **damping_curve** - Damping will vary along this :ref:`CurveTexture`. +- :ref:`float` **damping_random** - Damping randomness ratio. Default value: ``0``. +- :ref:`Vector3` **emission_box_extents** - The box's extents if ``emission_shape`` is set to ``EMISSION_SHAPE_BOX``. - :ref:`Texture` **emission_color_texture** - :ref:`Texture` **emission_normal_texture** -- :ref:`int` **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]. +- :ref:`int` **emission_point_count** - The number of emission points if ``emission_shape`` is set to ``EMISSION_SHAPE_POINTS`` or ``EMISSION_SHAPE_DIRECTED_POINTS``. - :ref:`Texture` **emission_point_texture** -- :ref:`int` **emission_shape** - Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values. Default value: [code]EMISSION_SHAPE_POINT[/code]. -- :ref:`float` **emission_sphere_radius** - The sphere's radius if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_SPHERE[/code]. +- :ref:`int` **emission_shape** - Particles will be emitted inside this region. Use ``EMISSION_SHAPE\_\*`` constants for values. Default value: ``EMISSION_SHAPE_POINT``. +- :ref:`float` **emission_sphere_radius** - The sphere's radius if ``emission_shape`` is set to ``EMISSION_SHAPE_SPHERE``. - :ref:`bool` **flag_align_y** -- :ref:`bool` **flag_disable_z** - If [code]true[/code] particles will not move on the z axis. Default value: [code]true[/code] for [Particles2D], [code]false[/code] for [Particles]. +- :ref:`bool` **flag_disable_z** - If ``true`` particles will not move on the z axis. Default value: ``true`` for :ref:`Particles2D`, ``false`` for :ref:`Particles`. - :ref:`bool` **flag_rotate_y** - :ref:`float` **flatness** -- :ref:`Vector3` **gravity** - Gravity applied to every particle. Default value: [code](0, 98, 0)[/code]. +- :ref:`Vector3` **gravity** - Gravity applied to every particle. Default value: ``(0, 98, 0)``. - :ref:`float` **hue_variation** - Initial hue variation applied to each particle. -- :ref:`Texture` **hue_variation_curve** - Each particle's hue will vary along this [CurveTexture]. -- :ref:`float` **hue_variation_random** - Hue variation randomness ratio. Default value: [code]0[/code]. +- :ref:`Texture` **hue_variation_curve** - Each particle's hue will vary along this :ref:`CurveTexture`. +- :ref:`float` **hue_variation_random** - Hue variation randomness ratio. Default value: ``0``. - :ref:`float` **initial_velocity** - Initial velocity for each particle. -- :ref:`float` **initial_velocity_random** - Initial velocity randomness ratio. Default value: [code]0[/code]. +- :ref:`float` **initial_velocity_random** - Initial velocity randomness ratio. Default value: ``0``. - :ref:`float` **linear_accel** - Linear acceleration applied to each particle. -- :ref:`Texture` **linear_accel_curve** - Each particle's linear acceleration will vary along this [CurveTexture]. -- :ref:`float` **linear_accel_random** - Linear acceleration randomness ratio. Default value: [code]0[/code]. +- :ref:`Texture` **linear_accel_curve** - Each particle's linear acceleration will vary along this :ref:`CurveTexture`. +- :ref:`float` **linear_accel_random** - Linear acceleration randomness ratio. Default value: ``0``. - :ref:`float` **orbit_velocity** - Orbital velocity applied to each particle. -- :ref:`Texture` **orbit_velocity_curve** - Each particle's orbital velocity will vary along this [CurveTexture]. -- :ref:`float` **orbit_velocity_random** - Orbital velocity randomness ratio. Default value: [code]0[/code]. +- :ref:`Texture` **orbit_velocity_curve** - Each particle's orbital velocity will vary along this :ref:`CurveTexture`. +- :ref:`float` **orbit_velocity_random** - Orbital velocity randomness ratio. Default value: ``0``. - :ref:`float` **radial_accel** - Linear acceleration applied to each particle. -- :ref:`Texture` **radial_accel_curve** - Each particle's radial acceleration will vary along this [CurveTexture]. -- :ref:`float` **radial_accel_random** - Radial acceleration randomness ratio. Default value: [code]0[/code]. +- :ref:`Texture` **radial_accel_curve** - Each particle's radial acceleration will vary along this :ref:`CurveTexture`. +- :ref:`float` **radial_accel_random** - Radial acceleration randomness ratio. Default value: ``0``. - :ref:`float` **scale** - Initial scale applied to each particle. -- :ref:`Texture` **scale_curve** - Each particle's scale will vary along this [CurveTexture]. -- :ref:`float` **scale_random** - Scale randomness ratio. Default value: [code]0[/code]. -- :ref:`float` **spread** - Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. +- :ref:`Texture` **scale_curve** - Each particle's scale will vary along this :ref:`CurveTexture`. +- :ref:`float` **scale_random** - Scale randomness ratio. Default value: ``0``. +- :ref:`float` **spread** - Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. Default value: ``45``. - :ref:`float` **tangential_accel** - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity. -- :ref:`Texture` **tangential_accel_curve** - Each particle's tangential acceleration will vary along this [CurveTexture]. -- :ref:`float` **tangential_accel_random** - Tangential acceleration randomness ratio. Default value: [code]0[/code]. -- :ref:`GradientTexture` **trail_color_modifier** - Trail particles' color will vary along this [GradientTexture]. -- :ref:`int` **trail_divisor** - Emitter will emit [code]amount[/code] divided by [code]trail_divisor[/code] particles. The remaining particles will be used as trail(s). -- :ref:`CurveTexture` **trail_size_modifier** - Trail particles' size will vary along this [CurveTexture]. +- :ref:`Texture` **tangential_accel_curve** - Each particle's tangential acceleration will vary along this :ref:`CurveTexture`. +- :ref:`float` **tangential_accel_random** - Tangential acceleration randomness ratio. Default value: ``0``. +- :ref:`GradientTexture` **trail_color_modifier** - Trail particles' color will vary along this :ref:`GradientTexture`. +- :ref:`int` **trail_divisor** - Emitter will emit ``amount`` divided by ``trail_divisor`` particles. The remaining particles will be used as trail(s). +- :ref:`CurveTexture` **trail_size_modifier** - Trail particles' size will vary along this :ref:`CurveTexture`. Numeric Constants ----------------- diff --git a/classes/class_physics2dserver.rst b/classes/class_physics2dserver.rst index 95f13c70a..150d4e616 100644 --- a/classes/class_physics2dserver.rst +++ b/classes/class_physics2dserver.rst @@ -199,8 +199,8 @@ Numeric Constants - **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = **0** --- Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. - **SPACE_PARAM_CONTACT_MAX_SEPARATION** = **1** --- Constant to set/get the maximum distance a shape can be from another before they are considered separated. - **SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION** = **2** --- Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. -- **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = **3** -- **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = **4** +- **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = **3** --- Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. +- **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = **4** --- Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. - **SPACE_PARAM_BODY_TIME_TO_SLEEP** = **5** --- Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. - **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = **6** --- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. - **SHAPE_LINE** = **0** --- This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks. @@ -208,7 +208,7 @@ Numeric Constants - **SHAPE_CIRCLE** = **3** --- This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. - **SHAPE_RECTANGLE** = **4** --- This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. - **SHAPE_CAPSULE** = **5** --- This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. -- **SHAPE_CONVEX_POLYGON** = **6** --- This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the method :ref:`CollisionPolygon2D.set_polygon`, polygons modified with :ref:`shape_set_data` do not verify that the points supplied form, in fact, a convex polygon. +- **SHAPE_CONVEX_POLYGON** = **6** --- This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the method :ref:`CollisionPolygon2D.set_polygon`, polygons modified with :ref:`shape_set_data` do not verify that the points supplied form is a convex polygon. - **SHAPE_CONCAVE_POLYGON** = **7** --- This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. - **SHAPE_CUSTOM** = **8** --- This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. - **AREA_PARAM_GRAVITY** = **0** --- Constant to set/get gravity strength in an area. @@ -268,97 +268,97 @@ Member Function Description - void **area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform=Transform2D( 1, 0, 0, 1, 0, 0 ) **)** -Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. +Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. .. _class_Physics2DServer_area_attach_object_instance_id: - void **area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** -Assign the area to a descendant of :ref:`Object`, so it can exist in the node tree. +Assigns the area to a descendant of :ref:`Object`, so it can exist in the node tree. .. _class_Physics2DServer_area_clear_shapes: - void **area_clear_shapes** **(** :ref:`RID` area **)** -Remove all shapes from an area. It does not delete the shapes, so they can be reassigned later. +Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. .. _class_Physics2DServer_area_create: - :ref:`RID` **area_create** **(** **)** -Create an :ref:`Area2D`. +Creates an :ref:`Area2D`. .. _class_Physics2DServer_area_get_object_instance_id: - :ref:`int` **area_get_object_instance_id** **(** :ref:`RID` area **)** const -Get the instance ID of the object the area is assigned to. +Gets the instance ID of the object the area is assigned to. .. _class_Physics2DServer_area_get_param: - :ref:`Variant` **area_get_param** **(** :ref:`RID` area, :ref:`int` param **)** const -Return an area parameter value. +Returns an area parameter value. A list of available parameters is on the AREA_PARAM\_\* constants. .. _class_Physics2DServer_area_get_shape: - :ref:`RID` **area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** const -Return the :ref:`RID` of the nth shape of an area. +Returns the :ref:`RID` of the nth shape of an area. .. _class_Physics2DServer_area_get_shape_count: - :ref:`int` **area_get_shape_count** **(** :ref:`RID` area **)** const -Return the number of shapes assigned to an area. +Returns the number of shapes assigned to an area. .. _class_Physics2DServer_area_get_shape_transform: - :ref:`Transform2D` **area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** const -Return the transform matrix of a shape within an area. +Returns the transform matrix of a shape within an area. .. _class_Physics2DServer_area_get_space: - :ref:`RID` **area_get_space** **(** :ref:`RID` area **)** const -Return the space assigned to the area. +Returns the space assigned to the area. .. _class_Physics2DServer_area_get_space_override_mode: - :ref:`int` **area_get_space_override_mode** **(** :ref:`RID` area **)** const -Return the space override mode for the area. +Returns the space override mode for the area. .. _class_Physics2DServer_area_get_transform: - :ref:`Transform2D` **area_get_transform** **(** :ref:`RID` area **)** const -Return the transform matrix for an area. +Returns the transform matrix for an area. .. _class_Physics2DServer_area_remove_shape: - void **area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** -Remove a shape from an area. It does not delete the shape, so it can be reassigned later. +Removes a shape from an area. It does not delete the shape, so it can be reassigned later. .. _class_Physics2DServer_area_set_collision_layer: - void **area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** -Assign the area to one or many physics layers. +Assigns the area to one or many physics layers. .. _class_Physics2DServer_area_set_collision_mask: - void **area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** -Set which physics layers the area will monitor. +Sets which physics layers the area will monitor. .. _class_Physics2DServer_area_set_monitor_callback: - void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Object` receiver, :ref:`String` method **)** -Set the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: +Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. @@ -374,207 +374,211 @@ Set the function to call when any body/area enters or exits the area. This callb - void **area_set_param** **(** :ref:`RID` area, :ref:`int` param, :ref:`Variant` value **)** -Set the value for an area parameter. A list of available parameters is on the AREA_PARAM\_\* constants. +Sets the value for an area parameter. A list of available parameters is on the AREA_PARAM\_\* constants. .. _class_Physics2DServer_area_set_shape: - void **area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** -Substitute a given area shape by another. The old shape is selected by its index, the new one by its :ref:`RID`. +Substitutes a given area shape by another. The old shape is selected by its index, the new one by its :ref:`RID`. .. _class_Physics2DServer_area_set_shape_disabled: - void **area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disable **)** +Disables a given shape in this area if ``disable is true`` + .. _class_Physics2DServer_area_set_shape_transform: - void **area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** -Set the transform matrix for an area shape. +Sets the transform matrix for an area shape. .. _class_Physics2DServer_area_set_space: - void **area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** -Assign a space to the area. +Assigns a space to the area. .. _class_Physics2DServer_area_set_space_override_mode: - void **area_set_space_override_mode** **(** :ref:`RID` area, :ref:`int` mode **)** -Set the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE\_\*. +Sets the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE\_\*. .. _class_Physics2DServer_area_set_transform: - void **area_set_transform** **(** :ref:`RID` area, :ref:`Transform2D` transform **)** -Set the transform matrix for an area. +Sets the transform matrix for an area. .. _class_Physics2DServer_body_add_collision_exception: - void **body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** -Add a body to the list of bodies exempt from collisions. +Adds a body to the list of bodies exempt from collisions. .. _class_Physics2DServer_body_add_force: - void **body_add_force** **(** :ref:`RID` body, :ref:`Vector2` offset, :ref:`Vector2` force **)** -Add a positioned force to the applied force and torque. As with :ref:`body_apply_impulse`, both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. +Adds a positioned force to the applied force and torque. As with :ref:`body_apply_impulse`, both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. .. _class_Physics2DServer_body_add_shape: - void **body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform=Transform2D( 1, 0, 0, 1, 0, 0 ) **)** -Add a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. +Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. .. _class_Physics2DServer_body_apply_impulse: - void **body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector2` position, :ref:`Vector2` impulse **)** -Add a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. +Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. .. _class_Physics2DServer_body_attach_object_instance_id: - void **body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** -Assign the area to a descendant of :ref:`Object`, so it can exist in the node tree. +Assigns the area to a descendant of :ref:`Object`, so it can exist in the node tree. .. _class_Physics2DServer_body_clear_shapes: - void **body_clear_shapes** **(** :ref:`RID` body **)** -Remove all shapes from a body. +Removes all shapes from a body. .. _class_Physics2DServer_body_create: - :ref:`RID` **body_create** **(** :ref:`int` mode=2, :ref:`bool` init_sleeping=false **)** -Create a physics body. The first parameter can be any value from constants BODY_MODE\*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. +Creates a physics body. The first parameter can be any value from constants BODY_MODE\*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. .. _class_Physics2DServer_body_get_collision_layer: - :ref:`int` **body_get_collision_layer** **(** :ref:`RID` body **)** const -Return the physics layer or layers a body belongs to. +Returns the physics layer or layers a body belongs to. .. _class_Physics2DServer_body_get_collision_mask: - :ref:`int` **body_get_collision_mask** **(** :ref:`RID` body **)** const -Return the physics layer or layers a body can collide with. +Returns the physics layer or layers a body can collide with. .. _class_Physics2DServer_body_get_continuous_collision_detection_mode: - :ref:`int` **body_get_continuous_collision_detection_mode** **(** :ref:`RID` body **)** const -Return the continuous collision detection mode. +Returns the continuous collision detection mode. .. _class_Physics2DServer_body_get_direct_state: - :ref:`Physics2DDirectBodyState` **body_get_direct_state** **(** :ref:`RID` body **)** +Returns the :ref:`Physics2DDirectBodyState` of the body. + .. _class_Physics2DServer_body_get_max_contacts_reported: - :ref:`int` **body_get_max_contacts_reported** **(** :ref:`RID` body **)** const -Return the maximum contacts that can be reported. See :ref:`body_set_max_contacts_reported`. +Returns the maximum contacts that can be reported. See :ref:`body_set_max_contacts_reported`. .. _class_Physics2DServer_body_get_mode: - :ref:`int` **body_get_mode** **(** :ref:`RID` body **)** const -Return the body mode. +Returns the body mode. .. _class_Physics2DServer_body_get_object_instance_id: - :ref:`int` **body_get_object_instance_id** **(** :ref:`RID` body **)** const -Get the instance ID of the object the area is assigned to. +Gets the instance ID of the object the area is assigned to. .. _class_Physics2DServer_body_get_param: - :ref:`float` **body_get_param** **(** :ref:`RID` body, :ref:`int` param **)** const -Return the value of a body parameter. +Returns the value of a body parameter. A list of available parameters is on the BODY_PARAM\_\* constants. .. _class_Physics2DServer_body_get_shape: - :ref:`RID` **body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const -Return the :ref:`RID` of the nth shape of a body. +Returns the :ref:`RID` of the nth shape of a body. .. _class_Physics2DServer_body_get_shape_count: - :ref:`int` **body_get_shape_count** **(** :ref:`RID` body **)** const -Return the number of shapes assigned to a body. +Returns the number of shapes assigned to a body. .. _class_Physics2DServer_body_get_shape_metadata: - :ref:`Variant` **body_get_shape_metadata** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const -Return the metadata of a shape of a body. +Returns the metadata of a shape of a body. .. _class_Physics2DServer_body_get_shape_transform: - :ref:`Transform2D` **body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const -Return the transform matrix of a body shape. +Returns the transform matrix of a body shape. .. _class_Physics2DServer_body_get_space: - :ref:`RID` **body_get_space** **(** :ref:`RID` body **)** const -Return the :ref:`RID` of the space assigned to a body. +Returns the :ref:`RID` of the space assigned to a body. .. _class_Physics2DServer_body_get_state: - :ref:`Variant` **body_get_state** **(** :ref:`RID` body, :ref:`int` state **)** const -Return a body state. +Returns a body state. .. _class_Physics2DServer_body_is_omitting_force_integration: - :ref:`bool` **body_is_omitting_force_integration** **(** :ref:`RID` body **)** const -Return whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). +Returns whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). .. _class_Physics2DServer_body_remove_collision_exception: - void **body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** -Remove a body from the list of bodies exempt from collisions. +Removes a body from the list of bodies exempt from collisions. .. _class_Physics2DServer_body_remove_shape: - void **body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** -Remove a shape from a body. The shape is not deleted, so it can be reused afterwards. +Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. .. _class_Physics2DServer_body_set_axis_velocity: - void **body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** -Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. +Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. .. _class_Physics2DServer_body_set_collision_layer: - void **body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** -Set the physics layer or layers a body belongs to. +Sets the physics layer or layers a body belongs to. .. _class_Physics2DServer_body_set_collision_mask: - void **body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** -Set the physics layer or layers a body can collide with. +Sets the physics layer or layers a body can collide with. .. _class_Physics2DServer_body_set_continuous_collision_detection_mode: - void **body_set_continuous_collision_detection_mode** **(** :ref:`RID` body, :ref:`int` mode **)** -Set the continuous collision detection mode from any of the CCD_MODE\_\* constants. +Sets the continuous collision detection mode from any of the CCD_MODE\_\* constants. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. @@ -582,200 +586,204 @@ Continuous collision detection tries to predict where a moving body will collide - void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, :ref:`Variant` userdata=null **)** -Set the function used to calculate physics for an object, if that object allows it (see :ref:`body_set_omit_force integration`). +Sets the function used to calculate physics for an object, if that object allows it (see :ref:`body_set_omit_force integration`). .. _class_Physics2DServer_body_set_max_contacts_reported: - void **body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** -Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. +Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. .. _class_Physics2DServer_body_set_mode: - void **body_set_mode** **(** :ref:`RID` body, :ref:`int` mode **)** -Set the body mode, from one of the constants BODY_MODE\*. +Sets the body mode, from one of the constants BODY_MODE\*. .. _class_Physics2DServer_body_set_omit_force_integration: - void **body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** -Set whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). +Sets whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). .. _class_Physics2DServer_body_set_param: - void **body_set_param** **(** :ref:`RID` body, :ref:`int` param, :ref:`float` value **)** -Set a body parameter (see BODY_PARAM\* constants). +Sets a body parameter. A list of available parameters is on the BODY_PARAM\_\* constants. .. _class_Physics2DServer_body_set_shape: - void **body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** -Substitute a given body shape by another. The old shape is selected by its index, the new one by its :ref:`RID`. +Substitutes a given body shape by another. The old shape is selected by its index, the new one by its :ref:`RID`. .. _class_Physics2DServer_body_set_shape_as_one_way_collision: - void **body_set_shape_as_one_way_collision** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable **)** +Enables one way collision on body if ``enable is true``. + .. _class_Physics2DServer_body_set_shape_disabled: - void **body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disable **)** +Disables shape in body if ``disable is true``. + .. _class_Physics2DServer_body_set_shape_metadata: - void **body_set_shape_metadata** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Variant` metadata **)** -Set metadata of a shape within a body. This metadata is different from :ref:`Object.set_meta`, and can be retrieved on shape queries. +Sets metadata of a shape within a body. This metadata is different from :ref:`Object.set_meta`, and can be retrieved on shape queries. .. _class_Physics2DServer_body_set_shape_transform: - void **body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** -Set the transform matrix for a body shape. +Sets the transform matrix for a body shape. .. _class_Physics2DServer_body_set_space: - void **body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** -Assign a space to the body (see :ref:`create_space`). +Assigns a space to the body (see :ref:`create_space`). .. _class_Physics2DServer_body_set_state: - void **body_set_state** **(** :ref:`RID` body, :ref:`int` state, :ref:`Variant` value **)** -Set a body state (see BODY_STATE\* constants). +Sets a body state (see BODY_STATE\* constants). .. _class_Physics2DServer_body_test_motion: - :ref:`bool` **body_test_motion** **(** :ref:`RID` body, :ref:`Transform2D` from, :ref:`Vector2` motion, :ref:`float` margin=0.08, :ref:`Physics2DTestMotionResult` result=null **)** -Return whether a body can move from a given point in a given direction. Apart from the boolean return value, a :ref:`Physics2DTestMotionResult` can be passed to return additional information in. +Returns whether a body can move from a given point in a given direction. Apart from the boolean return value, a :ref:`Physics2DTestMotionResult` can be passed to return additional information in. .. _class_Physics2DServer_damped_spring_joint_create: - :ref:`RID` **damped_spring_joint_create** **(** :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** -Create a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself. +Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself. .. _class_Physics2DServer_damped_string_joint_get_param: - :ref:`float` **damped_string_joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const -Return the value of a damped spring joint parameter. +Returns the value of a damped spring joint parameter. .. _class_Physics2DServer_damped_string_joint_set_param: - void **damped_string_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** -Set a damped spring joint parameter. Parameters are explained in the DAMPED_STRING\* constants. +Sets a damped spring joint parameter. Parameters are explained in the DAMPED_STRING\* constants. .. _class_Physics2DServer_free_rid: - void **free_rid** **(** :ref:`RID` rid **)** -Destroy any of the objects created by Physics2DServer. If the :ref:`RID` passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console. +Destroys any of the objects created by Physics2DServer. If the :ref:`RID` passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console. .. _class_Physics2DServer_get_process_info: - :ref:`int` **get_process_info** **(** :ref:`int` process_info **)** -Return information about the current state of the 2D physics engine. The states are listed under the INFO\_\* constants. +Returns information about the current state of the 2D physics engine. The states are listed under the INFO\_\* constants. .. _class_Physics2DServer_groove_joint_create: - :ref:`RID` **groove_joint_create** **(** :ref:`Vector2` groove1_a, :ref:`Vector2` groove2_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** -Create a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself. +Creates a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself. .. _class_Physics2DServer_joint_get_param: - :ref:`float` **joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const -Return the value of a joint parameter. +Returns the value of a joint parameter. .. _class_Physics2DServer_joint_get_type: - :ref:`int` **joint_get_type** **(** :ref:`RID` joint **)** const -Return the type of a joint (see JOINT\_\* constants). +Returns the type of a joint (see JOINT\_\* constants). .. _class_Physics2DServer_joint_set_param: - void **joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** -Set a joint parameter. Parameters are explained in the JOINT_PARAM\* constants. +Sets a joint parameter. Parameters are explained in the JOINT_PARAM\* constants. .. _class_Physics2DServer_pin_joint_create: - :ref:`RID` **pin_joint_create** **(** :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** -Create a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself. +Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself. .. _class_Physics2DServer_set_active: - void **set_active** **(** :ref:`bool` active **)** -Activate or deactivate the 2D physics engine. +Activates or deactivates the 2D physics engine. .. _class_Physics2DServer_shape_create: - :ref:`RID` **shape_create** **(** :ref:`int` type **)** -Create a shape of type SHAPE\_\*. Does not assign it to a body or an area. To do so, you must use :ref:`area_set_shape` or :ref:`body_set_shape`. +Creates a shape of type SHAPE\_\*. Does not assign it to a body or an area. To do so, you must use :ref:`area_set_shape` or :ref:`body_set_shape`. .. _class_Physics2DServer_shape_get_data: - :ref:`Variant` **shape_get_data** **(** :ref:`RID` shape **)** const -Return the shape data. +Returns the shape data. .. _class_Physics2DServer_shape_get_type: - :ref:`int` **shape_get_type** **(** :ref:`RID` shape **)** const -Return the type of shape (see SHAPE\_\* constants). +Returns the type of shape (see SHAPE\_\* constants). .. _class_Physics2DServer_shape_set_data: - void **shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** -Set the shape data that defines its shape and size. The data to be passed depends on the kind of shape created :ref:`shape_get_type`. +Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created :ref:`shape_get_type`. .. _class_Physics2DServer_space_create: - :ref:`RID` **space_create** **(** **)** -Create a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with :ref:`area_set_space`, or to a body with :ref:`body_set_space`. +Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with :ref:`area_set_space`, or to a body with :ref:`body_set_space`. .. _class_Physics2DServer_space_get_direct_state: - :ref:`Physics2DDirectSpaceState` **space_get_direct_state** **(** :ref:`RID` space **)** -Return the state of a space, a :ref:`Physics2DDirectSpaceState`. This object can be used to make collision/intersection queries. +Returns the state of a space, a :ref:`Physics2DDirectSpaceState`. This object can be used to make collision/intersection queries. .. _class_Physics2DServer_space_get_param: - :ref:`float` **space_get_param** **(** :ref:`RID` space, :ref:`int` param **)** const -Return the value of a space parameter. +Returns the value of a space parameter. .. _class_Physics2DServer_space_is_active: - :ref:`bool` **space_is_active** **(** :ref:`RID` space **)** const -Return whether the space is active. +Returns whether the space is active. .. _class_Physics2DServer_space_set_active: - void **space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** -Mark a space as active. It will not have an effect, unless it is assigned to an area or body. +Marks a space as active. It will not have an effect, unless it is assigned to an area or body. .. _class_Physics2DServer_space_set_param: - void **space_set_param** **(** :ref:`RID` space, :ref:`int` param, :ref:`float` value **)** -Set the value for a space parameter. A list of available parameters is on the SPACE_PARAM\_\* constants. +Sets the value for a space parameter. A list of available parameters is on the SPACE_PARAM\_\* constants. diff --git a/classes/class_physics2dserversw.rst b/classes/class_physics2dserversw.rst index 252ece95f..950719391 100644 --- a/classes/class_physics2dserversw.rst +++ b/classes/class_physics2dserversw.rst @@ -19,5 +19,5 @@ Software implementation of :ref:`Physics2DServer`. Description ----------- -Software implementation of :ref:`Physics2DServer`. This class exposes no new methods or properties and should not be used, as :ref:`Physics2DServer` automatically selects the best implementation available. +This class exposes no new methods or properties and should not be used, as :ref:`Physics2DServer` automatically selects the best implementation available. diff --git a/classes/class_physicsbody.rst b/classes/class_physicsbody.rst index 74de45f92..153a3e98c 100644 --- a/classes/class_physicsbody.rst +++ b/classes/class_physicsbody.rst @@ -47,8 +47,10 @@ Member Variables ---------------- - :ref:`int` **collision_layer** - The physics layers this area is in. - Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + +Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. + +A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. - :ref:`int` **collision_mask** - The physics layers this area can scan for collisions. Description diff --git a/classes/class_physicsbody2d.rst b/classes/class_physicsbody2d.rst index 4c48d615f..9e313a795 100644 --- a/classes/class_physicsbody2d.rst +++ b/classes/class_physicsbody2d.rst @@ -47,8 +47,10 @@ Member Variables ---------------- - :ref:`int` **collision_layer** - The physics layers this area is in. - Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + +Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. + +A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. - :ref:`int` **collision_mask** - The physics layers this area can scan for collisions. - :ref:`int` **layers** - Both collision_layer and collision_mask. Returns collision_layer when accessed. Updates collision_layers and collision_mask when modified. diff --git a/classes/class_physicsserver.rst b/classes/class_physicsserver.rst index be32f65bb..800d26f4a 100644 --- a/classes/class_physicsserver.rst +++ b/classes/class_physicsserver.rst @@ -16,7 +16,7 @@ PhysicsServer Brief Description ----------------- - +Server interface for low level physics access. Member Functions ---------------- @@ -232,124 +232,143 @@ Member Functions Numeric Constants ----------------- -- **JOINT_PIN** = **0** -- **JOINT_HINGE** = **1** -- **JOINT_SLIDER** = **2** -- **JOINT_CONE_TWIST** = **3** -- **JOINT_6DOF** = **4** -- **PIN_JOINT_BIAS** = **0** -- **PIN_JOINT_DAMPING** = **1** -- **PIN_JOINT_IMPULSE_CLAMP** = **2** -- **HINGE_JOINT_BIAS** = **0** -- **HINGE_JOINT_LIMIT_UPPER** = **1** -- **HINGE_JOINT_LIMIT_LOWER** = **2** -- **HINGE_JOINT_LIMIT_BIAS** = **3** +- **JOINT_PIN** = **0** --- The :ref:`Joint` is a :ref:`PinJoint`. +- **JOINT_HINGE** = **1** --- The :ref:`Joint` is a :ref:`HingeJoint`. +- **JOINT_SLIDER** = **2** --- The :ref:`Joint` is a :ref:`SliderJoint`. +- **JOINT_CONE_TWIST** = **3** --- The :ref:`Joint` is a :ref:`ConeTwistJoint`. +- **JOINT_6DOF** = **4** --- The :ref:`Joint` is a :ref:`Generic6DOFJoint`. +- **PIN_JOINT_BIAS** = **0** --- The strength with which the pinned objects try to stay in positional relation to each other. + +The higher, the stronger. +- **PIN_JOINT_DAMPING** = **1** --- The strength with which the pinned objects try to stay in velocity relation to each other. + +The higher, the stronger. +- **PIN_JOINT_IMPULSE_CLAMP** = **2** --- If above 0, this value is the maximum value for an impulse that this Joint puts on it's ends. +- **HINGE_JOINT_BIAS** = **0** --- The speed with wich the two bodies get pulled together when they move in different directions. +- **HINGE_JOINT_LIMIT_UPPER** = **1** --- The maximum rotation across the Hinge. +- **HINGE_JOINT_LIMIT_LOWER** = **2** --- The minimum rotation across the Hinge. +- **HINGE_JOINT_LIMIT_BIAS** = **3** --- The speed with which the rotation across the axis perpendicular to the hinge gets corrected. - **HINGE_JOINT_LIMIT_SOFTNESS** = **4** -- **HINGE_JOINT_LIMIT_RELAXATION** = **5** -- **HINGE_JOINT_MOTOR_TARGET_VELOCITY** = **6** -- **HINGE_JOINT_MOTOR_MAX_IMPULSE** = **7** -- **HINGE_JOINT_FLAG_USE_LIMIT** = **0** -- **HINGE_JOINT_FLAG_ENABLE_MOTOR** = **1** -- **SLIDER_JOINT_LINEAR_LIMIT_UPPER** = **0** -- **SLIDER_JOINT_LINEAR_LIMIT_LOWER** = **1** -- **SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** -- **SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION** = **3** -- **SLIDER_JOINT_LINEAR_LIMIT_DAMPING** = **4** -- **SLIDER_JOINT_LINEAR_MOTION_SOFTNESS** = **5** -- **SLIDER_JOINT_LINEAR_MOTION_RESTITUTION** = **6** -- **SLIDER_JOINT_LINEAR_MOTION_DAMPING** = **7** -- **SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS** = **8** -- **SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION** = **9** -- **SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING** = **10** -- **SLIDER_JOINT_ANGULAR_LIMIT_UPPER** = **11** -- **SLIDER_JOINT_ANGULAR_LIMIT_LOWER** = **12** -- **SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS** = **13** -- **SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION** = **14** -- **SLIDER_JOINT_ANGULAR_LIMIT_DAMPING** = **15** -- **SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS** = **16** -- **SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION** = **17** -- **SLIDER_JOINT_ANGULAR_MOTION_DAMPING** = **18** -- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** -- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** -- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING** = **21** -- **SLIDER_JOINT_MAX** = **22** -- **CONE_TWIST_JOINT_SWING_SPAN** = **0** -- **CONE_TWIST_JOINT_TWIST_SPAN** = **1** -- **CONE_TWIST_JOINT_BIAS** = **2** -- **CONE_TWIST_JOINT_SOFTNESS** = **3** -- **CONE_TWIST_JOINT_RELAXATION** = **4** -- **G6DOF_JOINT_LINEAR_LOWER_LIMIT** = **0** -- **G6DOF_JOINT_LINEAR_UPPER_LIMIT** = **1** -- **G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** -- **G6DOF_JOINT_LINEAR_RESTITUTION** = **3** -- **G6DOF_JOINT_LINEAR_DAMPING** = **4** -- **G6DOF_JOINT_ANGULAR_LOWER_LIMIT** = **5** -- **G6DOF_JOINT_ANGULAR_UPPER_LIMIT** = **6** -- **G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS** = **7** -- **G6DOF_JOINT_ANGULAR_DAMPING** = **8** -- **G6DOF_JOINT_ANGULAR_RESTITUTION** = **9** -- **G6DOF_JOINT_ANGULAR_FORCE_LIMIT** = **10** -- **G6DOF_JOINT_ANGULAR_ERP** = **11** -- **G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY** = **12** -- **G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT** = **13** -- **G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT** = **0** -- **G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT** = **1** -- **G6DOF_JOINT_FLAG_ENABLE_MOTOR** = **2** -- **SHAPE_PLANE** = **0** -- **SHAPE_RAY** = **1** -- **SHAPE_SPHERE** = **2** -- **SHAPE_BOX** = **3** -- **SHAPE_CAPSULE** = **4** -- **SHAPE_CONVEX_POLYGON** = **5** -- **SHAPE_CONCAVE_POLYGON** = **6** -- **SHAPE_HEIGHTMAP** = **7** -- **SHAPE_CUSTOM** = **8** -- **AREA_PARAM_GRAVITY** = **0** -- **AREA_PARAM_GRAVITY_VECTOR** = **1** -- **AREA_PARAM_GRAVITY_IS_POINT** = **2** -- **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = **3** -- **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = **4** -- **AREA_PARAM_LINEAR_DAMP** = **5** -- **AREA_PARAM_ANGULAR_DAMP** = **6** -- **AREA_PARAM_PRIORITY** = **7** +- **HINGE_JOINT_LIMIT_RELAXATION** = **5** --- The lower this value, the more the rotation gets slowed down. +- **HINGE_JOINT_MOTOR_TARGET_VELOCITY** = **6** --- Target speed for the motor. +- **HINGE_JOINT_MOTOR_MAX_IMPULSE** = **7** --- Maximum acceleration for the motor. +- **HINGE_JOINT_FLAG_USE_LIMIT** = **0** --- If ``true`` the Hinge has a maximum and a minimum rotation. +- **HINGE_JOINT_FLAG_ENABLE_MOTOR** = **1** --- If ``true`` a motor turns the Hinge +- **SLIDER_JOINT_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their x-axis before damping happens. +- **SLIDER_JOINT_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their x-axis before damping happens. +- **SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement accross the slider axis once the limits get surpassed. The lower, the slower the movement. +- **SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION** = **3** --- The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. +- **SLIDER_JOINT_LINEAR_LIMIT_DAMPING** = **4** --- The amount of damping once the slider limits are surpassed. +- **SLIDER_JOINT_LINEAR_MOTION_SOFTNESS** = **5** --- A factor applied to the movement accross the slider axis as long as the slider is in the limits. The lower, the slower the movement. +- **SLIDER_JOINT_LINEAR_MOTION_RESTITUTION** = **6** --- The amount of restitution inside the slider limits. +- **SLIDER_JOINT_LINEAR_MOTION_DAMPING** = **7** --- The amount of damping inside the slider limits. +- **SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS** = **8** --- A factor applied to the movement accross axes orthogonal to the slider. +- **SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION** = **9** --- The amount of restitution when movement is accross axes orthogonal to the slider. +- **SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING** = **10** --- The amount of damping when movement is accross axes orthogonal to the slider. +- **SLIDER_JOINT_ANGULAR_LIMIT_UPPER** = **11** --- The upper limit of rotation in the slider. +- **SLIDER_JOINT_ANGULAR_LIMIT_LOWER** = **12** --- The lower limit of rotation in the slider. +- **SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS** = **13** --- A factor applied to the all rotation once the limit is surpassed. +- **SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION** = **14** --- The amount of restitution of the rotation when the limit is surpassed. +- **SLIDER_JOINT_ANGULAR_LIMIT_DAMPING** = **15** --- The amount of damping of the rotation when the limit is surpassed. +- **SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS** = **16** --- A factor that gets applied to the all rotation in the limits. +- **SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION** = **17** --- The amount of restitution of the rotation in the limits. +- **SLIDER_JOINT_ANGULAR_MOTION_DAMPING** = **18** --- The amount of damping of the rotation in the limits. +- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** --- A factor that gets applied to the all rotation across axes orthogonal to the slider. +- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** --- The amount of restitution of the rotation across axes orthogonal to the slider. +- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING** = **21** --- The amount of damping of the rotation across axes orthogonal to the slider. +- **SLIDER_JOINT_MAX** = **22** --- End flag of SLIDER_JOINT\_\* constants, used internally. +- **CONE_TWIST_JOINT_SWING_SPAN** = **0** --- Swing is rotation from side to side, around the axis perpendicular to the twist axis. + +The swing span defines, how much rotation will not get corrected allong the swing axis. + +Could be defined as looseness in the :ref:`ConeTwistJoint`. + +If below 0.05, this behaviour is locked. Default value: ``PI/4``. +- **CONE_TWIST_JOINT_TWIST_SPAN** = **1** --- Twist is the rotation around the twist axis, this value defined how far the joint can twist. + +Twist is locked if below 0.05. +- **CONE_TWIST_JOINT_BIAS** = **2** --- The speed with which the swing or twist will take place. + +The higher, the faster. +- **CONE_TWIST_JOINT_SOFTNESS** = **3** --- The ease with which the Joint twists, if it's too low, it takes more force to twist the joint. +- **CONE_TWIST_JOINT_RELAXATION** = **4** --- Defines, how fast the swing- and twist-speed-difference on both sides gets synced. +- **G6DOF_JOINT_LINEAR_LOWER_LIMIT** = **0** --- The minimum difference between the pivot points' axes. +- **G6DOF_JOINT_LINEAR_UPPER_LIMIT** = **1** --- The maximum difference between the pivot points' axes. +- **G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor that gets applied to the movement accross the axes. The lower, the slower the movement. +- **G6DOF_JOINT_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. +- **G6DOF_JOINT_LINEAR_DAMPING** = **4** --- The amount of damping that happens at the linear motion across the axes. +- **G6DOF_JOINT_ANGULAR_LOWER_LIMIT** = **5** --- The minimum rotation in negative direction to break loose and rotate arround the axes. +- **G6DOF_JOINT_ANGULAR_UPPER_LIMIT** = **6** --- The minimum rotation in positive direction to break loose and rotate arround the axes. +- **G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS** = **7** --- A factor that gets multiplied onto all rotations accross the axes. +- **G6DOF_JOINT_ANGULAR_DAMPING** = **8** --- The amount of rotational damping accross the axes. The lower, the more dampening occurs. +- **G6DOF_JOINT_ANGULAR_RESTITUTION** = **9** --- The amount of rotational restitution accross the axes. The lower, the more restitution occurs. +- **G6DOF_JOINT_ANGULAR_FORCE_LIMIT** = **10** --- The maximum amount of force that can occur, when rotating arround the axes. +- **G6DOF_JOINT_ANGULAR_ERP** = **11** --- When correcting the crossing of limits in rotation accross the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. +- **G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY** = **12** --- Target speed for the motor at the axes. +- **G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT** = **13** --- Maximum acceleration for the motor at the axes. +- **G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If ``set`` there is linear motion possible within the given limits. +- **G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If ``set`` there is rotational motion possible. +- **G6DOF_JOINT_FLAG_ENABLE_MOTOR** = **2** --- If ``set`` there is a rotational motor across these axes. +- **SHAPE_PLANE** = **0** --- The :ref:`Shape` is a :ref:`PlaneShape`. +- **SHAPE_RAY** = **1** --- The :ref:`Shape` is a :ref:`RayShape`. +- **SHAPE_SPHERE** = **2** --- The :ref:`Shape` is a :ref:`SphereShape`. +- **SHAPE_BOX** = **3** --- The :ref:`Shape` is a :ref:`BoxShape`. +- **SHAPE_CAPSULE** = **4** --- The :ref:`Shape` is a :ref:`CapsuleShape`. +- **SHAPE_CONVEX_POLYGON** = **5** --- The :ref:`Shape` is a :ref:`ConvexPolygonShape`. +- **SHAPE_CONCAVE_POLYGON** = **6** --- The :ref:`Shape` is a :ref:`ConcavePolygonShape`. +- **SHAPE_HEIGHTMAP** = **7** --- The :ref:`Shape` is a HeightMapShape. +- **SHAPE_CUSTOM** = **8** --- This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. +- **AREA_PARAM_GRAVITY** = **0** --- Constant to set/get gravity strength in an area. +- **AREA_PARAM_GRAVITY_VECTOR** = **1** --- Constant to set/get gravity vector/center in an area. +- **AREA_PARAM_GRAVITY_IS_POINT** = **2** --- Constant to set/get whether the gravity vector of an area is a direction, or a center point. +- **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = **3** --- Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. +- **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = **4** --- This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. +- **AREA_PARAM_LINEAR_DAMP** = **5** --- Constant to set/get the linear dampening factor of an area. +- **AREA_PARAM_ANGULAR_DAMP** = **6** --- Constant to set/get the angular dampening factor of an area. +- **AREA_PARAM_PRIORITY** = **7** --- Constant to set/get the priority (order of processing) of an area. - **AREA_SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. - **AREA_SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. - **AREA_SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. - **AREA_SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. - **AREA_SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. -- **BODY_MODE_STATIC** = **0** -- **BODY_MODE_KINEMATIC** = **1** -- **BODY_MODE_RIGID** = **2** -- **BODY_MODE_CHARACTER** = **3** -- **BODY_PARAM_BOUNCE** = **0** -- **BODY_PARAM_FRICTION** = **1** -- **BODY_PARAM_MASS** = **2** -- **BODY_PARAM_GRAVITY_SCALE** = **3** -- **BODY_PARAM_ANGULAR_DAMP** = **5** -- **BODY_PARAM_LINEAR_DAMP** = **4** -- **BODY_PARAM_MAX** = **6** -- **BODY_STATE_TRANSFORM** = **0** -- **BODY_STATE_LINEAR_VELOCITY** = **1** -- **BODY_STATE_ANGULAR_VELOCITY** = **2** -- **BODY_STATE_SLEEPING** = **3** -- **BODY_STATE_CAN_SLEEP** = **4** -- **AREA_BODY_ADDED** = **0** -- **AREA_BODY_REMOVED** = **1** -- **INFO_ACTIVE_OBJECTS** = **0** -- **INFO_COLLISION_PAIRS** = **1** -- **INFO_ISLAND_COUNT** = **2** -- **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = **0** -- **SPACE_PARAM_CONTACT_MAX_SEPARATION** = **1** -- **SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION** = **2** -- **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = **3** -- **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = **4** -- **SPACE_PARAM_BODY_TIME_TO_SLEEP** = **5** +- **BODY_MODE_STATIC** = **0** --- Constant for static bodies. +- **BODY_MODE_KINEMATIC** = **1** --- Constant for kinematic bodies. +- **BODY_MODE_RIGID** = **2** --- Constant for rigid bodies. +- **BODY_MODE_CHARACTER** = **3** --- Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. +- **BODY_PARAM_BOUNCE** = **0** --- Constant to set/get a body's bounce factor. +- **BODY_PARAM_FRICTION** = **1** --- Constant to set/get a body's friction. +- **BODY_PARAM_MASS** = **2** --- Constant to set/get a body's mass. +- **BODY_PARAM_GRAVITY_SCALE** = **3** --- Constant to set/get a body's gravity multiplier. +- **BODY_PARAM_ANGULAR_DAMP** = **5** --- Constant to set/get a body's angular dampening factor. +- **BODY_PARAM_LINEAR_DAMP** = **4** --- Constant to set/get a body's linear dampening factor. +- **BODY_PARAM_MAX** = **6** --- This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. +- **BODY_STATE_TRANSFORM** = **0** --- Constant to set/get the current transform matrix of the body. +- **BODY_STATE_LINEAR_VELOCITY** = **1** --- Constant to set/get the current linear velocity of the body. +- **BODY_STATE_ANGULAR_VELOCITY** = **2** --- Constant to set/get the current angular velocity of the body. +- **BODY_STATE_SLEEPING** = **3** --- Constant to sleep/wake up a body, or to get whether it is sleeping. +- **BODY_STATE_CAN_SLEEP** = **4** --- Constant to set/get whether the body can sleep. +- **AREA_BODY_ADDED** = **0** --- The value of the first parameter and area callback function receives, when an object enters one of its shapes. +- **AREA_BODY_REMOVED** = **1** --- The value of the first parameter and area callback function receives, when an object exits one of its shapes. +- **INFO_ACTIVE_OBJECTS** = **0** --- Constant to get the number of objects that are not sleeping. +- **INFO_COLLISION_PAIRS** = **1** --- Constant to get the number of possible collisions. +- **INFO_ISLAND_COUNT** = **2** --- Constant to get the number of space regions where a collision could occur. +- **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = **0** --- Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. +- **SPACE_PARAM_CONTACT_MAX_SEPARATION** = **1** --- Constant to set/get the maximum distance a shape can be from another before they are considered separated. +- **SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION** = **2** --- Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. +- **SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD** = **3** --- Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. +- **SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD** = **4** --- Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. +- **SPACE_PARAM_BODY_TIME_TO_SLEEP** = **5** --- Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. - **SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO** = **6** -- **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = **7** -- **BODY_AXIS_LOCK_DISABLED** = **0** -- **BODY_AXIS_LOCK_X** = **1** -- **BODY_AXIS_LOCK_Y** = **2** -- **BODY_AXIS_LOCK_Z** = **3** +- **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = **7** --- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. +- **BODY_AXIS_LOCK_DISABLED** = **0** --- The Body can rotate and move freely. +- **BODY_AXIS_LOCK_X** = **1** --- The Body cannot move across x axis can only rotate across x axis. +- **BODY_AXIS_LOCK_Y** = **2** --- The Body cannot move across y axis can only rotate across y axis. +- **BODY_AXIS_LOCK_Z** = **3** --- The Body cannot move across z axis can only rotate across z axis. + +Description +----------- + +Everything related to physics in 3D. Member Function Description --------------------------- @@ -358,412 +377,634 @@ Member Function Description - void **area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform` transform=Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) **)** +Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + .. _class_PhysicsServer_area_attach_object_instance_id: - void **area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** +Assigns the area to a descendant of :ref:`Object`, so it can exist in the node tree. + .. _class_PhysicsServer_area_clear_shapes: - void **area_clear_shapes** **(** :ref:`RID` area **)** +Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. + .. _class_PhysicsServer_area_create: - :ref:`RID` **area_create** **(** **)** +Creates an :ref:`Area`. + .. _class_PhysicsServer_area_get_object_instance_id: - :ref:`int` **area_get_object_instance_id** **(** :ref:`RID` area **)** const +Gets the instance ID of the object the area is assigned to. + .. _class_PhysicsServer_area_get_param: - :ref:`Variant` **area_get_param** **(** :ref:`RID` area, :ref:`int` param **)** const +Returns an area parameter value. A list of available parameters is on the AREA_PARAM\_\* constants. + .. _class_PhysicsServer_area_get_shape: - :ref:`RID` **area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** const +Returns the :ref:`RID` of the nth shape of an area. + .. _class_PhysicsServer_area_get_shape_count: - :ref:`int` **area_get_shape_count** **(** :ref:`RID` area **)** const +Returns the number of shapes assigned to an area. + .. _class_PhysicsServer_area_get_shape_transform: - :ref:`Transform` **area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** const +Returns the transform matrix of a shape within an area. + .. _class_PhysicsServer_area_get_space: - :ref:`RID` **area_get_space** **(** :ref:`RID` area **)** const +Returns the space assigned to the area. + .. _class_PhysicsServer_area_get_space_override_mode: - :ref:`int` **area_get_space_override_mode** **(** :ref:`RID` area **)** const +Returns the space override mode for the area. + .. _class_PhysicsServer_area_get_transform: - :ref:`Transform` **area_get_transform** **(** :ref:`RID` area **)** const +Returns the transform matrix for an area. + .. _class_PhysicsServer_area_is_ray_pickable: - :ref:`bool` **area_is_ray_pickable** **(** :ref:`RID` area **)** const +If ``true`` area collides with rays. + .. _class_PhysicsServer_area_remove_shape: - void **area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** +Removes a shape from an area. It does not delete the shape, so it can be reassigned later. + .. _class_PhysicsServer_area_set_collision_layer: - void **area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** +Assigns the area to one or many physics layers. + .. _class_PhysicsServer_area_set_collision_mask: - void **area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** +Sets which physics layers the area will monitor. + .. _class_PhysicsServer_area_set_monitor_callback: - void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Object` receiver, :ref:`String` method **)** +Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: + +1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. + +2: :ref:`RID` of the object that entered/exited the area. + +3: Instance ID of the object that entered/exited the area. + +4: The shape index of the object that entered/exited the area. + +5: The shape index of the area where the object entered/exited. + .. _class_PhysicsServer_area_set_param: - void **area_set_param** **(** :ref:`RID` area, :ref:`int` param, :ref:`Variant` value **)** +Sets the value for an area parameter. A list of available parameters is on the AREA_PARAM\_\* constants. + .. _class_PhysicsServer_area_set_ray_pickable: - void **area_set_ray_pickable** **(** :ref:`RID` area, :ref:`bool` enable **)** +Sets object pickable with rays. + .. _class_PhysicsServer_area_set_shape: - void **area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** +Substitutes a given area shape by another. The old shape is selected by its index, the new one by its :ref:`RID`. + .. _class_PhysicsServer_area_set_shape_transform: - void **area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform` transform **)** +Sets the transform matrix for an area shape. + .. _class_PhysicsServer_area_set_space: - void **area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** +Assigns a space to the area. + .. _class_PhysicsServer_area_set_space_override_mode: - void **area_set_space_override_mode** **(** :ref:`RID` area, :ref:`int` mode **)** +Sets the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE\_\*. + .. _class_PhysicsServer_area_set_transform: - void **area_set_transform** **(** :ref:`RID` area, :ref:`Transform` transform **)** +Sets the transform matrix for an area. + .. _class_PhysicsServer_body_add_collision_exception: - void **body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** +Adds a body to the list of bodies exempt from collisions. + .. _class_PhysicsServer_body_add_shape: - void **body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform` transform=Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) **)** +Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + .. _class_PhysicsServer_body_apply_impulse: - void **body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector3` position, :ref:`Vector3` impulse **)** +Gives the body a push at a ``position`` in the direction of the ``impulse``. + .. _class_PhysicsServer_body_apply_torque_impulse: - void **body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** +Gives the body a push to rotate it. + .. _class_PhysicsServer_body_attach_object_instance_id: - void **body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** +Assigns the area to a descendant of :ref:`Object`, so it can exist in the node tree. + .. _class_PhysicsServer_body_clear_shapes: - void **body_clear_shapes** **(** :ref:`RID` body **)** +Removes all shapes from a body. + .. _class_PhysicsServer_body_create: - :ref:`RID` **body_create** **(** :ref:`int` mode=2, :ref:`bool` init_sleeping=false **)** +Creates a physics body. The first parameter can be any value from constants BODY_MODE\*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. + .. _class_PhysicsServer_body_get_axis_lock: - :ref:`int` **body_get_axis_lock** **(** :ref:`RID` body **)** const +Gets the information, which Axis is locked if any. The can be any calue from the constants BODY_AXIS_LOCK\* + .. _class_PhysicsServer_body_get_collision_layer: - :ref:`int` **body_get_collision_layer** **(** :ref:`RID` body **)** const +Returns the physics layer or layers a body belongs to. + .. _class_PhysicsServer_body_get_collision_mask: - :ref:`int` **body_get_collision_mask** **(** :ref:`RID` body **)** const +Returns the physics layer or layers a body can collide with. + +- + .. _class_PhysicsServer_body_get_direct_state: - :ref:`PhysicsDirectBodyState` **body_get_direct_state** **(** :ref:`RID` body **)** +Returns the :ref:`PhysicsDirectBodyState` of the body. + .. _class_PhysicsServer_body_get_max_contacts_reported: - :ref:`int` **body_get_max_contacts_reported** **(** :ref:`RID` body **)** const +Returns the maximum contacts that can be reported. See :ref:`body_set_max_contacts_reported`. + .. _class_PhysicsServer_body_get_mode: - :ref:`int` **body_get_mode** **(** :ref:`RID` body **)** const +Returns the body mode. + .. _class_PhysicsServer_body_get_object_instance_id: - :ref:`int` **body_get_object_instance_id** **(** :ref:`RID` body **)** const +Gets the instance ID of the object the area is assigned to. + .. _class_PhysicsServer_body_get_param: - :ref:`float` **body_get_param** **(** :ref:`RID` body, :ref:`int` param **)** const +Returns the value of a body parameter. A list of available parameters is on the BODY_PARAM\_\* constants. + .. _class_PhysicsServer_body_get_shape: - :ref:`RID` **body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const +Returns the :ref:`RID` of the nth shape of a body. + .. _class_PhysicsServer_body_get_shape_count: - :ref:`int` **body_get_shape_count** **(** :ref:`RID` body **)** const +Returns the number of shapes assigned to a body. + .. _class_PhysicsServer_body_get_shape_transform: - :ref:`Transform` **body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const +Returns the transform matrix of a body shape. + .. _class_PhysicsServer_body_get_space: - :ref:`RID` **body_get_space** **(** :ref:`RID` body **)** const +Returns the :ref:`RID` of the space assigned to a body. + .. _class_PhysicsServer_body_get_state: - :ref:`Variant` **body_get_state** **(** :ref:`RID` body, :ref:`int` state **)** const +Returns a body state. + .. _class_PhysicsServer_body_is_continuous_collision_detection_enabled: - :ref:`bool` **body_is_continuous_collision_detection_enabled** **(** :ref:`RID` body **)** const +If ``true`` the continuous collision detection mode is enabled. + .. _class_PhysicsServer_body_is_omitting_force_integration: - :ref:`bool` **body_is_omitting_force_integration** **(** :ref:`RID` body **)** const +Returns whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). + .. _class_PhysicsServer_body_is_ray_pickable: - :ref:`bool` **body_is_ray_pickable** **(** :ref:`RID` body **)** const +If ``true`` the body can be detected by rays + .. _class_PhysicsServer_body_remove_collision_exception: - void **body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** +Removes a body from the list of bodies exempt from collisions. + +Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. + .. _class_PhysicsServer_body_remove_shape: - void **body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** +Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. + .. _class_PhysicsServer_body_set_axis_lock: - void **body_set_axis_lock** **(** :ref:`RID` body, :ref:`int` axis **)** +Locks velocity along one axis to 0 and only allows rotation along this axis, can also be set to disabled which disables this functionality. + .. _class_PhysicsServer_body_set_axis_velocity: - void **body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** +Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + .. _class_PhysicsServer_body_set_collision_layer: - void **body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** +Sets the physics layer or layers a body belongs to. + .. _class_PhysicsServer_body_set_collision_mask: - void **body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** +Sets the physics layer or layers a body can collide with. + .. _class_PhysicsServer_body_set_enable_continuous_collision_detection: - void **body_set_enable_continuous_collision_detection** **(** :ref:`RID` body, :ref:`bool` enable **)** +If ``true`` the continuous collision detection mode is enabled. + +Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. + .. _class_PhysicsServer_body_set_force_integration_callback: - void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, :ref:`Variant` userdata=null **)** +Sets the function used to calculate physics for an object, if that object allows it (see :ref:`body_set_omit_force integration`). + .. _class_PhysicsServer_body_set_max_contacts_reported: - void **body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** +Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + .. _class_PhysicsServer_body_set_mode: - void **body_set_mode** **(** :ref:`RID` body, :ref:`int` mode **)** +Sets the body mode, from one of the constants BODY_MODE\*. + .. _class_PhysicsServer_body_set_omit_force_integration: - void **body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** +Sets whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback`). + .. _class_PhysicsServer_body_set_param: - void **body_set_param** **(** :ref:`RID` body, :ref:`int` param, :ref:`float` value **)** +Sets a body parameter. A list of available parameters is on the BODY_PARAM\_\* constants. + .. _class_PhysicsServer_body_set_ray_pickable: - void **body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool` enable **)** +Sets the body pickable with rays if ``enabled`` is set. + .. _class_PhysicsServer_body_set_shape: - void **body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** +Substitutes a given body shape by another. The old shape is selected by its index, the new one by its :ref:`RID`. + .. _class_PhysicsServer_body_set_shape_transform: - void **body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform` transform **)** +Sets the transform matrix for a body shape. + .. _class_PhysicsServer_body_set_space: - void **body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** +Assigns a space to the body (see :ref:`create_space`). + .. _class_PhysicsServer_body_set_state: - void **body_set_state** **(** :ref:`RID` body, :ref:`int` state, :ref:`Variant` value **)** +Sets a body state (see BODY_STATE\* constants). + .. _class_PhysicsServer_cone_twist_joint_get_param: - :ref:`float` **cone_twist_joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const +Gets a cone_twist_joint parameter (see CONE_TWIST_JOINT\* constants). + .. _class_PhysicsServer_cone_twist_joint_set_param: - void **cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** +Sets a cone_twist_joint parameter (see CONE_TWIST_JOINT\* constants). + .. _class_PhysicsServer_free_rid: - void **free_rid** **(** :ref:`RID` rid **)** +Destroys any of the objects created by PhysicsServer. If the :ref:`RID` passed is not one of the objects that can be created by PhysicsServer, an error will be sent to the console. + .. _class_PhysicsServer_generic_6dof_joint_get_flag: - :ref:`bool` **generic_6dof_joint_get_flag** **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` flag **)** +Gets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG\* constants). + .. _class_PhysicsServer_generic_6dof_joint_get_param: - :ref:`float` **generic_6dof_joint_get_param** **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` param **)** +Gets a generic_6_DOF_joint parameter (see G6DOF_JOINT\* constants without the G6DOF_JOINT_FLAG\*). + .. _class_PhysicsServer_generic_6dof_joint_set_flag: - void **generic_6dof_joint_set_flag** **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` flag, :ref:`bool` enable **)** +Sets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG\* constants). + .. _class_PhysicsServer_generic_6dof_joint_set_param: - void **generic_6dof_joint_set_param** **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` param, :ref:`float` value **)** +Sets a generic_6_DOF_joint parameter (see G6DOF_JOINT\* constants without the G6DOF_JOINT_FLAG\*). + .. _class_PhysicsServer_get_process_info: - :ref:`int` **get_process_info** **(** :ref:`int` process_info **)** +Returns an Info defined by the ProcessInfo input given. + .. _class_PhysicsServer_hinge_joint_get_flag: - :ref:`bool` **hinge_joint_get_flag** **(** :ref:`RID` joint, :ref:`int` flag **)** const +Gets a hinge_joint flag (see HINGE_JOINT_FLAG\* constants). + .. _class_PhysicsServer_hinge_joint_get_param: - :ref:`float` **hinge_joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const +Gets a hinge_joint parameter (see HINGE_JOINT\* constants without the HINGE_JOINT_FLAG\*). + .. _class_PhysicsServer_hinge_joint_set_flag: - void **hinge_joint_set_flag** **(** :ref:`RID` joint, :ref:`int` flag, :ref:`bool` enabled **)** +Sets a hinge_joint flag (see HINGE_JOINT_FLAG\* constants). + .. _class_PhysicsServer_hinge_joint_set_param: - void **hinge_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** +Sets a hinge_joint parameter (see HINGE_JOINT\* constants without the HINGE_JOINT_FLAG\*). + .. _class_PhysicsServer_joint_create_cone_twist: - :ref:`RID` **joint_create_cone_twist** **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** +Creates a :ref:`ConeTwistJoint`. + .. _class_PhysicsServer_joint_create_generic_6dof: - :ref:`RID` **joint_create_generic_6dof** **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** +Creates a :ref:`Generic6DOFJoint`. + .. _class_PhysicsServer_joint_create_hinge: - :ref:`RID` **joint_create_hinge** **(** :ref:`RID` body_A, :ref:`Transform` hinge_A, :ref:`RID` body_B, :ref:`Transform` hinge_B **)** +Creates a :ref:`HingeJoint`. + .. _class_PhysicsServer_joint_create_pin: - :ref:`RID` **joint_create_pin** **(** :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** +Creates a :ref:`PinJoint`. + .. _class_PhysicsServer_joint_create_slider: - :ref:`RID` **joint_create_slider** **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** +Creates a :ref:`SliderJoint`. + .. _class_PhysicsServer_joint_get_solver_priority: - :ref:`int` **joint_get_solver_priority** **(** :ref:`RID` joint **)** const +Gets the priority value of the Joint. + .. _class_PhysicsServer_joint_get_type: - :ref:`int` **joint_get_type** **(** :ref:`RID` joint **)** const +Returns the type of the Joint. + .. _class_PhysicsServer_joint_set_solver_priority: - void **joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int` priority **)** +Sets the priority value of the Joint. + .. _class_PhysicsServer_pin_joint_get_local_a: - :ref:`Vector3` **pin_joint_get_local_a** **(** :ref:`RID` joint **)** const +Returns position of the joint in the local space of body a of the joint. + .. _class_PhysicsServer_pin_joint_get_local_b: - :ref:`Vector3` **pin_joint_get_local_b** **(** :ref:`RID` joint **)** const +Returns position of the joint in the local space of body b of the joint. + .. _class_PhysicsServer_pin_joint_get_param: - :ref:`float` **pin_joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const +Gets a pin_joint parameter (see PIN_JOINT\* constants). + .. _class_PhysicsServer_pin_joint_set_local_a: - void **pin_joint_set_local_a** **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** +Sets position of the joint in the local space of body a of the joint. + .. _class_PhysicsServer_pin_joint_set_local_b: - void **pin_joint_set_local_b** **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** +Sets position of the joint in the local space of body b of the joint. + .. _class_PhysicsServer_pin_joint_set_param: - void **pin_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** +Sets a pin_joint parameter (see PIN_JOINT\* constants). + .. _class_PhysicsServer_set_active: - void **set_active** **(** :ref:`bool` active **)** +Activates or deactivates the 3D physics engine. + .. _class_PhysicsServer_shape_create: - :ref:`RID` **shape_create** **(** :ref:`int` type **)** +Creates a shape of type SHAPE\_\*. Does not assign it to a body or an area. To do so, you must use :ref:`area_set_shape` or :ref:`body_set_shape`. + .. _class_PhysicsServer_shape_get_data: - :ref:`Variant` **shape_get_data** **(** :ref:`RID` shape **)** const +Returns the shape data. + .. _class_PhysicsServer_shape_get_type: - :ref:`int` **shape_get_type** **(** :ref:`RID` shape **)** const +Returns the type of shape (see SHAPE\_\* constants). + .. _class_PhysicsServer_shape_set_data: - void **shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** +Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created :ref:`shape_get_type`. + .. _class_PhysicsServer_slider_joint_get_param: - :ref:`float` **slider_joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const +Gets a slider_joint parameter (see SLIDER_JOINT\* constants). + .. _class_PhysicsServer_slider_joint_set_param: - void **slider_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** +Gets a slider_joint parameter (see SLIDER_JOINT\* constants). + .. _class_PhysicsServer_space_create: - :ref:`RID` **space_create** **(** **)** +Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with :ref:`area_set_space`, or to a body with :ref:`body_set_space`. + .. _class_PhysicsServer_space_get_direct_state: - :ref:`PhysicsDirectSpaceState` **space_get_direct_state** **(** :ref:`RID` space **)** +Returns the state of a space, a :ref:`PhysicsDirectSpaceState`. This object can be used to make collision/intersection queries. + .. _class_PhysicsServer_space_get_param: - :ref:`float` **space_get_param** **(** :ref:`RID` space, :ref:`int` param **)** const +Returns the value of a space parameter. + .. _class_PhysicsServer_space_is_active: - :ref:`bool` **space_is_active** **(** :ref:`RID` space **)** const +Returns whether the space is active. + .. _class_PhysicsServer_space_set_active: - void **space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** +Marks a space as active. It will not have an effect, unless it is assigned to an area or body. + .. _class_PhysicsServer_space_set_param: - void **space_set_param** **(** :ref:`RID` space, :ref:`int` param, :ref:`float` value **)** +Sets the value for a space parameter. A list of available parameters is on the SPACE_PARAM\_\* constants. + diff --git a/classes/class_physicsserversw.rst b/classes/class_physicsserversw.rst index 9c5169ef5..53f1cd11d 100644 --- a/classes/class_physicsserversw.rst +++ b/classes/class_physicsserversw.rst @@ -14,5 +14,10 @@ PhysicsServerSW Brief Description ----------------- +Software implementation of :ref:`PhysicsServer`. +Description +----------- + +This class exposes no new methods or properties and should not be used, as :ref:`PhysicsServer` automatically selects the best implementation available. diff --git a/classes/class_pinjoint.rst b/classes/class_pinjoint.rst index 02cef4181..7dfb06a9d 100644 --- a/classes/class_pinjoint.rst +++ b/classes/class_pinjoint.rst @@ -14,7 +14,7 @@ PinJoint Brief Description ----------------- - +Pin Joint for 3D Shapes. Member Functions ---------------- @@ -28,16 +28,29 @@ Member Functions Member Variables ---------------- -- :ref:`float` **params/bias** -- :ref:`float` **params/damping** -- :ref:`float` **params/impulse_clamp** +- :ref:`float` **params/bias** - The force with wich the pinned objects stay in positional relation to each other. + +The higher, the stronger. +- :ref:`float` **params/damping** - The force with wich the pinned objects stay in velocity relation to each other. + +The higher, the stronger. +- :ref:`float` **params/impulse_clamp** - If above 0, this value is the maximum value for an impulse that this Joint produces. Numeric Constants ----------------- -- **PARAM_BIAS** = **0** -- **PARAM_DAMPING** = **1** -- **PARAM_IMPULSE_CLAMP** = **2** +- **PARAM_BIAS** = **0** --- The force with wich the pinned objects stay in positional relation to each other. + +The higher, the stronger. +- **PARAM_DAMPING** = **1** --- The force with wich the pinned objects stay in velocity relation to each other. + +The higher, the stronger. +- **PARAM_IMPULSE_CLAMP** = **2** --- If above 0, this value is the maximum value for an impulse that this Joint produces. + +Description +----------- + +Pin Joint for 3D Rigid Bodies. It pins 2 bodies (rigid or static) together. Member Function Description --------------------------- diff --git a/classes/class_pinjoint2d.rst b/classes/class_pinjoint2d.rst index 8be8ae64f..db4a04b38 100644 --- a/classes/class_pinjoint2d.rst +++ b/classes/class_pinjoint2d.rst @@ -28,7 +28,7 @@ Member Functions Member Variables ---------------- -- :ref:`float` **softness** +- :ref:`float` **softness** - The higher this value, the more the bond to the pinned partner can flex. Description ----------- diff --git a/classes/class_pluginscript.rst b/classes/class_pluginscript.rst new file mode 100644 index 000000000..57f9fd675 --- /dev/null +++ b/classes/class_pluginscript.rst @@ -0,0 +1,18 @@ +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PluginScript.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PluginScript: + +PluginScript +============ + +**Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + + + diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index 69d96e629..2c09f58a9 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -72,18 +72,18 @@ Member Functions Member Variables ---------------- -- :ref:`bool` **antialiased** - If [code]true[/code] polygon edges will be anti-aliased. Default value: [code]false[/code]. -- :ref:`Color` **color** - The polygon's fill color. If [code]texture[/code] is defined, it will be multiplied by this color. It will also be the default color for vertices not set in [code]vertex_colors[/code]. -- :ref:`float` **invert_border** - Added padding applied to the bounding box when using [code]invert[/code]. Setting this value too small may result in a "Bad Polygon" error. Default value: [code]100[/code]. -- :ref:`bool` **invert_enable** - If [code]true[/code] polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. Default value: [code]false[/code]. +- :ref:`bool` **antialiased** - If ``true`` polygon edges will be anti-aliased. Default value: ``false``. +- :ref:`Color` **color** - The polygon's fill color. If ``texture`` is defined, it will be multiplied by this color. It will also be the default color for vertices not set in ``vertex_colors``. +- :ref:`float` **invert_border** - Added padding applied to the bounding box when using ``invert``. Setting this value too small may result in a "Bad Polygon" error. Default value: ``100``. +- :ref:`bool` **invert_enable** - If ``true`` polygon will be inverted, containing the area outside the defined points and extending to the ``invert_border``. Default value: ``false``. - :ref:`Vector2` **offset** - The offset applied to each vertex. - :ref:`PoolVector2Array` **polygon** - The polygon's list of vertices. The final point will be connected to the first. -- :ref:`Texture` **texture** - The polygon's fill texture. Use [code]uv[/code] to set texture coordinates. -- :ref:`Vector2` **texture_offset** - Amount to offset the polygon's [code]texture[/code]. If [code](0, 0)[/code] the texture's origin (its top-left corner) will be placed at the polygon's [code]position[/code]. +- :ref:`Texture` **texture** - The polygon's fill texture. Use ``uv`` to set texture coordinates. +- :ref:`Vector2` **texture_offset** - Amount to offset the polygon's ``texture``. If ``(0, 0)`` the texture's origin (its top-left corner) will be placed at the polygon's ``position``. - :ref:`float` **texture_rotation** - The texture's rotation in degrees. -- :ref:`Vector2` **texture_scale** - Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa. -- :ref:`PoolVector2Array` **uv** - Texture coordinates for each vertex of the polygon. There should be one [code]uv[/code] per polygon vertex. If there are fewer, undefined vertices will use [code](0, 0)[/code]. -- :ref:`PoolColorArray` **vertex_colors** - Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code]. +- :ref:`Vector2` **texture_scale** - Amount to multiply the ``uv`` coordinates when using a ``texture``. Larger values make the texture smaller, and vice versa. +- :ref:`PoolVector2Array` **uv** - Texture coordinates for each vertex of the polygon. There should be one ``uv`` per polygon vertex. If there are fewer, undefined vertices will use ``(0, 0)``. +- :ref:`PoolColorArray` **vertex_colors** - Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use ``color``. Description ----------- diff --git a/classes/class_primitivemesh.rst b/classes/class_primitivemesh.rst index 6c555c3bf..66c9af37a 100644 --- a/classes/class_primitivemesh.rst +++ b/classes/class_primitivemesh.rst @@ -32,7 +32,7 @@ Member Functions Member Variables ---------------- -- :ref:`Material` **material** - The current [Material] of the primitive mesh. +- :ref:`Material` **material** - The current :ref:`Material` of the primitive mesh. Description ----------- diff --git a/classes/class_range.rst b/classes/class_range.rst index 65c3b61c2..c97f706bd 100644 --- a/classes/class_range.rst +++ b/classes/class_range.rst @@ -74,12 +74,12 @@ This signal is emitted when value changes. Member Variables ---------------- -- :ref:`bool` **exp_edit** - If [code]true[/code] and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly. -- :ref:`float` **max_value** - Maximum value. Range is clamped if [code]value[/code] is greater than [code]max_value[/code]. Default value: 100. -- :ref:`float` **min_value** - Minimum value. Range is clamped if [code]value[/code] is less than [code]min_value[/code]. Default value: 0. -- :ref:`float` **page** - Page size. Used mainly for [ScrollBar]. ScrollBar's length is its size multiplied by [code]page[/code] over the difference between [code]min_value[/code] and [code]max_value[/code]. -- :ref:`bool` **rounded** - If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer. -- :ref:`float` **step** - If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer. +- :ref:`bool` **exp_edit** - If ``true`` and ``min_value`` is greater than 0, ``value`` will be represented exponentially rather than linearly. +- :ref:`float` **max_value** - Maximum value. Range is clamped if ``value`` is greater than ``max_value``. Default value: 100. +- :ref:`float` **min_value** - Minimum value. Range is clamped if ``value`` is less than ``min_value``. Default value: 0. +- :ref:`float` **page** - Page size. Used mainly for :ref:`ScrollBar`. ScrollBar's length is its size multiplied by ``page`` over the difference between ``min_value`` and ``max_value``. +- :ref:`bool` **rounded** - If ``true``, ``value`` will always be rounded to the nearest integer. +- :ref:`float` **step** - If greater than 0, ``value`` will always be rounded to a multiple of ``step``. If ``rounded`` is also ``true``, ``value`` will first be rounded to a multiple of ``step`` then rounded to the nearest integer. - :ref:`float` **value** - Range's current value. Description diff --git a/classes/class_raycast.rst b/classes/class_raycast.rst index c185159f7..bbe88e0c5 100644 --- a/classes/class_raycast.rst +++ b/classes/class_raycast.rst @@ -62,14 +62,16 @@ Member Functions Member Variables ---------------- -- :ref:`Vector3` **cast_to** - The ray's destination point, relative to the RayCast's [code]position[/code]. +- :ref:`Vector3` **cast_to** - The ray's destination point, relative to the RayCast's ``position``. - :ref:`int` **collision_layer** - The RayCast's collision layer(s). Only bodies in the same collision layer(s) will be detected. -- :ref:`bool` **enabled** - If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. -- :ref:`int` **type_mask** - Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState]. - Example: - [codeblock] - RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY - [/codeblock] +- :ref:`bool` **enabled** - If ``true``, collisions will be reported. Default value: ``false``. +- :ref:`int` **type_mask** - Object types to detect using a logical sum (OR operation) of type constants defined in :ref:`Physics2DDirectSpaceState`. + +Example: + +:: + + RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY Description ----------- diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index 93333eb73..9197d79f7 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -66,15 +66,17 @@ Member Functions Member Variables ---------------- -- :ref:`Vector2` **cast_to** - The ray's destination point, relative to the RayCast's [code]position[/code]. +- :ref:`Vector2` **cast_to** - The ray's destination point, relative to the RayCast's ``position``. - :ref:`int` **collision_layer** - The RayCast2D's collision layer(s). Only bodies in the same collision layer(s) will be detected. -- :ref:`bool` **enabled** - If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. -- :ref:`bool` **exclude_parent** - If [code]true[/code], the parent node will be excluded from collision detection. Default value: [code]true[/code]. -- :ref:`int` **type_mask** - Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState]. - Example: - [codeblock] - RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY - [/codeblock] +- :ref:`bool` **enabled** - If ``true``, collisions will be reported. Default value: ``false``. +- :ref:`bool` **exclude_parent** - If ``true``, the parent node will be excluded from collision detection. Default value: ``true``. +- :ref:`int` **type_mask** - Object types to detect using a logical sum (OR operation) of type constants defined in :ref:`Physics2DDirectSpaceState`. + +Example: + +:: + + RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY Description ----------- diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 531634ab6..7d512a15c 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -48,6 +48,8 @@ Member Functions +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_meta_underlined` **(** **)** const | +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_overriding_selected_font_color` **(** **)** const | ++--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_scroll_active` **(** **)** const | +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_scroll_following` **(** **)** const | @@ -88,6 +90,8 @@ Member Functions +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_meta_underline` **(** :ref:`bool` enable **)** | +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_override_selected_font_color` **(** :ref:`bool` override **)** | ++--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_percent_visible` **(** :ref:`float` percent_visible **)** | +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_scroll_active` **(** :ref:`bool` active **)** | @@ -118,6 +122,7 @@ Member Variables - :ref:`bool` **bbcode_enabled** - :ref:`String` **bbcode_text** +- :ref:`bool` **override_selected_font_color** - :ref:`float` **percent_visible** - :ref:`int` **visible_characters** @@ -209,6 +214,10 @@ Returns the raw text, stripping out the formatting information. - :ref:`bool` **is_meta_underlined** **(** **)** const +.. _class_RichTextLabel_is_overriding_selected_font_color: + +- :ref:`bool` **is_overriding_selected_font_color** **(** **)** const + .. _class_RichTextLabel_is_scroll_active: - :ref:`bool` **is_scroll_active** **(** **)** const @@ -291,6 +300,10 @@ Return true if selecting the text inside this richtext is allowed. - void **set_meta_underline** **(** :ref:`bool` enable **)** +.. _class_RichTextLabel_set_override_selected_font_color: + +- void **set_override_selected_font_color** **(** :ref:`bool` override **)** + .. _class_RichTextLabel_set_percent_visible: - void **set_percent_visible** **(** :ref:`float` percent_visible **)** diff --git a/classes/class_rigidbody.rst b/classes/class_rigidbody.rst index 0f5553147..8e5d235e4 100644 --- a/classes/class_rigidbody.rst +++ b/classes/class_rigidbody.rst @@ -132,19 +132,20 @@ Member Variables - :ref:`Vector3` **angular_velocity** - RigidBody's rotational velocity. - :ref:`int` **axis_lock** - Locks the rotational forces to a particular axis, preventing rotations on other axes. - :ref:`float` **bounce** - RigidBody's bounciness. -- :ref:`bool` **can_sleep** - If [code]true[/code] the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. +- :ref:`bool` **can_sleep** - If ``true`` the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the ``apply_impulse`` method is used. - :ref:`bool` **contact_monitor** - If true, the RigidBody will emit signals when it collides with another RigidBody. - :ref:`int` **contacts_reported** - The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. -- :ref:`bool` **continuous_cd** - If [code]true[/code] continuous collision detection is used. - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses less impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. -- :ref:`bool` **custom_integrator** - If [code]true[/code] internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. +- :ref:`bool` **continuous_cd** - If ``true`` continuous collision detection is used. + +Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses less impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. +- :ref:`bool` **custom_integrator** - If ``true`` internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces` function, if defined. - :ref:`float` **friction** - The body friction, from 0 (frictionless) to 1 (max friction). - :ref:`float` **gravity_scale** - This is multiplied by the global 3D gravity setting found in "Project > Project Settings > Physics > 3d" to produce RigidBody's gravity. E.g. a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. - :ref:`float` **linear_damp** - RigidBody's linear damp. Default value: -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden. -- :ref:`Vector3` **linear_velocity** - RigidBody's linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. +- :ref:`Vector3` **linear_velocity** - RigidBody's linear velocity. Can be used sporadically, but **DON'T SET THIS IN EVERY FRAME**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces` as your process loop for precise control of the body state. - :ref:`float` **mass** - RigidBody's mass. -- :ref:`int` **mode** - The body mode from the MODE_* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER. -- :ref:`bool` **sleeping** - If [code]true[/code] RigidBody is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method. +- :ref:`int` **mode** - The body mode from the MODE\_\* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER. +- :ref:`bool` **sleeping** - If ``true`` RigidBody is sleeping and will not calculate forces until woken up by a collision or the ``apply_impulse`` method. - :ref:`float` **weight** - RigidBody's weight based on its mass and the global 3D gravity. Global values are set in "Project > Project Settings > Physics > 3d". Numeric Constants diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index d0105fd2d..709500499 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -14,7 +14,7 @@ RigidBody2D Brief Description ----------------- -Physics Body whose position is determined through physics simulation in 2D space. +A body that is controlled by the 2D physics engine. Member Functions ---------------- @@ -114,73 +114,76 @@ Signals - **body_entered** **(** :ref:`Object` body **)** -Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. +Emitted when a body enters into contact with this one. member contact_monitor must be ``true`` and member contacts_reported greater than ``0``. - **body_exited** **(** :ref:`Object` body **)** -Emitted when a body exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. +Emitted when a body exits contact with this one. member contact_monitor must be ``true`` and member contacts_reported greater than ``0``. - **body_shape_entered** **(** :ref:`int` body_id, :ref:`Object` body, :ref:`int` body_shape, :ref:`int` local_shape **)** -Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. - -This signal not only receives the body that collided with this one, but also its :ref:`RID` (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with. +Emitted when a body enters into contact with this one. Reports colliding shape information. See :ref:`CollisionObject2D` for shape index information. member contact_monitor must be ``true`` and member contacts_reported greater than ``0``. - **body_shape_exited** **(** :ref:`int` body_id, :ref:`Object` body, :ref:`int` body_shape, :ref:`int` local_shape **)** -Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. - -This signal not only receives the body that stopped colliding with this one, but also its :ref:`RID` (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with. +Emitted when a body shape exits contact with this one. Reports colliding shape information. See :ref:`CollisionObject2D` for shape index information. member contact_monitor must be ``true`` and member contacts_reported greater than ``0``. - **sleeping_state_changed** **(** **)** -Emitted when the body changes its sleeping state. Either by sleeping or waking up. +Emitted when member sleeping changes. Member Variables ---------------- -- :ref:`float` **angular_damp** - Damps RigidBody2D's rotational forces. -- :ref:`float` **angular_velocity** - RigidBody2D's rotational velocity. -- :ref:`float` **bounce** - RigidBody2D's bounciness. -- :ref:`bool` **can_sleep** - If [code]true[/code] RigidBody2D will not calculate forces and will act as a static body while there is no movement. It will wake up when other forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. Default value: [code]true[/code] -- :ref:`bool` **contact_monitor** - If [code]true[/code] RigidBody2D will emit signals when it collides with another RigidBody2D. -- :ref:`int` **contacts_reported** - The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. -- :ref:`int` **continuous_cd** - If [code]true[/code] continuous collision detection is used. Default value: [code]false[/code] - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses less impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. -- :ref:`bool` **custom_integrator** - If [code]true[/code] internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. -- :ref:`float` **friction** - The body friction, from 0 (frictionless) to 1 (max friction). -- :ref:`float` **gravity_scale** - This is multiplied by the global 2D gravity setting found in "Project > Project Settings > Physics > 2d" to produce RigidBody2D's gravity. E.g. a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. -- :ref:`float` **linear_damp** - RigidBody2D's linear damp. Default of -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden. -- :ref:`Vector2` **linear_velocity** - RigidBody2D's linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. -- :ref:`float` **mass** - RigidBody2D's mass. -- :ref:`int` **mode** - The body mode from the MODE_* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER. -- :ref:`bool` **sleeping** - If [code]true[/code] RigidBody2D is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method. -- :ref:`float` **weight** - RigidBody2D's weight based on its mass and the global 2D gravity. Global values are set in "Project > Project Settings > Physics > 2d". +- :ref:`float` **angular_damp** - Damps the body's member angular_velocity. If ``-1`` the body will use the "Default Angular Damp" in "Project > Project Settings > Physics > 2d". Default value: ``-1``. +- :ref:`float` **angular_velocity** - The body's rotational velocity. +- :ref:`float` **bounce** - The body's bounciness. Default value: ``0``. +- :ref:`bool` **can_sleep** - If ``true`` the body will not calculate forces and will act as a static body if there is no movement. The body will wake up when other forces are applied via collisions or by using :ref:`apply_impulse` or :ref:`add_force`. Default value: ``true``. +- :ref:`bool` **contact_monitor** - If ``true`` the body will emit signals when it collides with another RigidBody2D. See also member contacts_reported. Default value: ``false``. +- :ref:`int` **contacts_reported** - The maximum number of contacts to report. Default value: ``0``. +- :ref:`int` **continuous_cd** - Continuous collision detection mode. Default value: ``CCD_MODE_DISABLED``. + +Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See ``CCD_MODE\_`` constants for details. +- :ref:`bool` **custom_integrator** - If ``true`` internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the :ref:`_integrate_forces` function. +- :ref:`float` **friction** - The body's friction. Values range from ``0`` (frictionless) to ``1`` (maximum friction). Default value: ``1``. +- :ref:`float` **gravity_scale** - Multiplies the gravity applied to the body. The body's gravity is calculated from the "Default Gravity" value in "Project > Project Settings > Physics > 2d" and/or any additional gravity vector applied by :ref:`Area2D`\ s. Default value: ``1``. +- :ref:`float` **linear_damp** - Damps the body's member linear_velocity. If ``-1`` the body will use the "Default Linear Damp" in "Project > Project Settings > Physics > 2d". Default value: ``-1``. +- :ref:`Vector2` **linear_velocity** - The body's linear velocity. +- :ref:`float` **mass** - The body's mass. Default value: ``1``. +- :ref:`int` **mode** - The body's mode. See ``MODE\_\*`` constants. Default value: ``MODE_RIGID``. +- :ref:`bool` **sleeping** - If ``true`` the body is sleeping and will not calculate forces until woken up by a collision or by using :ref:`apply_impulse` or :ref:`add_force`. +- :ref:`float` **weight** - The body's weight based on its mass and the "Default Gravity" value in "Project > Project Settings > Physics > 2d". Numeric Constants ----------------- -- **MODE_STATIC** = **1** --- Static mode. The body behaves like a :ref:`StaticBody2D`, and can only move by user code. -- **MODE_KINEMATIC** = **3** --- Kinematic body. The body behaves like a :ref:`KinematicBody2D`, and can only move by user code. -- **MODE_RIGID** = **0** --- Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code. -- **MODE_CHARACTER** = **2** --- Character body. This behaves like a rigid body, but can not rotate. -- **CCD_MODE_DISABLED** = **0** --- Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. -- **CCD_MODE_CAST_RAY** = **1** --- Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. -- **CCD_MODE_CAST_SHAPE** = **2** --- Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. +- **MODE_STATIC** = **1** --- Static mode. The body behaves like a :ref:`StaticBody2D` and does not move. +- **MODE_KINEMATIC** = **3** --- Kinematic mode. The body behaves like a :ref:`KinematicBody2D`, and must be moved by code. +- **MODE_RIGID** = **0** --- Rigid mode. The body behaves as a physical object. It collides with other bodies and responds to forces applied to it. This is the default mode. +- **MODE_CHARACTER** = **2** --- Character mode. Similar to ``MODE_RIGID``, but the body can not rotate. +- **CCD_MODE_DISABLED** = **0** --- Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. +- **CCD_MODE_CAST_RAY** = **1** --- Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise. +- **CCD_MODE_CAST_SHAPE** = **2** --- Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. Description ----------- -This is the node that implements full 2D physics. This means that you do not control a RigidBody2D directly. Instead you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. +This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. -This node can use custom force integration, for writing complex physics motion behavior per node. +A RigidBody2D has 4 behavior modes (see member mode): -This node can shift state between regular Rigid body, Kinematic, Character or Static. +- **Rigid**: The body behaves as a physical object. It collides with other bodies and responds to forces applied to it. This is the default mode. -Character mode forbids this node from being rotated. +- **Static**: The body behaves like a :ref:`StaticBody2D` and does not move. -As a warning, don't change RigidBody2D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior. +- **Character**: Similar to ``Rigid`` mode, but the body can not rotate. + +- **Kinematic**: The body behaves like a :ref:`KinematicBody2D`, and must be moved by code. + +**Note:** You should not change a RigidBody2D's ``position`` or ``linear_velocity`` every frame or even very often. If you need to directly affect the body's state, use :ref:`_integrate_forces`, which allows you to directly access the physics state. + +If you need to override the default physics behavior, you can write a custom force integration. See member custom_integrator. Member Function Description --------------------------- @@ -189,19 +192,19 @@ Member Function Description - void **_integrate_forces** **(** :ref:`Physics2DDirectBodyState` state **)** virtual -Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but :ref:`set_use_custom_integrator` allows you to disable the default behavior and do fully custom force integration for a body. +Allows you to read and safely modify the simulation state for the object. Use this instead of Node._physics_process if you need to directly change the body's ``position`` or other physics properties. By default it works in addition to the usual physics behavior, but member custom_integrator allows you to disable the default behavior and write custom force integration for a body. .. _class_RigidBody2D_add_force: - void **add_force** **(** :ref:`Vector2` offset, :ref:`Vector2` force **)** -Add a positioned force to the applied force and torque. As with :ref:`apply_impulse`, both the force and the offset from the body origin are in global coordinates. +Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. .. _class_RigidBody2D_apply_impulse: - void **apply_impulse** **(** :ref:`Vector2` offset, :ref:`Vector2` impulse **)** -Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates. +Applies a positioned impulse to the body (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied instantaneously. Both the impulse and the offset from the body origin are in global coordinates. .. _class_RigidBody2D_get_angular_damp: @@ -219,13 +222,13 @@ Return the body angular velocity. This changes by physics granularity. See :ref: - :ref:`Vector2` **get_applied_force** **(** **)** const -Return the applied force vector. +Returns the body's total applied force. .. _class_RigidBody2D_get_applied_torque: - :ref:`float` **get_applied_torque** **(** **)** const -Return the torque which is being applied to this body. +Returns the body's total applied torque. .. _class_RigidBody2D_get_bounce: @@ -237,7 +240,7 @@ Return the body bounciness. - :ref:`Array` **get_colliding_bodies** **(** **)** const -Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see :ref:`set_max_contacts_reported` to increase it. You must also enable contact monitor, see :ref:`set_contact_monitor` +Returns a list of the bodies colliding with this one. Use member contacts_reported to set the maximum number reported. You must also set member contact_monitor to ``true``. .. _class_RigidBody2D_get_continuous_collision_detection_mode: @@ -261,7 +264,7 @@ Return the gravity factor. - :ref:`float` **get_inertia** **(** **)** const -Return the body's moment of inertia. This is usually automatically computed from the mass and the shapes. Note that this doesn't seem to work in a ``_ready`` function: it apparently has not been auto-computed yet. +Returns the body's moment of inertia, which is computed automatically from the body's mass and assigned :ref:`Shape2D`\ s during the physics frame. Note that it will not yet have a value in the ``_ready()`` function. .. _class_RigidBody2D_get_linear_damp: @@ -273,7 +276,7 @@ Return the linear damp for this body. - :ref:`Vector2` **get_linear_velocity** **(** **)** const -Return the body linear velocity. This changes by physics granularity. See :ref:`set_linear_velocity`. +Returns the body's linear velocity. This changes when a physics frame has passed, not during a normal update. See :ref:`set_linear_velocity`. .. _class_RigidBody2D_get_mass: @@ -339,19 +342,19 @@ Set the body angular velocity. Can be used sporadically, but **DON'T SET THIS IN - void **set_applied_force** **(** :ref:`Vector2` force **)** -Set the applied force vector. This is the equivalent of pushing a box over the ground: the force applied is applied constantly. +Sets the applied force vector. This is the equivalent of firing a rocket: the force is applied constantly. .. _class_RigidBody2D_set_applied_torque: - void **set_applied_torque** **(** :ref:`float` torque **)** -Set a constant torque which will be applied to this body. +Sets the applied torque. .. _class_RigidBody2D_set_axis_velocity: - void **set_axis_velocity** **(** :ref:`Vector2` axis_velocity **)** -Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. +Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. .. _class_RigidBody2D_set_bounce: @@ -451,6 +454,6 @@ Set the body weight given standard earth-weight (gravity 9.8). Not really useful - :ref:`bool` **test_motion** **(** :ref:`Vector2` motion, :ref:`float` margin=0.08, :ref:`Physics2DTestMotionResult` result=null **)** -Return whether the body would collide, if it tried to move in the given vector. This method allows two extra parameters: A margin, which increases slightly the size of the shapes involved in the collision detection, and an object of type :ref:`Physics2DTestMotionResult`, which will store additional information about the collision (should there be one). +Returns ``true`` if a collision would result from moving in the given vector. ``margin`` increases the size of the shapes involved in the collision detection, and ``result`` is an object of type :ref:`Physics2DTestMotionResult`, which contains additional information about the collision (should there be one). diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 671b72645..e3fddadc2 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -96,7 +96,7 @@ Member Functions +----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_refuse_new_network_connections` **(** :ref:`bool` refuse **)** | +----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_screen_stretch` **(** :ref:`int` mode, :ref:`int` aspect, :ref:`Vector2` minsize, :ref:`int` shrink=1 **)** | +| void | :ref:`set_screen_stretch` **(** :ref:`int` mode, :ref:`int` aspect, :ref:`Vector2` minsize, :ref:`float` shrink=1 **)** | +----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals @@ -114,6 +114,8 @@ Signals - **network_peer_disconnected** **(** :ref:`int` id **)** +- **node_added** **(** :ref:`Object` node **)** + - **node_configuration_warning_changed** **(** :ref:`Object` node **)** - **node_removed** **(** :ref:`Object` node **)** @@ -306,6 +308,6 @@ Set the peer object to handle the RPC system (effectively enabling networking). .. _class_SceneTree_set_screen_stretch: -- void **set_screen_stretch** **(** :ref:`int` mode, :ref:`int` aspect, :ref:`Vector2` minsize, :ref:`int` shrink=1 **)** +- void **set_screen_stretch** **(** :ref:`int` mode, :ref:`int` aspect, :ref:`Vector2` minsize, :ref:`float` shrink=1 **)** diff --git a/classes/class_script.rst b/classes/class_script.rst index 62462c0a4..d9dc9303d 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -9,7 +9,7 @@ Script **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Inherited By:** :ref:`VisualScript`, :ref:`GDScript`, :ref:`CSharpScript`, :ref:`NativeScript` +**Inherited By:** :ref:`VisualScript`, :ref:`GDScript`, :ref:`CSharpScript`, :ref:`NativeScript`, :ref:`PluginScript` **Category:** Core diff --git a/classes/class_sliderjoint.rst b/classes/class_sliderjoint.rst index da09f5355..cc70ac1cd 100644 --- a/classes/class_sliderjoint.rst +++ b/classes/class_sliderjoint.rst @@ -14,7 +14,7 @@ SliderJoint Brief Description ----------------- - +Piston kind of slider between two bodies in 3D. Member Functions ---------------- @@ -28,55 +28,66 @@ Member Functions Member Variables ---------------- -- :ref:`float` **angular_limit/damping** -- :ref:`float` **angular_limit/lower_angle** -- :ref:`float` **angular_limit/restitution** -- :ref:`float` **angular_limit/softness** -- :ref:`float` **angular_limit/upper_angle** -- :ref:`float` **angular_motion/damping** -- :ref:`float` **angular_motion/restitution** -- :ref:`float` **angular_motion/softness** -- :ref:`float` **angular_ortho/damping** -- :ref:`float` **angular_ortho/restitution** -- :ref:`float` **angular_ortho/softness** -- :ref:`float` **linear_limit/damping** -- :ref:`float` **linear_limit/lower_distance** -- :ref:`float` **linear_limit/restitution** -- :ref:`float` **linear_limit/softness** -- :ref:`float` **linear_limit/upper_distance** -- :ref:`float` **linear_motion/damping** -- :ref:`float` **linear_motion/restitution** -- :ref:`float` **linear_motion/softness** -- :ref:`float` **linear_ortho/damping** -- :ref:`float` **linear_ortho/restitution** -- :ref:`float` **linear_ortho/softness** +- :ref:`float` **angular_limit/damping** - The amount of damping of the rotation when the limit is surpassed. + +A lower damping value allows a rotation initiated by body A to travel to body B slower. +- :ref:`float` **angular_limit/lower_angle** - The lower limit of rotation in the slider. +- :ref:`float` **angular_limit/restitution** - The amount of restitution of the rotation when the limit is surpassed. + +Does not affect damping. +- :ref:`float` **angular_limit/softness** - A factor applied to the all rotation once the limit is surpassed. + +Makes all rotation slower when between 0 and 1. +- :ref:`float` **angular_limit/upper_angle** - The upper limit of rotation in the slider. +- :ref:`float` **angular_motion/damping** - The amount of damping of the rotation in the limits. +- :ref:`float` **angular_motion/restitution** - The amount of restitution of the rotation in the limits. +- :ref:`float` **angular_motion/softness** - A factor applied to the all rotation in the limits. +- :ref:`float` **angular_ortho/damping** - The amount of damping of the rotation across axes orthogonal to the slider. +- :ref:`float` **angular_ortho/restitution** - The amount of restitution of the rotation across axes orthogonal to the slider. +- :ref:`float` **angular_ortho/softness** - A factor applied to the all rotation across axes orthogonal to the slider. +- :ref:`float` **linear_limit/damping** - The amount of damping that happens once the limit defined by member linear_limit/lower_distance and member linear_limit/upper_distance is surpassed. +- :ref:`float` **linear_limit/lower_distance** - The minimum difference between the pivot points on their x-axis before damping happens. +- :ref:`float` **linear_limit/restitution** - The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. +- :ref:`float` **linear_limit/softness** - A factor applied to the movement accross the slider axis once the limits get surpassed. The lower, the slower the movement. +- :ref:`float` **linear_limit/upper_distance** - The maximum difference between the pivot points on their x-axis before damping happens. +- :ref:`float` **linear_motion/damping** - The amount of damping inside the slider limits. +- :ref:`float` **linear_motion/restitution** - The amount of restitution inside the slider limits. +- :ref:`float` **linear_motion/softness** - A factor applied to the movement accross the slider axis as long as the slider is in the limits. The lower, the slower the movement. +- :ref:`float` **linear_ortho/damping** - The amount of damping when movement is accross axes orthogonal to the slider. +- :ref:`float` **linear_ortho/restitution** - The amount of restitution when movement is accross axes orthogonal to the slider. +- :ref:`float` **linear_ortho/softness** - A factor applied to the movement accross axes orthogonal to the slider. Numeric Constants ----------------- -- **PARAM_LINEAR_LIMIT_UPPER** = **0** -- **PARAM_LINEAR_LIMIT_LOWER** = **1** -- **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** -- **PARAM_LINEAR_LIMIT_RESTITUTION** = **3** -- **PARAM_LINEAR_LIMIT_DAMPING** = **4** -- **PARAM_LINEAR_MOTION_SOFTNESS** = **5** -- **PARAM_LINEAR_MOTION_RESTITUTION** = **6** -- **PARAM_LINEAR_MOTION_DAMPING** = **7** -- **PARAM_LINEAR_ORTHOGONAL_SOFTNESS** = **8** -- **PARAM_LINEAR_ORTHOGONAL_RESTITUTION** = **9** -- **PARAM_LINEAR_ORTHOGONAL_DAMPING** = **10** -- **PARAM_ANGULAR_LIMIT_UPPER** = **11** -- **PARAM_ANGULAR_LIMIT_LOWER** = **12** -- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **13** -- **PARAM_ANGULAR_LIMIT_RESTITUTION** = **14** -- **PARAM_ANGULAR_LIMIT_DAMPING** = **15** -- **PARAM_ANGULAR_MOTION_SOFTNESS** = **16** -- **PARAM_ANGULAR_MOTION_RESTITUTION** = **17** -- **PARAM_ANGULAR_MOTION_DAMPING** = **18** -- **PARAM_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** -- **PARAM_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** -- **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = **21** -- **PARAM_MAX** = **22** +- **PARAM_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their x-axis before damping happens. +- **PARAM_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their x-axis before damping happens. +- **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement accross the slider axis once the limits get surpassed. The lower, the slower the movement. +- **PARAM_LINEAR_LIMIT_RESTITUTION** = **3** --- The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. +- **PARAM_LINEAR_LIMIT_DAMPING** = **4** --- The amount of damping once the slider limits are surpassed. +- **PARAM_LINEAR_MOTION_SOFTNESS** = **5** --- A factor applied to the movement accross the slider axis as long as the slider is in the limits. The lower, the slower the movement. +- **PARAM_LINEAR_MOTION_RESTITUTION** = **6** --- The amount of restitution inside the slider limits. +- **PARAM_LINEAR_MOTION_DAMPING** = **7** --- The amount of damping inside the slider limits. +- **PARAM_LINEAR_ORTHOGONAL_SOFTNESS** = **8** --- A factor applied to the movement accross axes orthogonal to the slider. +- **PARAM_LINEAR_ORTHOGONAL_RESTITUTION** = **9** --- The amount of restitution when movement is accross axes orthogonal to the slider. +- **PARAM_LINEAR_ORTHOGONAL_DAMPING** = **10** --- The amount of damping when movement is accross axes orthogonal to the slider. +- **PARAM_ANGULAR_LIMIT_UPPER** = **11** --- The upper limit of rotation in the slider. +- **PARAM_ANGULAR_LIMIT_LOWER** = **12** --- The lower limit of rotation in the slider. +- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **13** --- A factor applied to the all rotation once the limit is surpassed. +- **PARAM_ANGULAR_LIMIT_RESTITUTION** = **14** --- The amount of restitution of the rotation when the limit is surpassed. +- **PARAM_ANGULAR_LIMIT_DAMPING** = **15** --- The amount of damping of the rotation when the limit is surpassed. +- **PARAM_ANGULAR_MOTION_SOFTNESS** = **16** --- A factor applied to the all rotation in the limits. +- **PARAM_ANGULAR_MOTION_RESTITUTION** = **17** --- The amount of restitution of the rotation in the limits. +- **PARAM_ANGULAR_MOTION_DAMPING** = **18** --- The amount of damping of the rotation in the limits. +- **PARAM_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** --- A factor applied to the all rotation across axes orthogonal to the slider. +- **PARAM_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** --- The amount of restitution of the rotation across axes orthogonal to the slider. +- **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = **21** --- The amount of damping of the rotation across axes orthogonal to the slider. +- **PARAM_MAX** = **22** --- End flag of PARAM\_\* constants, used internally. + +Description +----------- + +Slides across the x-axis of the Pivot object. Member Function Description --------------------------- diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst index 82b5485a2..4eb4f197a 100644 --- a/classes/class_spatial.rst +++ b/classes/class_spatial.rst @@ -118,11 +118,11 @@ Emitted when node visibility changes. Member Variables ---------------- -- :ref:`Transform` **global_transform** - World space (global) [Transform] of this node. +- :ref:`Transform` **global_transform** - World space (global) :ref:`Transform` of this node. - :ref:`Vector3` **rotation** - Local euler rotation in radians of this node. - :ref:`Vector3` **rotation_deg** - Local euler rotation in degrees of this node. - :ref:`Vector3` **scale** - Local scale of this node. -- :ref:`Transform` **transform** - Local space [Transform] of this node. +- :ref:`Transform` **transform** - Local space :ref:`Transform` of this node. - :ref:`Vector3` **translation** - Local translation of this node. - :ref:`bool` **visible** - Visibility of this node. Toggles if this node is rendered. diff --git a/classes/class_sprite.rst b/classes/class_sprite.rst index e5d6eef62..ae5067ab3 100644 --- a/classes/class_sprite.rst +++ b/classes/class_sprite.rst @@ -84,17 +84,17 @@ Emitted when the member texture changes. Member Variables ---------------- -- :ref:`bool` **centered** - If [code]true[/code] texture is centered. Default value: [code]true[/code]. -- :ref:`bool` **flip_h** - If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. -- :ref:`bool` **flip_v** - If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. -- :ref:`int` **frame** - Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. +- :ref:`bool` **centered** - If ``true`` texture is centered. Default value: ``true``. +- :ref:`bool` **flip_h** - If ``true`` texture is flipped horizontally. Default value: ``false``. +- :ref:`bool` **flip_v** - If ``true`` texture is flipped vertically. Default value: ``false``. +- :ref:`int` **frame** - Current frame to display from sprite sheet. member vframes or member hframes must be greater than 1. - :ref:`int` **hframes** - The number of collumns in the sprite sheet. - :ref:`Texture` **normal_map** - The normal map gives depth to the Sprite. - :ref:`Vector2` **offset** - The texture's drawing offset. -- :ref:`bool` **region_enabled** - If [code]true[/code] texture is cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code]. -- :ref:`bool` **region_filter_clip** - If [code]true[/code] the outermost pixels get blurred out. -- :ref:`Rect2` **region_rect** - The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. -- :ref:`Texture` **texture** - [Texture] object to draw. +- :ref:`bool` **region_enabled** - If ``true`` texture is cut from a larger atlas texture. See ``region_rect``. Default value: ``false``. +- :ref:`bool` **region_filter_clip** - If ``true`` the outermost pixels get blurred out. +- :ref:`Rect2` **region_rect** - The region of the atlas texture to display. member region_enabled must be ``true``. +- :ref:`Texture` **texture** - :ref:`Texture` object to draw. - :ref:`int` **vframes** - The number of rows in the sprite sheet. Description diff --git a/classes/class_sprite3d.rst b/classes/class_sprite3d.rst index 43284630a..f8de05ee6 100644 --- a/classes/class_sprite3d.rst +++ b/classes/class_sprite3d.rst @@ -56,11 +56,11 @@ Emitted when the member frame changes. Member Variables ---------------- -- :ref:`int` **frame** - Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. +- :ref:`int` **frame** - Current frame to display from sprite sheet. member vframes or member hframes must be greater than 1. - :ref:`int` **hframes** - The number of columns in the sprite sheet. -- :ref:`bool` **region_enabled** - If [code]true[/code] texture will be cut from a larger atlas texture. See [member region_rect]. Default value: [code]false[/code]. -- :ref:`Rect2` **region_rect** - The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. -- :ref:`Texture` **texture** - [Texture] object to draw. +- :ref:`bool` **region_enabled** - If ``true`` texture will be cut from a larger atlas texture. See member region_rect. Default value: ``false``. +- :ref:`Rect2` **region_rect** - The region of the atlas texture to display. member region_enabled must be ``true``. +- :ref:`Texture` **texture** - :ref:`Texture` object to draw. - :ref:`int` **vframes** - The number of rows in the sprite sheet. Description diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst index e76869a37..8f2f52dce 100644 --- a/classes/class_spritebase3d.rst +++ b/classes/class_spritebase3d.rst @@ -70,16 +70,16 @@ Member Variables - :ref:`int` **alpha_cut** - :ref:`int` **axis** - The direction in which the front of the texture faces. -- :ref:`bool` **centered** - If [code]true[/code] texture will be centered. Default value: [code]true[/code]. -- :ref:`bool` **double_sided** - 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]. -- :ref:`bool` **flip_h** - If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. -- :ref:`bool` **flip_v** - If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. +- :ref:`bool` **centered** - If ``true`` texture will be centered. Default value: ``true``. +- :ref:`bool` **double_sided** - If ``true`` texture can be seen from the back as well, if ``false``, it is invisible when looking at it from behind. Default value: ``true``. +- :ref:`bool` **flip_h** - If ``true`` texture is flipped horizontally. Default value: ``false``. +- :ref:`bool` **flip_v** - If ``true`` texture is flipped vertically. Default value: ``false``. - :ref:`Color` **modulate** - A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light. - :ref:`Vector2` **offset** - The texture's drawing offset. -- :ref:`float` **opacity** - The objects visibility on a scale from [code]0[/code] fully invisible to [code]1[/code] fully visible. +- :ref:`float` **opacity** - The objects visibility on a scale from ``0`` fully invisible to ``1`` fully visible. - :ref:`float` **pixel_size** - The size of one pixel's width on the Sprite to scale it in 3D. -- :ref:`bool` **shaded** - If [code]true[/code] the [Light] in the [Environment] has effects on the Sprite. Default value: [code]false[/code]. -- :ref:`bool` **transparent** - 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]. +- :ref:`bool` **shaded** - If ``true`` the :ref:`Light` in the :ref:`Environment` has effects on the Sprite. Default value: ``false``. +- :ref:`bool` **transparent** - If ``true`` the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: ``true``. Numeric Constants ----------------- diff --git a/classes/class_spriteframes.rst b/classes/class_spriteframes.rst index a81f8388f..1b9e02e1f 100644 --- a/classes/class_spriteframes.rst +++ b/classes/class_spriteframes.rst @@ -54,7 +54,7 @@ Member Functions Member Variables ---------------- -- :ref:`Array` **animations** - An [Array] containing the [code]name[/code], [code]speed[/code], [code]loop[/code], and [code]frames[/code] of each animation. +- :ref:`Array` **animations** - An :ref:`Array` containing the ``name``, ``speed``, ``loop``, and ``frames`` of each animation. - :ref:`Array` **frames** Description diff --git a/classes/class_staticbody2d.rst b/classes/class_staticbody2d.rst index b98cb6a86..9de79ba26 100644 --- a/classes/class_staticbody2d.rst +++ b/classes/class_staticbody2d.rst @@ -40,10 +40,10 @@ Member Functions Member Variables ---------------- -- :ref:`float` **bounce** - The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). +- :ref:`float` **bounce** - The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness). - :ref:`float` **constant_angular_velocity** - Constant angular velocity for the body. This does not rotate the body, but affects colliding bodies, as if it were rotating. - :ref:`Vector2` **constant_linear_velocity** - Constant linear velocity for the body. This does not move the body, but affects colliding bodies, as if it were moving. -- :ref:`float` **friction** - The body's friction. Values range from [code]0[/code] (no friction) to [code]1[/code] (full friction). +- :ref:`float` **friction** - The body's friction. Values range from ``0`` (no friction) to ``1`` (full friction). Description ----------- diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index d9f9f59fc..1fae6a959 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -66,7 +66,7 @@ Member Functions +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_corner_radius_all` **(** :ref:`int` radius **)** | +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_corner_radius_individual` **(** :ref:`int` radius_top_left, :ref:`int` radius_top_right, :ref:`int` radius_botton_right, :ref:`int` radius_bottom_left **)** | +| void | :ref:`set_corner_radius_individual` **(** :ref:`int` radius_top_left, :ref:`int` radius_top_right, :ref:`int` radius_bottom_right, :ref:`int` radius_bottom_left **)** | +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_draw_center` **(** :ref:`bool` draw_center **)** | +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -93,9 +93,11 @@ Member Variables - :ref:`int` **border_width_left** - Border width for the left border. - :ref:`int` **border_width_right** - Border width for the right border. - :ref:`int` **border_width_top** - Border width for the top border. -- :ref:`int` **corner_detail** - This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius]) into account. - For corner radius smaller than 10: 4-5 should be enough - For corner radius smaller than 30: 8-12 should be enough ... +- :ref:`int` **corner_detail** - This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius (:ref:`set_corner_radius`) into account. + +For corner radius smaller than 10: 4-5 should be enough + +For corner radius smaller than 30: 8-12 should be enough ... - :ref:`int` **corner_radius_bottom_left** - The corner radius of the bottom left corner. When set to 0 the corner is not rounded. - :ref:`int` **corner_radius_bottom_right** - The corner radius of the bottom right corner. When set to 0 the corner is not rounded. - :ref:`int` **corner_radius_top_left** - The corner radius of the top left corner. When set to 0 the corner is not rounded. @@ -235,7 +237,7 @@ Member Function Description .. _class_StyleBoxFlat_set_corner_radius_individual: -- void **set_corner_radius_individual** **(** :ref:`int` radius_top_left, :ref:`int` radius_top_right, :ref:`int` radius_botton_right, :ref:`int` radius_bottom_left **)** +- void **set_corner_radius_individual** **(** :ref:`int` radius_top_left, :ref:`int` radius_top_right, :ref:`int` radius_bottom_right, :ref:`int` radius_bottom_left **)** .. _class_StyleBoxFlat_set_draw_center: diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index 0caf8f973..059e46ebf 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -75,8 +75,8 @@ Member Variables ---------------- - :ref:`int` **current_tab** - The current tab. -- :ref:`int` **tab_align** - The alignment of all the tabs of the tab container. See the [code]ALIGN_*[/code] constants. -- :ref:`bool` **tabs_visible** - If [code]true[/code] all tabs that are children of the TabContainer will be visible. +- :ref:`int` **tab_align** - The alignment of all the tabs of the tab container. See the ``ALIGN\_\*`` constants. +- :ref:`bool` **tabs_visible** - If ``true`` all tabs that are children of the TabContainer will be visible. Numeric Constants ----------------- diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 86ad92d3f..5a4c4213f 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -78,6 +78,8 @@ Member Functions +------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_highlight_all_occurrences_enabled` **(** **)** const | +------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_overriding_selected_font_color` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_selection_active` **(** **)** const | +------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_show_line_numbers_enabled` **(** **)** const | @@ -102,6 +104,8 @@ Member Functions +------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_max_chars` **(** :ref:`int` amount **)** | +------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_override_selected_font_color` **(** :ref:`bool` override **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_readonly` **(** :ref:`bool` enable **)** | +------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_show_line_numbers` **(** :ref:`bool` enable **)** | @@ -146,6 +150,7 @@ Member Variables - :ref:`float` **caret_blink_speed** - :ref:`bool` **caret_block_mode** - :ref:`bool` **highlight_all_occurrences** +- :ref:`bool` **override_selected_font_color** - :ref:`bool` **show_line_numbers** - :ref:`bool` **smooth_scrolling** - :ref:`bool` **syntax_highlighting** @@ -337,6 +342,10 @@ Insert a given text at the cursor position. Returns true if highlight all occurrences is enabled. +.. _class_TextEdit_is_overriding_selected_font_color: + +- :ref:`bool` **is_overriding_selected_font_color** **(** **)** const + .. _class_TextEdit_is_selection_active: - :ref:`bool` **is_selection_active** **(** **)** const @@ -405,6 +414,10 @@ Set to enable highlighting all occurrences of the current selection. Set the maximum amount of characters editable. +.. _class_TextEdit_set_override_selected_font_color: + +- void **set_override_selected_font_color** **(** :ref:`bool` override **)** + .. _class_TextEdit_set_readonly: - void **set_readonly** **(** :ref:`bool` enable **)** diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst index 9499cabf7..321e10c2d 100644 --- a/classes/class_texturebutton.rst +++ b/classes/class_texturebutton.rst @@ -56,14 +56,14 @@ Member Functions Member Variables ---------------- -- :ref:`bool` **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]. -- :ref:`int` **stretch_mode** - 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. -- :ref:`BitMap` **texture_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. -- :ref:`Texture` **texture_disabled** - Texture to display when the node is disabled. See [member BaseButton.disabled]. +- :ref:`bool` **expand** - If ``true`` the texture stretches to the edges of the node's bounding rectangle using the member stretch_mode. If ``false`` the texture will not scale with the node. Default value: ``false``. +- :ref:`int` **stretch_mode** - Controls the texture's behavior when you resize the node's bounding rectangle, **only if** member expand is ``true``. Set it to one of the ``STRETCH\_\*`` constants. See the constants to learn more. +- :ref:`BitMap` **texture_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. +- :ref:`Texture` **texture_disabled** - Texture to display when the node is disabled. See member BaseButton.disabled. - :ref:`Texture` **texture_focused** - Texture to display when the node has mouse or keyboard focus. - :ref:`Texture` **texture_hover** - Texture to display when the mouse hovers the node. -- :ref:`Texture` **texture_normal** - Texture to display by default, when the node is [b]not[/b] in the disabled, focused, hover or pressed state. -- :ref:`Texture` **texture_pressed** - 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. +- :ref:`Texture` **texture_normal** - Texture to display by default, when the node is **not** in the disabled, focused, hover or pressed state. +- :ref:`Texture` **texture_pressed** - 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. Numeric Constants ----------------- diff --git a/classes/class_textureprogress.rst b/classes/class_textureprogress.rst index a17d59973..fbaeee949 100644 --- a/classes/class_textureprogress.rst +++ b/classes/class_textureprogress.rst @@ -60,20 +60,22 @@ Member Functions Member Variables ---------------- -- :ref:`int` **fill_mode** - The fill direction. Uses FILL_* constants. -- :ref:`bool` **nine_patch_stretch** - 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]. -- :ref:`Vector2` **radial_center_offset** - Offsets [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code]. -- :ref:`float` **radial_fill_degrees** - 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]. -- :ref:`float` **radial_initial_angle** - 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]. +- :ref:`int` **fill_mode** - The fill direction. Uses FILL\_\* constants. +- :ref:`bool` **nine_patch_stretch** - If ``true`` Godot treats the bar's textures like :ref:`NinePatchRect`. Use ``stretch_margin\_\*``, like member stretch_margin_bottom, to set up the nine patch's 3x3 grid. Default value: ``false``. +- :ref:`Vector2` **radial_center_offset** - Offsets member texture_progress if member fill_mode is ``FILL_CLOCKWISE`` or ``FILL_COUNTER_CLOCKWISE``. +- :ref:`float` **radial_fill_degrees** - Upper limit for the fill of member texture_progress if member fill_mode is ``FILL_CLOCKWISE`` or ``FILL_COUNTER_CLOCKWISE``. When the node's ``value`` is equal to its ``max_value``, the texture fills up to this angle. + +See member Range.value, member Range.max_value. +- :ref:`float` **radial_initial_angle** - Starting angle for the fill of member texture_progress if member fill_mode is ``FILL_CLOCKWISE`` or ``FILL_COUNTER_CLOCKWISE``. When the node's ``value`` is equal to its ``min_value``, the texture doesn't show up at all. When the ``value`` increases, the texture fills and tends towards member radial_fill_degrees. - :ref:`int` **stretch_margin_bottom** - 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. - :ref:`int` **stretch_margin_left** - The width of the 9-patch's left column. - :ref:`int` **stretch_margin_right** - The width of the 9-patch's right column. - :ref:`int` **stretch_margin_top** - The height of the 9-patch's top row. -- :ref:`Texture` **texture_over** - [Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress]. -- :ref:`Texture` **texture_progress** - [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]. -- :ref:`Texture` **texture_under** - [Texture] that draws under the progress bar. The bar's background. +- :ref:`Texture` **texture_over** - :ref:`Texture` that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of member texture_progress. +- :ref:`Texture` **texture_progress** - :ref:`Texture` that clips based on the node's ``value`` and member fill_mode. As ``value`` increased, the texture fills up. It shows entirely when ``value`` reaches ``max_value``. It doesn't show at all if ``value`` is equal to ``min_value``. + +The ``value`` property comes from :ref:`Range`. See member Range.value, member Range.min_value, member Range.max_value. +- :ref:`Texture` **texture_under** - :ref:`Texture` that draws under the progress bar. The bar's background. Numeric Constants ----------------- diff --git a/classes/class_texturerect.rst b/classes/class_texturerect.rst index c672704a4..42293a6cb 100644 --- a/classes/class_texturerect.rst +++ b/classes/class_texturerect.rst @@ -36,9 +36,9 @@ Member Functions Member Variables ---------------- -- :ref:`bool` **expand** - If [code]true[/code], the texture scales to fit its bounding rectangle. Default value: [code]false[/code]. -- :ref:`int` **stretch_mode** - Controls the texture's behavior when you resize the node's bounding rectangle. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more. -- :ref:`Texture` **texture** - The node's [Texture] resource. +- :ref:`bool` **expand** - If ``true``, the texture scales to fit its bounding rectangle. Default value: ``false``. +- :ref:`int` **stretch_mode** - Controls the texture's behavior when you resize the node's bounding rectangle. Set it to one of the ``STRETCH\_\*`` constants. See the constants to learn more. +- :ref:`Texture` **texture** - The node's :ref:`Texture` resource. Numeric Constants ----------------- diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 3449ff641..789b4c521 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -130,21 +130,21 @@ Emitted when a tilemap setting has changed. Member Variables ---------------- -- :ref:`Transform2D` **cell_custom_transform** - The custom [Transform2D] to be applied to the TileMap's cells. -- :ref:`int` **cell_half_offset** - Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED. +- :ref:`Transform2D` **cell_custom_transform** - The custom :ref:`Transform2D` to be applied to the TileMap's cells. +- :ref:`int` **cell_half_offset** - Amount to offset alternating tiles. Uses HALF_OFFSET\_\* constants. Default value: HALF_OFFSET_DISABLED. - :ref:`int` **cell_quadrant_size** - The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16. - :ref:`Vector2` **cell_size** - The TileMap's cell size. -- :ref:`int` **cell_tile_origin** - Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT. -- :ref:`bool` **cell_y_sort** - If [code]true[/code] the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code]. -- :ref:`float` **collision_bounce** - Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0. -- :ref:`float` **collision_friction** - Friction value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 1. +- :ref:`int` **cell_tile_origin** - Position for tile origin. Uses TILE_ORIGIN\_\* constants. Default value: TILE_ORIGIN_TOP_LEFT. +- :ref:`bool` **cell_y_sort** - If ``true`` the TileMap's children will be drawn in order of their Y coordinate. Default value: ``false``. +- :ref:`float` **collision_bounce** - Bounce value for static body collisions (see ``collision_use_kinematic``). Default value: 0. +- :ref:`float` **collision_friction** - Friction value for static body collisions (see ``collision_use_kinematic``). Default value: 1. - :ref:`int` **collision_layer** - The collision layer(s) for all colliders in the TileMap. - :ref:`int` **collision_mask** - The collision mask(s) for all colliders in the TileMap. -- :ref:`bool` **collision_use_kinematic** - If [code]true[/code] TileMap collisions will be handled as a kinematic body. If [code]false[/code] collisions will be handled as static body. Default value: [code]false[/code]. -- :ref:`int` **mode** - The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE. +- :ref:`bool` **collision_use_kinematic** - If ``true`` TileMap collisions will be handled as a kinematic body. If ``false`` collisions will be handled as static body. Default value: ``false``. +- :ref:`int` **mode** - The TileMap orientation mode. Uses MODE\_\* constants. Default value: MODE_SQUARE. - :ref:`int` **occluder_light_mask** - The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s). -- :ref:`PoolIntArray` **tile_data** - A [PoolIntArray] containing -- :ref:`TileSet` **tile_set** - The assigned [TileSet]. +- :ref:`PoolIntArray` **tile_data** - A :ref:`PoolIntArray` containing +- :ref:`TileSet` **tile_set** - The assigned :ref:`TileSet`. Numeric Constants ----------------- diff --git a/classes/class_timer.rst b/classes/class_timer.rst index abbeb6ca1..df36dc6c4 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -60,9 +60,9 @@ Emitted when the Timer reaches 0. Member Variables ---------------- -- :ref:`bool` **autostart** - If [code]true[/code], Timer will automatically start when entering the scene tree. Default value: [code]false[/code]. -- :ref:`bool` **one_shot** - If [code]true[/code], Timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code]. -- :ref:`int` **process_mode** - Processing mode. Uses TIMER_PROCESS_* constants as value. +- :ref:`bool` **autostart** - If ``true``, Timer will automatically start when entering the scene tree. Default value: ``false``. +- :ref:`bool` **one_shot** - If ``true``, Timer will stop when reaching 0. If ``false``, it will restart. Default value: ``false``. +- :ref:`int` **process_mode** - Processing mode. Uses TIMER_PROCESS\_\* constants as value. - :ref:`float` **wait_time** - Wait time in seconds. Numeric Constants diff --git a/classes/class_touchscreenbutton.rst b/classes/class_touchscreenbutton.rst index 7e2c22dd9..fb6ff48f0 100644 --- a/classes/class_touchscreenbutton.rst +++ b/classes/class_touchscreenbutton.rst @@ -74,15 +74,15 @@ Emitted when the button is released (up). Member Variables ---------------- -- :ref:`String` **action** - The button's action. Actions can be handled with [InputEventAction]. +- :ref:`String` **action** - The button's action. Actions can be handled with :ref:`InputEventAction`. - :ref:`BitMap` **bitmask** - The button's bitmask. - :ref:`Texture` **normal** - The button's texture for the normal state. -- :ref:`bool` **passby_press** - If [code]true[/code] passby presses are enabled. +- :ref:`bool` **passby_press** - If ``true`` passby presses are enabled. - :ref:`Texture` **pressed** - The button's texture for the pressed state. - :ref:`Shape2D` **shape** - The button's shape. -- :ref:`bool` **shape_centered** - If [code]true[/code] the button's shape is centered. -- :ref:`bool` **shape_visible** - If [code]true[/code] the button's shape is visible. -- :ref:`int` **visibility_mode** - The button's visibility mode. See [code]VISIBILITY_*[/code] constants. +- :ref:`bool` **shape_centered** - If ``true`` the button's shape is centered. +- :ref:`bool` **shape_visible** - If ``true`` the button's shape is visible. +- :ref:`int` **visibility_mode** - The button's visibility mode. See ``VISIBILITY\_\*`` constants. Numeric Constants ----------------- diff --git a/classes/class_transform.rst b/classes/class_transform.rst index 575e72d35..774d7b179 100644 --- a/classes/class_transform.rst +++ b/classes/class_transform.rst @@ -52,7 +52,7 @@ Member Functions Member Variables ---------------- -- :ref:`Basis` **basis** - The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. +- :ref:`Basis` **basis** - The basis is a matrix containing 3 :ref:`Vector3` as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. - :ref:`Vector3` **origin** - The translation offset of the transform. Description diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 4ec1db01c..f696198ba 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -57,8 +57,8 @@ Member Variables ---------------- - :ref:`Vector2` **origin** - The translation offset of the transform. -- :ref:`Vector2` **x** - The X axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. -- :ref:`Vector2` **y** - The Y axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. +- :ref:`Vector2` **x** - The X axis of 2x2 basis matrix containing 2 :ref:`Vector2` as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. +- :ref:`Vector2` **y** - The Y axis of 2x2 basis matrix containing 2 :ref:`Vector2` as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. Description ----------- diff --git a/classes/class_visualscriptbuiltinfunc.rst b/classes/class_visualscriptbuiltinfunc.rst index 63cb1927b..7cf24a3e3 100644 --- a/classes/class_visualscriptbuiltinfunc.rst +++ b/classes/class_visualscriptbuiltinfunc.rst @@ -60,37 +60,39 @@ Numeric Constants - **MATH_DECIMALS** = **24** --- Return the number of digit places after the decimal that the first non-zero digit occurs. - **MATH_STEPIFY** = **25** --- Return the input snapped to a given step. - **MATH_LERP** = **26** --- Return a number linearly interpolated between the first two inputs, based on the third input. Uses the formula ``a + (a - b) \* t``. -- **MATH_DECTIME** = **27** --- Return the result of 'value' decreased by 'step' \* 'amount'. -- **MATH_RANDOMIZE** = **28** --- Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. -- **MATH_RAND** = **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. -- **MATH_RANDF** = **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. -- **MATH_RANDOM** = **31** --- Return a random floating-point value between the two inputs. -- **MATH_SEED** = **32** --- Set the seed for the random number generator. -- **MATH_RANDSEED** = **33** --- Return a random value from the given seed, along with the new seed. -- **MATH_DEG2RAD** = **34** --- Convert the input from degrees to radians. -- **MATH_RAD2DEG** = **35** --- Convert the input from radians to degrees. -- **MATH_LINEAR2DB** = **36** --- Convert the input from linear volume to decibel volume. -- **MATH_DB2LINEAR** = **37** --- Convert the input from decibel volume to linear volume. -- **LOGIC_MAX** = **38** --- Return the greater of the two numbers, also known as their maximum. -- **LOGIC_MIN** = **39** --- Return the lesser of the two numbers, also known as their minimum. -- **LOGIC_CLAMP** = **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)` -- **LOGIC_NEAREST_PO2** = **41** --- Return the nearest power of 2 to the input. -- **OBJ_WEAKREF** = **42** --- Create a :ref:`WeakRef` from the input. -- **FUNC_FUNCREF** = **43** --- Create a :ref:`FuncRef` from the input. -- **TYPE_CONVERT** = **44** --- Convert between types. -- **TYPE_OF** = **45** --- Return the type of the input as an integer. Check enum Variant.Type for the integers that might be returned. -- **TYPE_EXISTS** = **46** --- Checks if a type is registered in the :ref:`ClassDB`. -- **TEXT_CHAR** = **47** --- Return a character with the given ascii value. -- **TEXT_STR** = **48** --- Convert the input to a string. -- **TEXT_PRINT** = **49** --- Print the given string to the output window. -- **TEXT_PRINTERR** = **50** --- Print the given string to the standard error output. -- **TEXT_PRINTRAW** = **51** --- Print the given string to the standard output, without adding a newline. -- **VAR_TO_STR** = **52** --- Serialize a :ref:`Variant` to a string. -- **STR_TO_VAR** = **53** --- Deserialize a :ref:`Variant` from a string serialized using VAR_TO_STR. -- **VAR_TO_BYTES** = **54** --- Serialize a :ref:`Variant` to a :ref:`PoolByteArray`. -- **BYTES_TO_VAR** = **55** --- Deserialize a :ref:`Variant` from a :ref:`PoolByteArray` serialized using VAR_TO_BYTES. -- **COLORN** = **56** --- Return the :ref:`Color` with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc. -- **FUNC_MAX** = **57** --- The maximum value the member function property can have. +- **MATH_INVERSE_LERP** = **27** +- **MATH_RANGE_LERP** = **28** +- **MATH_DECTIME** = **29** --- Return the result of 'value' decreased by 'step' \* 'amount'. +- **MATH_RANDOMIZE** = **30** --- Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. +- **MATH_RAND** = **31** --- Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use it with the remainder function. +- **MATH_RANDF** = **32** --- Return a random floating-point value between 0 and 1. To obtain a random value between 0 to N, you can use it with multiplication. +- **MATH_RANDOM** = **33** --- Return a random floating-point value between the two inputs. +- **MATH_SEED** = **34** --- Set the seed for the random number generator. +- **MATH_RANDSEED** = **35** --- Return a random value from the given seed, along with the new seed. +- **MATH_DEG2RAD** = **36** --- Convert the input from degrees to radians. +- **MATH_RAD2DEG** = **37** --- Convert the input from radians to degrees. +- **MATH_LINEAR2DB** = **38** --- Convert the input from linear volume to decibel volume. +- **MATH_DB2LINEAR** = **39** --- Convert the input from decibel volume to linear volume. +- **LOGIC_MAX** = **40** --- Return the greater of the two numbers, also known as their maximum. +- **LOGIC_MIN** = **41** --- Return the lesser of the two numbers, also known as their minimum. +- **LOGIC_CLAMP** = **42** --- Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to `min(max(input, range_low), range_high)` +- **LOGIC_NEAREST_PO2** = **43** --- Return the nearest power of 2 to the input. +- **OBJ_WEAKREF** = **44** --- Create a :ref:`WeakRef` from the input. +- **FUNC_FUNCREF** = **45** --- Create a :ref:`FuncRef` from the input. +- **TYPE_CONVERT** = **46** --- Convert between types. +- **TYPE_OF** = **47** --- Return the type of the input as an integer. Check enum Variant.Type for the integers that might be returned. +- **TYPE_EXISTS** = **48** --- Checks if a type is registered in the :ref:`ClassDB`. +- **TEXT_CHAR** = **49** --- Return a character with the given ascii value. +- **TEXT_STR** = **50** --- Convert the input to a string. +- **TEXT_PRINT** = **51** --- Print the given string to the output window. +- **TEXT_PRINTERR** = **52** --- Print the given string to the standard error output. +- **TEXT_PRINTRAW** = **53** --- Print the given string to the standard output, without adding a newline. +- **VAR_TO_STR** = **54** --- Serialize a :ref:`Variant` to a string. +- **STR_TO_VAR** = **55** --- Deserialize a :ref:`Variant` from a string serialized using VAR_TO_STR. +- **VAR_TO_BYTES** = **56** --- Serialize a :ref:`Variant` to a :ref:`PoolByteArray`. +- **BYTES_TO_VAR** = **57** --- Deserialize a :ref:`Variant` from a :ref:`PoolByteArray` serialized using VAR_TO_BYTES. +- **COLORN** = **58** --- Return the :ref:`Color` with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc. +- **FUNC_MAX** = **59** --- The maximum value the member function property can have. Description ----------- diff --git a/classes/class_visualscriptclassconstant.rst b/classes/class_visualscriptclassconstant.rst index 8111da809..e21c07509 100644 --- a/classes/class_visualscriptclassconstant.rst +++ b/classes/class_visualscriptclassconstant.rst @@ -14,7 +14,7 @@ VisualScriptClassConstant Brief Description ----------------- -A Visual Script node representing a constant from a class. +Gets a constant from a given class. Member Functions ---------------- @@ -32,13 +32,21 @@ Member Functions Member Variables ---------------- -- :ref:`String` **base_type** - The type to get the constant from. -- :ref:`String` **constant** - The name of the constant to return. +- :ref:`String` **base_type** - The constant's parent class. +- :ref:`String` **constant** - The constant to return. See the given class for its available constants. Description ----------- -A Visual Script node representing a constant from the classes, such as @GlobalScope.TYPE_INT. +This node returns a constant from a given class, such as @GlobalScope.TYPE_INT. See the given class' documentation for available constants. + +**Input Ports:** + +none + +**Output Ports:** + +- Data (variant): ``value`` Member Function Description --------------------------- diff --git a/classes/class_visualscriptconstant.rst b/classes/class_visualscriptconstant.rst index 3b9433a9b..7192f7904 100644 --- a/classes/class_visualscriptconstant.rst +++ b/classes/class_visualscriptconstant.rst @@ -14,7 +14,7 @@ VisualScriptConstant Brief Description ----------------- -A Visual Script node which returns a constant value. +Gets a contant's value. Member Functions ---------------- @@ -38,7 +38,15 @@ Member Variables Description ----------- -A Visual Script node which returns the specified constant value. +This node returns a constant's value. + +**Input Ports:** + +none + +**Output Ports:** + +- Data (variant): ``get`` Member Function Description --------------------------- diff --git a/classes/class_visualscriptconstructor.rst b/classes/class_visualscriptconstructor.rst index 17f55bcae..0e7b29fb4 100644 --- a/classes/class_visualscriptconstructor.rst +++ b/classes/class_visualscriptconstructor.rst @@ -33,22 +33,23 @@ Member Variables ---------------- - :ref:`Dictionary` **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] + +:: + + { + 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\_\*} + } - :ref:`int` **type** - The type to be constructed. Description diff --git a/classes/class_visualscriptemitsignal.rst b/classes/class_visualscriptemitsignal.rst index 7654c6120..7c18ef301 100644 --- a/classes/class_visualscriptemitsignal.rst +++ b/classes/class_visualscriptemitsignal.rst @@ -14,7 +14,7 @@ VisualScriptEmitSignal Brief Description ----------------- -A Visual Script node which emits a specified signal. +Emits a specified signal. Member Functions ---------------- @@ -33,7 +33,15 @@ Member Variables Description ----------- -A Visual Script node which emits a specified signal when it is executed. +Emits a specified signal when it is executed. + +**Input Ports:** + +- Sequence: ``emit`` + +**Output Ports:** + +- Sequence Member Function Description --------------------------- diff --git a/classes/class_visualscriptiterator.rst b/classes/class_visualscriptiterator.rst index c6b95a1c9..edab5bdb1 100644 --- a/classes/class_visualscriptiterator.rst +++ b/classes/class_visualscriptiterator.rst @@ -14,5 +14,24 @@ VisualScriptIterator Brief Description ----------------- +Steps through items in a given input. +Description +----------- + +This node steps through each item in a given input. Input can be any sequence data type, such as an :ref:`Array` or :ref:`String`. When each item has been processed, execution passed out the ``exit`` Sequence port. + +**Input Ports:** + +- Sequence: ``for (elem) in (input)`` + +- Data (variant): ``input`` + +**Output Ports:** + +- Sequence: ``each`` + +- Sequence: ``exit`` + +- Data (variant): ``elem`` diff --git a/classes/class_visualscriptlocalvar.rst b/classes/class_visualscriptlocalvar.rst index cd528ccbe..3cb98a7ec 100644 --- a/classes/class_visualscriptlocalvar.rst +++ b/classes/class_visualscriptlocalvar.rst @@ -14,7 +14,7 @@ VisualScriptLocalVar Brief Description ----------------- - +Gets a local variable's value. Member Functions ---------------- @@ -32,8 +32,21 @@ Member Functions Member Variables ---------------- -- :ref:`int` **type** -- :ref:`String` **var_name** +- :ref:`int` **type** - The local variable's type. +- :ref:`String` **var_name** - The local variable's name. + +Description +----------- + +Returns a local variable's value. "Var Name" must be supplied, with an optional type. + +**Input Ports:** + +none + +**Output Ports:** + +- Data (variant): ``get`` Member Function Description --------------------------- diff --git a/classes/class_visualscriptlocalvarset.rst b/classes/class_visualscriptlocalvarset.rst index 08c8de6e6..db5f7cbf9 100644 --- a/classes/class_visualscriptlocalvarset.rst +++ b/classes/class_visualscriptlocalvarset.rst @@ -14,7 +14,7 @@ VisualScriptLocalVarSet Brief Description ----------------- - +Changes a local variable's value. Member Functions ---------------- @@ -32,8 +32,25 @@ Member Functions Member Variables ---------------- -- :ref:`int` **type** -- :ref:`String` **var_name** +- :ref:`int` **type** - The local variable's type. +- :ref:`String` **var_name** - The local variable's name. + +Description +----------- + +Changes a local variable's value to the given input. The new value is also provided on an output Data port. + +**Input Ports:** + +- Sequence + +- Data (variant): ``set`` + +**Output Ports:** + +- Sequence + +- Data (variant): ``get`` Member Function Description --------------------------- diff --git a/classes/class_visualscriptmathconstant.rst b/classes/class_visualscriptmathconstant.rst index 207659987..8fef39e70 100644 --- a/classes/class_visualscriptmathconstant.rst +++ b/classes/class_visualscriptmathconstant.rst @@ -14,7 +14,7 @@ VisualScriptMathConstant Brief Description ----------------- - +Commonly used mathematical constants. Member Functions ---------------- @@ -28,21 +28,34 @@ Member Functions Member Variables ---------------- -- :ref:`int` **constant** +- :ref:`int` **constant** - The math constant. Numeric Constants ----------------- -- **MATH_CONSTANT_ONE** = **0** -- **MATH_CONSTANT_PI** = **1** -- **MATH_CONSTANT_2PI** = **2** -- **MATH_CONSTANT_HALF_PI** = **3** -- **MATH_CONSTANT_E** = **4** -- **MATH_CONSTANT_SQRT2** = **5** -- **MATH_CONSTANT_INF** = **6** -- **MATH_CONSTANT_NAN** = **7** +- **MATH_CONSTANT_ONE** = **0** --- Unity: ``1`` +- **MATH_CONSTANT_PI** = **1** --- Pi: ``3.141593`` +- **MATH_CONSTANT_2PI** = **2** --- Pi times two: ``6.283185`` +- **MATH_CONSTANT_HALF_PI** = **3** --- Pi divided by two: ``1.570796`` +- **MATH_CONSTANT_E** = **4** --- Natural log: ``2.718282`` +- **MATH_CONSTANT_SQRT2** = **5** --- Square root of two: ``1.414214`` +- **MATH_CONSTANT_INF** = **6** --- Infinity: ``inf`` +- **MATH_CONSTANT_NAN** = **7** --- Not a number: ``nan`` - **MATH_CONSTANT_MAX** = **8** +Description +----------- + +Provides common math constants, such as Pi or Euler's constant, on an output Data port. + +**Input Ports:** + +none + +**Output Ports:** + +- Data (variant): ``get`` + Member Function Description --------------------------- diff --git a/classes/class_visualscriptoperator.rst b/classes/class_visualscriptoperator.rst index 7e5027c7f..c9665b511 100644 --- a/classes/class_visualscriptoperator.rst +++ b/classes/class_visualscriptoperator.rst @@ -46,11 +46,7 @@ Description **Output Ports:** -- Sequence: ``true`` - -- Sequence: ``false`` - -- Sequence: ``done`` +- Data (variant): ``result`` Member Function Description --------------------------- diff --git a/classes/class_visualscriptpreload.rst b/classes/class_visualscriptpreload.rst index 4b4f09488..c7f8f286e 100644 --- a/classes/class_visualscriptpreload.rst +++ b/classes/class_visualscriptpreload.rst @@ -14,7 +14,7 @@ VisualScriptPreload Brief Description ----------------- - +Creates a new :ref:`Resource` or loads one from the filesystem. Member Functions ---------------- @@ -28,7 +28,20 @@ Member Functions Member Variables ---------------- -- :ref:`Resource` **resource** +- :ref:`Resource` **resource** - The :ref:`Resource` to load. + +Description +----------- + +Creates a new :ref:`Resource` or loads one from the filesystem. + +**Input Ports:** + +none + +**Output Ports:** + +- Data (object): ``res`` Member Function Description --------------------------- diff --git a/classes/class_visualscriptreturn.rst b/classes/class_visualscriptreturn.rst index 2b1d05349..75b8db8bc 100644 --- a/classes/class_visualscriptreturn.rst +++ b/classes/class_visualscriptreturn.rst @@ -14,7 +14,7 @@ VisualScriptReturn Brief Description ----------------- - +Exits a function and returns an optional value. Member Functions ---------------- @@ -32,8 +32,23 @@ Member Functions Member Variables ---------------- -- :ref:`bool` **return_enabled** -- :ref:`int` **return_type** +- :ref:`bool` **return_enabled** - If ``true`` the ``return`` input port is available. +- :ref:`int` **return_type** - The return value's data type. + +Description +----------- + +Ends the execution of a function and returns control to the calling function. Optionally, it can return a :ref:`Variant` value. + +**Input Ports:** + +- Sequence + +- Data (variant): ``result`` (optional) + +**Output Ports:** + +none Member Function Description --------------------------- diff --git a/classes/class_visualscriptselect.rst b/classes/class_visualscriptselect.rst index 43b3b45db..377884586 100644 --- a/classes/class_visualscriptselect.rst +++ b/classes/class_visualscriptselect.rst @@ -14,7 +14,7 @@ VisualScriptSelect Brief Description ----------------- - +Chooses between two input values. Member Functions ---------------- @@ -28,7 +28,24 @@ Member Functions Member Variables ---------------- -- :ref:`int` **type** +- :ref:`int` **type** - The input variables' type. + +Description +----------- + +Chooses between two input values based on a Boolean condition. + +**Input Ports:** + +- Data (boolean): ``cond`` + +- Data (variant): ``a`` + +- Data (variant): ``b`` + +**Output Ports:** + +- Data (variant): ``out`` Member Function Description --------------------------- diff --git a/classes/class_visualscriptself.rst b/classes/class_visualscriptself.rst index 49fc9031e..445c62ce2 100644 --- a/classes/class_visualscriptself.rst +++ b/classes/class_visualscriptself.rst @@ -14,5 +14,18 @@ VisualScriptSelf Brief Description ----------------- +Outputs a reference to the current instance. +Description +----------- + +Provides a reference to the node running the visual script. + +**Input Ports:** + +none + +**Output Ports:** + +- Data (object): ``instance`` diff --git a/classes/class_visualscriptsequence.rst b/classes/class_visualscriptsequence.rst index 979b9a8d4..6d813a5a9 100644 --- a/classes/class_visualscriptsequence.rst +++ b/classes/class_visualscriptsequence.rst @@ -14,7 +14,7 @@ VisualScriptSequence Brief Description ----------------- - +Executes a series of Sequence ports. Member Functions ---------------- @@ -28,7 +28,24 @@ Member Functions Member Variables ---------------- -- :ref:`int` **steps** +- :ref:`int` **steps** - The number of steps in the sequence. + +Description +----------- + +Steps through a series of one or more output Sequence ports. The ``current`` data port outputs the currently executing item. + +**Input Ports:** + +- Sequence: ``in order`` + +**Output Ports:** + +- Sequence: ``1`` + +- Sequence: ``2 - n`` (optional) + +- Data (int): ``current`` Member Function Description --------------------------- diff --git a/classes/class_visualscriptswitch.rst b/classes/class_visualscriptswitch.rst index 7b46d0667..9b714b774 100644 --- a/classes/class_visualscriptswitch.rst +++ b/classes/class_visualscriptswitch.rst @@ -14,5 +14,28 @@ VisualScriptSwitch Brief Description ----------------- +Branches program flow based on a given input's value. +Description +----------- + +Branches the flow based on an input's value. Use "Case Count" in the Inspector to set the number of branches and each comparison's optional type. + +**Input Ports:** + +- Sequence: ``'input' is`` + +- Data (variant): ``=`` + +- Data (variant): ``=`` (optional) + +- Data (variant): ``input`` + +**Output Ports:** + +- Sequence + +- Sequence (optional) + +- Sequence: ``done`` diff --git a/classes/class_visualscriptvariableget.rst b/classes/class_visualscriptvariableget.rst index 6adeb2631..58d1fa4ab 100644 --- a/classes/class_visualscriptvariableget.rst +++ b/classes/class_visualscriptvariableget.rst @@ -14,7 +14,7 @@ VisualScriptVariableGet Brief Description ----------------- - +Gets a variable's value. Member Functions ---------------- @@ -28,7 +28,20 @@ Member Functions Member Variables ---------------- -- :ref:`String` **var_name** +- :ref:`String` **var_name** - The variable's name. + +Description +----------- + +Returns a variable's value. "Var Name" must be supplied, with an optional type. + +**Input Ports:** + +none + +**Output Ports:** + +- Data (variant): ``value`` Member Function Description --------------------------- diff --git a/classes/class_visualscriptvariableset.rst b/classes/class_visualscriptvariableset.rst index 28d214902..1221e623c 100644 --- a/classes/class_visualscriptvariableset.rst +++ b/classes/class_visualscriptvariableset.rst @@ -14,7 +14,7 @@ VisualScriptVariableSet Brief Description ----------------- - +Changes a variable's value. Member Functions ---------------- @@ -28,7 +28,22 @@ Member Functions Member Variables ---------------- -- :ref:`String` **var_name** +- :ref:`String` **var_name** - The variable's name. + +Description +----------- + +Changes a variable's value to the given input. + +**Input Ports:** + +- Sequence + +- Data (variant): ``set`` + +**Output Ports:** + +- Sequence Member Function Description --------------------------- diff --git a/classes/class_visualscriptwhile.rst b/classes/class_visualscriptwhile.rst index 9afe510e8..150730c37 100644 --- a/classes/class_visualscriptwhile.rst +++ b/classes/class_visualscriptwhile.rst @@ -14,5 +14,22 @@ VisualScriptWhile Brief Description ----------------- +Conditional loop. +Description +----------- + +Loops while a condition is ``true``. Execution continues out the ``exit`` Sequence port when the loop terminates. + +**Input Ports:** + +- Sequence: ``while(cond)`` + +- Data (bool): ``cond`` + +**Output Ports:** + +- Sequence: ``repeat`` + +- Sequence: ``exit`` diff --git a/classes/class_visualserver.rst b/classes/class_visualserver.rst index 542b938ed..39682ba55 100644 --- a/classes/class_visualserver.rst +++ b/classes/class_visualserver.rst @@ -19,25 +19,517 @@ Server for anything visible. Member Functions ---------------- -+------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_draw` **(** **)** | -+------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_sync` **(** **)** | -+------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_create` **(** **)** | -+------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`texture_create_from_image` **(** :ref:`Image` image, :ref:`int` flags=7 **)** | -+------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`texture_get_flags` **(** :ref:`RID` texture **)** const | -+------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`texture_get_height` **(** :ref:`RID` texture **)** const | -+------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`texture_get_width` **(** :ref:`RID` texture **)** const | -+------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_set_flags` **(** :ref:`RID` texture, :ref:`int` flags **)** | -+------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`texture_set_shrink_all_x2_on_set_data` **(** :ref:`bool` shrink **)** | -+------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`black_bars_set_images` **(** :ref:`RID` left, :ref:`RID` top, :ref:`RID` right, :ref:`RID` bottom **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`black_bars_set_margins` **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_circle` **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_clip_ignore` **(** :ref:`RID` item, :ref:`bool` ignore **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_line` **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_mesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` skeleton **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_multimesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` skeleton **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_nine_patch` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`int` x_axis_mode=0, :ref:`int` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`RID` normal_map **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_particles` **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture, :ref:`RID` normal_map, :ref:`int` h_frames, :ref:`int` v_frames **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_polygon` **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`RID` texture, :ref:`RID` normal_map, :ref:`bool` antialiased=false **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_polyline` **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_primitive` **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs, :ref:`RID` texture, :ref:`float` width=1.0, :ref:`RID` normal_map **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Color` color **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_texture_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`bool` transpose=false, :ref:`RID` normal_map **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`bool` transpose=false, :ref:`RID` normal_map, :ref:`bool` clip_uv=true **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_triangle_array` **(** :ref:`RID` item, :ref:`PoolIntArray` indices, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`RID` texture, :ref:`int` count=-1, :ref:`RID` normal_map **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_clear` **(** :ref:`RID` item **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_item_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_clip` **(** :ref:`RID` item, :ref:`bool` clip **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_copy_to_backbuffer` **(** :ref:`RID` item, :ref:`bool` enabled, :ref:`Rect2` rect **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_custom_rect` **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2( 0, 0, 0, 0 ) **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_distance_field_mode` **(** :ref:`RID` item, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_draw_behind_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_draw_index` **(** :ref:`RID` item, :ref:`int` index **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_light_mask` **(** :ref:`RID` item, :ref:`int` mask **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_material` **(** :ref:`RID` item, :ref:`RID` material **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_parent` **(** :ref:`RID` item, :ref:`RID` parent **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_self_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_sort_children_by_y` **(** :ref:`RID` item, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_use_parent_material` **(** :ref:`RID` item, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_visible` **(** :ref:`RID` item, :ref:`bool` visible **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_z` **(** :ref:`RID` item, :ref:`int` z **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_z_as_relative_to_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_attach_to_canvas` **(** :ref:`RID` light, :ref:`RID` canvas **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_light_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_attach_to_canvas` **(** :ref:`RID` occluder, :ref:`RID` canvas **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_light_occluder_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_set_enabled` **(** :ref:`RID` occluder, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_set_light_mask` **(** :ref:`RID` occluder, :ref:`int` mask **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_set_polygon` **(** :ref:`RID` occluder, :ref:`RID` polygon **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_occluder_set_transform` **(** :ref:`RID` occluder, :ref:`Transform2D` transform **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_color` **(** :ref:`RID` light, :ref:`Color` color **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_energy` **(** :ref:`RID` light, :ref:`float` energy **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_height` **(** :ref:`RID` light, :ref:`float` height **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_item_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_item_shadow_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_layer_range` **(** :ref:`RID` light, :ref:`int` min_layer, :ref:`int` max_layer **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_mode` **(** :ref:`RID` light, :ref:`int` mode **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_scale` **(** :ref:`RID` light, :ref:`float` scale **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_shadow_buffer_size` **(** :ref:`RID` light, :ref:`int` size **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_shadow_color` **(** :ref:`RID` light, :ref:`Color` color **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_shadow_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_shadow_filter` **(** :ref:`RID` light, :ref:`int` filter **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_shadow_gradient_length` **(** :ref:`RID` light, :ref:`float` length **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_shadow_smooth` **(** :ref:`RID` light, :ref:`float` smooth **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_texture` **(** :ref:`RID` light, :ref:`RID` texture **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_texture_offset` **(** :ref:`RID` light, :ref:`Vector2` offset **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_transform` **(** :ref:`RID` light, :ref:`Transform2D` transform **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_light_set_z_range` **(** :ref:`RID` light, :ref:`int` min_z, :ref:`int` max_z **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_occluder_polygon_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_occluder_polygon_set_cull_mode` **(** :ref:`RID` occluder_polygon, :ref:`int` mode **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_occluder_polygon_set_shape` **(** :ref:`RID` occluder_polygon, :ref:`PoolVector2Array` shape, :ref:`bool` closed **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_occluder_polygon_set_shape_as_lines` **(** :ref:`RID` occluder_polygon, :ref:`PoolVector2Array` shape **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_set_item_mirroring` **(** :ref:`RID` canvas, :ref:`RID` item, :ref:`Vector2` mirroring **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_set_modulate` **(** :ref:`RID` canvas, :ref:`Color` color **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`finish` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_draw` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_sync` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`free` **(** :ref:`RID` rid **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_render_info` **(** :ref:`int` info **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_test_cube` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_test_texture` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_white_texture` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_changed` **(** **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_feature` **(** :ref:`int` feature **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_os_feature` **(** :ref:`String` feature **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`init` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`make_sphere_mesh` **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`material_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`material_get_param` **(** :ref:`RID` material, :ref:`String` parameter **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`material_get_shader` **(** :ref:`RID` shader_material **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_line_width` **(** :ref:`RID` material, :ref:`float` width **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_next_pass` **(** :ref:`RID` material, :ref:`RID` next_material **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_param` **(** :ref:`RID` material, :ref:`String` parameter, :ref:`Variant` value **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_render_priority` **(** :ref:`RID` material, :ref:`int` priority **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_shader` **(** :ref:`RID` shader_material, :ref:`RID` shader **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_add_surface_from_arrays` **(** :ref:`RID` mesh, :ref:`int` primtive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[ ], :ref:`int` compress_format=97792 **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_clear` **(** :ref:`RID` mesh **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`mesh_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_get_blend_shape_count` **(** :ref:`RID` mesh **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_get_blend_shape_mode` **(** :ref:`RID` mesh **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect3` | :ref:`mesh_get_custom_aabb` **(** :ref:`RID` mesh **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_get_surface_count` **(** :ref:`RID` mesh **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_remove_surface` **(** :ref:`RID` mesh, :ref:`int` index **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_set_blend_shape_count` **(** :ref:`RID` mesh, :ref:`int` amount **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_set_blend_shape_mode` **(** :ref:`RID` mesh, :ref:`int` mode **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_set_custom_aabb` **(** :ref:`RID` mesh, :ref:`Rect3` aabb **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect3` | :ref:`mesh_surface_get_aabb` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolByteArray` | :ref:`mesh_surface_get_array` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_array_index_len` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_array_len` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`mesh_surface_get_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`mesh_surface_get_blend_shape_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_format` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolByteArray` | :ref:`mesh_surface_get_index_array` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`mesh_surface_get_material` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_primitive_type` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`mesh_surface_get_skeleton_aabb` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_surface_set_material` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`RID` material **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`request_frame_drawn_callback` **(** :ref:`Object` where, :ref:`String` method, :ref:`Variant` userdata **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_boot_image` **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_debug_generate_wireframes` **(** :ref:`bool` generate **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_clear_color` **(** :ref:`Color` color **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`shader_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`shader_get_code` **(** :ref:`RID` shader **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`shader_get_default_texture_param` **(** :ref:`RID` shader, :ref:`String` name **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`shader_get_param_list` **(** :ref:`RID` shader **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shader_set_code` **(** :ref:`RID` shader, :ref:`String` code **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shader_set_default_texture_param` **(** :ref:`RID` shader, :ref:`String` name, :ref:`RID` texture **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`sky_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sky_set_texture` **(** :ref:`RID` sky, :ref:`RID` cube_map, :ref:`int` radiance_size **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sync` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_allocate` **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height, :ref:`int` format, :ref:`int` flags=7 **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_create_from_image` **(** :ref:`Image` image, :ref:`int` flags=7 **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`texture_debug_usage` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`texture_get_data` **(** :ref:`RID` texture, :ref:`int` cube_side=0 **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`texture_get_flags` **(** :ref:`RID` texture **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`texture_get_format` **(** :ref:`RID` texture **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`texture_get_height` **(** :ref:`RID` texture **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`texture_get_path` **(** :ref:`RID` texture **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`texture_get_texid` **(** :ref:`RID` texture **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`texture_get_width` **(** :ref:`RID` texture **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_set_data` **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` cube_side=0 **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_set_flags` **(** :ref:`RID` texture, :ref:`int` flags **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_set_path` **(** :ref:`RID` texture, :ref:`String` path **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_set_shrink_all_x2_on_set_data` **(** :ref:`bool` shrink **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_set_size_override` **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`textures_keep_original` **(** :ref:`bool` enable **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_attach_camera` **(** :ref:`RID` viewport, :ref:`RID` camera **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_attach_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_attach_to_screen` **(** :ref:`RID` viewport, :ref:`Rect2` rect=Rect2( 0, 0, 0, 0 ), :ref:`int` screen=0 **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`viewport_create` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_detach` **(** :ref:`RID` viewport **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`viewport_get_render_info` **(** :ref:`RID` viewport, :ref:`int` info **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`viewport_get_texture` **(** :ref:`RID` viewport **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_remove_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_active` **(** :ref:`RID` viewport, :ref:`bool` active **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_canvas_layer` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`int` layer **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_canvas_transform` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`Transform2D` offset **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_clear_mode` **(** :ref:`RID` viewport, :ref:`int` clear_mode **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_debug_draw` **(** :ref:`RID` viewport, :ref:`int` draw **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_disable_3d` **(** :ref:`RID` viewport, :ref:`bool` disabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_disable_environment` **(** :ref:`RID` viewport, :ref:`bool` disabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_global_canvas_transform` **(** :ref:`RID` viewport, :ref:`Transform2D` transform **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_hdr` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_hide_canvas` **(** :ref:`RID` viewport, :ref:`bool` hidden **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_hide_scenario` **(** :ref:`RID` viewport, :ref:`bool` hidden **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_msaa` **(** :ref:`RID` viewport, :ref:`int` msaa **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_parent_viewport` **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_scenario` **(** :ref:`RID` viewport, :ref:`RID` scenario **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_shadow_atlas_quadrant_subdivision` **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_shadow_atlas_size` **(** :ref:`RID` viewport, :ref:`int` size **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_size` **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_transparent_background` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_update_mode` **(** :ref:`RID` viewport, :ref:`int` update_mode **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_usage` **(** :ref:`RID` viewport, :ref:`int` usage **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_use_arvr` **(** :ref:`RID` viewport, :ref:`bool` use_arvr **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_vflip` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **NO_INDEX_ARRAY** = **-1** +- **ARRAY_WEIGHTS_SIZE** = **4** +- **CANVAS_ITEM_Z_MIN** = **-4096** +- **CANVAS_ITEM_Z_MAX** = **4096** +- **MAX_GLOW_LEVELS** = **7** +- **MAX_CURSORS** = **8** +- **MATERIAL_RENDER_PRIORITY_MIN** = **-128** +- **MATERIAL_RENDER_PRIORITY_MAX** = **127** +- **CUBEMAP_LEFT** = **0** +- **CUBEMAP_RIGHT** = **1** +- **CUBEMAP_BOTTOM** = **2** +- **CUBEMAP_TOP** = **3** +- **CUBEMAP_FRONT** = **4** +- **CUBEMAP_BACK** = **5** +- **TEXTURE_FLAG_MIPMAPS** = **1** +- **TEXTURE_FLAG_REPEAT** = **2** +- **TEXTURE_FLAG_FILTER** = **4** +- **TEXTURE_FLAG_ANISOTROPIC_FILTER** = **8** +- **TEXTURE_FLAG_CONVERT_TO_LINEAR** = **16** +- **TEXTURE_FLAG_MIRRORED_REPEAT** = **32** +- **TEXTURE_FLAG_CUBEMAP** = **2048** +- **TEXTURE_FLAG_USED_FOR_STREAMING** = **4096** +- **TEXTURE_FLAGS_DEFAULT** = **7** +- **SHADER_SPATIAL** = **0** +- **SHADER_CANVAS_ITEM** = **1** +- **SHADER_PARTICLES** = **2** +- **SHADER_MAX** = **3** +- **ARRAY_VERTEX** = **0** +- **ARRAY_NORMAL** = **1** +- **ARRAY_TANGENT** = **2** +- **ARRAY_COLOR** = **3** +- **ARRAY_TEX_UV** = **4** +- **ARRAY_TEX_UV2** = **5** +- **ARRAY_BONES** = **6** +- **ARRAY_WEIGHTS** = **7** +- **ARRAY_INDEX** = **8** +- **ARRAY_MAX** = **9** +- **ARRAY_FORMAT_VERTEX** = **1** +- **ARRAY_FORMAT_NORMAL** = **2** +- **ARRAY_FORMAT_TANGENT** = **4** +- **ARRAY_FORMAT_COLOR** = **8** +- **ARRAY_FORMAT_TEX_UV** = **16** +- **ARRAY_FORMAT_TEX_UV2** = **32** +- **ARRAY_FORMAT_BONES** = **64** +- **ARRAY_FORMAT_WEIGHTS** = **128** +- **ARRAY_FORMAT_INDEX** = **256** +- **ARRAY_COMPRESS_BASE** = **9** +- **ARRAY_COMPRESS_VERTEX** = **512** +- **ARRAY_COMPRESS_NORMAL** = **1024** +- **ARRAY_COMPRESS_TANGENT** = **2048** +- **ARRAY_COMPRESS_COLOR** = **4096** +- **ARRAY_COMPRESS_TEX_UV** = **8192** +- **ARRAY_COMPRESS_TEX_UV2** = **16384** +- **ARRAY_COMPRESS_BONES** = **32768** +- **ARRAY_COMPRESS_WEIGHTS** = **65536** +- **ARRAY_COMPRESS_INDEX** = **131072** +- **ARRAY_FLAG_USE_2D_VERTICES** = **262144** +- **ARRAY_FLAG_USE_16_BIT_BONES** = **524288** +- **ARRAY_COMPRESS_DEFAULT** = **97792** +- **PRIMITIVE_POINTS** = **0** +- **PRIMITIVE_LINES** = **1** +- **PRIMITIVE_LINE_STRIP** = **2** +- **PRIMITIVE_LINE_LOOP** = **3** +- **PRIMITIVE_TRIANGLES** = **4** +- **PRIMITIVE_TRIANGLE_STRIP** = **5** +- **PRIMITIVE_TRIANGLE_FAN** = **6** +- **PRIMITIVE_MAX** = **7** +- **BLEND_SHAPE_MODE_NORMALIZED** = **0** +- **BLEND_SHAPE_MODE_RELATIVE** = **1** +- **LIGHT_DIRECTIONAL** = **0** +- **LIGHT_OMNI** = **1** +- **LIGHT_SPOT** = **2** +- **LIGHT_PARAM_ENERGY** = **0** +- **LIGHT_PARAM_SPECULAR** = **1** +- **LIGHT_PARAM_RANGE** = **2** +- **LIGHT_PARAM_ATTENUATION** = **3** +- **LIGHT_PARAM_SPOT_ANGLE** = **4** +- **LIGHT_PARAM_SPOT_ATTENUATION** = **5** +- **LIGHT_PARAM_CONTACT_SHADOW_SIZE** = **6** +- **LIGHT_PARAM_SHADOW_MAX_DISTANCE** = **7** +- **LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET** = **8** +- **LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET** = **9** +- **LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET** = **10** +- **LIGHT_PARAM_SHADOW_NORMAL_BIAS** = **11** +- **LIGHT_PARAM_SHADOW_BIAS** = **12** +- **LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE** = **13** +- **LIGHT_PARAM_MAX** = **14** +- **VIEWPORT_UPDATE_DISABLED** = **0** +- **VIEWPORT_UPDATE_ONCE** = **1** +- **VIEWPORT_UPDATE_WHEN_VISIBLE** = **2** +- **VIEWPORT_UPDATE_ALWAYS** = **3** +- **VIEWPORT_CLEAR_ALWAYS** = **0** +- **VIEWPORT_CLEAR_NEVER** = **1** +- **VIEWPORT_CLEAR_ONLY_NEXT_FRAME** = **2** +- **VIEWPORT_MSAA_DISABLED** = **0** +- **VIEWPORT_MSAA_2X** = **1** +- **VIEWPORT_MSAA_4X** = **2** +- **VIEWPORT_MSAA_8X** = **3** +- **VIEWPORT_MSAA_16X** = **4** +- **VIEWPORT_USAGE_2D** = **0** +- **VIEWPORT_USAGE_2D_NO_SAMPLING** = **1** +- **VIEWPORT_USAGE_3D** = **2** +- **VIEWPORT_USAGE_3D_NO_EFFECTS** = **3** +- **VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME** = **0** +- **VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME** = **1** +- **VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME** = **2** +- **VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME** = **3** +- **VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME** = **4** +- **VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME** = **5** +- **VIEWPORT_RENDER_INFO_MAX** = **6** +- **VIEWPORT_DEBUG_DRAW_DISABLED** = **0** +- **VIEWPORT_DEBUG_DRAW_UNSHADED** = **1** +- **VIEWPORT_DEBUG_DRAW_OVERDRAW** = **2** +- **VIEWPORT_DEBUG_DRAW_WIREFRAME** = **3** +- **SCENARIO_DEBUG_DISABLED** = **0** +- **SCENARIO_DEBUG_WIREFRAME** = **1** +- **SCENARIO_DEBUG_OVERDRAW** = **2** +- **SCENARIO_DEBUG_SHADELESS** = **3** +- **INSTANCE_NONE** = **0** +- **INSTANCE_MESH** = **1** +- **INSTANCE_MULTIMESH** = **2** +- **INSTANCE_IMMEDIATE** = **3** +- **INSTANCE_PARTICLES** = **4** +- **INSTANCE_LIGHT** = **5** +- **INSTANCE_REFLECTION_PROBE** = **6** +- **INSTANCE_GI_PROBE** = **7** +- **INSTANCE_MAX** = **8** +- **INSTANCE_GEOMETRY_MASK** = **30** +- **NINE_PATCH_STRETCH** = **0** +- **NINE_PATCH_TILE** = **1** +- **NINE_PATCH_TILE_FIT** = **2** +- **CANVAS_LIGHT_MODE_ADD** = **0** +- **CANVAS_LIGHT_MODE_SUB** = **1** +- **CANVAS_LIGHT_MODE_MIX** = **2** +- **CANVAS_LIGHT_MODE_MASK** = **3** +- **CANVAS_LIGHT_FILTER_NONE** = **0** +- **CANVAS_LIGHT_FILTER_PCF3** = **1** +- **CANVAS_LIGHT_FILTER_PCF5** = **2** +- **CANVAS_LIGHT_FILTER_PCF7** = **3** +- **CANVAS_LIGHT_FILTER_PCF9** = **4** +- **CANVAS_LIGHT_FILTER_PCF13** = **5** +- **CANVAS_OCCLUDER_POLYGON_CULL_DISABLED** = **0** +- **CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE** = **1** +- **CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE** = **2** +- **INFO_OBJECTS_IN_FRAME** = **0** +- **INFO_VERTICES_IN_FRAME** = **1** +- **INFO_MATERIAL_CHANGES_IN_FRAME** = **2** +- **INFO_SHADER_CHANGES_IN_FRAME** = **3** +- **INFO_SURFACE_CHANGES_IN_FRAME** = **4** +- **INFO_DRAW_CALLS_IN_FRAME** = **5** +- **INFO_USAGE_VIDEO_MEM_TOTAL** = **6** +- **INFO_VIDEO_MEM_USED** = **7** +- **INFO_TEXTURE_MEM_USED** = **8** +- **INFO_VERTEX_MEM_USED** = **9** +- **FEATURE_SHADERS** = **0** +- **FEATURE_MULTITHREADED** = **1** Description ----------- @@ -49,6 +541,294 @@ The visual server is completely opaque, the internals are entirely implementatio Member Function Description --------------------------- +.. _class_VisualServer_black_bars_set_images: + +- void **black_bars_set_images** **(** :ref:`RID` left, :ref:`RID` top, :ref:`RID` right, :ref:`RID` bottom **)** + +.. _class_VisualServer_black_bars_set_margins: + +- void **black_bars_set_margins** **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** + +.. _class_VisualServer_canvas_create: + +- :ref:`RID` **canvas_create** **(** **)** + +.. _class_VisualServer_canvas_item_add_circle: + +- void **canvas_item_add_circle** **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** + +.. _class_VisualServer_canvas_item_add_clip_ignore: + +- void **canvas_item_add_clip_ignore** **(** :ref:`RID` item, :ref:`bool` ignore **)** + +.. _class_VisualServer_canvas_item_add_line: + +- void **canvas_item_add_line** **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** + +.. _class_VisualServer_canvas_item_add_mesh: + +- void **canvas_item_add_mesh** **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` skeleton **)** + +.. _class_VisualServer_canvas_item_add_multimesh: + +- void **canvas_item_add_multimesh** **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` skeleton **)** + +.. _class_VisualServer_canvas_item_add_nine_patch: + +- void **canvas_item_add_nine_patch** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`int` x_axis_mode=0, :ref:`int` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`RID` normal_map **)** + +.. _class_VisualServer_canvas_item_add_particles: + +- void **canvas_item_add_particles** **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture, :ref:`RID` normal_map, :ref:`int` h_frames, :ref:`int` v_frames **)** + +.. _class_VisualServer_canvas_item_add_polygon: + +- void **canvas_item_add_polygon** **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`RID` texture, :ref:`RID` normal_map, :ref:`bool` antialiased=false **)** + +.. _class_VisualServer_canvas_item_add_polyline: + +- void **canvas_item_add_polyline** **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** + +.. _class_VisualServer_canvas_item_add_primitive: + +- void **canvas_item_add_primitive** **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs, :ref:`RID` texture, :ref:`float` width=1.0, :ref:`RID` normal_map **)** + +.. _class_VisualServer_canvas_item_add_rect: + +- void **canvas_item_add_rect** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Color` color **)** + +.. _class_VisualServer_canvas_item_add_set_transform: + +- void **canvas_item_add_set_transform** **(** :ref:`RID` item, :ref:`Transform2D` transform **)** + +.. _class_VisualServer_canvas_item_add_texture_rect: + +- void **canvas_item_add_texture_rect** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`bool` transpose=false, :ref:`RID` normal_map **)** + +.. _class_VisualServer_canvas_item_add_texture_rect_region: + +- void **canvas_item_add_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`bool` transpose=false, :ref:`RID` normal_map, :ref:`bool` clip_uv=true **)** + +.. _class_VisualServer_canvas_item_add_triangle_array: + +- void **canvas_item_add_triangle_array** **(** :ref:`RID` item, :ref:`PoolIntArray` indices, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`RID` texture, :ref:`int` count=-1, :ref:`RID` normal_map **)** + +.. _class_VisualServer_canvas_item_clear: + +- void **canvas_item_clear** **(** :ref:`RID` item **)** + +.. _class_VisualServer_canvas_item_create: + +- :ref:`RID` **canvas_item_create** **(** **)** + +.. _class_VisualServer_canvas_item_set_clip: + +- void **canvas_item_set_clip** **(** :ref:`RID` item, :ref:`bool` clip **)** + +.. _class_VisualServer_canvas_item_set_copy_to_backbuffer: + +- void **canvas_item_set_copy_to_backbuffer** **(** :ref:`RID` item, :ref:`bool` enabled, :ref:`Rect2` rect **)** + +.. _class_VisualServer_canvas_item_set_custom_rect: + +- void **canvas_item_set_custom_rect** **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2( 0, 0, 0, 0 ) **)** + +.. _class_VisualServer_canvas_item_set_distance_field_mode: + +- void **canvas_item_set_distance_field_mode** **(** :ref:`RID` item, :ref:`bool` enabled **)** + +.. _class_VisualServer_canvas_item_set_draw_behind_parent: + +- void **canvas_item_set_draw_behind_parent** **(** :ref:`RID` item, :ref:`bool` enabled **)** + +.. _class_VisualServer_canvas_item_set_draw_index: + +- void **canvas_item_set_draw_index** **(** :ref:`RID` item, :ref:`int` index **)** + +.. _class_VisualServer_canvas_item_set_light_mask: + +- void **canvas_item_set_light_mask** **(** :ref:`RID` item, :ref:`int` mask **)** + +.. _class_VisualServer_canvas_item_set_material: + +- void **canvas_item_set_material** **(** :ref:`RID` item, :ref:`RID` material **)** + +.. _class_VisualServer_canvas_item_set_modulate: + +- void **canvas_item_set_modulate** **(** :ref:`RID` item, :ref:`Color` color **)** + +.. _class_VisualServer_canvas_item_set_parent: + +- void **canvas_item_set_parent** **(** :ref:`RID` item, :ref:`RID` parent **)** + +.. _class_VisualServer_canvas_item_set_self_modulate: + +- void **canvas_item_set_self_modulate** **(** :ref:`RID` item, :ref:`Color` color **)** + +.. _class_VisualServer_canvas_item_set_sort_children_by_y: + +- void **canvas_item_set_sort_children_by_y** **(** :ref:`RID` item, :ref:`bool` enabled **)** + +.. _class_VisualServer_canvas_item_set_transform: + +- void **canvas_item_set_transform** **(** :ref:`RID` item, :ref:`Transform2D` transform **)** + +.. _class_VisualServer_canvas_item_set_use_parent_material: + +- void **canvas_item_set_use_parent_material** **(** :ref:`RID` item, :ref:`bool` enabled **)** + +.. _class_VisualServer_canvas_item_set_visible: + +- void **canvas_item_set_visible** **(** :ref:`RID` item, :ref:`bool` visible **)** + +.. _class_VisualServer_canvas_item_set_z: + +- void **canvas_item_set_z** **(** :ref:`RID` item, :ref:`int` z **)** + +.. _class_VisualServer_canvas_item_set_z_as_relative_to_parent: + +- void **canvas_item_set_z_as_relative_to_parent** **(** :ref:`RID` item, :ref:`bool` enabled **)** + +.. _class_VisualServer_canvas_light_attach_to_canvas: + +- void **canvas_light_attach_to_canvas** **(** :ref:`RID` light, :ref:`RID` canvas **)** + +.. _class_VisualServer_canvas_light_create: + +- :ref:`RID` **canvas_light_create** **(** **)** + +.. _class_VisualServer_canvas_light_occluder_attach_to_canvas: + +- void **canvas_light_occluder_attach_to_canvas** **(** :ref:`RID` occluder, :ref:`RID` canvas **)** + +.. _class_VisualServer_canvas_light_occluder_create: + +- :ref:`RID` **canvas_light_occluder_create** **(** **)** + +.. _class_VisualServer_canvas_light_occluder_set_enabled: + +- void **canvas_light_occluder_set_enabled** **(** :ref:`RID` occluder, :ref:`bool` enabled **)** + +.. _class_VisualServer_canvas_light_occluder_set_light_mask: + +- void **canvas_light_occluder_set_light_mask** **(** :ref:`RID` occluder, :ref:`int` mask **)** + +.. _class_VisualServer_canvas_light_occluder_set_polygon: + +- void **canvas_light_occluder_set_polygon** **(** :ref:`RID` occluder, :ref:`RID` polygon **)** + +.. _class_VisualServer_canvas_light_occluder_set_transform: + +- void **canvas_light_occluder_set_transform** **(** :ref:`RID` occluder, :ref:`Transform2D` transform **)** + +.. _class_VisualServer_canvas_light_set_color: + +- void **canvas_light_set_color** **(** :ref:`RID` light, :ref:`Color` color **)** + +.. _class_VisualServer_canvas_light_set_enabled: + +- void **canvas_light_set_enabled** **(** :ref:`RID` light, :ref:`bool` enabled **)** + +.. _class_VisualServer_canvas_light_set_energy: + +- void **canvas_light_set_energy** **(** :ref:`RID` light, :ref:`float` energy **)** + +.. _class_VisualServer_canvas_light_set_height: + +- void **canvas_light_set_height** **(** :ref:`RID` light, :ref:`float` height **)** + +.. _class_VisualServer_canvas_light_set_item_cull_mask: + +- void **canvas_light_set_item_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** + +.. _class_VisualServer_canvas_light_set_item_shadow_cull_mask: + +- void **canvas_light_set_item_shadow_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** + +.. _class_VisualServer_canvas_light_set_layer_range: + +- void **canvas_light_set_layer_range** **(** :ref:`RID` light, :ref:`int` min_layer, :ref:`int` max_layer **)** + +.. _class_VisualServer_canvas_light_set_mode: + +- void **canvas_light_set_mode** **(** :ref:`RID` light, :ref:`int` mode **)** + +.. _class_VisualServer_canvas_light_set_scale: + +- void **canvas_light_set_scale** **(** :ref:`RID` light, :ref:`float` scale **)** + +.. _class_VisualServer_canvas_light_set_shadow_buffer_size: + +- void **canvas_light_set_shadow_buffer_size** **(** :ref:`RID` light, :ref:`int` size **)** + +.. _class_VisualServer_canvas_light_set_shadow_color: + +- void **canvas_light_set_shadow_color** **(** :ref:`RID` light, :ref:`Color` color **)** + +.. _class_VisualServer_canvas_light_set_shadow_enabled: + +- void **canvas_light_set_shadow_enabled** **(** :ref:`RID` light, :ref:`bool` enabled **)** + +.. _class_VisualServer_canvas_light_set_shadow_filter: + +- void **canvas_light_set_shadow_filter** **(** :ref:`RID` light, :ref:`int` filter **)** + +.. _class_VisualServer_canvas_light_set_shadow_gradient_length: + +- void **canvas_light_set_shadow_gradient_length** **(** :ref:`RID` light, :ref:`float` length **)** + +.. _class_VisualServer_canvas_light_set_shadow_smooth: + +- void **canvas_light_set_shadow_smooth** **(** :ref:`RID` light, :ref:`float` smooth **)** + +.. _class_VisualServer_canvas_light_set_texture: + +- void **canvas_light_set_texture** **(** :ref:`RID` light, :ref:`RID` texture **)** + +.. _class_VisualServer_canvas_light_set_texture_offset: + +- void **canvas_light_set_texture_offset** **(** :ref:`RID` light, :ref:`Vector2` offset **)** + +.. _class_VisualServer_canvas_light_set_transform: + +- void **canvas_light_set_transform** **(** :ref:`RID` light, :ref:`Transform2D` transform **)** + +.. _class_VisualServer_canvas_light_set_z_range: + +- void **canvas_light_set_z_range** **(** :ref:`RID` light, :ref:`int` min_z, :ref:`int` max_z **)** + +.. _class_VisualServer_canvas_occluder_polygon_create: + +- :ref:`RID` **canvas_occluder_polygon_create** **(** **)** + +.. _class_VisualServer_canvas_occluder_polygon_set_cull_mode: + +- void **canvas_occluder_polygon_set_cull_mode** **(** :ref:`RID` occluder_polygon, :ref:`int` mode **)** + +.. _class_VisualServer_canvas_occluder_polygon_set_shape: + +- void **canvas_occluder_polygon_set_shape** **(** :ref:`RID` occluder_polygon, :ref:`PoolVector2Array` shape, :ref:`bool` closed **)** + +.. _class_VisualServer_canvas_occluder_polygon_set_shape_as_lines: + +- void **canvas_occluder_polygon_set_shape_as_lines** **(** :ref:`RID` occluder_polygon, :ref:`PoolVector2Array` shape **)** + +.. _class_VisualServer_canvas_set_item_mirroring: + +- void **canvas_set_item_mirroring** **(** :ref:`RID` canvas, :ref:`RID` item, :ref:`Vector2` mirroring **)** + +.. _class_VisualServer_canvas_set_modulate: + +- void **canvas_set_modulate** **(** :ref:`RID` canvas, :ref:`Color` color **)** + +.. _class_VisualServer_draw: + +- void **draw** **(** **)** + +.. _class_VisualServer_finish: + +- void **finish** **(** **)** + .. _class_VisualServer_force_draw: - void **force_draw** **(** **)** @@ -57,6 +837,230 @@ Member Function Description - void **force_sync** **(** **)** +.. _class_VisualServer_free: + +- void **free** **(** :ref:`RID` rid **)** + +.. _class_VisualServer_get_render_info: + +- :ref:`int` **get_render_info** **(** :ref:`int` info **)** + +.. _class_VisualServer_get_test_cube: + +- :ref:`RID` **get_test_cube** **(** **)** + +.. _class_VisualServer_get_test_texture: + +- :ref:`RID` **get_test_texture** **(** **)** + +.. _class_VisualServer_get_white_texture: + +- :ref:`RID` **get_white_texture** **(** **)** + +.. _class_VisualServer_has_changed: + +- :ref:`bool` **has_changed** **(** **)** const + +.. _class_VisualServer_has_feature: + +- :ref:`bool` **has_feature** **(** :ref:`int` feature **)** const + +.. _class_VisualServer_has_os_feature: + +- :ref:`bool` **has_os_feature** **(** :ref:`String` feature **)** const + +.. _class_VisualServer_init: + +- void **init** **(** **)** + +.. _class_VisualServer_make_sphere_mesh: + +- :ref:`RID` **make_sphere_mesh** **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** + +.. _class_VisualServer_material_create: + +- :ref:`RID` **material_create** **(** **)** + +.. _class_VisualServer_material_get_param: + +- :ref:`Variant` **material_get_param** **(** :ref:`RID` material, :ref:`String` parameter **)** const + +.. _class_VisualServer_material_get_shader: + +- :ref:`RID` **material_get_shader** **(** :ref:`RID` shader_material **)** const + +.. _class_VisualServer_material_set_line_width: + +- void **material_set_line_width** **(** :ref:`RID` material, :ref:`float` width **)** + +.. _class_VisualServer_material_set_next_pass: + +- void **material_set_next_pass** **(** :ref:`RID` material, :ref:`RID` next_material **)** + +.. _class_VisualServer_material_set_param: + +- void **material_set_param** **(** :ref:`RID` material, :ref:`String` parameter, :ref:`Variant` value **)** + +.. _class_VisualServer_material_set_render_priority: + +- void **material_set_render_priority** **(** :ref:`RID` material, :ref:`int` priority **)** + +.. _class_VisualServer_material_set_shader: + +- void **material_set_shader** **(** :ref:`RID` shader_material, :ref:`RID` shader **)** + +.. _class_VisualServer_mesh_add_surface_from_arrays: + +- void **mesh_add_surface_from_arrays** **(** :ref:`RID` mesh, :ref:`int` primtive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[ ], :ref:`int` compress_format=97792 **)** + +.. _class_VisualServer_mesh_clear: + +- void **mesh_clear** **(** :ref:`RID` mesh **)** + +.. _class_VisualServer_mesh_create: + +- :ref:`RID` **mesh_create** **(** **)** + +.. _class_VisualServer_mesh_get_blend_shape_count: + +- :ref:`int` **mesh_get_blend_shape_count** **(** :ref:`RID` mesh **)** const + +.. _class_VisualServer_mesh_get_blend_shape_mode: + +- :ref:`int` **mesh_get_blend_shape_mode** **(** :ref:`RID` mesh **)** const + +.. _class_VisualServer_mesh_get_custom_aabb: + +- :ref:`Rect3` **mesh_get_custom_aabb** **(** :ref:`RID` mesh **)** const + +.. _class_VisualServer_mesh_get_surface_count: + +- :ref:`int` **mesh_get_surface_count** **(** :ref:`RID` mesh **)** const + +.. _class_VisualServer_mesh_remove_surface: + +- void **mesh_remove_surface** **(** :ref:`RID` mesh, :ref:`int` index **)** + +.. _class_VisualServer_mesh_set_blend_shape_count: + +- void **mesh_set_blend_shape_count** **(** :ref:`RID` mesh, :ref:`int` amount **)** + +.. _class_VisualServer_mesh_set_blend_shape_mode: + +- void **mesh_set_blend_shape_mode** **(** :ref:`RID` mesh, :ref:`int` mode **)** + +.. _class_VisualServer_mesh_set_custom_aabb: + +- void **mesh_set_custom_aabb** **(** :ref:`RID` mesh, :ref:`Rect3` aabb **)** + +.. _class_VisualServer_mesh_surface_get_aabb: + +- :ref:`Rect3` **mesh_surface_get_aabb** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_get_array: + +- :ref:`PoolByteArray` **mesh_surface_get_array** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_get_array_index_len: + +- :ref:`int` **mesh_surface_get_array_index_len** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_get_array_len: + +- :ref:`int` **mesh_surface_get_array_len** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_get_arrays: + +- :ref:`Array` **mesh_surface_get_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_get_blend_shape_arrays: + +- :ref:`Array` **mesh_surface_get_blend_shape_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_get_format: + +- :ref:`int` **mesh_surface_get_format** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_get_index_array: + +- :ref:`PoolByteArray` **mesh_surface_get_index_array** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_get_material: + +- :ref:`RID` **mesh_surface_get_material** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_get_primitive_type: + +- :ref:`int` **mesh_surface_get_primitive_type** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_get_skeleton_aabb: + +- :ref:`Array` **mesh_surface_get_skeleton_aabb** **(** :ref:`RID` mesh, :ref:`int` surface **)** const + +.. _class_VisualServer_mesh_surface_set_material: + +- void **mesh_surface_set_material** **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`RID` material **)** + +.. _class_VisualServer_request_frame_drawn_callback: + +- void **request_frame_drawn_callback** **(** :ref:`Object` where, :ref:`String` method, :ref:`Variant` userdata **)** + +Schedules a callback to the corresponding named 'method' on 'where' after a frame has been drawn. + +The callback method must use only 1 argument which will be called with 'userdata'. + +.. _class_VisualServer_set_boot_image: + +- void **set_boot_image** **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale **)** + +.. _class_VisualServer_set_debug_generate_wireframes: + +- void **set_debug_generate_wireframes** **(** :ref:`bool` generate **)** + +.. _class_VisualServer_set_default_clear_color: + +- void **set_default_clear_color** **(** :ref:`Color` color **)** + +.. _class_VisualServer_shader_create: + +- :ref:`RID` **shader_create** **(** **)** + +.. _class_VisualServer_shader_get_code: + +- :ref:`String` **shader_get_code** **(** :ref:`RID` shader **)** const + +.. _class_VisualServer_shader_get_default_texture_param: + +- :ref:`RID` **shader_get_default_texture_param** **(** :ref:`RID` shader, :ref:`String` name **)** const + +.. _class_VisualServer_shader_get_param_list: + +- :ref:`Array` **shader_get_param_list** **(** :ref:`RID` shader **)** const + +.. _class_VisualServer_shader_set_code: + +- void **shader_set_code** **(** :ref:`RID` shader, :ref:`String` code **)** + +.. _class_VisualServer_shader_set_default_texture_param: + +- void **shader_set_default_texture_param** **(** :ref:`RID` shader, :ref:`String` name, :ref:`RID` texture **)** + +.. _class_VisualServer_sky_create: + +- :ref:`RID` **sky_create** **(** **)** + +.. _class_VisualServer_sky_set_texture: + +- void **sky_set_texture** **(** :ref:`RID` sky, :ref:`RID` cube_map, :ref:`int` radiance_size **)** + +.. _class_VisualServer_sync: + +- void **sync** **(** **)** + +.. _class_VisualServer_texture_allocate: + +- void **texture_allocate** **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height, :ref:`int` format, :ref:`int` flags=7 **)** + .. _class_VisualServer_texture_create: - :ref:`RID` **texture_create** **(** **)** @@ -65,24 +1069,180 @@ Member Function Description - :ref:`RID` **texture_create_from_image** **(** :ref:`Image` image, :ref:`int` flags=7 **)** +.. _class_VisualServer_texture_debug_usage: + +- :ref:`Array` **texture_debug_usage** **(** **)** + +.. _class_VisualServer_texture_get_data: + +- :ref:`Image` **texture_get_data** **(** :ref:`RID` texture, :ref:`int` cube_side=0 **)** const + .. _class_VisualServer_texture_get_flags: - :ref:`int` **texture_get_flags** **(** :ref:`RID` texture **)** const +.. _class_VisualServer_texture_get_format: + +- :ref:`int` **texture_get_format** **(** :ref:`RID` texture **)** const + .. _class_VisualServer_texture_get_height: - :ref:`int` **texture_get_height** **(** :ref:`RID` texture **)** const +.. _class_VisualServer_texture_get_path: + +- :ref:`String` **texture_get_path** **(** :ref:`RID` texture **)** const + +.. _class_VisualServer_texture_get_texid: + +- :ref:`int` **texture_get_texid** **(** :ref:`RID` texture **)** const + .. _class_VisualServer_texture_get_width: - :ref:`int` **texture_get_width** **(** :ref:`RID` texture **)** const +.. _class_VisualServer_texture_set_data: + +- void **texture_set_data** **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` cube_side=0 **)** + .. _class_VisualServer_texture_set_flags: - void **texture_set_flags** **(** :ref:`RID` texture, :ref:`int` flags **)** +.. _class_VisualServer_texture_set_path: + +- void **texture_set_path** **(** :ref:`RID` texture, :ref:`String` path **)** + .. _class_VisualServer_texture_set_shrink_all_x2_on_set_data: - void **texture_set_shrink_all_x2_on_set_data** **(** :ref:`bool` shrink **)** +.. _class_VisualServer_texture_set_size_override: + +- void **texture_set_size_override** **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height **)** + +.. _class_VisualServer_textures_keep_original: + +- void **textures_keep_original** **(** :ref:`bool` enable **)** + +.. _class_VisualServer_viewport_attach_camera: + +- void **viewport_attach_camera** **(** :ref:`RID` viewport, :ref:`RID` camera **)** + +.. _class_VisualServer_viewport_attach_canvas: + +- void **viewport_attach_canvas** **(** :ref:`RID` viewport, :ref:`RID` canvas **)** + +.. _class_VisualServer_viewport_attach_to_screen: + +- void **viewport_attach_to_screen** **(** :ref:`RID` viewport, :ref:`Rect2` rect=Rect2( 0, 0, 0, 0 ), :ref:`int` screen=0 **)** + +.. _class_VisualServer_viewport_create: + +- :ref:`RID` **viewport_create** **(** **)** + +.. _class_VisualServer_viewport_detach: + +- void **viewport_detach** **(** :ref:`RID` viewport **)** + +.. _class_VisualServer_viewport_get_render_info: + +- :ref:`int` **viewport_get_render_info** **(** :ref:`RID` viewport, :ref:`int` info **)** + +.. _class_VisualServer_viewport_get_texture: + +- :ref:`RID` **viewport_get_texture** **(** :ref:`RID` viewport **)** const + +.. _class_VisualServer_viewport_remove_canvas: + +- void **viewport_remove_canvas** **(** :ref:`RID` viewport, :ref:`RID` canvas **)** + +.. _class_VisualServer_viewport_set_active: + +- void **viewport_set_active** **(** :ref:`RID` viewport, :ref:`bool` active **)** + +.. _class_VisualServer_viewport_set_canvas_layer: + +- void **viewport_set_canvas_layer** **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`int` layer **)** + +.. _class_VisualServer_viewport_set_canvas_transform: + +- void **viewport_set_canvas_transform** **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`Transform2D` offset **)** + +.. _class_VisualServer_viewport_set_clear_mode: + +- void **viewport_set_clear_mode** **(** :ref:`RID` viewport, :ref:`int` clear_mode **)** + +.. _class_VisualServer_viewport_set_debug_draw: + +- void **viewport_set_debug_draw** **(** :ref:`RID` viewport, :ref:`int` draw **)** + +.. _class_VisualServer_viewport_set_disable_3d: + +- void **viewport_set_disable_3d** **(** :ref:`RID` viewport, :ref:`bool` disabled **)** + +.. _class_VisualServer_viewport_set_disable_environment: + +- void **viewport_set_disable_environment** **(** :ref:`RID` viewport, :ref:`bool` disabled **)** + +.. _class_VisualServer_viewport_set_global_canvas_transform: + +- void **viewport_set_global_canvas_transform** **(** :ref:`RID` viewport, :ref:`Transform2D` transform **)** + +.. _class_VisualServer_viewport_set_hdr: + +- void **viewport_set_hdr** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** + +.. _class_VisualServer_viewport_set_hide_canvas: + +- void **viewport_set_hide_canvas** **(** :ref:`RID` viewport, :ref:`bool` hidden **)** + +.. _class_VisualServer_viewport_set_hide_scenario: + +- void **viewport_set_hide_scenario** **(** :ref:`RID` viewport, :ref:`bool` hidden **)** + +.. _class_VisualServer_viewport_set_msaa: + +- void **viewport_set_msaa** **(** :ref:`RID` viewport, :ref:`int` msaa **)** + +.. _class_VisualServer_viewport_set_parent_viewport: + +- void **viewport_set_parent_viewport** **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** + +.. _class_VisualServer_viewport_set_scenario: + +- void **viewport_set_scenario** **(** :ref:`RID` viewport, :ref:`RID` scenario **)** + +.. _class_VisualServer_viewport_set_shadow_atlas_quadrant_subdivision: + +- void **viewport_set_shadow_atlas_quadrant_subdivision** **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** + +.. _class_VisualServer_viewport_set_shadow_atlas_size: + +- void **viewport_set_shadow_atlas_size** **(** :ref:`RID` viewport, :ref:`int` size **)** + +.. _class_VisualServer_viewport_set_size: + +- void **viewport_set_size** **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** + +.. _class_VisualServer_viewport_set_transparent_background: + +- void **viewport_set_transparent_background** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** + +.. _class_VisualServer_viewport_set_update_mode: + +- void **viewport_set_update_mode** **(** :ref:`RID` viewport, :ref:`int` update_mode **)** + +.. _class_VisualServer_viewport_set_usage: + +- void **viewport_set_usage** **(** :ref:`RID` viewport, :ref:`int` usage **)** + +.. _class_VisualServer_viewport_set_use_arvr: + +- void **viewport_set_use_arvr** **(** :ref:`RID` viewport, :ref:`bool` use_arvr **)** + +.. _class_VisualServer_viewport_set_vflip: + +- void **viewport_set_vflip** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** +